diff --git a/.travis.yml b/.travis.yml index c883e52b0..b1f9ca40c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ env: # Format quay image target - IMAGE_REPO_DRIVER=quay.io/${IMAGE_REPO_OWNER}/${REPO_NAME_DRIVER} - IMAGE_REPO_OPERATOR=quay.io/${IMAGE_REPO_OWNER}/${REPO_NAME_OPERATOR} + # Add image tag - IMAGE_TAG=$( if [[ $TRAVIS_EVENT_TYPE == 'cron' ]]; @@ -44,6 +45,11 @@ env: - BUILD_DIR_OPERATOR="${TRAVIS_BUILD_DIR}/operator" - BUILD_DIR_DRIVER="${TRAVIS_BUILD_DIR}/driver" + # For the quay app + - BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) + - OPERATOR_DIR=deploy/olm-catalog/ibm-spectrum-scale-csi-operator + - QUAY_NAMESPACE=${IMAGE_REPO_OWNER} + - PACKAGE_NAME=${REPO_NAME}-${BRANCH} # Operator ENV - OCTOKIT_API_ENDPOINT="https://github.ibm.com/api/v3/" @@ -72,6 +78,7 @@ stages: - test jobs: fast_finish: true + include: # Install operator-courier and run the lint on the manifest. @@ -156,7 +163,7 @@ jobs: on: all_branches: true condition: -n "$QUAY_BOT_USERNAME" && -n "$QUAY_BOT_PASSWORD" - + # stage: build - name: "Build - Operator: image and push to registry" install: @@ -172,10 +179,15 @@ jobs: - docker tag ${REPO_NAME_OPERATOR} ${IMAGE_FQN_OPERATOR} deploy: - provider: script - script: docker push ${IMAGE_FQN_OPERATOR} + script: docker push ${IMAGE_FQN_OPERATOR} on: all_branches: true condition: -n "$QUAY_BOT_USERNAME" && -n "$QUAY_BOT_PASSWORD" + - provider: script + script: ../tools/scripts/push_app.sh + on: + all_branches: true + condition: -n "$QUAY_BOT_USERNAME" && -n "$QUAY_BOT_PASSWORD" && -n "$QUAY_APP" # stage: build - name: "Build - Operator: docs" @@ -200,7 +212,7 @@ jobs: - docker tag ${REPO_NAME_OPERATOR} ${OPERATOR_LOCAL_IMAGE} script: # molecule - - python hacks/change_deploy_image.py -i ${OPERATOR_LOCAL_IMAGE} --ifnotpresent + - ansible-playbook hacks/change_deploy_image.yml --extra-vars "quay_operator_endpoint=${OPERATOR_LOCAL_IMAGE}" - kubectl create -f deploy/namespace.yaml - molecule test -s test-local # sc diff --git a/Makefile b/Makefile index b827938e5..0d67c8ff9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,3 @@ -<<<<<<< HEAD ############################################################################### # Licensed Materials - Property of IBM. # Copyright IBM Corporation 2017. All Rights Reserved. @@ -50,7 +49,7 @@ NAME=ibm-spectrum-scale-csi .PHONY: all $NAME -IMAGE_VERSION=v1.0.1 +IMAGE_VERSION=v1.1.0 IMAGE_NAME=$(NAME) all: $NAME diff --git a/OWNERS b/OWNERS new file mode 100644 index 000000000..e9996e8e6 --- /dev/null +++ b/OWNERS @@ -0,0 +1,18 @@ +filters: + ".*": + reviewers: + - edunn-us + approvers: + - edunn-us + + "driver/.*": + reviewers: + - edunn-us + approvers: + - edunn-us + + "operator/.*": + reviewers: + - edunn-us + approvers: + - edunn-us diff --git a/README.md b/README.md index 4da1b8b06..e6fcbf5dd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # IBM Spectrum Scale CSI (Container Storage Interface) -[![Documentation Status](https://readthedocs.org/projects/ibm-spectrum-scale-csi/badge/?version=latest)](https://ibm-spectrum-scale-csi.readthedocs.io/en/latest/?badge=latest) +[Official Knowledge Center Documentation](https://www.ibm.com/support/knowledgecenter/STXKQY_CSI_SHR) + The IBM Spectrum Scale Container Storage Interface (CSI) project enables container orchestrators, such as Kubernetes and OpenShift, to manage the life-cycle of persistent storage. @@ -11,20 +12,21 @@ If you are looking to deploy released versions of the IBM Spectrum Scale CSI Ope * OpenShift - Under Operator -> OperatorHub in the OpenShift Console, search 'IBM Spectrum Scale CSI" and install * Kubernetes - See the project on [OperatorHub.io - ibm-spectrum-scale-csi-operator](https://operatorhub.io/operator/ibm-spectrum-scale-csi-operator) -## Report Bugs +## Support -To file issues, suggestions, new features, etc., Open an [Issue](https://github.com/IBM/ibm-spectrum-scale-csi/issues). +IBM Spectrum Scale CSI driver is part of the IBM Spectrum Scale offering. Please follow the [IBM support procedure](https://www.ibm.com/mysupport/s/) for any issues with the driver. -## Getting Started and Documentation +## Report Bugs -To get started, see our [Documentation](https://ibm-spectrum-scale-csi.rtfd.io/) +For help with urgent situations, please use the IBM PMR process. All Spectrum Scale customers using CSI, +who also have ongoing support contracts, are entitled to the PMR process. Feature requests through the official RFE channels are also encouraged. + +For non-urgent issues, suggestions, recommendations, feel free to open an issue in [github](https://github.com/IBM/ibm-spectrum-scale-csi/issues). +Issues will be addressed as team availability permits. ## Contributing We welcome contributions to this project, see [Contributing](CONTRIBUTING.md) for more details. -## Troubleshooting - -See the [Troubleshooting](https://ibm-spectrum-scale-csi.readthedocs.io/en/latest/troubleshoot/index.html) section for more information. diff --git a/TESTCONFIG.md b/TESTCONFIG.md deleted file mode 100644 index a0abd7fbb..000000000 --- a/TESTCONFIG.md +++ /dev/null @@ -1,109 +0,0 @@ - - -## Environments in Test - - - - - -**Software components** - -|Component | Level |Comments | -|--|--|--| -|Spectrum Scale | 5.0.4.1 | x86_64 | -|OS | RHEL 7.5, RHEL 7.6, RHEL 7.7 worker nodes | | -|Kubernetes | 1.13, 1.14, 1.15, 1.16 | | -|Docker | 18.03, 18.06 | | -|OpenShift | 4.2 | | - - - - - -## Example Hardware Configs - - - -All examples below consider a non-production test environment: - - - -### Small virtual cluster testbed - -This environment assumes a minimum number of nodes to perform goodpath testing. Because this assumes a virtual environment, understand the [Spectrum Scale support statement for KVM / VMware clusters](https://www.ibm.com/support/knowledgecenter/STXKQY/gpfsclustersfaq.html?view=kc#virtual) - - - -| Node Type | # | Cores | RAM | HD | Spectrum Scale | K8s | -|--|--|--|--|--|--|--| -| **Master node** | 1x | 2core | 8GB | 50GB | do not install | required | -| **Worker node** | 2x | 2core | 16GB | 50GB | required | required | -| **GUI node** | 1x | 2core | 16GB | 50GB | required | do not install | -| **NSD node** | 2x | 2core | 8GB | 50GB | required | not recommended | - - - -- gpfs pagepool set to 2GB (*mmchconfig pagepool=2G*) - -- No other Spectrum Scale functions installed - -- Do not install Spectrum Scale on the Master node - -- Do not install Kubernetes on the GUI node - -- NSD nodes with shared disks (8x 10GB) for NSD and file system creation. Boost memory and cpu cores on NSD nodes if stacking K8s / Scale functionality - - -### OpenShift VMware testbed - -This environment assumes a minimum number of nodes to perform goodpath testing. Because this assumes a virtual environment, understand the [Spectrum Scale support statement for KVM / VMware clusters](https://www.ibm.com/support/knowledgecenter/STXKQY/gpfsclustersfaq.html?view=kc#virtual) - - - -| Node Type | # | Cores | RAM | HD | Spectrum Scale | K8s | -|--|--|--|--|--|--|--| -| **Master node** | 3x | 4core | 16GB | 120GB | do not install | required | -| **Infrastructure node** | 3x | 4core | 16GB | 120GB | required | required | -| **Worker node** | 3x | 2core | 16GB | 120GB | required | required | -| **GUI node** | 1x | 2core | 16GB | 50GB | required | do not install | -| **NSD node** | 2x | 2core | 16GB | 50GB | required | not recommended | - - - -- pagepool set to 8GB on workers, 4GB on NSD and GUI - -- No other Spectrum Scale functions installed - -- Master nodes will run RHCOS. Spectrum Scale is not supported on RHCOS nodes. Do not install Spectrum Scale on the master nodes. - -- Do not add Spectrum Scale GUI node to Openshift cluster - -- NSD nodes with shared disks (8x 10GB) for NSD and file system creation. Boost memory on NSD nodes if stacking K8s / Scale functionality - - - - - -### OpenShift baremetal testbed - - - -| Node Type | # | Cores | RAM | HD | Spectrum Scale | K8s | -|--|--|--|--|--|--|--| -| **Master node** | 3x | 2core | 64GB | 120GB | do not install | required | -| **Infrastructure node** | 3x | 4core | 64GB | 120GB | required | required | -| **Worker node** | 3x | 2core | 128GB | 120GB | required | required | -| **GUI node** | 1x | 2core | 32GB | 50GB | required | do not install | -| **NSD node** | 2x | 2core | 32GB | 50GB | required | not recommended | - - - -- pagepool set to 32GB on workers, 8GB on NSD and GUI - -- no other Spectrum Scale functions installed - -- Master nodes will run RHCOS. Spectrum Scale is not supported on RHCOS nodes. Do not install Spectrum Scale on the master nodes. - -- Do not add Spectrum Scale GUI node to Openshift cluster - -- NSD nodes with shared disks (8x 100GB) for NSD and file system creation. Boost memory and cpu cores on NSD nodes if stacking K8s / Scale functionality diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/case.yaml b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/case.yaml index d32c2ad6a..faa5affad 100644 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/case.yaml +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/case.yaml @@ -1,6 +1,6 @@ name: ibm-spectrum-scale-csi-operator specVersion: 1.0.0 -version: 1.0.0 +version: 1.1.0 appVersion: 1.0.0 description: "Represents a deployment of the IBM CSI Spectrum Scale driver." displayName: "IBM CSI Spectrum Scale Driver CASE" diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/files/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/files/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml new file mode 120000 index 000000000..993e42f09 --- /dev/null +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/files/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml @@ -0,0 +1 @@ +../../../../../../../operator/ibm-spectrum-scale-csi-operator/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml \ No newline at end of file diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/files/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/files/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml deleted file mode 120000 index 0d911044e..000000000 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/files/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../operator/ibm-spectrum-scale-csi-operator/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml \ No newline at end of file diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/files/manifest.yaml b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/files/manifest.yaml index 28b910e4b..0532d0956 100644 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/files/manifest.yaml +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/files/manifest.yaml @@ -9,4 +9,4 @@ ############################################################################### images: - - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.0 + - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.1.0 diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/resources.yaml b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/resources.yaml index a868cd9ec..5a7a93c19 100644 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/resources.yaml +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperator/resources.yaml @@ -7,6 +7,6 @@ resources: resourceDefs: files: - mediaType: application/vnd.case.resource.k8s.v1+yaml - ref: deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml + ref: deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml - mediaType: application/vnd.case.resource.image.manifest.v1 ref: manifest.yaml diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/files/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/files/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml new file mode 120000 index 000000000..b09747835 --- /dev/null +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/files/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml @@ -0,0 +1 @@ +../../../../../../../operator/ibm-spectrum-scale-csi-operator/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml \ No newline at end of file diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/files/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/files/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml deleted file mode 120000 index 398c0a2a2..000000000 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/files/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../operator/ibm-spectrum-scale-csi-operator/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml \ No newline at end of file diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/files/manifest.yaml b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/files/manifest.yaml index 28b910e4b..0532d0956 100644 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/files/manifest.yaml +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/files/manifest.yaml @@ -9,4 +9,4 @@ ############################################################################### images: - - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.0 + - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.1.0 diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/resources.yaml b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/resources.yaml index 650f401f8..8e2901ad4 100644 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/resources.yaml +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/case/ibm-spectrum-scale-csi-operator/inventory/ibmCSIScaleOperatorSetup/resources.yaml @@ -7,7 +7,7 @@ resources: resourceDefs: files: - mediaType: application/vnd.case.resource.k8s.v1+yaml - ref: deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml + ref: deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml - mediaType: application/vnd.case.resource.k8s.v1+yaml ref: deploy/operator.yaml - mediaType: application/vnd.case.resource.k8s.v1+yaml diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/delete/delete.sh b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/delete/delete.sh index 528b0b2fd..c6636b344 100755 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/delete/delete.sh +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/delete/delete.sh @@ -14,8 +14,8 @@ echo "deleteDir is " echo $deleteDir $APP_TEST_LIBRARY_FUNCTIONS/operatorDelete.sh \ --serviceaccount $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/service_account.yaml \ - --crd $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml \ - --cr $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml \ + --crd $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml \ + --cr $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml \ --role $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/role.yaml \ --rolebinding $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/role_binding.yaml \ --operator $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/operator.yaml \ diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/install/install.sh b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/install/install.sh index 228c961a5..b2ae76f85 100755 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/install/install.sh +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/install/install.sh @@ -12,4 +12,4 @@ operator=ibm-spectrum-scale-csi-operator installDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" $APP_TEST_LIBRARY_FUNCTIONS/operatorInstall.sh \ - --cr $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml + --cr $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/pre-install/pre-install.sh b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/pre-install/pre-install.sh index 0973521fa..42deddbb4 100755 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/pre-install/pre-install.sh +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-01/pre-install/pre-install.sh @@ -27,7 +27,7 @@ setNamespace ${CV_TEST_USER} ${CV_TEST_NAMESPACE} $APP_TEST_LIBRARY_FUNCTIONS/operatorDeployment.sh \ --serviceaccount $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/service_account.yaml \ - --crd $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml \ + --crd $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml \ --role $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/role.yaml \ --rolebinding $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/role_binding.yaml \ --operator $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/operator.yaml diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/delete/delete.sh b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/delete/delete.sh index 528b0b2fd..c6636b344 100755 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/delete/delete.sh +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/delete/delete.sh @@ -14,8 +14,8 @@ echo "deleteDir is " echo $deleteDir $APP_TEST_LIBRARY_FUNCTIONS/operatorDelete.sh \ --serviceaccount $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/service_account.yaml \ - --crd $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml \ - --cr $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml \ + --crd $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml \ + --cr $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml \ --role $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/role.yaml \ --rolebinding $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/role_binding.yaml \ --operator $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/operator.yaml \ diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/install/install.sh b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/install/install.sh index 228c961a5..b2ae76f85 100755 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/install/install.sh +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/install/install.sh @@ -12,4 +12,4 @@ operator=ibm-spectrum-scale-csi-operator installDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" $APP_TEST_LIBRARY_FUNCTIONS/operatorInstall.sh \ - --cr $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml + --cr $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml diff --git a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/pre-install/pre-install.sh b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/pre-install/pre-install.sh index 0973521fa..42deddbb4 100755 --- a/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/pre-install/pre-install.sh +++ b/cloudpak/stable/ibm-spectrum-scale-csi-operator-bundle/tests/test-02/pre-install/pre-install.sh @@ -27,7 +27,7 @@ setNamespace ${CV_TEST_USER} ${CV_TEST_NAMESPACE} $APP_TEST_LIBRARY_FUNCTIONS/operatorDeployment.sh \ --serviceaccount $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/service_account.yaml \ - --crd $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml \ + --crd $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml \ --role $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/role.yaml \ --rolebinding $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/role_binding.yaml \ --operator $CV_TEST_BUNDLE_DIR/operators/${operator}/deploy/operator.yaml diff --git a/cloudpak/stable/scripts/operator-push.sh b/cloudpak/stable/scripts/operator-push.sh deleted file mode 100755 index 06c30a093..000000000 --- a/cloudpak/stable/scripts/operator-push.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -x -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -cd ${DIR}/.. - -export OPERATOR_DIR=olm-catalog/ibm-spectrum-scale-csi-operator -export QUAY_NAMESPACE=mew2057 -export PACKAGE_NAME=ibm-spectrum-scale-csi-operator-app -export PACKAGE_VERSION=0.1.21 -export TOKEN=$(curl -sH "Content-Type: application/json" -XPOST https://quay.io/cnr/api/v1/users/login -d ' -{"user": {"username": "'"${QUAY_USERNAME}"'","password": "'"${QUAY_PASSWORD}"'"}}' | cut -d'"' -f4) - -#operator-courier verify --ui_validate_io "$OPERATOR_DIR" - -if [ $? -eq 0 ] -then - operator-courier push "$OPERATOR_DIR" "$QUAY_NAMESPACE" "$PACKAGE_NAME" "$PACKAGE_VERSION" "$TOKEN" -fi - - - diff --git a/docs/source/conf.py b/docs/source/conf.py index f7202dae1..90b6aee0f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,7 +24,7 @@ master_doc = 'index' # The full version, including alpha/beta/rc tags -release = '1.0.1' +release = '1.1.0' # -- General configuration --------------------------------------------------- diff --git a/docs/source/developers/cert.rst b/docs/source/developers/cert.rst new file mode 100644 index 000000000..c11c925e5 --- /dev/null +++ b/docs/source/developers/cert.rst @@ -0,0 +1,23 @@ +Cert Process +============ + +Creating the Pull Request +------------------------- + +1. Fork `https://github.ibm.com/IBMPrivateCloud/charts`_. +2. Clone the forked repository . +3. From the root dir (of this project) execute the following: + +.. code-block:: bash + + export CHARTS= + + cp -R -L cloudpak/ ${CHARTS} + cd ${CHARTS}/stable + + git checkout -b ibm-spectrum-scale-csi-operator-bundle + git add ibm-spectrum-scale-csi-operator-bundle + git commit -S -m "Some message" + git push origin ibm-spectrum-scale-csi-operator-bundle + +4. Follow standard Pull Request procedures. diff --git a/docs/source/developers/clone.rst b/docs/source/developers/clone.rst index 21bf08ed6..dcde0ef34 100644 --- a/docs/source/developers/clone.rst +++ b/docs/source/developers/clone.rst @@ -62,7 +62,7 @@ Driver cd ${DRIVER_DIR} # Build the container image - VERSION="v1.0.0" + VERSION="v1.1.0" docker build -t ibm-spectrum-scale-csi:${VERSION} -f Dockerfile.msb . # Save the image into a .tar file diff --git a/docs/source/developers/deployment.rst b/docs/source/developers/deployment.rst index 401702290..fc78ff907 100644 --- a/docs/source/developers/deployment.rst +++ b/docs/source/developers/deployment.rst @@ -48,7 +48,7 @@ Once you have a repository ready: # OPERATOR_DIR has been defined in previous steps cd ${OPERATOR_DIR} # Use a helper script to update your deployment to point at your operator image - hacks/change_deploy_image.py -i quay.io/${MYUSER}/ibm-spectrum-scale-csi-operator:${VERSION} + ansible-playbook hacks/change_deploy_image.yml --extra-vars "quay_operator_endpoint=quay.io/${MYUSER}/ibm-spectrum-scale-csi-operator:${VERSION}" Installing the CSI Operator @@ -66,7 +66,7 @@ Run the following to deploy the IBM Spectrum Scale CSI operator manually: kubectl apply -f ${OPERATOR_DIR}/deploy/role.yaml kubectl apply -f ${OPERATOR_DIR}/deploy/role_binding.yaml kubectl apply -f ${OPERATOR_DIR}/deploy/service_account.yaml - kubectl apply -f ${OPERATOR_DIR}/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml + kubectl apply -f ${OPERATOR_DIR}/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml Installing the CSI Driver @@ -74,20 +74,20 @@ Installing the CSI Driver .. tip:: Before starting the plugin, ensure that any GUI secrets have been added to the appropriate namespace. -A Custom Resource (CR) file is provided `ibm-spectrum-scale-csi-operator-cr.yaml `_. Modify this file to match the properties in your environment. +A Custom Resource (CR) file is provided `csiscaleoperators.csi.ibm.com.cr.yaml `_. Modify this file to match the properties in your environment. To start: .. code-block:: bash - kubectl apply -f ${OPERATOR_DIR}/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml + kubectl apply -f ${OPERATOR_DIR}/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml To stop: .. code-block:: bash - kubectl delete -f ${OPERATOR_DIR}/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml + kubectl delete -f ${OPERATOR_DIR}/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml Removing the CSI Operator and Driver ------------------------------------ @@ -97,14 +97,14 @@ To remove the IBM Spectrum Scale CSI Operator and Driver: .. code-block:: bash # The following removes the csi-driver - kubectl delete -f ${OPERATOR_DIR}/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml + kubectl delete -f ${OPERATOR_DIR}/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml # The following removes the csi-operator kubectl delete -f ${OPERATOR_DIR}/deploy/operator.yaml kubectl delete -f ${OPERATOR_DIR}/deploy/role.yaml kubectl delete -f ${OPERATOR_DIR}/deploy/role_binding.yaml kubectl delete -f ${OPERATOR_DIR}/deploy/service_account.yaml - kubectl delete -f ${OPERATOR_DIR}/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml + kubectl delete -f ${OPERATOR_DIR}/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml # The following removes the namespace kubectl delete -f ${OPERATOR_DIR}/deploy/namespace.yaml diff --git a/docs/source/developers/index.rst b/docs/source/developers/index.rst index a8f077585..7a3c1cf86 100644 --- a/docs/source/developers/index.rst +++ b/docs/source/developers/index.rst @@ -8,3 +8,5 @@ This section is to help those interested in contributing to the project. clone.rst deployment.rst + olm.rst + cert.rst diff --git a/docs/source/developers/olm.rst b/docs/source/developers/olm.rst new file mode 100644 index 000000000..bbc039777 --- /dev/null +++ b/docs/source/developers/olm.rst @@ -0,0 +1,158 @@ +OLM +=== + +Using Test Versions of CSV +-------------------------- + +Due to the nature of Operator Lifecycle Manager (OLM) it is necessary to maintain an application +repository to host the most up to date Cluster Service Version (CSV). To assist, two application registries +are maintained by the development team: + +* `Master - https://quay.io/application/ibm-spectrum-scale-dev/ibm-spectrum-scale-csi-master `_ +* `Dev - https://quay.io/application/ibm-spectrum-scale-dev/ibm-spectrum-scale-csi-dev `_ + +These subscriptions maintain the latest iteration of the CSV on the `dev `_ and `master `_ branches respectively. +To subscribe to these applicaions via OLM, the code repository provides three YAML files: + +``tools/olm/operator-source-openshift.yaml`` + +* Used for both applications on OpenShift. +* Created in the `openshift-marketplace` namespace. + +``tools/olm/operator-source-k8s-master.yaml`` + +* Used for OLM subscription to the master stream in raw k8s. +* Created in the `marketplace` namespace. + +``tools/olm/operator-source-k8s-dev.yaml`` + +* Used for OLM subscription to the master stream in raw k8s. +* Created in the `marketplace` namespace. + +This yaml files should be applied against your Kubernetes or OpenShift cluster: + +.. code-block:: bash + + kubectl apply -f + +.. note:: For OpenShift environments, replace ``kubectl`` with ``oc`` + +Testing an in development CSV +----------------------------- + +While modifying a CSV it is conceivable that a developer would want to test their CSV in a local environment. +One method for achieving this is to host the CSV on `quay.io `_. + +1. Create a new `Application Repository` in `quay.io/new `_. + +.. tip:: Save the name of this repository, because you'll need it in the next steps. + +2. Install helm and helm registry: + + .. code-block:: bash + + curl -L https://git.io/get_helm.sh | bash + helm init + cd ~/.helm/plugins/ && git clone https://github.com/app-registry/appr-helm-plugin.git registry + +3. Create a helm project for your application and push it to quay: + + .. code-block:: bash + + # Set your variables + REPO_NAME="" + QUAY_USER="" + CHANNEL_NAME="test" + + # Create the helm project + cd ~ + helm create ${REPO_NAME} + cd ${REPO_NAME} + + # Push to quay + helm registry login quay.io + helm registry push --namespace ${QUAY_USER} quay.io + helm registry push --namespace ${QUAY_USER} --channel ${CHANNEL_NAME} quay.io + +4. Using the helper script, sync the latest csv. + + .. code-block:: bash + + # Assumed to be relative to this repositories root. + export OPERATOR_DIR="operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator" + export QUAY_NAMESPACE=${QUAY_USER} + export PACKAGE_NAME=${REPO_NAME} + export QUAY_USERNAME="" + export QUAY_PASSWORD="" + + tools/scripts/push_app.sh + +At this point your application is ready to be subscribed to. Use the following templates for k8s and OpenShift respectively. + +Kubernetes subscription template +++++++++++++++++++++++++++++++++ + +.. code-block:: yaml + + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + name: olm-crb + subjects: + - kind: ServiceAccount + name: default + namespace: kube-system + roleRef: + kind: ClusterRole + name: cluster-admin + apiGroup: "" + + --- + apiVersion: operators.coreos.com/v1 + kind: OperatorSource + metadata: + name: ibm-spectrum-scale-csi + namespace: marketplace + spec: + type: appregistry + endpoint: https://quay.io/cnr + registryNamespace: {{ QUAY_USER }} + + --- + apiVersion: operators.coreos.com/v1alpha2 + kind: OperatorGroup + metadata: + name: operator-group + namespace: marketplace + spec: + targetNamespaces: + - marketplace + + --- + apiVersion: operators.coreos.com/v1alpha1 + kind: Subscription + metadata: + name: oper-sub + namespace: marketplace + spec: + channel: stable + name: {{ REPO_NAME }} + source: {{ REPO_NAME }} + sourceNamespace: marketplace + +OpenShift subscription template ++++++++++++++++++++++++++++++++ + +.. code-block:: yaml + + apiVersion: operators.coreos.com/v1 + kind: OperatorSource + metadata: + name: ibm-spectrum-scale + namespace: openshift-marketplace + spec: + type: appregistry + endpoint: https://quay.io/cnr + registryNamespace: {{ QUAY_USER }} + displayName: "CSI Scale Operator" + publisher: "IBM" diff --git a/docs/source/get-started/driver.rst b/docs/source/get-started/driver.rst index c39533269..230717e65 100644 --- a/docs/source/get-started/driver.rst +++ b/docs/source/get-started/driver.rst @@ -16,7 +16,7 @@ OpenShift .. image:: images/operatorhub-custom-resource.png :alt: IBM Spectrum Scale CSI Operator Tabs - For a complete sample of valid CR options, see `ibm-spectrum-scale-csi-operator-cr.yaml `_ + For a complete sample of valid CR options, see `csiscaleoperators.csi.ibm.com.cr.yaml `_ Kubernetes ---------- diff --git a/docs/source/get-started/prereq.rst b/docs/source/get-started/prereq.rst index 1b0312e9c..8f657e4ea 100644 --- a/docs/source/get-started/prereq.rst +++ b/docs/source/get-started/prereq.rst @@ -27,9 +27,10 @@ If you do not see a login or on-screen instructions, review the `GUI Documentati export USERNAME_B64=$(echo $USERNAME | base64) export PASSWORD_B64=$(echo $PASSWORD | base64) - export OPERATOR_NAMESPACE="ibm-spectrum-scale-csi-driver" # Set this to the namespace you deploy the operator in. - + # Set the following to the target namespace to deploy the operator in. + export OPERATOR_NAMESPACE="SomeNamespace" + cat << EOF > /tmp/csisecret.yaml apiVersion: v1 data: diff --git a/docs/source/index.rst b/docs/source/index.rst index 637b230d7..5615986e8 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,6 +9,7 @@ Table of Contents introduction/index.rst get-started/index.md + maintenance/index.rst troubleshoot/index.md developers/index.rst diff --git a/docs/source/maintenance/index.rst b/docs/source/maintenance/index.rst new file mode 100644 index 000000000..8a949f162 --- /dev/null +++ b/docs/source/maintenance/index.rst @@ -0,0 +1,7 @@ +Maintenance +=========== + +.. toctree:: + :maxdepth: 2 + + secrets.rst diff --git a/docs/source/maintenance/secrets.rst b/docs/source/maintenance/secrets.rst new file mode 100644 index 000000000..5761841f8 --- /dev/null +++ b/docs/source/maintenance/secrets.rst @@ -0,0 +1,47 @@ +Secrets +======= + +The IBM Spectrum Scale CSI Driver leverages secrets to store API authentication. In the event +of an authentication going stale the user will need to update the secret in kubernetes. + +Updating a Secret +----------------- + +.. note:: For OpenShift environments, replace ``kubectl`` with ``oc`` + +Due to `ansible-operator` constraints when updating a secret `kubectl apply` and `kubectl edit` +are not usable at this time. To update the secret and have the operator apply it, please follow +the folowing steps: + +1. Edit the `json` or `yaml` defining your secret to have the updated authentication information. + + ... code-block:: bash + export SECRET_NAME="mysecret" + export NAMESPACE="ibm-spectrum-scale-csi-driver" + + # Note if you still have a json or yaml file you can just edit that. + kubectl get secret -n ${NAMESPACE} ${SECRET_NAME} -o yaml > secret.yaml + + # Edit the contents of secret.yaml to be up to date. + +2. Ensure the secret has the correct labelling. If the label is not set the operator will not trigger. + + ... code-block:: yaml + + metadata: + labels: + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + +3. Delete the old secret and apply the updated secret configuration. + + ... code-block:: bash + + kubectl delete secret -n ${NAMESPACE} ${SECRET_NAME} + kubectl apply -f secret.yaml + + +After running the fresh apply you should see the `spec.trigger` field increment if the secret +was sucessfully created. The process may then be monitored in operator logs. + +Additionally, if the operator's custom resource was deployed before the secrets were created the +above process may be leveraged to start the operator without deleting the Custom Resource. diff --git a/driver/Dockerfile b/driver/Dockerfile deleted file mode 100644 index b204e9062..000000000 --- a/driver/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# MULTI-STAGE BUILD for IBM Spectrum Scale CSI Driver - -FROM golang:1.13.1 AS builder -WORKDIR /go/src/github.com/IBM/ibm-spectrum-scale-csi/driver/ -COPY . . -ARG GOFLAGS -RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/ibm-spectrum-scale-csi ./cmd/ibm-spectrum-scale-csi -RUN chmod +x _output/ibm-spectrum-scale-csi - -FROM registry.access.redhat.com/ubi8-minimal:latest -LABEL name="IBM Spectrum Scale CSI driver" \ - vendor="ibm" \ - version="1.0.1" \ - release="1" \ - run='docker run ibm-spectrum-scale-csi-driver' \ - summary="An implementation of CSI Plugin for the IBM Spectrum Scale product."\ - description="CSI Plugin for IBM Spectrum Scale"\ - maintainers="IBM Spectrum Scale" -COPY licenses /licenses -COPY --from=builder /go/src/github.com/IBM/ibm-spectrum-scale-csi/driver/_output/ibm-spectrum-scale-csi /ibm-spectrum-scale-csi -ENTRYPOINT ["/ibm-spectrum-scale-csi"] diff --git a/driver/Dockerfile b/driver/Dockerfile new file mode 120000 index 000000000..868c59451 --- /dev/null +++ b/driver/Dockerfile @@ -0,0 +1 @@ +build/Dockerfile \ No newline at end of file diff --git a/driver/build/Dockerfile b/driver/build/Dockerfile new file mode 100644 index 000000000..485205a37 --- /dev/null +++ b/driver/build/Dockerfile @@ -0,0 +1,27 @@ +# Multi-arch build for IBM Spectrum Scale CSI Driver +# usage: docker buildx build --platform=linux/amd64 -t my_image_tag . + +FROM golang:1.13.1 AS builder +WORKDIR /go/src/github.com/IBM/ibm-spectrum-scale-csi/driver/ +COPY ./go.mod . +COPY ./go.sum . +RUN go mod download + +COPY . . +ARG GOFLAGS +RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/ibm-spectrum-scale-csi ./cmd/ibm-spectrum-scale-csi +RUN chmod +x _output/ibm-spectrum-scale-csi + + +FROM registry.access.redhat.com/ubi8-minimal:latest +LABEL name="IBM Spectrum Scale CSI driver" \ + vendor="ibm" \ + version="1.1.0" \ + release="1" \ + run='docker run ibm-spectrum-scale-csi-driver' \ + summary="An implementation of CSI Plugin for the IBM Spectrum Scale product."\ + description="CSI Plugin for IBM Spectrum Scale"\ + maintainers="IBM Spectrum Scale" +COPY licenses /licenses +COPY --from=builder /go/src/github.com/IBM/ibm-spectrum-scale-csi/driver/_output/ibm-spectrum-scale-csi /ibm-spectrum-scale-csi +ENTRYPOINT ["/ibm-spectrum-scale-csi"] diff --git a/driver/build/multi-arch.Dockerfile b/driver/build/multi-arch.Dockerfile new file mode 100644 index 000000000..90089568d --- /dev/null +++ b/driver/build/multi-arch.Dockerfile @@ -0,0 +1,29 @@ +# Multi-arch build for IBM Spectrum Scale CSI Driver +# usage: docker buildx build --platform=linux/amd64 -t my_image_tag . + +FROM --platform=$BUILDPLATFORM golang:1.13.1 AS builder +WORKDIR /go/src/github.com/IBM/ibm-spectrum-scale-csi/driver/ +COPY ./go.mod . +COPY ./go.sum . +RUN go mod download + +COPY . . +ARG TARGETOS +ARG TARGETARCH +ARG GOFLAGS +RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -a -ldflags '-extldflags "-static"' -o _output/ibm-spectrum-scale-csi ./cmd/ibm-spectrum-scale-csi +RUN chmod +x _output/ibm-spectrum-scale-csi + + +FROM registry.access.redhat.com/ubi8-minimal:latest +LABEL name="IBM Spectrum Scale CSI driver" \ + vendor="ibm" \ + version="1.1.0" \ + release="1" \ + run='docker run ibm-spectrum-scale-csi-driver' \ + summary="An implementation of CSI Plugin for the IBM Spectrum Scale product."\ + description="CSI Plugin for IBM Spectrum Scale"\ + maintainers="IBM Spectrum Scale" +COPY licenses /licenses +COPY --from=builder /go/src/github.com/IBM/ibm-spectrum-scale-csi/driver/_output/ibm-spectrum-scale-csi /ibm-spectrum-scale-csi +ENTRYPOINT ["/ibm-spectrum-scale-csi"] diff --git a/driver/cmd/ibm-spectrum-scale-csi/main.go b/driver/cmd/ibm-spectrum-scale-csi/main.go index d5d4d6375..99e56f684 100644 --- a/driver/cmd/ibm-spectrum-scale-csi/main.go +++ b/driver/cmd/ibm-spectrum-scale-csi/main.go @@ -30,9 +30,9 @@ import ( var ( endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint") - driverName = flag.String("drivername", "ibm-spectrum-scale-csi", "name of the driver") + driverName = flag.String("drivername", "spectrumscale.csi.ibm.com", "name of the driver") nodeID = flag.String("nodeid", "", "node id") - vendorVersion = "1.0.0" + vendorVersion = "1.1.0" ) func main() { diff --git a/driver/csiplugin/gpfs_util.go b/driver/csiplugin/gpfs_util.go index 29af81881..edcc52aa5 100644 --- a/driver/csiplugin/gpfs_util.go +++ b/driver/csiplugin/gpfs_util.go @@ -133,7 +133,7 @@ func getScaleVolumeOptions(volOptions map[string]string) (*scaleVolume, error) { if volDirPathSpecified { if fsTypeSpecified { - return &scaleVolume{}, status.Error(codes.InvalidArgument, "fileType and volDirBasePath must not be specified together in storageClass") + return &scaleVolume{}, status.Error(codes.InvalidArgument, "filesetType and volDirBasePath must not be specified together in storageClass") } if isparentFilesetSpecified { return &scaleVolume{}, status.Error(codes.InvalidArgument, "parentFileset and volDirBasePath must not be specified together in storageClass") @@ -146,11 +146,11 @@ func getScaleVolumeOptions(volOptions map[string]string) (*scaleVolume, error) { if fsTypeSpecified { if fsType == dependentFileset { if inodeLimSpecified { - return &scaleVolume{}, status.Error(codes.InvalidArgument, "inodeLimit and fileseType=dependent must not be specified together in storageClass") + return &scaleVolume{}, status.Error(codes.InvalidArgument, "inodeLimit and filesetType=dependent must not be specified together in storageClass") } } else if fsType == independentFileset { if isparentFilesetSpecified { - return &scaleVolume{}, status.Error(codes.InvalidArgument, "parentFileset and fileseType=independent(Default) must not be specified together in storageClass") + return &scaleVolume{}, status.Error(codes.InvalidArgument, "parentFileset and filesetType=independent(Default) must not be specified together in storageClass") } } else { return &scaleVolume{}, status.Error(codes.InvalidArgument, "Invalid value specified for filesetType in storageClass") diff --git a/driver/examples/dynamic/fileset/storageclassfileset_dependent.yaml b/driver/examples/dynamic/fileset/storageclassfileset_dependent.yaml index b04205871..ed3d01d65 100644 --- a/driver/examples/dynamic/fileset/storageclassfileset_dependent.yaml +++ b/driver/examples/dynamic/fileset/storageclassfileset_dependent.yaml @@ -7,5 +7,5 @@ parameters: volBackendFs: "gpfs0" clusterId: "7118073361626808055" filesetType: "dependent" - parentFileset: "pvc-9c93ffc6-b113-47b4-bbb4-29306f567f2b" + parentFileset: "independent-fileset-gpfs0-fset1" reclaimPolicy: Delete diff --git a/driver/examples/static/static_pv.yaml b/driver/examples/static/static_pv.yaml index 935eaf3e7..09638ba6e 100644 --- a/driver/examples/static/static_pv.yaml +++ b/driver/examples/static/static_pv.yaml @@ -8,6 +8,6 @@ spec: accessModes: - ReadWriteMany csi: - driver: ibm-spectrum-scale-csi + driver: spectrumscale.csi.ibm.com volumeHandle: "clusterID;FSUID;path=/gpfs/fs1/staticdir" diff --git a/generated/installer/ibm-spectrum-scale-csi-operator-dev.yaml b/generated/installer/ibm-spectrum-scale-csi-operator-dev.yaml new file mode 100644 index 000000000..d87c7dc1c --- /dev/null +++ b/generated/installer/ibm-spectrum-scale-csi-operator-dev.yaml @@ -0,0 +1,422 @@ +# DO NOT MODIFY - generated by ansible/generate-playbook.yaml - DO NOT MODIFY +# BEGIN deploy/operator.yaml +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator + app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + product: ibm-spectrum-scale-csi + release: ibm-spectrum-scale-csi-operator + name: ibm-spectrum-scale-csi-operator + namespace: ibm-spectrum-scale-csi-driver +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + template: + metadata: + annotations: + productID: ibm-spectrum-scale-csi-operator + productName: IBM Spectrum Scale CSI Operator + productVersion: 1.1.0 + labels: + app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator + app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + name: ibm-spectrum-scale-csi-operator + product: ibm-spectrum-scale-csi + release: ibm-spectrum-scale-csi-operator + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: beta.kubernetes.io/arch + operator: Exists + containers: + - command: + - /usr/local/bin/ao-logs + - /tmp/ansible-operator/runner + - stdout + image: quay.io/ibm-spectrum-scale-dev/ibm-spectrum-scale-csi-operator:v1.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 10 + periodSeconds: 30 + name: ansible + readinessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 3 + periodSeconds: 1 + securityContext: + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /tmp/ansible-operator/runner + name: runner + readOnly: true + env: + - name: CSI_DRIVER_IMAGE + value: quay.io/ibm-spectrum-scale-dev/ibm-spectrum-scale-csi-driver:v1.1.0 + - env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: ibm-spectrum-scale-csi-operator + - name: CSI_DRIVER_IMAGE + value: quay.io/ibm-spectrum-scale-dev/ibm-spectrum-scale-csi-driver:v1.1.0 + image: quay.io/ibm-spectrum-scale-dev/ibm-spectrum-scale-csi-operator:v1.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 10 + periodSeconds: 30 + name: operator + readinessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 3 + periodSeconds: 1 + securityContext: + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /tmp/ansible-operator/runner + name: runner + serviceAccountName: ibm-spectrum-scale-csi-operator + volumes: + - emptyDir: {} + name: runner +# END deploy/operator.yaml +# BEGIN deploy/role.yaml +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator + app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + product: ibm-spectrum-scale-csi + release: ibm-spectrum-scale-csi-operator + name: ibm-spectrum-scale-csi-operator + namespace: ibm-spectrum-scale-csi-driver +rules: + - apiGroups: + - "" + resources: + - pods + - persistentvolumeclaims + - services + - endpoints + - events + - configmaps + - secrets + - secrets/status + - services/finalizers + - serviceaccounts + verbs: + - "*" + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterroles + - clusterrolebindings + verbs: + - "*" + - apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - "*" + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create + - apiGroups: + - apps + resourceNames: + - ibm-spectrum-scale-csi-operator + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - apiGroups: + - csi.ibm.com + resources: + - "*" + verbs: + - "*" + - apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints + verbs: + - "*" + - apiGroups: + - storage.k8s.io + resources: + - volumeattachments + - storageclasses + verbs: + - "*" +# END deploy/role.yaml +# BEGIN deploy/role_binding.yaml +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator + app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + product: ibm-spectrum-scale-csi + release: ibm-spectrum-scale-csi-operator + name: ibm-spectrum-scale-csi-operator + namespace: ibm-spectrum-scale-csi-driver +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: ibm-spectrum-scale-csi-operator +subjects: + - kind: ServiceAccount + name: ibm-spectrum-scale-csi-operator + namespace: ibm-spectrum-scale-csi-driver +# END deploy/role_binding.yaml +# BEGIN deploy/service_account.yaml +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator + app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + product: ibm-spectrum-scale-csi + release: ibm-spectrum-scale-csi-operator + name: ibm-spectrum-scale-csi-operator + namespace: ibm-spectrum-scale-csi-driver +# END deploy/service_account.yaml +# BEGIN deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + labels: + app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator + app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + release: ibm-spectrum-scale-csi-operator + name: csiscaleoperators.csi.ibm.com +spec: + group: csi.ibm.com + names: + kind: CSIScaleOperator + listKind: CSIScaleOperatorList + plural: csiscaleoperators + singular: csiscaleoperator + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + properties: + apiVersion: + description: + "APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" + type: string + kind: + description: + "Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + type: string + metadata: + type: object + spec: + properties: + attacher: + description: Attacher image for csi (actually attaches to the storage). + type: string + attacherNodeSelector: + description: Node selector for attacher sidecar. + items: + properties: + key: + description: Key for node selector. + type: string + value: + description: Value for key. + type: string + type: object + type: array + clusters: + description: + A collection of gpfs cluster properties for the csi driver + to mount. + items: + properties: + cacert: + description: A string specifying a cacert resource name. + type: string + id: + description: The cluster id of the gpfs cluster specified (mandatory). + type: string + primary: + description: The primary file system for the GPFS cluster. + properties: + inodeLimit: + description: Inode limit for Primary Fileset. + type: string + primaryFs: + description: The name of the primary filesystem. + type: string + primaryFset: + description: The name of the primary fileset, created in primaryFs. + type: string + remoteCluster: + description: Remote cluster ID. + type: string + remoteFs: + description: Filesystem name on remote cluster. + type: string + type: object + restApi: + description: A collection of targets for REST calls. + items: + properties: + guiHost: + description: The hostname of the REST server. + type: string + guiPort: + description: The port number running the REST server. + type: integer + type: object + type: array + secrets: + description: A string specifying a secret resource name. + type: string + secureSslMode: + description: Require a secure SSL connection to connect to GPFS. + type: boolean + type: object + required: + - id + type: array + driverRegistrar: + description: + Sidecar container image for the csi spectrum scale plugin + pods. + type: string + nodeMapping: + description: Mapping of K8s node with SpectrumScale node. + items: + properties: + k8sNode: + description: K8s node name. + type: string + spectrumscaleNode: + description: SpectrumScale node name. + type: string + type: object + type: array + pluginNodeSelector: + description: Node selector for SpectrumScale CSI Plugin. + items: + properties: + key: + description: Key for node selector. + type: string + value: + description: Value for key. + type: string + type: object + type: array + provisioner: + description: Provisioner image for csi (actually issues provision requests). + type: string + provisionerNodeSelector: + description: Node selector for provisioner sidecar. + items: + properties: + key: + description: Key for node selector. + type: string + value: + description: Value for key. + type: string + type: object + type: array + scaleHostpath: + description: The path to the gpfs file system mounted on the host machine. + type: string + secretCounter: + description: + An internal counter used by the operator to trigger reloads + on secret change. + type: integer + trigger: + description: A generic trigger to be used in kickin off the ansible operator. + type: string + spectrumScale: + description: Image name for the csi spectrum scale plugin container. + type: string + required: + - scaleHostpath + type: object + status: + properties: + conditions: + description: The active status of the operator + items: + properties: + isRunning: + description: Indicates that the plugin is running. + type: boolean + type: object + type: array + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +# END deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml diff --git a/generated/installer/ibm-spectrum-scale-csi-operator.yaml b/generated/installer/ibm-spectrum-scale-csi-operator.yaml index 23f3a4ee5..abec4904f 100644 --- a/generated/installer/ibm-spectrum-scale-csi-operator.yaml +++ b/generated/installer/ibm-spectrum-scale-csi-operator.yaml @@ -1,5 +1,6 @@ # DO NOT MODIFY - generated by ansible/generate-playbook.yaml - DO NOT MODIFY # BEGIN deploy/operator.yaml +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -21,7 +22,7 @@ spec: annotations: productID: ibm-spectrum-scale-csi-operator productName: IBM Spectrum Scale CSI Operator - productVersion: 1.0.1 + productVersion: 1.1.0 labels: app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator @@ -34,91 +35,82 @@ spec: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - - matchExpressions: - - key: beta.kubernetes.io/arch - operator: Exists + - matchExpressions: + - key: beta.kubernetes.io/arch + operator: Exists containers: - - command: - - /usr/local/bin/ao-logs - - /tmp/ansible-operator/runner - - stdout - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.1 - imagePullPolicy: IfNotPresent - livenessProbe: - exec: - command: - - ./health_check.sh - initialDelaySeconds: 10 - periodSeconds: 30 - name: ansible - readinessProbe: - exec: - command: - - ./health_check.sh - initialDelaySeconds: 3 - periodSeconds: 1 - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 50m - memory: 50Mi - securityContext: - capabilities: - drop: - - ALL - volumeMounts: - - mountPath: /tmp/ansible-operator/runner - name: runner - readOnly: true - - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: ibm-spectrum-scale-csi-operator - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.1 - imagePullPolicy: IfNotPresent - livenessProbe: - exec: - command: - - ./health_check.sh - initialDelaySeconds: 10 - periodSeconds: 30 - name: operator - readinessProbe: - exec: - command: - - ./health_check.sh - initialDelaySeconds: 3 - periodSeconds: 1 - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 50m - memory: 50Mi - securityContext: - capabilities: - drop: - - ALL - volumeMounts: - - mountPath: /tmp/ansible-operator/runner - name: runner + - command: + - /usr/local/bin/ao-logs + - /tmp/ansible-operator/runner + - stdout + image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 10 + periodSeconds: 30 + name: ansible + readinessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 3 + periodSeconds: 1 + securityContext: + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /tmp/ansible-operator/runner + name: runner + readOnly: true + env: + - name: CSI_DRIVER_IMAGE + value: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-driver:v1.1.0 + - env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: ibm-spectrum-scale-csi-operator + - name: CSI_DRIVER_IMAGE + value: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-driver:v1.1.0 + image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 10 + periodSeconds: 30 + name: operator + readinessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 3 + periodSeconds: 1 + securityContext: + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /tmp/ansible-operator/runner + name: runner serviceAccountName: ibm-spectrum-scale-csi-operator volumes: - - emptyDir: {} - name: runner + - emptyDir: {} + name: runner # END deploy/operator.yaml ---- # BEGIN deploy/role.yaml +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -132,80 +124,80 @@ metadata: name: ibm-spectrum-scale-csi-operator namespace: ibm-spectrum-scale-csi-driver rules: -- apiGroups: - - '' - resources: - - pods - - persistentvolumeclaims - - services - - endpoints - - events - - configmaps - - secrets - - secrets/status - - services/finalizers - - serviceaccounts - verbs: - - '*' -- apiGroups: - - rbac.authorization.k8s.io - resources: - - clusterroles - - clusterrolebindings - verbs: - - '*' -- apiGroups: - - apps - resources: - - deployments - - daemonsets - - replicasets - - statefulsets - verbs: - - '*' -- apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - verbs: - - get - - create -- apiGroups: - - apps - resourceNames: - - ibm-spectrum-scale-csi-operator - resources: - - deployments/finalizers - verbs: - - update -- apiGroups: - - apps - resources: - - replicasets - verbs: - - get -- apiGroups: - - csi.ibm.com - resources: - - '*' - verbs: - - '*' -- apiGroups: - - security.openshift.io - resources: - - securitycontextconstraints - verbs: - - '*' -- apiGroups: - - storage.k8s.io - resources: - - volumeattachments - - storageclasses - verbs: - - '*' + - apiGroups: + - "" + resources: + - pods + - persistentvolumeclaims + - services + - endpoints + - events + - configmaps + - secrets + - secrets/status + - services/finalizers + - serviceaccounts + verbs: + - "*" + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterroles + - clusterrolebindings + verbs: + - "*" + - apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - "*" + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create + - apiGroups: + - apps + resourceNames: + - ibm-spectrum-scale-csi-operator + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - apiGroups: + - csi.ibm.com + resources: + - "*" + verbs: + - "*" + - apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints + verbs: + - "*" + - apiGroups: + - storage.k8s.io + resources: + - volumeattachments + - storageclasses + verbs: + - "*" # END deploy/role.yaml ---- # BEGIN deploy/role_binding.yaml +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -222,12 +214,12 @@ roleRef: kind: ClusterRole name: ibm-spectrum-scale-csi-operator subjects: -- kind: ServiceAccount - name: ibm-spectrum-scale-csi-operator - namespace: ibm-spectrum-scale-csi-driver + - kind: ServiceAccount + name: ibm-spectrum-scale-csi-operator + namespace: ibm-spectrum-scale-csi-driver # END deploy/role_binding.yaml ---- # BEGIN deploy/service_account.yaml +--- apiVersion: v1 kind: ServiceAccount metadata: @@ -240,8 +232,8 @@ metadata: name: ibm-spectrum-scale-csi-operator namespace: ibm-spectrum-scale-csi-driver # END deploy/service_account.yaml +# BEGIN deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml --- -# BEGIN deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: @@ -265,14 +257,16 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation + description: + "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" type: string kind: - description: 'Kind is a string value representing the REST resource this + description: + "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" type: string metadata: type: object @@ -294,7 +288,8 @@ spec: type: object type: array clusters: - description: A collection of gpfs cluster properties for the csi driver + description: + A collection of gpfs cluster properties for the csi driver to mount. items: properties: @@ -343,10 +338,11 @@ spec: type: boolean type: object required: - - id + - id type: array driverRegistrar: - description: Sidecar container image for the csi spectrum scale plugin + description: + Sidecar container image for the csi spectrum scale plugin pods. type: string nodeMapping: @@ -392,14 +388,18 @@ spec: description: The path to the gpfs file system mounted on the host machine. type: string secretCounter: - description: An internal counter used by the operator to trigger reloads + description: + An internal counter used by the operator to trigger reloads on secret change. type: integer + trigger: + description: A generic trigger to be used in kickin off the ansible operator. + type: string spectrumScale: description: Image name for the csi spectrum scale plugin container. type: string required: - - scaleHostpath + - scaleHostpath type: object status: properties: @@ -416,8 +416,7 @@ spec: type: object version: v1 versions: - - name: v1 - served: true - storage: true -# END deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml ---- + - name: v1 + served: true + storage: true +# END deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml diff --git a/operator/.osdk-scorecard.yaml b/operator/.osdk-scorecard.yaml index 1cb9f8c0b..409e6a4ae 100644 --- a/operator/.osdk-scorecard.yaml +++ b/operator/.osdk-scorecard.yaml @@ -1,3 +1,4 @@ +--- scorecard: init-timeout: 120 output: json @@ -5,12 +6,10 @@ scorecard: - basic: namespace: "ibm-spectrum-scale-csi-driver" cr-manifest: - - "deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml" + - "deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml" - olm: namespace: "ibm-spectrum-scale-csi-driver" cr-manifest: - - "deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml" - csv-path: "deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/ibm-spectrum-scale-csi-operator.v1.0.1.clusterserviceversion.yaml" + - "deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml" + csv-path: "deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.1.0/ibm-spectrum-scale-csi-operator.v1.1.0.clusterserviceversion.yaml" # TODO add custom test. - - diff --git a/operator/.yamllint b/operator/.yamllint new file mode 100644 index 000000000..11d4392cd --- /dev/null +++ b/operator/.yamllint @@ -0,0 +1,31 @@ +--- +yaml-files: + - '*.yaml' + - '*.yml' + - '.yamllint' + +rules: + braces: enable + brackets: enable + colons: enable + commas: enable + comments: + level: warning + comments-indentation: + level: warning + document-end: disable + document-start: enable + empty-lines: enable + empty-values: disable + hyphens: enable + indentation: enable + key-duplicates: enable + key-ordering: disable + line-length: disable + new-line-at-end-of-file: enable + new-lines: enable + octal-values: disable + quoted-strings: disable + trailing-spaces: enable + truthy: + level: warning diff --git a/operator/Dockerfile b/operator/Dockerfile new file mode 120000 index 000000000..868c59451 --- /dev/null +++ b/operator/Dockerfile @@ -0,0 +1 @@ +build/Dockerfile \ No newline at end of file diff --git a/operator/Makefile b/operator/Makefile index 1ada33578..57be0a18a 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -9,7 +9,7 @@ install: ## Install all resources (CR/CRD's, RBCA and Operator) @echo ....... Creating namespace ....... - kubectl create namespace ${NAMESPACE} @echo ....... Applying CRDS and Operator ....... - - kubectl apply -f deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml -n ${NAMESPACE} + - kubectl apply -f deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml -n ${NAMESPACE} @echo ....... Applying Rules and Service Account ....... - kubectl apply -f deploy/role.yaml -n ${NAMESPACE} - kubectl apply -f deploy/role_binding.yaml -n ${NAMESPACE} @@ -17,12 +17,12 @@ install: ## Install all resources (CR/CRD's, RBCA and Operator) @echo ....... Applying Operator ....... - kubectl apply -f deploy/operator.yaml -n ${NAMESPACE} @echo ....... Creating the Cluster ....... - - kubectl apply -f deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml -n ${NAMESPACE} + - kubectl apply -f deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml -n ${NAMESPACE} uninstall: ## Uninstall all that all performed in the $ make install @echo ....... Uninstalling ....... @echo ....... Deleting CRDs....... - - kubectl delete -f deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml -n ${NAMESPACE} + - kubectl delete -f deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml -n ${NAMESPACE} @echo ....... Deleting Rules and Service Account ....... - kubectl delete -f deploy/role.yaml -n ${NAMESPACE} - kubectl delete -f deploy/role_binding.yaml -n ${NAMESPACE} diff --git a/operator/build/Dockerfile b/operator/build/Dockerfile index dfc08d079..2b6a616a0 100644 --- a/operator/build/Dockerfile +++ b/operator/build/Dockerfile @@ -1,21 +1,15 @@ -FROM quay.io/operator-framework/ansible-operator:v0.11.0 +FROM quay.io/operator-framework/ansible-operator:v0.14.0 MAINTAINER jdunham@us.ibm.com LABEL name="IBM Spectrum Scale CSI Operator" \ vendor="ibm" \ - version="1.0.1" \ + version="1.1.0" \ release="1" \ run='docker run ibm-spectrum-scale-csi-operator' \ summary="An Ansible based operator to run and manage the deployment of the IBM Spectrum Scale CSI Driver." \ description="An Ansible based operator to run and manage the deployment of the IBM Spectrum Scale CSI Driver." -COPY build/health_check.sh . +COPY hacks/health_check.sh . COPY licenses /licenses COPY watches.yaml ${HOME}/watches.yaml -COPY build/_output/bin/operator ${OPERATOR} COPY roles/ ${HOME}/roles/ - - - - - diff --git a/operator/build/Dockerfile.s390x b/operator/build/Dockerfile.s390x deleted file mode 100644 index 758fc997b..000000000 --- a/operator/build/Dockerfile.s390x +++ /dev/null @@ -1,21 +0,0 @@ -FROM quay.io/mew2057/ansible-operator:latest -MAINTAINER jdunham@us.ibm.com - -LABEL name="IBM Spectrum Scale CSI Operator" \ - vendor="ibm" \ - version="1.0.1" \ - release="1" \ - run='docker run ibm-spectrum-scale-csi-operator' \ - summary="An Ansible based operator to run and manage the deployment of the IBM Spectrum Scale CSI Driver." \ - description="An Ansible based operator to run and manage the deployment of the IBM Spectrum Scale CSI Driver." - -COPY build/health_check.sh . -COPY licenses /licenses -COPY watches.yaml ${HOME}/watches.yaml -COPY build/_output/bin/operator ${OPERATOR} -COPY roles/ ${HOME}/roles/ - - - - - diff --git a/operator/build/multi-arch.Dockerfile b/operator/build/multi-arch.Dockerfile new file mode 100644 index 000000000..37d8bec5d --- /dev/null +++ b/operator/build/multi-arch.Dockerfile @@ -0,0 +1,28 @@ +# Multi-arch build for IBM Spectrum Scale CSI Operator +# usage: docker buildx build --platform=linux/amd64 -t my_image_tag . + +FROM quay.io/mew2057/ansible-operator:$TARGETARCH +MAINTAINER jdunham@us.ibm.com + +ARG CSI_ATTACHER_IMAGE +ARG CSI_PROVISIONER_IMAGE +ARG CSI_NODE_REGISTRAR_IMAGE +ARG CSI_DRIVER_IMAGE + +ENV CSI_ATTACHER_IMAGE $CSI_ATTACHER_IMAGE +ENV CSI_PROVISIONER_IMAGE $CSI_PROVISIONER_IMAGE +ENV CSI_NODE_REGISTRAR_IMAGE $CSI_NODE_REGISTRAR_IMAGE +ENV CSI_DRIVER_IMAGE $CSI_DRIVER_IMAGE + +LABEL name="IBM Spectrum Scale CSI Operator" \ + vendor="ibm" \ + version="1.1.0" \ + release="1" \ + run='docker run ibm-spectrum-scale-csi-operator' \ + summary="An Ansible based operator to run and manage the deployment of the IBM Spectrum Scale CSI Driver." \ + description="An Ansible based operator to run and manage the deployment of the IBM Spectrum Scale CSI Driver." + +COPY hacks/health_check.sh . +COPY licenses /licenses +COPY watches.yaml ${HOME}/watches.yaml +COPY roles/ ${HOME}/roles/ diff --git a/operator/cmd/manager/main.go b/operator/cmd/manager/main.go deleted file mode 100644 index b26ec5f40..000000000 --- a/operator/cmd/manager/main.go +++ /dev/null @@ -1,235 +0,0 @@ -package main - -import ( - "context" - //"flag" - "fmt" - "os" - "runtime" - "strconv" - "strings" - - // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) - _ "k8s.io/client-go/plugin/pkg/client/auth" - - "github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/apis" - "github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/controller/csiscalesecret" - - aocontroller "github.com/operator-framework/operator-sdk/pkg/ansible/controller" - aoflags "github.com/operator-framework/operator-sdk/pkg/ansible/flags" - proxy "github.com/operator-framework/operator-sdk/pkg/ansible/proxy" - "github.com/operator-framework/operator-sdk/pkg/ansible/proxy/controllermap" - "github.com/operator-framework/operator-sdk/pkg/ansible/runner" - "github.com/operator-framework/operator-sdk/pkg/ansible/watches" - - "github.com/operator-framework/operator-sdk/pkg/k8sutil" - "github.com/operator-framework/operator-sdk/pkg/leader" - "github.com/operator-framework/operator-sdk/pkg/log/zap" - //"github.com/operator-framework/operator-sdk/pkg/metrics" - "github.com/operator-framework/operator-sdk/pkg/restmapper" - sdkVersion "github.com/operator-framework/operator-sdk/version" - "github.com/spf13/pflag" - "sigs.k8s.io/controller-runtime/pkg/client/config" - "sigs.k8s.io/controller-runtime/pkg/manager" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - "sigs.k8s.io/controller-runtime/pkg/runtime/signals" - - //kubemetrics "github.com/operator-framework/operator-sdk/pkg/kube-metrics" - //v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - //"k8s.io/apimachinery/pkg/util/intstr" -) - -// Change below variables to serve metrics on different host or port. -var ( - log = logf.Log.WithName("cmd") - metricsHost = "0.0.0.0" - metricsPort int32 = 8383 - operatorMetricsPort int32 = 8686 -) - -func printVersion() { - log.Info(fmt.Sprintf("Go Version: %s", runtime.Version())) - log.Info(fmt.Sprintf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH)) - log.Info(fmt.Sprintf("Version of operator-sdk: %v", sdkVersion.Version)) -} - -func main() { - // Use the ansible flag mechanism. - flags := aoflags.AddTo(pflag.CommandLine) - pflag.Parse() - logf.SetLogger(zap.Logger()) - - printVersion() - - namespace, found := os.LookupEnv(k8sutil.WatchNamespaceEnvVar) - //log = log.WithValues("Namespace", namespace) - if found { - log.Info("Watching namespace.") - } else { - log.Info(fmt.Sprintf("%v environment variable not set. This operator is watching all namespaces.", - k8sutil.WatchNamespaceEnvVar)) - namespace = metav1.NamespaceAll - } - - // Get a config to talk to the apiserver - cfg, err := config.GetConfig() - if err != nil { - log.Error(err, "") - os.Exit(1) - } - - // Create a new Cmd to provide shared dependencies and start components - mgr, err := manager.New(cfg, manager.Options{ - Namespace: namespace, - MapperProvider: restmapper.NewDynamicRESTMapper, - MetricsBindAddress: fmt.Sprintf("%s:%d", metricsHost, metricsPort), - }) - if err != nil { - log.Error(err, "") - os.Exit(1) - } - - // Setup Scheme for all resources - if err := apis.AddToScheme(mgr.GetScheme()); err != nil { - log.Error(err, "") - os.Exit(1) - } - - // This reimplements the Ansible run code. - // Effectively this patches in the runners. - // --------------------------------------------------------- - var gvks []schema.GroupVersionKind - cMap := controllermap.NewControllerMap() - watches, err := watches.Load(flags.WatchesFile) - if err != nil { - log.Error(err, "Failed to load watches.") - os.Exit(1) - } - - for _, w := range watches { - runner, err := runner.New(w) - if err != nil { - log.Error(err, "Failed to create runner") - os.Exit(1) - } - log.Info(fmt.Sprintf("Role %s", w.Role)) - ctr := aocontroller.Add(mgr, aocontroller.Options{ - GVK: w.GroupVersionKind, - Runner: runner, - ManageStatus: w.ManageStatus, - MaxWorkers: getMaxWorkers(w.GroupVersionKind, flags.MaxWorkers), - ReconcilePeriod: w.ReconcilePeriod, - }) - if ctr == nil { - log.Error(nil, "failed to add controller for GVK %v", w.GroupVersionKind.String()) - os.Exit(1) - } - - cMap.Store(w.GroupVersionKind, &controllermap.Contents{Controller: *ctr, - WatchDependentResources: w.WatchDependentResources, - WatchClusterScopedResources: w.WatchClusterScopedResources, - OwnerWatchMap: controllermap.NewWatchMap(), - AnnotationWatchMap: controllermap.NewWatchMap(), - }) - gvks = append(gvks, w.GroupVersionKind) - } - // --------------------------------------------------------- - - // This is what we needed to inject for secret monitoring. - ctr := csiscalesecret.Add(mgr) - if ctr == nil { - log.Error(nil, "failed to add controller for secrets") - os.Exit(1) - } - //cMap.Store(csiscalesecret.GVK, &controllermap.Contents{Controller: *ctr, - // WatchDependentResources: true, - // WatchClusterScopedResources: true, - // OwnerWatchMap: controllermap.NewWatchMap(), - // AnnotationWatchMap: controllermap.NewWatchMap(), - //}) - gvks = append(gvks, csiscalesecret.GVK) - - operatorName, err := k8sutil.GetOperatorName() - if err != nil { - log.Error(err, "Failed to get the operator name") - os.Exit(1) - } - - // Become the leader before proceeding - err = leader.Become(context.TODO(), operatorName+"-lock") - if err != nil { - log.Error(err, "Failed to become leader.") - os.Exit(1) - } - - // ------------------------------------- - - //err = kubemetrics.GenerateAndServeCRMetrics(cfg, []string{namespace}, gvks, metricsHost, operatorMetricsPort) - //if err != nil { - // log.Info("Could not generate and serve custom resource metrics", "error", err.Error()) - //} - //servicePorts := []v1.ServicePort{ - // {Port: metricsPort, Name: metrics.OperatorPortName, Protocol: v1.ProtocolTCP, TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: metricsPort}}, - //} - - //// Create Service object to expose the metrics port(s). - //// TODO: probably should expose the port as an environment variable - //_, err = metrics.CreateMetricsService(context.TODO(), cfg, servicePorts) - //if err != nil { - // log.Error(err, "Exposing metrics port failed.") - // os.Exit(1) - //} - - done := make(chan error) - - // start the proxy - err = proxy.Run(done, proxy.Options{ - Address: "localhost", - Port: 8888, - KubeConfig: mgr.GetConfig(), - Cache: mgr.GetCache(), - RESTMapper: mgr.GetRESTMapper(), - ControllerMap: cMap, - OwnerInjection: flags.InjectOwnerRef, - WatchedNamespaces: []string{namespace}, - }) - if err != nil { - log.Error(err, "Error starting proxy.") - os.Exit(1) - } - - go func() { - done <- mgr.Start(signals.SetupSignalHandler()) - }() - // ------------------------------------- - - // Wait for proxy or cmd to finish - err = <-done - if err != nil { - log.Error(err, "Proxy or operator exited with error.") - os.Exit(1) - } - log.Info("Exiting.") -} - -// The following function is borrowed from the operator sdk run. -func getMaxWorkers(gvk schema.GroupVersionKind, defValue int) int { - envVar := strings.ToUpper(strings.Replace( - fmt.Sprintf("WORKER_%s_%s", gvk.Kind, gvk.Group), - ".", - "_", - -1, - )) - switch maxWorkers, err := strconv.Atoi(os.Getenv(envVar)); { - case maxWorkers <= 1: - return defValue - case err != nil: - // we don't care why we couldn't parse it just use default - log.Info("Failed to parse %v from environment. Using default %v", envVar, defValue) - return defValue - default: - return maxWorkers - } -} diff --git a/operator/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml b/operator/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml similarity index 66% rename from operator/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml rename to operator/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml index 0c4de56ed..fe51d2200 100644 --- a/operator/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml +++ b/operator/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml @@ -1,22 +1,23 @@ +--- apiVersion: csi.ibm.com/v1 -kind: 'CSIScaleOperator' +kind: "CSIScaleOperator" metadata: - name: 'ibm-spectrum-scale-csi' - namespace: 'ibm-spectrum-scale-csi-driver' - labels: - app.kubernetes.io/name: ibm-spectrum-scale-csi-operator - app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator - app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator - release: ibm-spectrum-scale-csi-operator + name: "ibm-spectrum-scale-csi" + namespace: "ibm-spectrum-scale-csi-driver" + labels: + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator + app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + release: ibm-spectrum-scale-csi-operator status: {} spec: -# The path to the GPFS file system mounted on the host machine. -# ================================================================================== + # The path to the GPFS file system mounted on the host machine. + # ================================================================================== scaleHostpath: "< GPFS FileSystem Path >" -# Below specifies the details of a SpectrumScale cluster configuration used by the -# plugin. It can have multiple values. -# ================================================================================== + # Below specifies the details of a SpectrumScale cluster configuration used by the + # plugin. It can have multiple values. + # ================================================================================== clusters: - id: "< Primary Cluster ID - WARNING - THIS IS A STRING NEEDS YAML QUOTES! >" secrets: "secret1" @@ -24,36 +25,36 @@ spec: primary: primaryFs: "< Primary Filesystem >" primaryFset: "< Fileset in Primary Filesystem >" -# inodeLimit: "< node limit for Primary Fileset >" # Optional -# remoteCluster: "< Remote ClusterID >" # Optional - This ID should have seperate entry in Clusters map. -# remoteFs: "< Remote Filesystem >" # Optional -# cacert: "< CA cert configmap for GUI >" # Optional - restApi: - - guiHost: "< Primary cluster GUI IP/Hostname >" + # inodeLimit: "< node limit for Primary Fileset >" # Optional + # remoteCluster: "< Remote ClusterID >" # Optional - This ID should have seperate entry in Clusters map. + # remoteFs: "< Remote Filesystem >" # Optional + # cacert: "< CA cert configmap for GUI >" # Optional + restApi: + - guiHost: "< Primary cluster GUI IP/Hostname >" # # In the case we have multiple clusters, specify their configuration below. # ================================================================================== # - id: "< Cluster ID >" # secrets: "< Secret for Cluster >" # secureSslMode: false -# restApi: +# restApi: # - guiHost: "< Cluster GUI IP/Hostname >" # Attacher image name, in case we do not want to use default image. # ================================================================================== -# attacher: "quay.io/k8scsi/csi-attacher:v1.0.0" +# attacher: "quay.io/k8scsi/csi-attacher:v2.1.1" # Provisioner image name, in case we do not want to use default image. # ================================================================================== -# provisioner: "quay.io/k8scsi/csi-provisioner:v1.0.0" +# provisioner: "quay.io/k8scsi/csi-provisioner:v1.5.0" # Driver Registrar image name, in case we do not want to use default image. # ================================================================================== -# driverRegistrar: "quay.io/k8scsi/csi-node-driver-registrar:v1.0.1'" +# driverRegistrar: "quay.io/k8scsi/csi-node-driver-registrar:v1.2.0" # SpectrumScale CSI Plugin image name, in case we do not want to use default image. # ================================================================================== -# spectrumScale: "quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-driver:v1.0.0" +# spectrumScale: "quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-driver:v1.1.0" # attacherNodeSelector specifies on which nodes we want to run attacher sidecar # In below example attacher will run on nodes which have label as "scale=true" @@ -89,5 +90,6 @@ spec: # nodeMapping: # - k8sNode: "< K8s Node Name >" # spectrumscaleNode: "< SpectrumScale Node Name >" - - +# In case K8s node name start with number then use following node mapping format. +# - k8sNode: "K8sNodePrefix_< K8s Node Name >" +# spectrumscaleNode: "< SpectrumScale Node Name >" diff --git a/operator/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml b/operator/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml similarity index 88% rename from operator/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml rename to operator/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml index 94df52269..378364f20 100644 --- a/operator/deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml +++ b/operator/deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml @@ -1,3 +1,4 @@ +--- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: @@ -21,14 +22,16 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation + description: + "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" type: string kind: - description: 'Kind is a string value representing the REST resource this + description: + "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" type: string metadata: type: object @@ -50,7 +53,8 @@ spec: type: object type: array clusters: - description: A collection of gpfs cluster properties for the csi driver + description: + A collection of gpfs cluster properties for the csi driver to mount. items: properties: @@ -99,10 +103,11 @@ spec: type: boolean type: object required: - - id + - id type: array driverRegistrar: - description: Sidecar container image for the csi spectrum scale plugin + description: + Sidecar container image for the csi spectrum scale plugin pods. type: string nodeMapping: @@ -148,14 +153,18 @@ spec: description: The path to the gpfs file system mounted on the host machine. type: string secretCounter: - description: An internal counter used by the operator to trigger reloads + description: + An internal counter used by the operator to trigger reloads on secret change. type: integer + trigger: + description: A generic trigger to be used in kickin off the ansible operator. + type: string spectrumScale: description: Image name for the csi spectrum scale plugin container. type: string required: - - scaleHostpath + - scaleHostpath type: object status: properties: @@ -172,6 +181,6 @@ spec: type: object version: v1 versions: - - name: v1 - served: true - storage: true + - name: v1 + served: true + storage: true diff --git a/operator/deploy/namespace.yaml b/operator/deploy/namespace.yaml index 38b9928f9..68843a5fa 100644 --- a/operator/deploy/namespace.yaml +++ b/operator/deploy/namespace.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: Namespace metadata: diff --git a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.0/ibm-spectrum-scale-csi-operator.v1.0.0.clusterserviceversion.yaml b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.0/ibm-spectrum-scale-csi-operator.v1.0.0.clusterserviceversion.yaml deleted file mode 100644 index 8eac46568..000000000 --- a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.0/ibm-spectrum-scale-csi-operator.v1.0.0.clusterserviceversion.yaml +++ /dev/null @@ -1,550 +0,0 @@ -apiVersion: operators.coreos.com/v1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: "[\n {\n \"apiVersion\": \"csi.ibm.com/v1\",\n \"kind\":\ - \ \"CSIScaleOperator\",\n \"metadata\": {\n \"labels\": {\n \"\ - app.kubernetes.io/instance\": \"ibm-spectrum-scale-csi-operator\",\n \ - \ \"app.kubernetes.io/managed-by\": \"ibm-spectrum-scale-csi-operator\",\n \ - \ \"app.kubernetes.io/name\": \"ibm-spectrum-scale-csi-operator\"\n \ - \ },\n \"name\": \"ibm-spectrum-scale-csi\"\n },\n \"spec\": {\n\ - \ \"clusters\": [\n {\n \"id\": \"\\u003c Primary Cluster\ - \ ID - WARNING: THIS IS A STRING NEEDS YAML QUOTES!\\u003e\",\n \"\ - primary\": {\n \"primaryFs\": \"\\u003c Primary Filesystem \\u003e\"\ - ,\n \"primaryFset\": \"\\u003c Fileset in Primary Filesystem \\u003e\"\ - \n },\n \"restApi\": [\n {\n \"guiHost\"\ - : \"\\u003c Primary cluster GUI IP/Hostname \\u003e\"\n }\n \ - \ ],\n \"secrets\": \"secret1\",\n \"secureSslMode\":\ - \ false\n }\n ],\n \"scaleHostpath\": \"\\u003c GPFS FileSystem\ - \ Path \\u003e\"\n },\n \"status\": {}\n }\n]" - capabilities: Basic Install - categories: Storage - certified: 'false' - containerImage: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.0 - createdAt: Wed Dec 4 06:41:31 EST 2019 - description: An operator for deploying and managing the IBM CSI Spectrum Scale - Driver. - repository: https://github.com/IBM/ibm-spectrum-scale-csi-operator/ - support: IBM - labels: - app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator - app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator - app.kubernetes.io/name: ibm-spectrum-scale-csi-operator - release: ibm-spectrum-scale-csi-operator - name: ibm-spectrum-scale-csi-operator.v1.0.0 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: Represents a deployment of the IBM CSI Spectrum Scale driver. - displayName: IBM CSI Spectrum Scale Driver - kind: CSIScaleOperator - name: csiscaleoperators.csi.ibm.com - resources: - - kind: csiscaleoperators - name: '' - version: v1 - - kind: Deployment - name: '' - version: v1 - - kind: Secret - name: '' - version: v1 - - kind: Pod - name: '' - version: v1 - - kind: StatefulSet - name: '' - version: v1beta1 - - kind: DaemonSet - name: '' - version: v1beta2 - - kind: ConfigMap - name: '' - version: v1 - specDescriptors: - - description: Node selector for provisioner sidecar. - displayName: Provisioner Node Selector - path: provisionerNodeSelector - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: Node selector for SpectrumScale CSI Plugin. - displayName: Plugin Node Selector - path: pluginNodeSelector - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: A collection of gpfs cluster properties for the csi driver to - mount. - displayName: Clusters - path: clusters - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: Image name for the csi spectrum scale plugin container. - displayName: Spectrum Scale Image - path: spectrumScale - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: An internal counter used by the operator to trigger reloads on - secret change. - displayName: Secret Counter - path: secretCounter - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:number - - description: Mapping of K8s node with SpectrumScale node. - displayName: nodeMapping - path: nodeMapping - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Provisioner image for csi (actually issues provision requests). - displayName: Provisioner Image - path: provisioner - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Sidecar container image for the csi spectrum scale plugin pods. - displayName: Driver Registrar Image - path: driverRegistrar - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: The path to the gpfs file system mounted on the host machine. - displayName: Spectrum Scale Hostpath - path: scaleHostpath - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Attacher image for csi (actually attaches to the storage). - displayName: Attacher Image - path: attacher - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Node selector for attacher sidecar. - displayName: Attacher Node Selector - path: attacherNodeSelector - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: Key for node selector. - displayName: Key - path: provisionerNodeSelector.key - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Value for key. - displayName: Value - path: provisionerNodeSelector.value - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Key for node selector. - displayName: Key - path: pluginNodeSelector.key - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Value for key. - displayName: Value - path: pluginNodeSelector.value - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: A string specifying a cacert resource name. - displayName: cacert Resource Name - path: clusters.cacert - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Require a secure SSL connection to connect to GPFS. - displayName: Secure SSL Mode - path: clusters.secureSslMode - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: A string specifying a secret resource name. - displayName: Kubernetes Secret Name - path: clusters.secrets - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: A collection of targets for REST calls. - displayName: REST API - path: clusters.restApi - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: The primary file system for the GPFS cluster. - displayName: Primary - path: clusters.primary - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: The cluster id of the gpfs cluster specified (mandatory). - displayName: ID - path: clusters.id - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: K8s node name. - displayName: Kubernetes Node - path: nodeMapping.k8sNode - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: SpectrumScale node name. - displayName: Spectrum Scale Node - path: nodeMapping.spectrumscaleNode - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Key for node selector. - displayName: Key - path: attacherNodeSelector.key - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Value for key. - displayName: Value - path: attacherNodeSelector.value - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: The hostname of the REST server. - displayName: GUI Host - path: clusters.restApi.guiHost - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: The port number running the REST server. - displayName: GUI Port - path: clusters.restApi.guiPort - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:number - statusDescriptors: - - description: The active status of the operator - displayName: Conditions - path: conditions - x-descriptors: - - urn:alm:descriptor:io.kubernetes.conditions - - description: Indicates that the plugin is running. - displayName: Is Running - path: conditions.isRunning - x-descriptors: - - urn:alm:descriptor:io.kubernetes.phase - version: v1 - description: "Quickstart Guide\n================\n\nThe IBM Spectrum Scale CSI Operator\ - \ runs within a Kubernetes cluster providing a means to \ndeploy and manage the\ - \ CSI plugin for spectrum scale. For more in depth documentation please refer\n\ - to the [README](https://github.com/IBM/ibm-spectrum-scale-csi-operator/blob/v1.0.0/README.md).\n\ - \nThis operator should be used to deploy the CSI plugin.\n\nThe configuration\ - \ process is as follows:\n\n1. [Spectrum Scale GUI Setup](#spectrum-scale-gui-setup)\n\ - 2. [Custom Resource Configuration](#custom-resource-configuration)\n\nSpectrum\ - \ Scale GUI Setup \n------------------------\n> **NOTE:** This step only needs\ - \ to be preformed once per GUI.\n\n> **WARNING:** If your daemonset pods (driver\ - \ pods) do not come up, generally this means you have a secret that has not\ - \ been defined in the correct namespace.\n\n1. Ensure the Spectrum Scale GUI is\ - \ running by pointing your browser to the IP hosting the GUI:\n\n ![](https://user-images.githubusercontent.com/1195452/67230992-6d2d9700-f40c-11e9-96d5-3f0e5bcb2d9a.png)\n\ - \n > If you do not see a login follow on screen instructions, or review the\ - \ [GUI Documentation](https://www.ibm.com/support/knowledgecenter/en/STXKQY_5.0.3/com.ibm.spectrum.scale.v5r03.doc/bl1ins_quickrefforgui.htm)\n\ - \n\n2. Create a CsiAdmin group account on in the GUI (currently requires a CLI\ - \ call):\n\n ```\n\n export USERNAME=\"SomeUser\"\n export PASSWORD=\"SomePassword\"\ - \n /usr/lpp/mmfs/gui/cli/mkuser ${USERNAME} -p ${PASSWORD} -g CsiAdmin\n\n \ - \ ```\n\n3. Create a Kubernetes secret for the `CsiAdmin` user:\n\n ```\n\n\ - \ export USERNAME_B64=$(echo $USERNAME | base64)\n export PASSWORD_B64=$(echo\ - \ $PASSWORD | base64)\n export OPERATOR_NAMESPACE=\"ibm-spectrum-scale-csi-driver\"\ - \ # Set this to the namespace you deploy the operator in.\n \n\n cat << EOF\ - \ > /tmp/csisecret.yaml\n apiVersion: v1\n data:\n password: ${PASSWORD_B64}\n\ - \ username: ${USERNAME_B64}\n kind: Secret\n type: Opaque\n metadata:\n\ - \ name: csisecret # This should be in your CSIScaleOperator definition\n\ - \ namespace: ${OPERATOR_NAMESPACE} \n labels:\n app.kubernetes.io/name:\ - \ ibm-spectrum-scale-csi-operator # Used by the operator to detect changes, set\ - \ on load of CR change if secret matches name in CR and namespace.\n EOF\n \n\ - \n kubectl create -f /tmp/csisecret.yaml\n rm -f /tmp/csisecret.yaml\n \n \ - \ ```\n\nCustom Resource Configuration\n-----------------------------\n\nThe bundled\ - \ Custom Resource example represents the minimum settings needed to run the operator.\n\ - If your environment needs more advanced settings (e.g. remote clusters, node mapping,\ - \ etc.) please\nrefer to the sample [Custom Resource](https://github.com/IBM/ibm-spectrum-scale-csi-operator/blob/v1.0.0/stable/ibm-spectrum-scale-csi-operator-bundle/operators/ibm-spectrum-scale-csi-operator/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml).\n\ - \n\n" - displayName: IBM Spectrum Scale CSI Plugin Operator - icon: - - base64data: iVBORw0KGgoAAAANSUhEUgAAAGQAAABnCAMAAADBqBfIAAAAsVBMVEUAAACIyVeGxlaGx1aGxlaMylyM0FmJyliPymKOymGGxlaHx1aHx1iHx1eKylqKy1qGx1aHyFeKylmMyV6Gx1aGxlaHyFeMzFyGx1aHx1aIyViKylmLyluGx1aIyFiJylmHx1aIyViJylmLyluIyFeIyVeJylmMy16HyFeIyFeIyViJyliHyFeIyVeHyFeIyFeIyViIyViKylqHyFeIyVeJylmIyViIyFeLy1qFxVWHx1f7ghN0AAAAOXRSTlMAC2qj/JM5qx0juuRL2A8E6s0oQvX4phPy7oJGGd6PMdFhIQmYiVwGtJ5V275usH14Zi3Dc1E9xzb8nESrAAAEv0lEQVRo3u2a6VbiQBCFC4zImrCEsCSGJawOO4iW7/9gM8hAlV1JJNCc45kz3z8HmZvu2rpvhJ+J+WLBvVk1sVKFu9Ir4AEnB3cj94Z/qbfhPpgPBhKFF9CPlW7iV976oJlRCQWGkwWNVCdIsBW1lqCLho9EtwPLOv34rCk06RaesT8r0XNYCsw0VE2myySW5ulf8yw0gxTcyCuecfo8E55pLXAzFTxSqcEXUstTBrzDzXSOO9UDQXaBBwaggSlifdiAMPZviGUPriW7pgz+eMrFdMw5rTmdrE21P4wOlWJsEZlwoosl9/I29do8BBoSssY/THIXRvpvm4qo5fYsPJvGhWPV+BdUjeecm3kAEvdQHgMTJP65oX3XaSyfNYylXOT2NLPGIoysb5ZqseVdZh12LjZkWqfGWBRbkEfiyYsMRpfPCnVLgl0ZOfk9KBTZzPlop76drvJA4sqpNWiI6WnTp+UiCIZsTwuih2wWGEJ5l1KrZsrns7LW9wJv6KAQDPki2+wHWX39GRIOcNIUjIloU/MCS4feGPoOsl8XG/vCfj1cpNIR4WTpUB8e96f2hoQvQrOy40RkHVX5Uy9y9IVntrp1oIbGMSJFPnKgDia2/92ajBN9pDCIFskqfZxVRnkeyEUSE+Wk93ihyHuJBeNxDJJMBYlhKrmI98SrewMCkXjNdUKR1EoUQzjjgc1Cs08iErTYAy4tiGPDqs9oJxBJ0fceU2LgitBQOj9cIzLriHou4SAr73jXi8ihUf0cGvbKkqPmWhF1mHu+fQrxCBSerhXJKMf7AhKL6j1Eal3lnuV7ukVyExTYc0uniNluYhiVokaRCUbh6hPJYxTFnyaSrR1wQZtItfYJhKBJhPgv8l/kXxIZ/TpQ0Vfx61+fhB5TdbeVHyeyr6CALu23ilDQyihZZAG0iJARaSgSpVcATSKEt0BGaw2gUYRwuyeJ+kMAmkQc1Vewei08sO0LL+P5WhFsrUzVUhiE2fTvE8QrRE48vwpPryeakI94kwgasw3EQ55LMhHYz5AYeHHGUondl9rmZSLkYMqbr2TjoDCnE4hAqm2zwitCCCbd5cmcvkiEyD1wm6wKDLnY9RguFFHTP0MeinAe98z4sIdqqvuRIpjPCh+WP22aJfJD6IWI+mm0CNq+pXpdflPe6M02El03wg+VIicKa/muyfjqoVi877dWolqZzwicFyS2G/Fk3GXxMyXhqMjr9pGy8rh89k1zwkNpYRh5GQxKhzD32C3wj9XQWI91ISE9l832u0aR2vH/QBqqymmiKR7Em9qsNjMQjjdAYtYJ8VCIRzOuURZGQMSF2NgJJ39ejzSnG/ybQxGMKMPV6IR1K+65cKwu5U0fBFHm5hTCyG3tdnhDFo0yltwUMeaFWArCmR5r2YILcSuIO0hIw0B72IAEpPOUPdteEL3qxYZqnRplYkbkYKoESwNnoIFGgU5aoc3mVYPIkF7thFvPrTHcSt8+j78RMLJ0hNjBrYyMsH4UfDGn4Wb6E97QPHFbaaZBBy6fEb4FnYp4e6b7zyTKCyQo6TQQOCwG/DSuF2mnGr0x6ITmMzFtwF2Y05x/q8K9MJ2/we+BXuRrh/puDPfFcqdZ+In8Bg8Knr3O+ZToAAAAAElFTkSuQmCC - mediatype: image/png - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - security.openshift.io - resources: - - securitycontextconstraints - verbs: - - '*' - - apiGroups: - - '' - resources: - - secrets - - secrets/status - verbs: - - '*' - - apiGroups: - - storage.k8s.io - resources: - - volumeattachments - - storageclasses - verbs: - - '*' - serviceAccountName: ibm-spectrum-scale-csi-operator - - rules: - - apiGroups: - - '' - resources: - - nodes - verbs: - - get - - list - - update - - apiGroups: - - '' - resources: - - namespaces - verbs: - - get - - list - - apiGroups: - - '' - resources: - - persistentvolumes - verbs: - - get - - list - - watch - - update - - apiGroups: - - storage.k8s.io - resources: - - volumeattachments - verbs: - - get - - list - - watch - - update - serviceAccountName: ibm-spectrum-scale-csi-node - - rules: - - apiGroups: - - '' - resources: - - events - verbs: - - get - - list - - watch - - update - - apiGroups: - - '' - resources: - - persistentvolumes - verbs: - - get - - list - - watch - - update - - apiGroups: - - '' - resources: - - nodes - verbs: - - get - - list - - watch - - apiGroups: - - storage.k8s.io - resources: - - volumeattachments - verbs: - - get - - list - - watch - - update - serviceAccountName: ibm-spectrum-scale-csi-attacher - - rules: - - apiGroups: - - '' - resources: - - secrets - verbs: - - get - - list - - apiGroups: - - '' - resources: - - persistentvolumes - verbs: - - get - - list - - watch - - create - - delete - - apiGroups: - - '' - resources: - - persistentvolumeclaims - verbs: - - get - - list - - watch - - update - - apiGroups: - - storage.k8s.io - resources: - - storageclasses - verbs: - - get - - list - - watch - - apiGroups: - - '' - resources: - - events - verbs: - - list - - watch - - create - - update - - patch - serviceAccountName: ibm-spectrum-scale-csi-provisioner - deployments: - - name: ibm-spectrum-scale-csi-operator - spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: ibm-spectrum-scale-csi-operator - strategy: {} - template: - metadata: - annotations: - productID: ibm-spectrum-scale-csi-operator - productName: IBM Spectrum Scale CSI Operator - productVersion: 1.0.0 - labels: - app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator - app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator - app.kubernetes.io/name: ibm-spectrum-scale-csi-operator - name: ibm-spectrum-scale-csi-operator - product: ibm-spectrum-scale-csi - release: ibm-spectrum-scale-csi-operator - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: beta.kubernetes.io/arch - operator: Exists - containers: - - command: - - /usr/local/bin/ao-logs - - /tmp/ansible-operator/runner - - stdout - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.0 - imagePullPolicy: IfNotPresent - name: ansible - resources: {} - securityContext: - capabilities: - drop: - - ALL - volumeMounts: - - mountPath: /tmp/ansible-operator/runner - name: runner - readOnly: true - - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: ibm-spectrum-scale-csi-operator - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.0 - imagePullPolicy: IfNotPresent - name: operator - resources: {} - securityContext: - capabilities: - drop: - - ALL - volumeMounts: - - mountPath: /tmp/ansible-operator/runner - name: runner - serviceAccountName: ibm-spectrum-scale-csi-operator - volumes: - - emptyDir: {} - name: runner - permissions: - - rules: - - apiGroups: - - '' - resources: - - pods - - persistentvolumeclaims - - services - - endpoints - - events - - configmaps - - secrets - - secrets/status - - services/finalizers - verbs: - - '*' - - apiGroups: - - apps - resources: - - deployments - - daemonsets - - replicasets - - statefulsets - verbs: - - '*' - - apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - verbs: - - get - - create - - apiGroups: - - apps - resourceNames: - - ibm-spectrum-scale-csi-operator - resources: - - deployments/finalizers - verbs: - - update - - apiGroups: - - apps - resources: - - replicasets - verbs: - - get - - apiGroups: - - csi.ibm.com - resources: - - '*' - verbs: - - '*' - serviceAccountName: ibm-spectrum-scale-csi-operator - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - keywords: - - IBM - - GPFS - - Spectrum Scale - labels: - operator: ibm-spectrum-scale-csi-operator - links: - - name: IBM CSI Spectrum Scale Operator Documentation - url: https://ibm-spectrum-scale-csi-operator.readthedocs.io/en/latest/ - - name: CSI Developer Documentation - url: https://kubernetes-csi.github.io/docs/ - maintainers: - - email: jdunham@us.ibm.com - name: John Dunham - - email: yadayada@in.ibm.com - name: Yadavendra Yadav - maturity: alpha - provider: - name: IBM - version: 1.0.0 diff --git a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/ibm-spectrum-scale-csi-operator-crd.yaml b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/csiscaleoperators.csi.ibm.com.crd.yaml similarity index 90% rename from operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/ibm-spectrum-scale-csi-operator-crd.yaml rename to operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/csiscaleoperators.csi.ibm.com.crd.yaml index 94df52269..f14069e99 100644 --- a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/ibm-spectrum-scale-csi-operator-crd.yaml +++ b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/csiscaleoperators.csi.ibm.com.crd.yaml @@ -1,3 +1,4 @@ +--- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: @@ -21,14 +22,16 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation + description: + "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" type: string kind: - description: 'Kind is a string value representing the REST resource this + description: + "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" type: string metadata: type: object @@ -50,7 +53,8 @@ spec: type: object type: array clusters: - description: A collection of gpfs cluster properties for the csi driver + description: + A collection of gpfs cluster properties for the csi driver to mount. items: properties: @@ -99,10 +103,11 @@ spec: type: boolean type: object required: - - id + - id type: array driverRegistrar: - description: Sidecar container image for the csi spectrum scale plugin + description: + Sidecar container image for the csi spectrum scale plugin pods. type: string nodeMapping: @@ -148,14 +153,15 @@ spec: description: The path to the gpfs file system mounted on the host machine. type: string secretCounter: - description: An internal counter used by the operator to trigger reloads + description: + An internal counter used by the operator to trigger reloads on secret change. type: integer spectrumScale: description: Image name for the csi spectrum scale plugin container. type: string required: - - scaleHostpath + - scaleHostpath type: object status: properties: @@ -172,6 +178,6 @@ spec: type: object version: v1 versions: - - name: v1 - served: true - storage: true + - name: v1 + served: true + storage: true diff --git a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/ibm-spectrum-scale-csi-operator.v1.0.1.clusterserviceversion.yaml b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/ibm-spectrum-scale-csi-operator.v1.0.1.clusterserviceversion.yaml index 22b337dd8..a8d9dc291 100644 --- a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/ibm-spectrum-scale-csi-operator.v1.0.1.clusterserviceversion.yaml +++ b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.1/ibm-spectrum-scale-csi-operator.v1.0.1.clusterserviceversion.yaml @@ -1,50 +1,33 @@ -apiVersion: operators.coreos.com/v1 +--- +apiVersion: operators.coreos.com/v1alpha1 kind: ClusterServiceVersion metadata: annotations: - alm-examples: |- - [ - { - "apiVersion": "csi.ibm.com/v1", - "kind": "CSIScaleOperator", - "metadata": { - "labels": { - "app.kubernetes.io/instance": "ibm-spectrum-scale-csi-operator", - "app.kubernetes.io/managed-by": "ibm-spectrum-scale-csi-operator", - "app.kubernetes.io/name": "ibm-spectrum-scale-csi-operator" - }, - "name": "ibm-spectrum-scale-csi", - "namespace": "ibm-spectrum-scale-csi-driver", - "release": "ibm-spectrum-scale-csi-operator" - }, - "spec": { - "clusters": [ - { - "id": "\u003c Primary Cluster ID - WARNING - THIS IS A STRING NEEDS YAML QUOTES! \u003e", - "primary": { - "primaryFs": "\u003c Primary Filesystem \u003e", - "primaryFset": "\u003c Fileset in Primary Filesystem \u003e" - }, - "restApi": [ - { - "guiHost": "\u003c Primary cluster GUI IP/Hostname \u003e" - } - ], - "secrets": "secret1", - "secureSslMode": false - } - ], - "scaleHostpath": "\u003c GPFS FileSystem Path \u003e" - }, - "status": {} - } - ] + alm-examples: + "[\n {\n \"apiVersion\": \"csi.ibm.com/v1\",\n \"kind\":\ + \ \"CSIScaleOperator\",\n \"metadata\": {\n \"labels\": {\n \"\ + app.kubernetes.io/instance\": \"ibm-spectrum-scale-csi-operator\",\n \ + \ \"app.kubernetes.io/managed-by\": \"ibm-spectrum-scale-csi-operator\",\n \ + \ \"app.kubernetes.io/name\": \"ibm-spectrum-scale-csi-operator\",\n \ + \ \"release\": \"ibm-spectrum-scale-csi-operator\"\n },\n \"\ + name\": \"ibm-spectrum-scale-csi\",\n \"namespace\": \"ibm-spectrum-scale-csi-driver\"\ + \n },\n \"spec\": {\n \"clusters\": [\n {\n \"id\"\ + : \"\\u003c Primary Cluster ID - WARNING - THIS IS A STRING NEEDS YAML QUOTES!\ + \ \\u003e\",\n \"primary\": {\n \"primaryFs\": \"\\u003c\ + \ Primary Filesystem \\u003e\",\n ß \"primaryFset\": \"\\u003c Fileset\ + \ in Primary Filesystem \\u003e\"\n },\n \"restApi\": [\n\ + \ {\n \"guiHost\": \"\\u003c Primary cluster GUI IP/Hostname\ + \ \\u003e\"\n }\n ],\n \"secrets\": \"secret1\"\ + ,\n \"secureSslMode\": false\n }\n ],\n \"scaleHostpath\"\ + : \"\\u003c GPFS FileSystem Path \\u003e\"\n },\n \"status\": {}\n }\n\ + ]" capabilities: Basic Install categories: Storage certified: "false" containerImage: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.1 - createdAt: Wed Dec 4 06:41:31 EST 2019 - description: An operator for deploying and managing the IBM CSI Spectrum Scale + createdAt: Mon Feb 17 05:46:00 PST 2020 + description: + An operator for deploying and managing the IBM CSI Spectrum Scale Driver. repository: https://github.com/IBM/ibm-spectrum-scale-csi-operator/ support: IBM @@ -56,448 +39,426 @@ metadata: name: ibm-spectrum-scale-csi-operator.v1.0.1 namespace: placeholder spec: + replaces: ibm-spectrum-scale-csi-operator.v1.0.0 apiservicedefinitions: {} customresourcedefinitions: owned: - - description: Represents a deployment of the IBM CSI Spectrum Scale driver. - displayName: IBM CSI Spectrum Scale Driver - kind: CSIScaleOperator - name: csiscaleoperators.csi.ibm.com - resources: - - kind: csiscaleoperators - name: "" + - description: Represents a deployment of the IBM CSI Spectrum Scale driver. + displayName: IBM CSI Spectrum Scale Driver + kind: CSIScaleOperator + name: csiscaleoperators.csi.ibm.com + resources: + - kind: csiscaleoperators + name: "" + version: v1 + - kind: Deployment + name: "" + version: v1 + - kind: Secret + name: "" + version: v1 + - kind: Pod + name: "" + version: v1 + - kind: StatefulSet + name: "" + version: v1beta1 + - kind: DaemonSet + name: "" + version: v1beta2 + - kind: ConfigMap + name: "" + version: v1 + specDescriptors: + - description: Node selector for provisioner sidecar. + displayName: Provisioner Node Selector + path: provisionerNodeSelector + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: Node selector for SpectrumScale CSI Plugin. + displayName: Plugin Node Selector + path: pluginNodeSelector + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: + A collection of gpfs cluster properties for the csi driver to + mount. + displayName: Clusters + path: clusters + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: Image name for the csi spectrum scale plugin container. + displayName: Spectrum Scale Image + path: spectrumScale + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: + An internal counter used by the operator to trigger reloads on + secret change. + displayName: Secret Counter + path: secretCounter + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: A generic trigger to be used in kickin off the ansible operator. + displayName: trigger + path: trigger + x-descriptors: [] + - description: Mapping of K8s node with SpectrumScale node. + displayName: nodeMapping + path: nodeMapping + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Provisioner image for csi (actually issues provision requests). + displayName: Provisioner Image + path: provisioner + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Sidecar container image for the csi spectrum scale plugin pods. + displayName: Driver Registrar Image + path: driverRegistrar + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: The path to the gpfs file system mounted on the host machine. + displayName: Spectrum Scale Hostpath + path: scaleHostpath + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Attacher image for csi (actually attaches to the storage). + displayName: Attacher Image + path: attacher + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Node selector for attacher sidecar. + displayName: Attacher Node Selector + path: attacherNodeSelector + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: Key for node selector. + displayName: Key + path: provisionerNodeSelector.key + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Value for key. + displayName: Value + path: provisionerNodeSelector.value + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Key for node selector. + displayName: Key + path: pluginNodeSelector.key + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Value for key. + displayName: Value + path: pluginNodeSelector.value + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: A string specifying a cacert resource name. + displayName: cacert Resource Name + path: clusters.cacert + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Require a secure SSL connection to connect to GPFS. + displayName: Secure SSL Mode + path: clusters.secureSslMode + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:booleanSwitch + - description: A string specifying a secret resource name. + displayName: Kubernetes Secret Name + path: clusters.secrets + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: A collection of targets for REST calls. + displayName: REST API + path: clusters.restApi + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: The primary file system for the GPFS cluster. + displayName: Primary + path: clusters.primary + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: The cluster id of the gpfs cluster specified (mandatory). + displayName: ID + path: clusters.id + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: K8s node name. + displayName: Kubernetes Node + path: nodeMapping.k8sNode + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: SpectrumScale node name. + displayName: spectrumscaleNode + path: nodeMapping.spectrumscaleNode + x-descriptors: [] + - description: Key for node selector. + displayName: Key + path: attacherNodeSelector.key + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Value for key. + displayName: Value + path: attacherNodeSelector.value + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: The hostname of the REST server. + displayName: GUI Host + path: clusters.restApi.guiHost + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: The port number running the REST server. + displayName: GUI Port + path: clusters.restApi.guiPort + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + statusDescriptors: + - description: The active status of the operator + displayName: Conditions + path: conditions + x-descriptors: + - urn:alm:descriptor:io.kubernetes.conditions + - description: Indicates that the plugin is running. + displayName: Is Running + path: conditions.isRunning + x-descriptors: + - urn:alm:descriptor:io.kubernetes.phase version: v1 - - kind: Deployment - name: "" - version: v1 - - kind: Secret - name: "" - version: v1 - - kind: Pod - name: "" - version: v1 - - kind: StatefulSet - name: "" - version: v1beta1 - - kind: DaemonSet - name: "" - version: v1beta2 - - kind: ConfigMap - name: "" - version: v1 - specDescriptors: - - description: Node selector for provisioner sidecar. - displayName: Provisioner Node Selector - path: provisionerNodeSelector - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: Node selector for SpectrumScale CSI Plugin. - displayName: Plugin Node Selector - path: pluginNodeSelector - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: A collection of gpfs cluster properties for the csi driver to - mount. - displayName: Clusters - path: clusters - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: Image name for the csi spectrum scale plugin container. - displayName: Spectrum Scale Image - path: spectrumScale - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: An internal counter used by the operator to trigger reloads on - secret change. - displayName: Secret Counter - path: secretCounter - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:number - - description: Mapping of K8s node with SpectrumScale node. - displayName: nodeMapping - path: nodeMapping - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Provisioner image for csi (actually issues provision requests). - displayName: Provisioner Image - path: provisioner - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Sidecar container image for the csi spectrum scale plugin pods. - displayName: Driver Registrar Image - path: driverRegistrar - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: The path to the gpfs file system mounted on the host machine. - displayName: Spectrum Scale Hostpath - path: scaleHostpath - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Attacher image for csi (actually attaches to the storage). - displayName: Attacher Image - path: attacher - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Node selector for attacher sidecar. - displayName: Attacher Node Selector - path: attacherNodeSelector - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: Key for node selector. - displayName: Key - path: provisionerNodeSelector.key - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Value for key. - displayName: Value - path: provisionerNodeSelector.value - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Key for node selector. - displayName: Key - path: pluginNodeSelector.key - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Value for key. - displayName: Value - path: pluginNodeSelector.value - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: A string specifying a cacert resource name. - displayName: cacert Resource Name - path: clusters.cacert - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Require a secure SSL connection to connect to GPFS. - displayName: Secure SSL Mode - path: clusters.secureSslMode - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: A string specifying a secret resource name. - displayName: Kubernetes Secret Name - path: clusters.secrets - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: A collection of targets for REST calls. - displayName: REST API - path: clusters.restApi - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: The primary file system for the GPFS cluster. - displayName: Primary - path: clusters.primary - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:advanced - - description: The cluster id of the gpfs cluster specified (mandatory). - displayName: ID - path: clusters.id - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: K8s node name. - displayName: Kubernetes Node - path: nodeMapping.k8sNode - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: SpectrumScale node name. - displayName: Spectrum Scale Node - path: nodeMapping.spectrumscaleNode - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Key for node selector. - displayName: Key - path: attacherNodeSelector.key - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: Value for key. - displayName: Value - path: attacherNodeSelector.value - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: The hostname of the REST server. - displayName: GUI Host - path: clusters.restApi.guiHost - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:label - - description: The port number running the REST server. - displayName: GUI Port - path: clusters.restApi.guiPort - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:number - statusDescriptors: - - description: The active status of the operator - displayName: Conditions - path: conditions - x-descriptors: - - urn:alm:descriptor:io.kubernetes.conditions - - description: Indicates that the plugin is running. - displayName: Is Running - path: conditions.isRunning - x-descriptors: - - urn:alm:descriptor:io.kubernetes.phase - version: v1 - description: "IBM Spectrum Scale CSI Operator Quickstart\n==========================================\n\nThe - IBM Spectrum Scale CSI Operator runs within a Kubernetes cluster providing a means - to \ndeploy and manage the CSI plugin for spectrum scale. For more in depth documentation - please refer\nto the [README](https://github.com/IBM/ibm-spectrum-scale-csi-operator/blob/v1.0.1/README.md).\n\nThis - operator should be used to deploy the CSI plugin.\n\nThe configuration process - is as follows:\n\n1. [Spectrum Scale GUI Setup](#spectrum-scale-gui-setup)\n2. - [Custom Resource Configuration](#custom-resource-configuration)\n\nSpectrum Scale - GUI Setup \n------------------------\n> **NOTE:** This step only needs to be preformed - once per GUI.\n\n> **WARNING:** If your daemonset pods (driver pods) do not come - up, generally this means you have a secret that has not been defined in the - correct namespace.\n\n1. Ensure the Spectrum Scale GUI is running by pointing - your browser to the IP hosting the GUI:\n\n ![](https://user-images.githubusercontent.com/1195452/67230992-6d2d9700-f40c-11e9-96d5-3f0e5bcb2d9a.png)\n\n - \ > If you do not see a login follow on screen instructions, or review the [GUI - Documentation](https://www.ibm.com/support/knowledgecenter/en/STXKQY_5.0.3/com.ibm.spectrum.scale.v5r03.doc/bl1ins_quickrefforgui.htm)\n\n\n2. - Create a CsiAdmin group account on in the GUI (currently requires a CLI call):\n\n - \ ```\n\n export USERNAME=\"SomeUser\"\n export PASSWORD=\"SomePassword\"\n - \ /usr/lpp/mmfs/gui/cli/mkuser ${USERNAME} -p ${PASSWORD} -g CsiAdmin\n\n ```\n\n3. - Create a Kubernetes secret for the `CsiAdmin` user:\n\n ```\n\n export USERNAME_B64=$(echo - $USERNAME | base64)\n export PASSWORD_B64=$(echo $PASSWORD | base64)\n export - OPERATOR_NAMESPACE=\"ibm-spectrum-scale-csi-driver\" # Set this to the namespace - you deploy the operator in.\n \n\n cat << EOF > /tmp/csisecret.yaml\n apiVersion: - v1\n data:\n password: ${PASSWORD_B64}\n username: ${USERNAME_B64}\n kind: - Secret\n type: Opaque\n metadata:\n name: csisecret # This should be in - your CSIScaleOperator definition\n namespace: ${OPERATOR_NAMESPACE} \n labels:\n - \ app.kubernetes.io/name: ibm-spectrum-scale-csi-operator # Used by the operator - to detect changes, set on load of CR change if secret matches name in CR and namespace.\n - \ EOF\n \n\n kubectl create -f /tmp/csisecret.yaml\n rm -f /tmp/csisecret.yaml\n - \ \n ```\n\nCustom Resource Configuration\n-----------------------------\n\nThe - bundled Custom Resource example represents the minimum settings needed to run - the operator.\nIf your environment needs more advanced settings (e.g. remote clusters, - node mapping, etc.) please\nrefer to the sample [Custom Resource](https://github.com/IBM/ibm-spectrum-scale-csi-operator/blob/v1.0.1/stable/ibm-spectrum-scale-csi-operator-bundle/operators/ibm-spectrum-scale-csi-operator/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml).\n\n\n" + description: + "\nThe IBM Spectrum Scale CSI Operator runs within a Kubernetes cluster providing\ + \ a means to \ndeploy and manage the CSI plugin for spectrum scale. For more in\ + \ depth documentation please refer\nto the [README](https://github.com/IBM/ibm-spectrum-scale-csi-operator/blob/v1.0.1/README.md).\n\ + \nThis operator should be used to deploy the CSI plugin.\n\nThe configuration\ + \ process is as follows:\n\n1. [Spectrum Scale GUI Setup](#spectrum-scale-gui-setup)\n\ + 2. [Custom Resource Configuration](#custom-resource-configuration)\n\nSpectrum\ + \ Scale GUI Setup \n------------------------\n> **NOTE:** This step only needs\ + \ to be preformed once per GUI.\n\n> **WARNING:** If your daemonset pods (driver\ + \ pods) do not come up, generally this means you have a secret that has not\ + \ been defined in the correct namespace.\n\n1. Ensure the Spectrum Scale GUI is\ + \ running by pointing your browser to the IP hosting the GUI:\n\n ![](https://user-images.githubusercontent.com/1195452/67230992-6d2d9700-f40c-11e9-96d5-3f0e5bcb2d9a.png)\n\ + \n > If you do not see a login follow on screen instructions, or review the\ + \ [GUI Documentation](https://www.ibm.com/support/knowledgecenter/en/STXKQY_5.0.3/com.ibm.spectrum.scale.v5r03.doc/bl1ins_quickrefforgui.htm)\n\ + \n\n3. Create a CsiAdmin group account on in the GUI (currently requires a CLI\ + \ call):\n\n ```\n\n export USERNAME=\"SomeUser\"\n export PASSWORD=\"SomePassword\"\ + \n /usr/lpp/mmfs/gui/cli/mkuser ${USERNAME} -p ${PASSWORD} -g CsiAdmin\n\n \ + \ ```\n\n3. Create a Kubernetes secret for the `CsiAdmin` user:\n\n ```\n\n\ + \ export USERNAME_B64=$(echo $USERNAME | base64)\n export PASSWORD_B64=$(echo\ + \ $PASSWORD | base64)\n export OPERATOR_NAMESPACE=\"ibm-spectrum-scale-csi-driver\"\ + \ # Set this to the namespace you deploy the operator in.\n \n\n cat << EOF\ + \ > /tmp/csisecret.yaml\n apiVersion: v1\n data:\n password: ${PASSWORD_B64}\n\ + \ username: ${USERNAME_B64}\n kind: Secret\n type: Opaque\n metadata:\n\ + \ name: csisecret # This should be in your CSIScaleOperator definition\n\ + \ namespace: ${OPERATOR_NAMESPACE} \n labels:\n app.kubernetes.io/name:\ + \ ibm-spectrum-scale-csi-operator # Used by the operator to detect changes, set\ + \ on load of CR change if secret matches name in CR and namespace.\n EOF\n \n\ + \n kubectl create -f /tmp/csisecret.yaml\n rm -f /tmp/csisecret.yaml\n \n \ + \ ```\n\nCustom Resource Configuration\n-----------------------------\n\nThe bundled\ + \ Custom Resource example represents the minimum settings needed to run the operator.\n\ + If your environment needs more advanced settings (e.g. remote clusters, node mapping,\ + \ etc.) please\nrefer to the sample [Custom Resource](https://github.com/IBM/ibm-spectrum-scale-csi-operator/blob/v1.0.1/stable/ibm-spectrum-scale-csi-operator-bundle/operators/ibm-spectrum-scale-csi-operator/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml).\n\ + \n\n" displayName: IBM Spectrum Scale CSI Plugin Operator icon: - - base64data: iVBORw0KGgoAAAANSUhEUgAAAGQAAABnCAMAAADBqBfIAAAAsVBMVEUAAACIyVeGxlaGx1aGxlaMylyM0FmJyliPymKOymGGxlaHx1aHx1iHx1eKylqKy1qGx1aHyFeKylmMyV6Gx1aGxlaHyFeMzFyGx1aHx1aIyViKylmLyluGx1aIyFiJylmHx1aIyViJylmLyluIyFeIyVeJylmMy16HyFeIyFeIyViJyliHyFeIyVeHyFeIyFeIyViIyViKylqHyFeIyVeJylmIyViIyFeLy1qFxVWHx1f7ghN0AAAAOXRSTlMAC2qj/JM5qx0juuRL2A8E6s0oQvX4phPy7oJGGd6PMdFhIQmYiVwGtJ5V275usH14Zi3Dc1E9xzb8nESrAAAEv0lEQVRo3u2a6VbiQBCFC4zImrCEsCSGJawOO4iW7/9gM8hAlV1JJNCc45kz3z8HmZvu2rpvhJ+J+WLBvVk1sVKFu9Ir4AEnB3cj94Z/qbfhPpgPBhKFF9CPlW7iV976oJlRCQWGkwWNVCdIsBW1lqCLho9EtwPLOv34rCk06RaesT8r0XNYCsw0VE2myySW5ulf8yw0gxTcyCuecfo8E55pLXAzFTxSqcEXUstTBrzDzXSOO9UDQXaBBwaggSlifdiAMPZviGUPriW7pgz+eMrFdMw5rTmdrE21P4wOlWJsEZlwoosl9/I29do8BBoSssY/THIXRvpvm4qo5fYsPJvGhWPV+BdUjeecm3kAEvdQHgMTJP65oX3XaSyfNYylXOT2NLPGIoysb5ZqseVdZh12LjZkWqfGWBRbkEfiyYsMRpfPCnVLgl0ZOfk9KBTZzPlop76drvJA4sqpNWiI6WnTp+UiCIZsTwuih2wWGEJ5l1KrZsrns7LW9wJv6KAQDPki2+wHWX39GRIOcNIUjIloU/MCS4feGPoOsl8XG/vCfj1cpNIR4WTpUB8e96f2hoQvQrOy40RkHVX5Uy9y9IVntrp1oIbGMSJFPnKgDia2/92ajBN9pDCIFskqfZxVRnkeyEUSE+Wk93ihyHuJBeNxDJJMBYlhKrmI98SrewMCkXjNdUKR1EoUQzjjgc1Cs08iErTYAy4tiGPDqs9oJxBJ0fceU2LgitBQOj9cIzLriHou4SAr73jXi8ihUf0cGvbKkqPmWhF1mHu+fQrxCBSerhXJKMf7AhKL6j1Eal3lnuV7ukVyExTYc0uniNluYhiVokaRCUbh6hPJYxTFnyaSrR1wQZtItfYJhKBJhPgv8l/kXxIZ/TpQ0Vfx61+fhB5TdbeVHyeyr6CALu23ilDQyihZZAG0iJARaSgSpVcATSKEt0BGaw2gUYRwuyeJ+kMAmkQc1Vewei08sO0LL+P5WhFsrUzVUhiE2fTvE8QrRE48vwpPryeakI94kwgasw3EQ55LMhHYz5AYeHHGUondl9rmZSLkYMqbr2TjoDCnE4hAqm2zwitCCCbd5cmcvkiEyD1wm6wKDLnY9RguFFHTP0MeinAe98z4sIdqqvuRIpjPCh+WP22aJfJD6IWI+mm0CNq+pXpdflPe6M02El03wg+VIicKa/muyfjqoVi877dWolqZzwicFyS2G/Fk3GXxMyXhqMjr9pGy8rh89k1zwkNpYRh5GQxKhzD32C3wj9XQWI91ISE9l832u0aR2vH/QBqqymmiKR7Em9qsNjMQjjdAYtYJ8VCIRzOuURZGQMSF2NgJJ39ejzSnG/ybQxGMKMPV6IR1K+65cKwu5U0fBFHm5hTCyG3tdnhDFo0yltwUMeaFWArCmR5r2YILcSuIO0hIw0B72IAEpPOUPdteEL3qxYZqnRplYkbkYKoESwNnoIFGgU5aoc3mVYPIkF7thFvPrTHcSt8+j78RMLJ0hNjBrYyMsH4UfDGn4Wb6E97QPHFbaaZBBy6fEb4FnYp4e6b7zyTKCyQo6TQQOCwG/DSuF2mnGr0x6ITmMzFtwF2Y05x/q8K9MJ2/we+BXuRrh/puDPfFcqdZ+In8Bg8Knr3O+ZToAAAAAElFTkSuQmCC - mediatype: image/png + - base64data: iVBORw0KGgoAAAANSUhEUgAAAGQAAABnCAMAAADBqBfIAAAAsVBMVEUAAACIyVeGxlaGx1aGxlaMylyM0FmJyliPymKOymGGxlaHx1aHx1iHx1eKylqKy1qGx1aHyFeKylmMyV6Gx1aGxlaHyFeMzFyGx1aHx1aIyViKylmLyluGx1aIyFiJylmHx1aIyViJylmLyluIyFeIyVeJylmMy16HyFeIyFeIyViJyliHyFeIyVeHyFeIyFeIyViIyViKylqHyFeIyVeJylmIyViIyFeLy1qFxVWHx1f7ghN0AAAAOXRSTlMAC2qj/JM5qx0juuRL2A8E6s0oQvX4phPy7oJGGd6PMdFhIQmYiVwGtJ5V275usH14Zi3Dc1E9xzb8nESrAAAEv0lEQVRo3u2a6VbiQBCFC4zImrCEsCSGJawOO4iW7/9gM8hAlV1JJNCc45kz3z8HmZvu2rpvhJ+J+WLBvVk1sVKFu9Ir4AEnB3cj94Z/qbfhPpgPBhKFF9CPlW7iV976oJlRCQWGkwWNVCdIsBW1lqCLho9EtwPLOv34rCk06RaesT8r0XNYCsw0VE2myySW5ulf8yw0gxTcyCuecfo8E55pLXAzFTxSqcEXUstTBrzDzXSOO9UDQXaBBwaggSlifdiAMPZviGUPriW7pgz+eMrFdMw5rTmdrE21P4wOlWJsEZlwoosl9/I29do8BBoSssY/THIXRvpvm4qo5fYsPJvGhWPV+BdUjeecm3kAEvdQHgMTJP65oX3XaSyfNYylXOT2NLPGIoysb5ZqseVdZh12LjZkWqfGWBRbkEfiyYsMRpfPCnVLgl0ZOfk9KBTZzPlop76drvJA4sqpNWiI6WnTp+UiCIZsTwuih2wWGEJ5l1KrZsrns7LW9wJv6KAQDPki2+wHWX39GRIOcNIUjIloU/MCS4feGPoOsl8XG/vCfj1cpNIR4WTpUB8e96f2hoQvQrOy40RkHVX5Uy9y9IVntrp1oIbGMSJFPnKgDia2/92ajBN9pDCIFskqfZxVRnkeyEUSE+Wk93ihyHuJBeNxDJJMBYlhKrmI98SrewMCkXjNdUKR1EoUQzjjgc1Cs08iErTYAy4tiGPDqs9oJxBJ0fceU2LgitBQOj9cIzLriHou4SAr73jXi8ihUf0cGvbKkqPmWhF1mHu+fQrxCBSerhXJKMf7AhKL6j1Eal3lnuV7ukVyExTYc0uniNluYhiVokaRCUbh6hPJYxTFnyaSrR1wQZtItfYJhKBJhPgv8l/kXxIZ/TpQ0Vfx61+fhB5TdbeVHyeyr6CALu23ilDQyihZZAG0iJARaSgSpVcATSKEt0BGaw2gUYRwuyeJ+kMAmkQc1Vewei08sO0LL+P5WhFsrUzVUhiE2fTvE8QrRE48vwpPryeakI94kwgasw3EQ55LMhHYz5AYeHHGUondl9rmZSLkYMqbr2TjoDCnE4hAqm2zwitCCCbd5cmcvkiEyD1wm6wKDLnY9RguFFHTP0MeinAe98z4sIdqqvuRIpjPCh+WP22aJfJD6IWI+mm0CNq+pXpdflPe6M02El03wg+VIicKa/muyfjqoVi877dWolqZzwicFyS2G/Fk3GXxMyXhqMjr9pGy8rh89k1zwkNpYRh5GQxKhzD32C3wj9XQWI91ISE9l832u0aR2vH/QBqqymmiKR7Em9qsNjMQjjdAYtYJ8VCIRzOuURZGQMSF2NgJJ39ejzSnG/ybQxGMKMPV6IR1K+65cKwu5U0fBFHm5hTCyG3tdnhDFo0yltwUMeaFWArCmR5r2YILcSuIO0hIw0B72IAEpPOUPdteEL3qxYZqnRplYkbkYKoESwNnoIFGgU5aoc3mVYPIkF7thFvPrTHcSt8+j78RMLJ0hNjBrYyMsH4UfDGn4Wb6E97QPHFbaaZBBy6fEb4FnYp4e6b7zyTKCyQo6TQQOCwG/DSuF2mnGr0x6ITmMzFtwF2Y05x/q8K9MJ2/we+BXuRrh/puDPfFcqdZ+In8Bg8Knr3O+ZToAAAAAElFTkSuQmCC + mediatype: image/png install: spec: clusterPermissions: - - rules: - - apiGroups: - - "" - resources: - - pods - - persistentvolumeclaims - - services - - endpoints - - events - - configmaps - - secrets - - secrets/status - - services/finalizers - - serviceaccounts - verbs: - - '*' - - apiGroups: - - rbac.authorization.k8s.io - resources: - - roles - - rolebindings - verbs: - - create - - delete - - apiGroups: - - apps - resources: - - deployments - - daemonsets - - replicasets - - statefulsets - verbs: - - '*' - - apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - verbs: - - get - - create - - apiGroups: - - apps - resourceNames: - - ibm-spectrum-scale-csi-operator - resources: - - deployments/finalizers - verbs: - - update - - apiGroups: - - apps - resources: - - replicasets - verbs: - - get - - apiGroups: - - csi.ibm.com - resources: - - '*' - verbs: - - '*' - - apiGroups: - - security.openshift.io - resources: - - securitycontextconstraints - verbs: - - '*' - - apiGroups: - - storage.k8s.io - resources: - - volumeattachments - - storageclasses - verbs: - - '*' - serviceAccountName: ibm-spectrum-scale-csi-operator + - rules: + - apiGroups: + - "" + resources: + - pods + - persistentvolumeclaims + - services + - endpoints + - events + - configmaps + - secrets + - secrets/status + - services/finalizers + - serviceaccounts + verbs: + - "*" + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterroles + - clusterrolebindings + verbs: + - "*" + - apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - "*" + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create + - apiGroups: + - apps + resourceNames: + - ibm-spectrum-scale-csi-operator + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - apiGroups: + - csi.ibm.com + resources: + - "*" + verbs: + - "*" + - apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints + verbs: + - "*" + - apiGroups: + - storage.k8s.io + resources: + - volumeattachments + - storageclasses + verbs: + - "*" + serviceAccountName: ibm-spectrum-scale-csi-operator deployments: - - name: ibm-spectrum-scale-csi-operator - spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: ibm-spectrum-scale-csi-operator - strategy: {} - template: - metadata: - annotations: - productID: ibm-spectrum-scale-csi-operator - productName: IBM Spectrum Scale CSI Operator - productVersion: 1.0.1 - labels: - app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator - app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + - name: ibm-spectrum-scale-csi-operator + spec: + replicas: 1 + selector: + matchLabels: app.kubernetes.io/name: ibm-spectrum-scale-csi-operator - name: ibm-spectrum-scale-csi-operator - product: ibm-spectrum-scale-csi - release: ibm-spectrum-scale-csi-operator - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: beta.kubernetes.io/arch - operator: Exists - containers: - - command: - - /usr/local/bin/ao-logs - - /tmp/ansible-operator/runner - - stdout - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.1 - imagePullPolicy: IfNotPresent - name: ansible - resources: {} - securityContext: - capabilities: - drop: - - ALL - volumeMounts: - - mountPath: /tmp/ansible-operator/runner - name: runner - readOnly: true - - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: ibm-spectrum-scale-csi-operator - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.1 - imagePullPolicy: IfNotPresent - name: operator - resources: {} - securityContext: - capabilities: - drop: - - ALL - volumeMounts: - - mountPath: /tmp/ansible-operator/runner - name: runner - serviceAccountName: ibm-spectrum-scale-csi-operator - volumes: - - emptyDir: {} - name: runner - permissions: - - rules: - - apiGroups: - - "" - resources: - - pods - - persistentvolumeclaims - - services - - endpoints - - events - - configmaps - - secrets - - secrets/status - - services/finalizers - verbs: - - '*' - - apiGroups: - - apps - resources: - - deployments - - daemonsets - - replicasets - - statefulsets - verbs: - - '*' - - apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - verbs: - - get - - create - - apiGroups: - - apps - resourceNames: - - ibm-spectrum-scale-csi-operator - resources: - - deployments/finalizers - verbs: - - update - - apiGroups: - - apps - resources: - - replicasets - verbs: - - get - - apiGroups: - - csi.ibm.com - resources: - - '*' - verbs: - - '*' - serviceAccountName: ibm-spectrum-scale-csi-operator + strategy: {} + template: + metadata: + annotations: + productID: ibm-spectrum-scale-csi-operator + productName: IBM Spectrum Scale CSI Operator + productVersion: 1.0.1 + labels: + app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator + app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + name: ibm-spectrum-scale-csi-operator + product: ibm-spectrum-scale-csi + release: ibm-spectrum-scale-csi-operator + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: beta.kubernetes.io/arch + operator: Exists + containers: + - command: + - /usr/local/bin/ao-logs + - /tmp/ansible-operator/runner + - stdout + image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.1 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 10 + periodSeconds: 30 + name: ansible + readinessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 3 + periodSeconds: 1 + resources: {} + securityContext: + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /tmp/ansible-operator/runner + name: runner + readOnly: true + - env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: ibm-spectrum-scale-csi-operator + image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.1 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 10 + periodSeconds: 30 + name: operator + readinessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 3 + periodSeconds: 1 + resources: {} + securityContext: + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /tmp/ansible-operator/runner + name: runner + serviceAccountName: ibm-spectrum-scale-csi-operator + volumes: + - emptyDir: {} + name: runner strategy: deployment installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: false + type: AllNamespaces keywords: - - IBM - - GPFS - - Spectrum Scale + - IBM + - GPFS + - Spectrum Scale labels: operator: ibm-spectrum-scale-csi-operator links: - - name: IBM CSI Spectrum Scale Operator Documentation - url: https://ibm-spectrum-scale-csi-operator.readthedocs.io/en/latest/ - - name: CSI Developer Documentation - url: https://kubernetes-csi.github.io/docs/ + - name: IBM CSI Spectrum Scale Operator Documentation + url: https://ibm-spectrum-scale-csi-operator.readthedocs.io/en/latest/ + - name: CSI Developer Documentation + url: https://kubernetes-csi.github.io/docs/ maintainers: - - email: jdunham@us.ibm.com - name: John Dunham - - email: yadayada@in.ibm.com - name: Yadavendra Yadav + - email: jdunham@us.ibm.com + name: John Dunham + - email: yadayada@in.ibm.com + name: Yadavendra Yadav maturity: alpha provider: name: IBM diff --git a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.0/ibm-spectrum-scale-csi-operator-crd.yaml b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.1.0/csiscaleoperators.csi.ibm.com.crd.yaml similarity index 88% rename from operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.0/ibm-spectrum-scale-csi-operator-crd.yaml rename to operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.1.0/csiscaleoperators.csi.ibm.com.crd.yaml index 94df52269..378364f20 100644 --- a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.0.0/ibm-spectrum-scale-csi-operator-crd.yaml +++ b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.1.0/csiscaleoperators.csi.ibm.com.crd.yaml @@ -1,3 +1,4 @@ +--- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: @@ -21,14 +22,16 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation + description: + "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" type: string kind: - description: 'Kind is a string value representing the REST resource this + description: + "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" type: string metadata: type: object @@ -50,7 +53,8 @@ spec: type: object type: array clusters: - description: A collection of gpfs cluster properties for the csi driver + description: + A collection of gpfs cluster properties for the csi driver to mount. items: properties: @@ -99,10 +103,11 @@ spec: type: boolean type: object required: - - id + - id type: array driverRegistrar: - description: Sidecar container image for the csi spectrum scale plugin + description: + Sidecar container image for the csi spectrum scale plugin pods. type: string nodeMapping: @@ -148,14 +153,18 @@ spec: description: The path to the gpfs file system mounted on the host machine. type: string secretCounter: - description: An internal counter used by the operator to trigger reloads + description: + An internal counter used by the operator to trigger reloads on secret change. type: integer + trigger: + description: A generic trigger to be used in kickin off the ansible operator. + type: string spectrumScale: description: Image name for the csi spectrum scale plugin container. type: string required: - - scaleHostpath + - scaleHostpath type: object status: properties: @@ -172,6 +181,6 @@ spec: type: object version: v1 versions: - - name: v1 - served: true - storage: true + - name: v1 + served: true + storage: true diff --git a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.1.0/ibm-spectrum-scale-csi-operator.v1.1.0.clusterserviceversion.yaml b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.1.0/ibm-spectrum-scale-csi-operator.v1.1.0.clusterserviceversion.yaml new file mode 100644 index 000000000..e789bc1e7 --- /dev/null +++ b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/1.1.0/ibm-spectrum-scale-csi-operator.v1.1.0.clusterserviceversion.yaml @@ -0,0 +1,479 @@ +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |- + [ + { + "apiVersion": "csi.ibm.com/v1", + "kind": "CSIScaleOperator", + "metadata": { + "labels": { + "app.kubernetes.io/instance": "ibm-spectrum-scale-csi-operator", + "app.kubernetes.io/managed-by": "ibm-spectrum-scale-csi-operator", + "app.kubernetes.io/name": "ibm-spectrum-scale-csi-operator", + "release": "ibm-spectrum-scale-csi-operator" + }, + "name": "ibm-spectrum-scale-csi", + "namespace": "ibm-spectrum-scale-csi-driver" + }, + "spec": { + "clusters": [ + { + "id": "\u003c Primary Cluster ID - WARNING - THIS IS A STRING NEEDS YAML QUOTES! \u003e", + "primary": { + "primaryFs": "\u003c Primary Filesystem \u003e", + "primaryFset": "\u003c Fileset in Primary Filesystem \u003e" + }, + "restApi": [ + { + "guiHost": "\u003c Primary cluster GUI IP/Hostname \u003e" + } + ], + "secrets": "secret1", + "secureSslMode": false + } + ], + "scaleHostpath": "\u003c GPFS FileSystem Path \u003e" + }, + "status": {} + } + ] + capabilities: Basic Install + categories: Storage + certified: "false" + containerImage: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.1.0 + createdAt: Mon Feb 17 05:46:00 PST 2020 + description: + An operator for deploying and managing the IBM CSI Spectrum Scale + Driver. + repository: https://github.com/IBM/ibm-spectrum-scale-csi/ + support: IBM + labels: + app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator + app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + release: ibm-spectrum-scale-csi-operator + name: ibm-spectrum-scale-csi-operator.v1.1.0 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: Represents a deployment of the IBM CSI Spectrum Scale driver. + displayName: IBM CSI Spectrum Scale Driver + kind: CSIScaleOperator + name: csiscaleoperators.csi.ibm.com + resources: + - kind: csiscaleoperators + name: "" + version: v1 + - kind: Deployment + name: "" + version: v1 + - kind: Secret + name: "" + version: v1 + - kind: Pod + name: "" + version: v1 + - kind: StatefulSet + name: "" + version: v1beta1 + - kind: DaemonSet + name: "" + version: v1beta2 + - kind: ConfigMap + name: "" + version: v1 + specDescriptors: + - description: Node selector for provisioner sidecar. + displayName: Provisioner Node Selector + path: provisionerNodeSelector + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: Node selector for SpectrumScale CSI Plugin. + displayName: Plugin Node Selector + path: pluginNodeSelector + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: + A collection of gpfs cluster properties for the csi driver to + mount. + displayName: Clusters + path: clusters + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: Image name for the csi spectrum scale plugin container. + displayName: Spectrum Scale Image + path: spectrumScale + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: + An internal counter used by the operator to trigger reloads on + secret change. + displayName: Secret Counter + path: secretCounter + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: A generic trigger to be used in kickin off the ansible operator. + displayName: trigger + path: trigger + - description: Mapping of K8s node with SpectrumScale node. + displayName: nodeMapping + path: nodeMapping + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Provisioner image for csi (actually issues provision requests). + displayName: Provisioner Image + path: provisioner + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Sidecar container image for the csi spectrum scale plugin pods. + displayName: Driver Registrar Image + path: driverRegistrar + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: The path to the gpfs file system mounted on the host machine. + displayName: Spectrum Scale Hostpath + path: scaleHostpath + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Attacher image for csi (actually attaches to the storage). + displayName: Attacher Image + path: attacher + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Node selector for attacher sidecar. + displayName: Attacher Node Selector + path: attacherNodeSelector + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: Key for node selector. + displayName: Key + path: provisionerNodeSelector.key + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Value for key. + displayName: Value + path: provisionerNodeSelector.value + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Key for node selector. + displayName: Key + path: pluginNodeSelector.key + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Value for key. + displayName: Value + path: pluginNodeSelector.value + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: A string specifying a cacert resource name. + displayName: cacert Resource Name + path: clusters.cacert + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Require a secure SSL connection to connect to GPFS. + displayName: Secure SSL Mode + path: clusters.secureSslMode + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:booleanSwitch + - description: A string specifying a secret resource name. + displayName: Kubernetes Secret Name + path: clusters.secrets + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: A collection of targets for REST calls. + displayName: REST API + path: clusters.restApi + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: The primary file system for the GPFS cluster. + displayName: Primary + path: clusters.primary + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - description: The cluster id of the gpfs cluster specified (mandatory). + displayName: ID + path: clusters.id + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: K8s node name. + displayName: Kubernetes Node + path: nodeMapping.k8sNode + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: SpectrumScale node name. + displayName: spectrumscaleNode + path: nodeMapping.spectrumscaleNode + - description: Key for node selector. + displayName: Key + path: attacherNodeSelector.key + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: Value for key. + displayName: Value + path: attacherNodeSelector.value + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: The hostname of the REST server. + displayName: GUI Host + path: clusters.restApi.guiHost + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: The port number running the REST server. + displayName: GUI Port + path: clusters.restApi.guiPort + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + statusDescriptors: + - description: The active status of the operator + displayName: Conditions + path: conditions + x-descriptors: + - urn:alm:descriptor:io.kubernetes.conditions + - description: Indicates that the plugin is running. + displayName: Is Running + path: conditions.isRunning + x-descriptors: + - urn:alm:descriptor:io.kubernetes.phase + version: v1 + description: + "\nThe IBM Spectrum Scale CSI Operator runs within a Kubernetes cluster + providing a means to \ndeploy and manage the CSI plugin for spectrum scale. For + more in depth documentation please refer\nto the [knowledge center]( https://www.ibm.com/support/knowledgecenter/STXKQY_CSI_SHR) + \n\nThis operator should be used to deploy + the CSI plugin.\n\nThe configuration process + is as follows:\n\n1. [Spectrum Scale GUI Setup](#spectrum-scale-gui-setup)\n2. + [Custom Resource Configuration](#custom-resource-configuration)\n\nSpectrum Scale + GUI Setup \n------------------------\n> **NOTE:** This step only needs to be preformed + once per GUI.\n\n> **WARNING:** If your daemonset pods (driver pods) do not come + up, generally this means you have a secret that has not been defined in the + correct namespace.\n\n1\\. Ensure the Spectrum Scale GUI is running by pointing + your browser to the IP hosting the GUI:\n\n ![](https://user-images.githubusercontent.com/1195452/67230992-6d2d9700-f40c-11e9-96d5-3f0e5bcb2d9a.png)\n\n + \ > If you do not see a login follow on screen instructions, or review the [GUI + Documentation]( https://www.ibm.com/support/knowledgecenter/en/STXKQY_5.0.4/com.ibm.spectrum.scale.v5r04.doc/bl1ins_quickrefforgui.htm)\n\n\n2\\. + Create a CsiAdmin group account on in the GUI (currently requires a CLI call):\n\n + \ ```\n\n export USERNAME=\"SomeUser\"\n export PASSWORD=\"SomePassword\"\n + \ /usr/lpp/mmfs/gui/cli/mkuser ${USERNAME} -p ${PASSWORD} -g CsiAdmin\n\n ```\n\n3\\. + Create a Kubernetes secret for the `CsiAdmin` user:\n\n ```\n\n export USERNAME_B64=$(echo + $USERNAME | base64)\n export PASSWORD_B64=$(echo $PASSWORD | base64)\n export + OPERATOR_NAMESPACE=\"ibm-spectrum-scale-csi-driver\" # Set this to the namespace + you deploy the operator in.\n \n\n cat << EOF > /tmp/csisecret.yaml\n apiVersion: + v1\n data:\n password: ${PASSWORD_B64}\n username: ${USERNAME_B64}\n kind: + Secret\n type: Opaque\n metadata:\n name: csisecret # This should be in + your CSIScaleOperator definition\n namespace: ${OPERATOR_NAMESPACE} \n labels:\n + \ app.kubernetes.io/name: ibm-spectrum-scale-csi-operator # Used by the operator + to detect changes, set on load of CR change if secret matches name in CR and namespace.\n + \ EOF\n \n\n kubectl create -f /tmp/csisecret.yaml\n rm -f /tmp/csisecret.yaml\n + \ \n ```\n\nCustom Resource Configuration\n-----------------------------\n\nThe + bundled Custom Resource example represents the minimum settings needed to run + the operator.\nIf your environment needs more advanced settings (e.g. remote clusters, + node mapping, etc.) please\nrefer to the sample [Custom Resource](https://raw.githubusercontent.com/IBM/ibm-spectrum-scale-csi/v1.1.0/operator/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml).\n\n\n" + displayName: IBM Spectrum Scale CSI Plugin Operator + icon: + - base64data: iVBORw0KGgoAAAANSUhEUgAAAGQAAABnCAMAAADBqBfIAAAAsVBMVEUAAACIyVeGxlaGx1aGxlaMylyM0FmJyliPymKOymGGxlaHx1aHx1iHx1eKylqKy1qGx1aHyFeKylmMyV6Gx1aGxlaHyFeMzFyGx1aHx1aIyViKylmLyluGx1aIyFiJylmHx1aIyViJylmLyluIyFeIyVeJylmMy16HyFeIyFeIyViJyliHyFeIyVeHyFeIyFeIyViIyViKylqHyFeIyVeJylmIyViIyFeLy1qFxVWHx1f7ghN0AAAAOXRSTlMAC2qj/JM5qx0juuRL2A8E6s0oQvX4phPy7oJGGd6PMdFhIQmYiVwGtJ5V275usH14Zi3Dc1E9xzb8nESrAAAEv0lEQVRo3u2a6VbiQBCFC4zImrCEsCSGJawOO4iW7/9gM8hAlV1JJNCc45kz3z8HmZvu2rpvhJ+J+WLBvVk1sVKFu9Ir4AEnB3cj94Z/qbfhPpgPBhKFF9CPlW7iV976oJlRCQWGkwWNVCdIsBW1lqCLho9EtwPLOv34rCk06RaesT8r0XNYCsw0VE2myySW5ulf8yw0gxTcyCuecfo8E55pLXAzFTxSqcEXUstTBrzDzXSOO9UDQXaBBwaggSlifdiAMPZviGUPriW7pgz+eMrFdMw5rTmdrE21P4wOlWJsEZlwoosl9/I29do8BBoSssY/THIXRvpvm4qo5fYsPJvGhWPV+BdUjeecm3kAEvdQHgMTJP65oX3XaSyfNYylXOT2NLPGIoysb5ZqseVdZh12LjZkWqfGWBRbkEfiyYsMRpfPCnVLgl0ZOfk9KBTZzPlop76drvJA4sqpNWiI6WnTp+UiCIZsTwuih2wWGEJ5l1KrZsrns7LW9wJv6KAQDPki2+wHWX39GRIOcNIUjIloU/MCS4feGPoOsl8XG/vCfj1cpNIR4WTpUB8e96f2hoQvQrOy40RkHVX5Uy9y9IVntrp1oIbGMSJFPnKgDia2/92ajBN9pDCIFskqfZxVRnkeyEUSE+Wk93ihyHuJBeNxDJJMBYlhKrmI98SrewMCkXjNdUKR1EoUQzjjgc1Cs08iErTYAy4tiGPDqs9oJxBJ0fceU2LgitBQOj9cIzLriHou4SAr73jXi8ihUf0cGvbKkqPmWhF1mHu+fQrxCBSerhXJKMf7AhKL6j1Eal3lnuV7ukVyExTYc0uniNluYhiVokaRCUbh6hPJYxTFnyaSrR1wQZtItfYJhKBJhPgv8l/kXxIZ/TpQ0Vfx61+fhB5TdbeVHyeyr6CALu23ilDQyihZZAG0iJARaSgSpVcATSKEt0BGaw2gUYRwuyeJ+kMAmkQc1Vewei08sO0LL+P5WhFsrUzVUhiE2fTvE8QrRE48vwpPryeakI94kwgasw3EQ55LMhHYz5AYeHHGUondl9rmZSLkYMqbr2TjoDCnE4hAqm2zwitCCCbd5cmcvkiEyD1wm6wKDLnY9RguFFHTP0MeinAe98z4sIdqqvuRIpjPCh+WP22aJfJD6IWI+mm0CNq+pXpdflPe6M02El03wg+VIicKa/muyfjqoVi877dWolqZzwicFyS2G/Fk3GXxMyXhqMjr9pGy8rh89k1zwkNpYRh5GQxKhzD32C3wj9XQWI91ISE9l832u0aR2vH/QBqqymmiKR7Em9qsNjMQjjdAYtYJ8VCIRzOuURZGQMSF2NgJJ39ejzSnG/ybQxGMKMPV6IR1K+65cKwu5U0fBFHm5hTCyG3tdnhDFo0yltwUMeaFWArCmR5r2YILcSuIO0hIw0B72IAEpPOUPdteEL3qxYZqnRplYkbkYKoESwNnoIFGgU5aoc3mVYPIkF7thFvPrTHcSt8+j78RMLJ0hNjBrYyMsH4UfDGn4Wb6E97QPHFbaaZBBy6fEb4FnYp4e6b7zyTKCyQo6TQQOCwG/DSuF2mnGr0x6ITmMzFtwF2Y05x/q8K9MJ2/we+BXuRrh/puDPfFcqdZ+In8Bg8Knr3O+ZToAAAAAElFTkSuQmCC + mediatype: image/png + install: + spec: + clusterPermissions: + - rules: + - apiGroups: + - "" + resources: + - pods + - persistentvolumeclaims + - services + - endpoints + - events + - configmaps + - secrets + - secrets/status + - services/finalizers + - serviceaccounts + verbs: + - "*" + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterroles + - clusterrolebindings + verbs: + - "*" + - apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - "*" + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create + - apiGroups: + - apps + resourceNames: + - ibm-spectrum-scale-csi-operator + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - apiGroups: + - csi.ibm.com + resources: + - "*" + verbs: + - "*" + - apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints + verbs: + - "*" + - apiGroups: + - storage.k8s.io + resources: + - volumeattachments + - storageclasses + verbs: + - "*" + serviceAccountName: ibm-spectrum-scale-csi-operator + deployments: + - name: ibm-spectrum-scale-csi-operator + spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + strategy: {} + template: + metadata: + annotations: + productID: ibm-spectrum-scale-csi-operator + productName: IBM Spectrum Scale CSI Operator + productVersion: 1.1.0 + labels: + app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator + app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + name: ibm-spectrum-scale-csi-operator + product: ibm-spectrum-scale-csi + release: ibm-spectrum-scale-csi-operator + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: beta.kubernetes.io/arch + operator: Exists + containers: + - command: + - /usr/local/bin/ao-logs + - /tmp/ansible-operator/runner + - stdout + image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 10 + periodSeconds: 30 + name: ansible + readinessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 3 + periodSeconds: 1 + resources: {} + securityContext: + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /tmp/ansible-operator/runner + name: runner + readOnly: true + - env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: ibm-spectrum-scale-csi-operator + image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 10 + periodSeconds: 30 + name: operator + readinessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 3 + periodSeconds: 1 + resources: {} + securityContext: + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /tmp/ansible-operator/runner + name: runner + serviceAccountName: ibm-spectrum-scale-csi-operator + volumes: + - emptyDir: {} + name: runner + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: false + type: AllNamespaces + keywords: + - IBM + - GPFS + - Spectrum Scale + labels: + operator: ibm-spectrum-scale-csi-operator + links: + - name: IBM CSI Spectrum Scale Knowledge Center + url: https://www.ibm.com/support/knowledgecenter/STXKQY_CSI_SHR + - name: CSI Developer Documentation + url: https://kubernetes-csi.github.io/docs/ + maintainers: + - email: jdunham@us.ibm.com + name: John Dunham + maturity: alpha + provider: + name: IBM + replaces: ibm-spectrum-scale-csi-operator.v1.0.0 + version: 1.1.0 diff --git a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/ibm-spectrum-scale-csi-operator.package.yaml b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/ibm-spectrum-scale-csi-operator.package.yaml index b843155bd..f5761a9d2 100644 --- a/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/ibm-spectrum-scale-csi-operator.package.yaml +++ b/operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator/ibm-spectrum-scale-csi-operator.package.yaml @@ -1,5 +1,6 @@ +--- channels: -- currentCSV: ibm-spectrum-scale-csi-operator.v1.0.1 - name: stable + - currentCSV: ibm-spectrum-scale-csi-operator.v1.1.0 + name: stable defaultChannel: stable packageName: ibm-spectrum-scale-csi-operator diff --git a/operator/deploy/operator.yaml b/operator/deploy/operator.yaml index 63015231d..d9609fb9d 100644 --- a/operator/deploy/operator.yaml +++ b/operator/deploy/operator.yaml @@ -1,3 +1,4 @@ +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -19,7 +20,7 @@ spec: annotations: productID: ibm-spectrum-scale-csi-operator productName: IBM Spectrum Scale CSI Operator - productVersion: 1.0.1 + productVersion: 1.1.0 labels: app.kubernetes.io/instance: ibm-spectrum-scale-csi-operator app.kubernetes.io/managed-by: ibm-spectrum-scale-csi-operator @@ -32,85 +33,76 @@ spec: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - - matchExpressions: - - key: beta.kubernetes.io/arch - operator: Exists + - matchExpressions: + - key: beta.kubernetes.io/arch + operator: Exists containers: - - command: - - /usr/local/bin/ao-logs - - /tmp/ansible-operator/runner - - stdout - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.1 - imagePullPolicy: IfNotPresent - livenessProbe: - exec: - command: - - ./health_check.sh - initialDelaySeconds: 10 - periodSeconds: 30 - name: ansible - readinessProbe: - exec: - command: - - ./health_check.sh - initialDelaySeconds: 3 - periodSeconds: 1 - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 50m - memory: 50Mi - securityContext: - capabilities: - drop: - - ALL - volumeMounts: - - mountPath: /tmp/ansible-operator/runner - name: runner - readOnly: true - - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: ibm-spectrum-scale-csi-operator - image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.1 - imagePullPolicy: IfNotPresent - livenessProbe: - exec: - command: - - ./health_check.sh - initialDelaySeconds: 10 - periodSeconds: 30 - name: operator - readinessProbe: - exec: - command: - - ./health_check.sh - initialDelaySeconds: 3 - periodSeconds: 1 - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 50m - memory: 50Mi - securityContext: - capabilities: - drop: - - ALL - volumeMounts: - - mountPath: /tmp/ansible-operator/runner - name: runner + - command: + - /usr/local/bin/ao-logs + - /tmp/ansible-operator/runner + - stdout + image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 10 + periodSeconds: 30 + name: ansible + readinessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 3 + periodSeconds: 1 + securityContext: + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /tmp/ansible-operator/runner + name: runner + readOnly: true + env: + - name: CSI_DRIVER_IMAGE + value: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-driver:v1.1.0 + - env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: ibm-spectrum-scale-csi-operator + - name: CSI_DRIVER_IMAGE + value: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-driver:v1.1.0 + image: quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 10 + periodSeconds: 30 + name: operator + readinessProbe: + exec: + command: + - ./health_check.sh + initialDelaySeconds: 3 + periodSeconds: 1 + securityContext: + capabilities: + drop: + - ALL + volumeMounts: + - mountPath: /tmp/ansible-operator/runner + name: runner serviceAccountName: ibm-spectrum-scale-csi-operator volumes: - - emptyDir: {} - name: runner + - emptyDir: {} + name: runner diff --git a/operator/deploy/role.yaml b/operator/deploy/role.yaml index 17e1e6977..54ed6c81c 100644 --- a/operator/deploy/role.yaml +++ b/operator/deploy/role.yaml @@ -1,3 +1,4 @@ +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -11,74 +12,74 @@ metadata: name: ibm-spectrum-scale-csi-operator namespace: ibm-spectrum-scale-csi-driver rules: -- apiGroups: - - '' - resources: - - pods - - persistentvolumeclaims - - services - - endpoints - - events - - configmaps - - secrets - - secrets/status - - services/finalizers - - serviceaccounts - verbs: - - '*' -- apiGroups: - - rbac.authorization.k8s.io - resources: - - clusterroles - - clusterrolebindings - verbs: - - '*' -- apiGroups: - - apps - resources: - - deployments - - daemonsets - - replicasets - - statefulsets - verbs: - - '*' -- apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - verbs: - - get - - create -- apiGroups: - - apps - resourceNames: - - ibm-spectrum-scale-csi-operator - resources: - - deployments/finalizers - verbs: - - update -- apiGroups: - - apps - resources: - - replicasets - verbs: - - get -- apiGroups: - - csi.ibm.com - resources: - - '*' - verbs: - - '*' -- apiGroups: - - security.openshift.io - resources: - - securitycontextconstraints - verbs: - - '*' -- apiGroups: - - storage.k8s.io - resources: - - volumeattachments - - storageclasses - verbs: - - '*' + - apiGroups: + - "" + resources: + - pods + - persistentvolumeclaims + - services + - endpoints + - events + - configmaps + - secrets + - secrets/status + - services/finalizers + - serviceaccounts + verbs: + - "*" + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterroles + - clusterrolebindings + verbs: + - "*" + - apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - "*" + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create + - apiGroups: + - apps + resourceNames: + - ibm-spectrum-scale-csi-operator + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - apiGroups: + - csi.ibm.com + resources: + - "*" + verbs: + - "*" + - apiGroups: + - security.openshift.io + resources: + - securitycontextconstraints + verbs: + - "*" + - apiGroups: + - storage.k8s.io + resources: + - volumeattachments + - storageclasses + verbs: + - "*" diff --git a/operator/deploy/role_binding.yaml b/operator/deploy/role_binding.yaml index 1922919be..6d87777fe 100644 --- a/operator/deploy/role_binding.yaml +++ b/operator/deploy/role_binding.yaml @@ -1,3 +1,4 @@ +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -14,6 +15,6 @@ roleRef: kind: ClusterRole name: ibm-spectrum-scale-csi-operator subjects: -- kind: ServiceAccount - name: ibm-spectrum-scale-csi-operator - namespace: ibm-spectrum-scale-csi-driver + - kind: ServiceAccount + name: ibm-spectrum-scale-csi-operator + namespace: ibm-spectrum-scale-csi-driver diff --git a/operator/deploy/service_account.yaml b/operator/deploy/service_account.yaml index 70d7b4bc8..cbfe55133 100644 --- a/operator/deploy/service_account.yaml +++ b/operator/deploy/service_account.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: ServiceAccount metadata: diff --git a/operator/go.mod b/operator/go.mod deleted file mode 100644 index 1e438717e..000000000 --- a/operator/go.mod +++ /dev/null @@ -1,39 +0,0 @@ -module github.com/IBM/ibm-spectrum-scale-csi/operator - -require ( - github.com/davecgh/go-spew v1.1.1 - github.com/go-openapi/spec v0.19.0 - github.com/gogo/protobuf v1.3.0 // indirect - github.com/operator-framework/operator-sdk v0.10.0 - github.com/spf13/pflag v1.0.3 - golang.org/x/text v0.3.2 // indirect - golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 // indirect - k8s.io/api v0.0.0-20190612125737-db0771252981 - k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad - k8s.io/client-go v11.0.0+incompatible - k8s.io/code-generator v0.0.0-20181203235156-f8cba74510f3 - k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a - k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580 - sigs.k8s.io/controller-runtime v0.1.10 - sigs.k8s.io/controller-tools v0.1.10 -) - -// Pinned to kubernetes-1.13.1 -replace ( - k8s.io/api => k8s.io/api v0.0.0-20181213150558-05914d821849 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20181213153335-0fe22c71c476 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93 - k8s.io/client-go => k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31 -) - -replace ( - github.com/coreos/prometheus-operator => github.com/coreos/prometheus-operator v0.29.0 - k8s.io/code-generator => k8s.io/code-generator v0.0.0-20181117043124-c2090bec4d9b - k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20180711000925-0cf8f7e6ed1d - sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.1.10 - sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde -) - -replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.10.0 - -go 1.13 diff --git a/operator/go.sum b/operator/go.sum deleted file mode 100644 index 50881688f..000000000 --- a/operator/go.sum +++ /dev/null @@ -1,575 +0,0 @@ -bitbucket.org/ww/goautoneg v0.0.0-20120707110453-75cd24fc2f2c/go.mod h1:1vhO7Mn/FZMgOgDVGLy5X1mE6rq1HbkBdkF/yj8zkcg= -cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.2 h1:4y4L7BdHenTfZL0HervofNTHh9Ad6mNX72cQvl+5eH0= -cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA= -contrib.go.opencensus.io/exporter/ocagent v0.4.11 h1:Zwy9skaqR2igcEfSVYDuAsbpa33N0RPtnYTHEe2whPI= -contrib.go.opencensus.io/exporter/ocagent v0.4.11/go.mod h1:7ihiYRbdcVfW4m4wlXi9WRPdv79C0fStcjNlyE6ek9s= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest v11.1.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v11.7.0+incompatible h1:gzma19dc9ejB75D90E5S+/wXouzpZyA+CV+/MJPSD/k= -github.com/Azure/go-autorest v11.7.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v0.0.0-20190301161902-9f8fceff796f/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 h1:Kn3rqvbUFqSepE2OqVu0Pn1CbDw9IuMlONapol0zuwk= -github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30/go.mod h1:4AJxUpXUhv4N+ziTvIcWWXgeorXpxPZOfk9HdEVr96M= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= -github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4= -github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.9+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/prometheus-operator v0.29.0 h1:Moi4klbr1xUVaofWzlaM12mxwCL294GiLW2Qj8ku0sY= -github.com/coreos/prometheus-operator v0.29.0/go.mod h1:SO+r5yZUacDFPKHfPoUjI3hMsH+ZUdiuNNhuSq3WoSg= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/docker/distribution v2.6.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v0.0.0-20180612054059-a9fbbdc8dd87/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= -github.com/elazarl/goproxy v0.0.0-20190421051319-9d40249d3c2f/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy/ext v0.0.0-20190421051319-9d40249d3c2f/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= -github.com/emicklei/go-restful v2.8.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.8.1+incompatible h1:AyDqLHbJ1quqbWr/OWDw+PlIP8ZFoTmYrGYaxzrLbNg= -github.com/emicklei/go-restful v2.8.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.3+incompatible h1:2OwhVdhtzYUp5P5wuGsVDPagKSRd9JK72sJCHVCXh5g= -github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6/go.mod h1:qr0VowGBT4CS4Q8vFF8BSeKz34PuqKGxs/L0IAQA9DQ= -github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.0.0+incompatible h1:xregGRMLBeuRcwiOTHRCsPPuzCQlqhxUPbqdw+zNkLc= -github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.1.0+incompatible h1:K1MDoo4AZ4wU0GIU/fPmtZg7VpzLjCxu+UwBD1FvwOc= -github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= -github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/zapr v0.1.1 h1:qXBXPDdNncunGs7XeEpsJt8wCjYBygluzfdLO0G5baE= -github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/jsonpointer v0.17.0 h1:nH6xp8XdXHx8dqveo0ZuJBluCO2qGrPbDNZ0dwoRHP0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8= -github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonreference v0.17.0 h1:yJW3HCkTHg7NOA+gZ83IPHzUSnUzGXhGmsdiCcMexbA= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk= -github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.0 h1:A4SZ6IWh3lnjH0rG0Z5lkxazMGBECtrZcbyYQi+64k4= -github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/swag v0.17.0 h1:iqrgMg7Q7SvtbWLlltPrkMs0UBJI6oTSs79JFRUi880= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.0 h1:Kg7Wl7LkTPlmc393QZQ/5rQadPhi7pBVEMZxyTi0Ii8= -github.com/go-openapi/swag v0.19.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.15 h1:OsV5vOpHYUpP7ZLS6sem1y40/lNX1BZj+ynMiRi21lQ= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gogo/protobuf v0.0.0-20170330071051-c0656edd0d9e/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.0 h1:G8O7TerXerS4F6sx9OV7/nRfJdnXgHZu/S/7F2SN+UE= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20141105023935-44145f04b68c/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4 h1:6UVLWz0fIIrv0UVj6t0A7cL48n8IyAdLVQqAYzEfsKI= -github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g= -github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/gophercloud/gophercloud v0.0.0-20180330165814-781450b3c4fc/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= -github.com/gophercloud/gophercloud v0.0.0-20190408160324-6c7ac67f8855 h1:3dfUujjROkkXcwIpsh9z6bjOhPFooLpxejc7qgX13/g= -github.com/gophercloud/gophercloud v0.0.0-20190408160324-6c7ac67f8855/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f h1:ShTPMJQes6tubcjzGMODIVG5hlrCeImaBnZzKF2N8SM= -github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.6.3/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.8.5 h1:2+KSC78XiO6Qy0hIjfc1OD9H+hsaJdJlb8Kqsd41CTE= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-health-probe v0.2.0/go.mod h1:4GVx/bTCtZaSzhjbGueDY5YgBdsmKeVx+LErv/n0L6s= -github.com/hashicorp/golang-lru v0.0.0-20160207214719-a0d98a5f2880/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= -github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= -github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983 h1:wL11wNW7dhKIcRCHSm4sHKPWz0tt4mwBsVodG7+Xyqg= -github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/markbates/inflect v1.0.4 h1:5fh1gzTFhfae06u3hzHYO9xe3l3v3nW5Pwt3naLTP5g= -github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/martinlindhe/base36 v0.0.0-20180729042928-5cda0030da17/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8= -github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/maxbrunsfeld/counterfeiter v0.0.0-20181017030959-1aadac120687/go.mod h1:aoVsckWnsNzazwF2kmD+bzgdr4GBlbK91zsdivQJ2eU= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/operator-framework/operator-lifecycle-manager v0.0.0-20181023032605-e838f7fb2186/go.mod h1:Ma5ZXd4S1vmMyewWlF7aO8CZiokR7Sd8dhSfkGkNU4U= -github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190105193533-81104ffdc4fb/go.mod h1:XMyE4n2opUK4N6L45YGQkXXi8F9fD7XDYFv/CsS6V5I= -github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190128024246-5eb7ae5bdb7a/go.mod h1:vq6TTFvg6ti1Bn6ACsZneZTmjTsURgDD6tQtVDbEgsU= -github.com/operator-framework/operator-registry v1.0.1/go.mod h1:1xEdZjjUg2hPEd52LG3YQ0jtwiwEGdm98S1TH5P4RAA= -github.com/operator-framework/operator-registry v1.0.4/go.mod h1:hve6YwcjM2nGVlscLtNsp9sIIBkNZo6jlJgzWw7vP9s= -github.com/operator-framework/operator-sdk v0.10.0 h1:k2yovBNxaya06yIkJ1e6lNsqiWjhS32G+d2LUdjuu/E= -github.com/operator-framework/operator-sdk v0.10.0/go.mod h1:7eW7ldXmvenehIMVdO2zCdERf/828Mrftq4u7GS0I68= -github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.3.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= -github.com/petar/GoLLRB v0.0.0-20130427215148-53be0d36a84c/go.mod h1:HUpKUBZnpzkdx0kD/+Yfuft+uD3zHGtXF/XJB14TUr4= -github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f h1:BVwpUVJDADN2ufcGik7W992pyps0wZ888b/y9GXcLTU= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20190104105734-b1c43a6df3ae/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190104112138-b1a0a9a36d74/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1 h1:/K3IL0Z1quvmJ7X0A1AwNEK7CRkVK3YwfOU/QAL4WGg= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872 h1:0aNv3xC7DmQoy1/x1sMh18g+fihWW68LL13i8ao9kl4= -github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/robfig/cron v0.0.0-20170526150127-736158dc09e1/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2 h1:J7U/N7eRtzjhs26d6GqMh2HBuXP8/Z64Densiiieafo= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/technosophos/moniker v0.0.0-20180509230615-a5dbd03a2245/go.mod h1:O1c8HleITsZqzNZDjSNzirUGsMT0oGu9LhHKoJrqO+A= -github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= -github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= -go.opencensus.io v0.19.2 h1:ZZpq6xI6kv/LuE/5s5UQvBU5vMjvRnPb8PvJrIntAnc= -go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= -go.opencensus.io v0.20.0 h1:L/ARO58pdktB6dLmYI0zAyW1XnavEmGziFd0MKfxnck= -go.opencensus.io v0.20.0/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= -go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= -golang.org/x/crypto v0.0.0-20180222182404-49796115aa4b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjWtbDmn9OYFLX5Ik9alpJpE= -golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/oauth2 v0.0.0-20170412232759-a6bd8cefa181/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181105165119-ca4130e427c7/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 h1:Wo7BWFiOk0QRFMLYMqJGFMd9CgUAcGx7V+qEg/h5IBI= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181023152157-44b849a8bc13/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181218192612-074acd46bca6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= -golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011152555-a398e557df60/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181207222222-4c874b978acb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190213015956-f7e1b50d2251/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138 h1:H3uGjxCR/6Ds0Mjgyp7LMK81+LvmbvWWEnJhzk1Pi9E= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350 h1:0USRhKWpISljvJE8egltEaoJb+VD0IUA4eOH6W1yss8= -golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.2.0 h1:B5VXkdjt7K2Gm6fGBC9C9a1OAKJDT95cTqwet+2zib0= -google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= -google.golang.org/api v0.3.0 h1:UIJY20OEo3+tK5MBlcdx37kmdH6EnRjGkW78mc6+EeA= -google.golang.org/api v0.3.0/go.mod h1:IuvZyQh8jgscv8qWfQ4ABd8m7hEudgBFM/EdhA3BnXw= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181016170114-94acd270e44e/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107 h1:xtNn7qFlagY2mQNFHMSRPjT2RkOV4OXM7P5TVy9xATo= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.3.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.0.0-20181213150558-05914d821849 h1:WZFcFPXmLR7g5CxQNmjWv0mg8qulJLxDghbzS4pQtzY= -k8s.io/api v0.0.0-20181213150558-05914d821849/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= -k8s.io/apiextensions-apiserver v0.0.0-20181213153335-0fe22c71c476 h1:Ws9zfxsgV19Durts9ftyTG7TO0A/QLhmu98VqNWLiH8= -k8s.io/apiextensions-apiserver v0.0.0-20181213153335-0fe22c71c476/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= -k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93 h1:tT6oQBi0qwLbbZSfDkdIsb23EwaLY85hoAV4SpXfdao= -k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= -k8s.io/apiserver v0.0.0-20181026151315-13cfe3978170/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= -k8s.io/apiserver v0.0.0-20181213151703-3ccfe8365421/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= -k8s.io/cli-runtime v0.0.0-20181213153952-835b10687cb6/go.mod h1:qWnH3/b8sp/l7EvlDh7ulDU3UWA4P4N1NFbEEP791tM= -k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31 h1:OH3z6khCtxnJBAc0C5CMYWLl1CoK5R5fngX7wrwdN5c= -k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= -k8s.io/code-generator v0.0.0-20181117043124-c2090bec4d9b h1:KH0fUlgdFZH8UMxJ/FDCYHpczfSQKefetq5NjL6BVF0= -k8s.io/code-generator v0.0.0-20181117043124-c2090bec4d9b/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= -k8s.io/gengo v0.0.0-20181106084056-51747d6e00da/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20181113154421-fd15ee9cc2f7/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6 h1:4s3/R4+OYYYUKptXPhZKjQ04WJ6EhQQVFdjOFvCazDk= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a h1:QoHVuRquf80YZ+/bovwxoMO3Q/A3nt3yTgS0/0nejuk= -k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/helm v2.13.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.2.0 h1:0ElL0OHzF3N+OhoJTL0uca20SxtYt4X4+bzHeqrB83c= -k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.1 h1:RVgyDHY/kFKtLqh67NvEWIgkMneNoIrdkN0CxDSQc68= -k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/kube-aggregator v0.0.0-20181204002017-122bac39d429/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= -k8s.io/kube-aggregator v0.0.0-20181213152105-1e8cd453c474/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= -k8s.io/kube-openapi v0.0.0-20180711000925-0cf8f7e6ed1d h1:mn2F9UzCk6KGa7M/d2ibLyRtBQm7n6QvbCjDe/cDWSg= -k8s.io/kube-openapi v0.0.0-20180711000925-0cf8f7e6ed1d/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-state-metrics v1.6.0 h1:6wkxiTPTZ4j+LoMWuT+rZ+OlUWswktzXs5yHmggmAZ0= -k8s.io/kube-state-metrics v1.6.0/go.mod h1:84+q9aGVQPzXYGgtvyhZr/fSI6BdLsbPWXn37RASc9k= -k8s.io/kubernetes v1.11.7-beta.0.0.20181219023948-b875d52ea96d/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2 h1:CzIOMOEjH+sQw35LY1Gl0jwthkyOojzaq2HIeYZYOrM= -k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= -sigs.k8s.io/controller-runtime v0.1.10 h1:amLOmcekVdnsD1uIpmgRqfTbQWJ2qxvQkcdeFhcotn4= -sigs.k8s.io/controller-runtime v0.1.10/go.mod h1:HFAYoOh6XMV+jKF1UjFwrknPbowfyHEHHRdJMf2jMX8= -sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde h1:ZkaHf5rNYzIB6CB82keKMQNv7xxkqT0ylOBdfJPfi+k= -sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde/go.mod h1:ATWLRP3WGxuAN9HcT2LaKHReXIH+EZGzRuMHuxjXfhQ= -sigs.k8s.io/testing_frameworks v0.1.1 h1:cP2l8fkA3O9vekpy5Ks8mmA0NW/F7yBdXf8brkWhVrs= -sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/operator/hacks/change_deploy_image.py b/operator/hacks/change_deploy_image.py deleted file mode 100755 index 816c80c39..000000000 --- a/operator/hacks/change_deploy_image.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/python -# TODO write a script to break up yaml into multiple files. - -import argparse -import sys -import os -import yaml - -DEFAULT_DEPLOY="{0}/../deploy/operator.yaml".format(os.path.dirname(os.path.realpath(__file__))) -DEFAULT_IMAGE="quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-operator:v1.0.1" -DEV_PULL="Always" -REL_PULL="IfNotPresent" -NEV_PULL="Never" - -def change_image(operator=DEFAULT_DEPLOY, output=DEFAULT_DEPLOY, image=DEFAULT_IMAGE, pullpolicy=REL_PULL ): - with open(operator, 'r') as stream: - try: - opobj= yaml.safe_load(stream) - except yaml.YAMLError as e: - print(e) - return 1 - - containers=opobj.get("spec",{}).get("template",{}).get("spec",{}).get("containers",[]) - - for i, container in enumerate(containers): - containers[i]["image"] = image - containers[i]["imagePullPolicy"] = pullpolicy - - with open(output, 'w') as outfile: - yaml.dump(opobj, outfile, default_flow_style=False) - - -def main(args): - - parser = argparse.ArgumentParser( - description=''' -A hack to change the image used by the operator deployment. -This should be used when deploying a custom image. -''') - - parser.add_argument( '-o', '--operator', metavar='operator', dest='operator', - default=DEFAULT_DEPLOY, - help='''The filename of the operator deployment to edit.''') - - parser.add_argument( '-i','--image', metavar='image', dest='image', - default=DEFAULT_IMAGE, - help='''The new image, defaults to "official" image.''') - - parser.add_argument( '--ifnotpresent', dest='ifnotpresent', - action='store_true', - help='''A flag to set image pull to ifnotpresent.''') - - parser.add_argument( '--neverpull', dest='neverpull', - action='store_true', - help='''A flag to set never pull the image, takes precedence.''') - - - parser.add_argument( '--output', metavar='output', dest='output', - default=DEFAULT_DEPLOY, - help='''Where to save the deployment, if unset overwrites deployment.''') - - args = parser.parse_args() - - if args.operator is None: - print("Missing operator filename") - return 1 - - # Prep the operator input. - operator=args.operator - if operator[0] is not '/': - operator="{0}/{1}".format(os.getcwd(), operator) - - # Prep the output - output=args.output - if output[0] is not '/': - output ="{0}/{1}".format(os.getcwd(), output) - - image = args.image - pullpolicy = REL_PULL if (image == DEFAULT_IMAGE or args.ifnotpresent) else DEV_PULL - - if args.neverpull: - pullpolicy = NEV_PULL - - change_image(operator, output, image, pullpolicy) - - -if __name__ == "__main__": - sys.exit(main(sys.argv)) - diff --git a/operator/hacks/change_deploy_image.yml b/operator/hacks/change_deploy_image.yml new file mode 100644 index 000000000..c16e68c43 --- /dev/null +++ b/operator/hacks/change_deploy_image.yml @@ -0,0 +1,19 @@ +--- +- name: Change deploy image + hosts: localhost + vars: + image_pull_policy: "IfNotPresent" + operator_yaml: "{{ lookup('env','PWD') }}/deploy/operator.yaml" + + tasks: + - name: "Modify the imagePullPolicy to: {{ image_pull_policy }}" + replace: + path: "{{ operator_yaml }}" + regexp: '^(\s+)imagePullPolicy: (.*)' + replace: "\\1imagePullPolicy: {{ image_pull_policy }}" + + - name: "Modify the operator image to {{ quay_operator_endpoint }}" + replace: + path: "{{ operator_yaml }}" + regexp: '^(\s+)image: quay.io(.*)' + replace: "\\1image: {{ quay_operator_endpoint }}" diff --git a/operator/hacks/csi-scale-deploy.sh b/operator/hacks/csi-scale-deploy.sh index 18ee6def2..e398f4a1e 100755 --- a/operator/hacks/csi-scale-deploy.sh +++ b/operator/hacks/csi-scale-deploy.sh @@ -5,8 +5,7 @@ set -x if [[ $1 == "-b" ]] then - export GO111MODULE="on" - operator-sdk build ibm-spectrum-scale-csi-operator + operator-sdk build . -t ibm-spectrum-scale-csi-operator shift export REPO="$(hostname -f):5000/" @@ -15,17 +14,17 @@ then export REPO="$1/" fi - docker tag ibm-spectrum-scale-csi-operator ${REPO}csi-scale-operator + docker tag ibm-spectrum-scale-csi-operator ${REPO}csi-scale-operator:latest docker push ${REPO}csi-scale-operator:latest #operator-sdk generate k8s - hacks/change_deploy_image.py -i ${REPO}csi-scale-operator:latest + ansible-playbook hacks/change_deploy_image.yml --extra-vars "quay_operator_endpoint=${REPO}csi-scale-operator:latest" fi kubectl apply -f deploy/namespace.yaml kubectl apply -f deploy/role.yaml kubectl apply -f deploy/service_account.yaml kubectl apply -f deploy/role_binding.yaml -kubectl apply -f deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml +kubectl apply -f deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml kubectl apply -f deploy/operator.yaml diff --git a/operator/hacks/csi-scale-destroy.sh b/operator/hacks/csi-scale-destroy.sh index 7ec4eae12..db62c676f 100755 --- a/operator/hacks/csi-scale-destroy.sh +++ b/operator/hacks/csi-scale-destroy.sh @@ -5,5 +5,5 @@ kubectl delete -f deploy/operator.yaml kubectl delete -f deploy/role.yaml kubectl delete -f deploy/service_account.yaml kubectl delete -f deploy/role_binding.yaml -kubectl delete -f deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml +kubectl delete -f deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml kubectl delete -f deploy/namespace.yaml diff --git a/operator/hacks/csv_copy_cr.py b/operator/hacks/csv_copy_cr.py index f9158ac6b..7dbf5c81b 100755 --- a/operator/hacks/csv_copy_cr.py +++ b/operator/hacks/csv_copy_cr.py @@ -7,7 +7,7 @@ import json BASE_DIR="{0}/../".format(os.path.dirname(os.path.realpath(__file__))) -DEFAULT_VERSION="1.0.1" +DEFAULT_VERSION="1.1.0" CSV_PATH="{0}deploy/olm-catalog/ibm-spectrum-scale-csi-operator/{1}/ibm-spectrum-scale-csi-operator.v{1}.clusterserviceversion.yaml" CR="{0}/deploy/crds/{1}" diff --git a/operator/hacks/csv_copy_crd_descriptions.py b/operator/hacks/csv_copy_crd_descriptions.py index 7aa3cabab..800c03d3d 100755 --- a/operator/hacks/csv_copy_crd_descriptions.py +++ b/operator/hacks/csv_copy_crd_descriptions.py @@ -6,7 +6,7 @@ import yaml BASE_DIR="{0}/../".format(os.path.dirname(os.path.realpath(__file__))) -DEFAULT_VERSION="1.0.1" +DEFAULT_VERSION="1.1.0" CSV_PATH="{0}deploy/olm-catalog/ibm-spectrum-scale-csi-operator/{1}/ibm-spectrum-scale-csi-operator.v{1}.clusterserviceversion.yaml" CRD_SOURCE_PATH="{0}deploy/crds/{1}" CRD_TARGET_PATH="{0}deploy/olm-catalog/ibm-spectrum-scale-csi-operator/{1}/{2}" diff --git a/operator/hacks/csv_copy_docs.py b/operator/hacks/csv_copy_docs.py index 9e7629a66..7db2e4561 100755 --- a/operator/hacks/csv_copy_docs.py +++ b/operator/hacks/csv_copy_docs.py @@ -6,7 +6,7 @@ import yaml BASE_DIR="{0}/../".format(os.path.dirname(os.path.realpath(__file__))) -DEFAULT_VERSION="1.0.1" +DEFAULT_VERSION="1.1.0" CSV_PATH="{0}deploy/olm-catalog/ibm-spectrum-scale-csi-operator/{1}/ibm-spectrum-scale-csi-operator.v{1}.clusterserviceversion.yaml" QUICKSTART="{0}../../../../docs/source/get-started/quickstart.md".format(BASE_DIR) diff --git a/operator/hacks/csv_prep.py b/operator/hacks/csv_prep.py index 7c1597cb1..18be66cbe 100755 --- a/operator/hacks/csv_prep.py +++ b/operator/hacks/csv_prep.py @@ -6,7 +6,7 @@ import yaml BASE_DIR="{0}/../".format(os.path.dirname(os.path.realpath(__file__))) -DEFAULT_VERSION="1.0.1" +DEFAULT_VERSION="1.1.0" CSV_PATH="{0}deploy/olm-catalog/ibm-spectrum-scale-csi-operator/{1}/ibm-spectrum-scale-csi-operator.v{1}.clusterserviceversion.yaml" def main(args): diff --git a/operator/build/health_check.sh b/operator/hacks/health_check.sh similarity index 100% rename from operator/build/health_check.sh rename to operator/hacks/health_check.sh diff --git a/operator/hacks/monitor-namespace.sh b/operator/hacks/monitor-namespace.sh new file mode 100755 index 000000000..e98915f3c --- /dev/null +++ b/operator/hacks/monitor-namespace.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "==Cluster Role==" +kubectl get -n ibm-spectrum-scale-csi-driver ClusterRole | grep -i csi +echo "==Cluster Role Binding==" +kubectl get -n ibm-spectrum-scale-csi-driver ClusterRoleBinding | grep -i csi +echo "==Stateful Set==" +kubectl get -n ibm-spectrum-scale-csi-driver StatefulSet | grep -i csi +echo "==Daemon Set==" +kubectl get -n ibm-spectrum-scale-csi-driver DaemonSet | grep -i csi +echo "==Service Account==" +kubectl get -n ibm-spectrum-scale-csi-driver ServiceAccount | grep -i csi +echo "==Config Map==" +kubectl get -n ibm-spectrum-scale-csi-driver ConfigMap | grep -i csi diff --git a/operator/hacks/relabel.py b/operator/hacks/relabel.py index ff7d00a25..9eb77290e 100755 --- a/operator/hacks/relabel.py +++ b/operator/hacks/relabel.py @@ -9,7 +9,7 @@ BASE_DIR="{0}/..".format(os.path.dirname(os.path.realpath(__file__))) DEPLOY_DIR="{0}/deploy".format(BASE_DIR) CONFIG_FILES=["operator.yaml", "role_binding.yaml", "role.yaml", "service_account.yaml", - "crds/ibm-spectrum-scale-csi-operator-crd.yaml", "crds/ibm-spectrum-scale-csi-operator-cr.yaml"] + "crds/csiscaleoperators.csi.ibm.com.crd.yaml", "crds/csiscaleoperators.csi.ibm.com.cr.yaml"] def label(obj): diff --git a/operator/molecule/default/molecule.yml b/operator/molecule/default/molecule.yml index 32d7d6675..10dbc229d 100644 --- a/operator/molecule/default/molecule.yml +++ b/operator/molecule/default/molecule.yml @@ -3,28 +3,27 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - enabled: False +lint: | + set -e + yamllint . +# ansible-lint +# flake8 platforms: -- name: kind-default - groups: - - k8s - image: bsycorp/kind:latest-1.12 - privileged: True - override_command: no - exposed_ports: - - 8443/tcp - - 10080/tcp - published_ports: - - 0.0.0.0:${TEST_CLUSTER_PORT:-9443}:8443/tcp - pre_build_image: yes + - name: kind-default + groups: + - k8s + image: bsycorp/kind:latest-1.12 + privileged: True + override_command: no + exposed_ports: + - 8443/tcp + - 10080/tcp + published_ports: + - 0.0.0.0:${TEST_CLUSTER_PORT:-9443}:8443/tcp + pre_build_image: yes provisioner: name: ansible log: True - lint: - name: ansible-lint - enabled: False inventory: group_vars: all: @@ -33,10 +32,8 @@ provisioner: K8S_AUTH_KUBECONFIG: /tmp/molecule/kind-default/kubeconfig KUBECONFIG: /tmp/molecule/kind-default/kubeconfig ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/roles - KIND_PORT: '${TEST_CLUSTER_PORT:-9443}' + KIND_PORT: "${TEST_CLUSTER_PORT:-9443}" scenario: name: default verifier: name: testinfra - lint: - name: flake8 diff --git a/operator/molecule/default/prepare.yml b/operator/molecule/default/prepare.yml index 9d4aaadb8..1c57cc5f8 100644 --- a/operator/molecule/default/prepare.yml +++ b/operator/molecule/default/prepare.yml @@ -7,13 +7,13 @@ tasks: - name: delete the kubeconfig if present file: - path: '{{ kubeconfig }}' + path: "{{ kubeconfig }}" state: absent delegate_to: localhost - name: Fetch the kubeconfig fetch: - dest: '{{ kubeconfig }}' + dest: "{{ kubeconfig }}" flat: yes src: /root/.kube/config @@ -21,7 +21,7 @@ replace: regexp: "8443" replace: "{{ lookup('env', 'KIND_PORT') }}" - path: '{{ kubeconfig }}' + path: "{{ kubeconfig }}" delegate_to: localhost - name: Wait for the Kubernetes API to become available (this could take a minute) @@ -33,6 +33,3 @@ until: (result.status|default(-1)) == 200 retries: 60 delay: 5 - - - diff --git a/operator/molecule/default/tests/basic_tests.yaml b/operator/molecule/default/tests/basic_tests.yaml index ee98aea94..5006f62ce 100644 --- a/operator/molecule/default/tests/basic_tests.yaml +++ b/operator/molecule/default/tests/basic_tests.yaml @@ -1,6 +1,5 @@ --- -- include_tasks: 'test_node_selectors.yaml' -- include_tasks: 'test_secrets.yaml' -- include_tasks: 'test_rbac.yaml' -- include_tasks: 'test_creation.yaml' - +- include_tasks: "test_node_selectors.yaml" +- include_tasks: "test_secrets.yaml" +- include_tasks: "test_rbac.yaml" +# - include_tasks: 'test_creation.yaml' diff --git a/operator/molecule/default/tests/test_creation.yaml b/operator/molecule/default/tests/test_creation.yaml index 20d293929..56685d9f3 100644 --- a/operator/molecule/default/tests/test_creation.yaml +++ b/operator/molecule/default/tests/test_creation.yaml @@ -3,47 +3,49 @@ set_fact: secret_pass: "cGFzc3dvcmQ=" # "password" secret_user: "dXNlcm5hbWU=" # "username" - secret_name: "secret1" # TODO move this code to global for the molecule test. + secret_name: "secret1" # TODO move this code to global for the molecule test. - name: Ensure environment is ready block: - - name: Delete the csi.ibm.com/v1.CSIScaleOperator - k8s: - state: absent - namespace: '{{ namespace }}' - definition: '{{ custom_resource }}' - validate: - strict: yes - fail_on_error: yes - - name: Clear the secret if present - k8s: - state: absent - namespace: "{{ namespace }}" - definition: - apiVersion: "v1" - kind: "Secret" - metadata: - name: "{{ secret_name }}" + - name: Delete the csi.ibm.com/v1.CSIScaleOperator + k8s: + state: absent + namespace: "{{ namespace }}" + definition: "{{ custom_resource }}" + validate: + strict: yes + fail_on_error: yes + - name: Clear the secret if present + k8s: + state: absent + namespace: "{{ namespace }}" + definition: + apiVersion: "v1" + kind: "Secret" + metadata: + name: "{{ secret_name }}" - name: Test creation block: - - name: Create the csi.ibm.com/v1.CSIScaleOperator without a valid secret - k8s: - state: present - namespace: '{{ namespace }}' - definition: '{{ custom_resource }}' - validate: - strict: yes - fail_on_error: yes + - name: Create the csi.ibm.com/v1.CSIScaleOperator without a valid secret + k8s: + state: present + namespace: "{{ namespace }}" + definition: "{{ custom_resource }}" + validate: + strict: yes + fail_on_error: yes - - name: Wait 60s for reconciliation to run and failure to be detected. - k8s_facts: - api_version: '{{ custom_resource.apiVersion }}' - kind: '{{ custom_resource.kind }}' - namespace: '{{ namespace }}' - name: '{{ custom_resource.metadata.name }}' - register: cr - until: - - "'Failed' in (cr | json_query('resources[].status.conditions[].reason'))" - delay: 6 - retries: 10 + - name: Wait 60s for reconciliation to run and failure to be detected. + k8s_info: + api_version: "{{ custom_resource.apiVersion }}" + kind: "{{ custom_resource.kind }}" + namespace: "{{ namespace }}" + name: "{{ custom_resource.metadata.name }}" + register: cr + until: + - "Successful in (cr | json_query('resources[].status.conditions[].reason')) AND + !(cr | json_query('resources[].status.conditions[].isRunning))" + - + delay: 6 + retries: 10 diff --git a/operator/molecule/default/tests/test_node_selectors.yaml b/operator/molecule/default/tests/test_node_selectors.yaml index b9d59f1f3..67efc0d22 100644 --- a/operator/molecule/default/tests/test_node_selectors.yaml +++ b/operator/molecule/default/tests/test_node_selectors.yaml @@ -1,23 +1,23 @@ --- - name: Assert Custom Resource has been created - k8s_facts: - api_version: '{{ custom_resource.apiVersion }}' - kind: '{{ custom_resource.kind }}' - namespace: '{{ namespace }}' - name: '{{ custom_resource.metadata.name }}' + k8s_info: + api_version: "{{ custom_resource.apiVersion }}" + kind: "{{ custom_resource.kind }}" + namespace: "{{ namespace }}" + name: "{{ custom_resource.metadata.name }}" register: cr # Should this be computed? - name: Set attacher variables set_fact: - attacherNodeSelector: - key: node1 + attacherNodeSelector: + key: node1 value: infra1 provisionerNodeSelector: - key: node2 + key: node2 value: infra1 pluginNodeSelector: - key: node3 + key: node3 value: infra1 nodeMapping: k8sNode: node1 @@ -25,58 +25,57 @@ - name: Update Custom Resource to have attacher fields k8s: - state: present - api_version: '{{ custom_resource.apiVersion }}' - kind: '{{ custom_resource.kind }}' - namespace: '{{ namespace }}' - name: '{{ custom_resource.metadata.name }}' + state: present + api_version: "{{ custom_resource.apiVersion }}" + kind: "{{ custom_resource.kind }}" + namespace: "{{ namespace }}" + name: "{{ custom_resource.metadata.name }}" definition: spec: - attacherNodeSelector: + attacherNodeSelector: - "{{ attacherNodeSelector }}" - provisionerNodeSelector: - - "{{ provisionerNodeSelector }}" - pluginNodeSelector: + provisionerNodeSelector: + - "{{ provisionerNodeSelector }}" + pluginNodeSelector: - "{{ pluginNodeSelector }}" nodeMapping: - "{{ nodeMapping }}" - block: # We know that the provisioner will have this name - - name: Wait 60s for provisioner reconciliation to run - k8s_facts: - kind: Statefulset + - name: Wait 60s for provisioner reconciliation to run + k8s_info: + kind: Statefulset api_version: v1 - namespace: '{{ namespace }}' + namespace: "{{ namespace }}" name: "{{custom_resource.metadata.name}}-provisioner" register: provisioner - until: - - ( provisioner | json_query('resources[].spec.template.spec.containers[].nodeSelector')) is defined + until: + - ( provisioner | json_query('resources[].spec.template.spec.containers[].nodeSelector')) is defined delay: 6 retries: 10 - - name: Wait 60s for attacher reconciliation to run - k8s_facts: - kind: Statefulset + - name: Wait 60s for attacher reconciliation to run + k8s_info: + kind: Statefulset api_version: v1 - namespace: '{{ namespace }}' + namespace: "{{ namespace }}" name: "{{custom_resource.metadata.name}}-attacher" register: attacher until: - - ( attacher | json_query('resources[].spec.template.spec.containers[].nodeSelector')) is defined + - ( attacher | json_query('resources[].spec.template.spec.containers[].nodeSelector')) is defined delay: 6 retries: 10 - - name: Wait 60s for driver reconciliation to run - k8s_facts: - kind: Daemonset + - name: Wait 60s for driver reconciliation to run + k8s_info: + kind: Daemonset api_version: v1 - namespace: '{{ namespace }}' + namespace: "{{ namespace }}" name: "{{custom_resource.metadata.name}}" register: driver until: - - ( driver| json_query('resources[].spec.template.spec.containers[].nodeSelector')) is defined - - (driver | json_query('resources[].spec.template.spec.containers[].env[*][?name==`nodeMapping.k8sNode` && value==`nodeMapping.spectrumscaleNode`]')) is defined + - ( driver| json_query('resources[].spec.template.spec.containers[].nodeSelector')) is defined + - (driver | json_query('resources[].spec.template.spec.containers[].env[*][?name==`nodeMapping.k8sNode` && value==`nodeMapping.spectrumscaleNode`]')) is defined delay: 6 retries: 10 - diff --git a/operator/molecule/default/tests/test_rbac.yaml b/operator/molecule/default/tests/test_rbac.yaml index a603af8e4..4002d670e 100644 --- a/operator/molecule/default/tests/test_rbac.yaml +++ b/operator/molecule/default/tests/test_rbac.yaml @@ -1,64 +1,62 @@ --- - name: Verify RBAC present - k8s_facts: + k8s_info: kind: "{{item.kind}}" name: "{{item.name}}" - api_version: v1 - namespace: '{{ namespace }}' + api_version: v1 + namespace: "{{ namespace }}" register: ref loop: - - kind: ClusterRole - name: ibm-spectrum-scale-csi-attacher - - kind: ClusterRole - name: ibm-spectrum-scale-csi-node - - kind: ClusterRole - name: ibm-spectrum-scale-csi-provisioner - - kind: ClusterRoleBinding - name: ibm-spectrum-scale-csi-attacher - - kind: ClusterRoleBinding - name: ibm-spectrum-scale-csi-node - - kind: ClusterRoleBinding - name: ibm-spectrum-scale-csi-provisioner - - kind: ServiceAccount - name: ibm-spectrum-scale-csi-attacher - - kind: ServiceAccount - name: ibm-spectrum-scale-csi-node - - kind: ServiceAccount - name: ibm-spectrum-scale-csi-provisioner + - kind: ClusterRole + name: ibm-spectrum-scale-csi-attacher + - kind: ClusterRole + name: ibm-spectrum-scale-csi-node + - kind: ClusterRole + name: ibm-spectrum-scale-csi-provisioner + - kind: ClusterRoleBinding + name: ibm-spectrum-scale-csi-attacher + - kind: ClusterRoleBinding + name: ibm-spectrum-scale-csi-node + - kind: ClusterRoleBinding + name: ibm-spectrum-scale-csi-provisioner + - kind: ServiceAccount + name: ibm-spectrum-scale-csi-attacher + - kind: ServiceAccount + name: ibm-spectrum-scale-csi-node + - kind: ServiceAccount + name: ibm-spectrum-scale-csi-provisioner -- name: Delete csi.ibm.com/v1.CSIScaleOperator +- name: Delete csi.ibm.com/v1.CSIScaleOperator k8s: state: absent - namespace: '{{ namespace }}' - definition: '{{ custom_resource }}' + namespace: "{{ namespace }}" + definition: "{{ custom_resource }}" wait: yes - - name: Verify RBAC absent - k8s_facts: + k8s_info: kind: "{{item.kind}}" name: "{{item.name}}" - api_version: v1 - namespace: '{{ namespace }}' + api_version: v1 + namespace: "{{ namespace }}" register: ref_abs failed_when: ref_abs.resources loop: - - kind: ClusterRole - name: ibm-spectrum-scale-csi-attacher - - kind: ClusterRole - name: ibm-spectrum-scale-csi-node - - kind: ClusterRole - name: ibm-spectrum-scale-csi-provisioner - - kind: ClusterRoleBinding - name: ibm-spectrum-scale-csi-attacher - - kind: ClusterRoleBinding - name: ibm-spectrum-scale-csi-node - - kind: ClusterRoleBinding - name: ibm-spectrum-scale-csi-provisioner - - kind: ServiceAccount - name: ibm-spectrum-scale-csi-attacher - - kind: ServiceAccount - name: ibm-spectrum-scale-csi-node - - kind: ServiceAccount - name: ibm-spectrum-scale-csi-provisioner - + - kind: ClusterRole + name: ibm-spectrum-scale-csi-attacher + - kind: ClusterRole + name: ibm-spectrum-scale-csi-node + - kind: ClusterRole + name: ibm-spectrum-scale-csi-provisioner + - kind: ClusterRoleBinding + name: ibm-spectrum-scale-csi-attacher + - kind: ClusterRoleBinding + name: ibm-spectrum-scale-csi-node + - kind: ClusterRoleBinding + name: ibm-spectrum-scale-csi-provisioner + - kind: ServiceAccount + name: ibm-spectrum-scale-csi-attacher + - kind: ServiceAccount + name: ibm-spectrum-scale-csi-node + - kind: ServiceAccount + name: ibm-spectrum-scale-csi-provisioner diff --git a/operator/molecule/default/tests/test_secrets.yaml b/operator/molecule/default/tests/test_secrets.yaml index fc2ddfea2..ecd6f51fb 100644 --- a/operator/molecule/default/tests/test_secrets.yaml +++ b/operator/molecule/default/tests/test_secrets.yaml @@ -9,147 +9,79 @@ - name: Ensure environment is ready block: - - name: Clear the secret if present - k8s: - state: absent - namespace: "{{ namespace }}" - definition: - apiVersion: "v1" - kind: "Secret" - metadata: - name: "{{ secret_name }}" + - name: Clear the secret if present + k8s: + state: absent + namespace: "{{ namespace }}" + definition: + apiVersion: "v1" + kind: "Secret" + metadata: + name: "{{ secret_name }}" - name: Assert Custom Resource has been created - k8s_facts: - api_version: '{{ custom_resource.apiVersion }}' - kind: '{{ custom_resource.kind }}' - namespace: '{{ namespace }}' - name: '{{ custom_resource.metadata.name }}' + k8s_info: + kind: "{{ custom_resource.kind }}" + name: "{{custom_resource.metadata.name}}" + namespace: "{{ custom_resource.metadata.namespace }}" register: cr - # Should this be computed? - name: Set start_counter set_fact: - start_counter: "{{cr.resources[0].spec.secretCounter | default(0)}}" + start_counter: + "{{cr.resources[0].spec.trigger | default(0) | int }}" #"{{ cr.resources[0].secretCounter }}" + - debug: - var: start_counter + var: cr # The password and username secrets are literally just "username" and "password". - name: "Secret[1]: Ensure secret create triggers operator" block: - name: Create the password secret k8s: - state: present - definition: + state: present + definition: apiVersion: "v1" - kind: "Secret" + kind: "Secret" metadata: name: "{{ secret_name }}" namespace: "{{ namespace }}" + labels: + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator data: password: "{{ secret_pass }}" username: "{{ secret_user }}" type: "Opaque" - labels: - app.kubernetes.io/name: ibm-spectrum-scale-csi-operator - # How can I improve this? + # How can I improve this? - name: Wait 60s for secret to be processed - k8s_facts: - api_version: '{{ custom_resource.apiVersion }}' - kind: '{{ custom_resource.kind }}' + k8s_info: + api_version: "{{ custom_resource.apiVersion }}" + kind: "{{ custom_resource.kind }}" register: cr_secret until: - - start_counter|int != ( cr_secret.resources[0].spec.secretCounter | default(0) ) + - start_counter|int != ( cr_secret.resources[0].spec.trigger | default(start_counter) | int ) delay: 6 retries: 10 - name: Update start_counter set_fact: - start_counter: "{{cr_secret.resources[0].spec.secretCounter}}" - - rescue: - - fail: - msg: "Secret[1]: Secret create failed to trigger operator" - -- name: "Secret[2]: Ensure secret change triggers operator" - block: - - name: Change the password secret - k8s: - state: present - definition: - apiVersion: "v1" - kind: "Secret" - metadata: - name: "{{ secret_name }}" - namespace: "{{ namespace }}" - data: - password: "{{ secret_pass }}" - username: "{{ secret_user_delta }}" - type: "Opaque" - labels: - app.kubernetes.io/name: ibm-spectrum-scale-csi-operator - - # How can I improve this? - - name: Wait 60s for secret to be processed - k8s_facts: - api_version: '{{ custom_resource.apiVersion }}' - kind: '{{ custom_resource.kind }}' - register: cr_secret - until: - - start_counter|int != cr_secret.resources[0].spec.secretCounter - delay: 6 - retries: 10 - - - name: Update start_counter - set_fact: - start_counter: "{{cr_secret.resources[0].spec.secretCounter}}" + start_counter: "{{cr_secret.resources[0].spec.trigger | int}}" rescue: - - fail: - msg: "Secret[2]: Secret change failed to trigger operator" + - fail: + msg: "Secret[1]: Secret create failed to trigger operator" -- name: "Secret[3]: Ensure secret delete triggers operator" - block: - - name: Delete the secret - k8s: - state: absent - namespace: "{{ namespace }}" - definition: - apiVersion: "v1" - kind: "Secret" - metadata: - name: "{{ secret_name }}" - - # How can I improve this? - - name: Wait 60s for secret to be processed - k8s_facts: - api_version: '{{ custom_resource.apiVersion }}' - kind: '{{ custom_resource.kind }}' - register: cr_secret - until: - - start_counter|int != cr_secret.resources[0].spec.secretCounter - delay: 6 - retries: 10 - - - name: Update start_counter - set_fact: - start_counter: "{{cr_secret.resources[0].spec.secretCounter}}" - - rescue: - - fail: - msg: "Secret[3]: Secret delete failed to trigger operator" - -- name: "Secret[4]: Ensure secret create doesn't triggers operator when label not set" +- name: "Secret[2]: Ensure secret create doesn't triggers operator when label not set" block: - name: Create the password secret, not linked to operator k8s: - state: present - definition: + state: present + definition: apiVersion: "v1" - kind: "Secret" + kind: "Secret" metadata: name: "{{secret_name_dummy}}" namespace: "{{ namespace }}" @@ -162,14 +94,13 @@ pause: seconds: 30 - # How can I improve this? + # How can I improve this? - name: Verify operator didn't process secret - k8s_facts: - api_version: '{{ custom_resource.apiVersion }}' - kind: '{{ custom_resource.kind }}' + k8s_info: + api_version: "{{ custom_resource.apiVersion }}" + kind: "{{ custom_resource.kind }}" register: cr_secret - - fail: - msg: "Secret[4]: Secret create triggered operator" - when: start_counter|int != cr_secret.resources[0].spec.secretCounter - + - fail: + msg: "Secret[2]: Secret create triggered operator" + when: start_counter|int != (cr_secret.resources[0].spec.trigger | int) diff --git a/operator/molecule/helpers/test_harness.yaml b/operator/molecule/helpers/test_harness.yaml index 311f47acd..137354111 100644 --- a/operator/molecule/helpers/test_harness.yaml +++ b/operator/molecule/helpers/test_harness.yaml @@ -1,3 +1,4 @@ +--- - name: Run tests hosts: all become: yes @@ -6,13 +7,11 @@ vars: custom_resource: apiVersion: csi.ibm.com/v1 - kind: CSIScaleOperator + kind: CSIScaleOperator metadata: name: "ibm-spectrum-scale-csi" namespace: ibm-spectrum-scale-csi-driver - tasks: - - name: Run tests include_tasks: ../default/tests/basic_tests.yaml diff --git a/operator/molecule/test-cluster/molecule.yml b/operator/molecule/test-cluster/molecule.yml index 2eaa5faaf..fa48ec6de 100644 --- a/operator/molecule/test-cluster/molecule.yml +++ b/operator/molecule/test-cluster/molecule.yml @@ -6,22 +6,21 @@ driver: options: managed: False ansible_connection_options: {} -lint: - name: yamllint - enabled: False +lint: | + set -e + yamllint . +# ansible-lint +# flake8 platforms: -- name: test-cluster - groups: - - k8s + - name: test-cluster + groups: + - k8s provisioner: name: ansible inventory: group_vars: all: namespace: ${TEST_NAMESPACE:-osdk-test} - lint: - name: ansible-lint - enabled: False env: ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/roles scenario: @@ -39,5 +38,3 @@ scenario: - destroy verifier: name: testinfra - lint: - name: flake8 diff --git a/operator/molecule/test-cluster/playbook.yml b/operator/molecule/test-cluster/playbook.yml index 9ecee40b9..b3973d7fb 100644 --- a/operator/molecule/test-cluster/playbook.yml +++ b/operator/molecule/test-cluster/playbook.yml @@ -7,34 +7,33 @@ ansible_python_interpreter: '{{ ansible_playbook_python }}' deploy_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/deploy" image_name: csi.ibm.com/ibm-spectrum-scale-csi-operator:testing - custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/ibm-spectrum-scale-csi-operator-cr.yaml'])) | from_yaml }}" + custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/csiscaleoperators.csi.ibm.com.cr.yaml'])) | from_yaml }}" tasks: + - name: Ensure specified namespace is present + k8s: + api_version: v1 + kind: Namespace + name: '{{ namespace }}' - - name: Ensure specified namespace is present - k8s: - api_version: v1 - kind: Namespace - name: '{{ namespace }}' + - name: Create the csi.ibm.com/v1.CSIScaleOperator + k8s: + namespace: '{{ namespace }}' + definition: "{{ lookup('file', '/'.join([deploy_dir, 'crds/csiscaleoperators.csi.ibm.com.cr.yaml'])) }}" - - name: Create the csi.ibm.com/v1.CSIScaleOperator - k8s: - namespace: '{{ namespace }}' - definition: "{{ lookup('file', '/'.join([deploy_dir, 'crds/ibm-spectrum-scale-csi-operator-cr.yaml'])) }}" + - name: Get the newly created Custom Resource + debug: + msg: "{{ lookup('k8s', group='csi.ibm.com', api_version='v1', kind='CSIScaleOperator', namespace=namespace, resource_name=custom_resource.metadata.name) }}" - - name: Get the newly created Custom Resource - debug: - msg: "{{ lookup('k8s', group='csi.ibm.com', api_version='v1', kind='CSIScaleOperator', namespace=namespace, resource_name=custom_resource.metadata.name) }}" - - - name: Wait 60s for reconciliation to run - k8s_facts: - api_version: 'v1' - kind: 'CSIScaleOperator' - namespace: '{{ namespace }}' - name: '{{ custom_resource.metadata.name }}' - register: reconcile_cr - until: - - "'Successful' in (reconcile_cr | json_query('resources[].status.conditions[].reason'))" - delay: 6 - retries: 10 + - name: Wait 60s for reconciliation to run + k8s_facts: + api_version: 'v1' + kind: 'CSIScaleOperator' + namespace: '{{ namespace }}' + name: '{{ custom_resource.metadata.name }}' + register: reconcile_cr + until: + - "'Successful' in (reconcile_cr | json_query('resources[].status.conditions[].reason'))" + delay: 6 + retries: 10 - import_playbook: '{{ playbook_dir }}/../default/asserts.yml' diff --git a/operator/molecule/test-local/molecule.yml b/operator/molecule/test-local/molecule.yml index 2f615c521..33c42dfa4 100644 --- a/operator/molecule/test-local/molecule.yml +++ b/operator/molecule/test-local/molecule.yml @@ -3,30 +3,29 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - enabled: False +lint: | + set -e + yamllint . +# ansible-lint +# flake8 platforms: -- name: kind-test-local - groups: - - k8s - image: bsycorp/kind:latest-1.12 - privileged: True - override_command: no - exposed_ports: - - 8443/tcp - - 10080/tcp - published_ports: - - 0.0.0.0:${TEST_CLUSTER_PORT:-10443}:8443/tcp - pre_build_image: yes - volumes: - - ${MOLECULE_PROJECT_DIRECTORY}:/build:Z + - name: kind-test-local + groups: + - k8s + image: bsycorp/kind:latest-1.12 + privileged: True + override_command: no + exposed_ports: + - 8443/tcp + - 10080/tcp + published_ports: + - 0.0.0.0:${TEST_CLUSTER_PORT:-10443}:8443/tcp + pre_build_image: yes + volumes: + - ${MOLECULE_PROJECT_DIRECTORY}:/build:Z provisioner: name: ansible log: True - lint: - name: ansible-lint - enabled: False inventory: group_vars: all: @@ -35,7 +34,7 @@ provisioner: K8S_AUTH_KUBECONFIG: /tmp/molecule/kind-test-local/kubeconfig KUBECONFIG: /tmp/molecule/kind-test-local/kubeconfig ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/roles - KIND_PORT: '${TEST_CLUSTER_PORT:-10443}' + KIND_PORT: "${TEST_CLUSTER_PORT:-10443}" scenario: name: test-local test_sequence: @@ -51,6 +50,3 @@ scenario: - destroy verifier: name: testinfra - lint: - name: flake8 - diff --git a/operator/molecule/test-local/playbook.yml b/operator/molecule/test-local/playbook.yml index f13542aab..90497638d 100644 --- a/operator/molecule/test-local/playbook.yml +++ b/operator/molecule/test-local/playbook.yml @@ -4,20 +4,21 @@ vars: image_name: csi.ibm.com/ibm-spectrum-scale-csi-operator:testing tasks: - # using command so we don't need to install any dependencies - - name: Get existing image hash - command: docker images -q {{ image_name }} - register: prev_hash - changed_when: false + # using command so we don't need to install any dependencies + - name: Get existing image hash + command: docker images -q {{ image_name }} + register: prev_hash + changed_when: false - - name: Check if CI - set_fact: - CI: lookup('env', 'CI') + - name: Check if CI + set_fact: + CI: lookup('env', 'CI') + + - name: Build Operator Image + command: docker build -f /build/build/Dockerfile -t {{ image_name }} /build + register: build_cmd + changed_when: not prev_hash.stdout or (prev_hash.stdout and prev_hash.stdout not in ''.join(build_cmd.stdout_lines[-2:])) - - name: Build Operator Image - command: docker build -f /build/build/Dockerfile -t {{ image_name }} /build - register: build_cmd - changed_when: not prev_hash.stdout or (prev_hash.stdout and prev_hash.stdout not in ''.join(build_cmd.stdout_lines[-2:])) - name: Converge hosts: localhost @@ -27,150 +28,148 @@ deploy_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/deploy" pull_policy: Never REPLACE_IMAGE: csi.ibm.com/ibm-spectrum-scale-csi-operator:testing - custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/ibm-spectrum-scale-csi-operator-cr.yaml'])) | from_yaml }}" + custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/csiscaleoperators.csi.ibm.com.cr.yaml'])) | from_yaml }}" tasks: - - block: - - name: Delete the Operator Deployment - k8s: - state: absent - namespace: '{{ namespace }}' - definition: "{{ lookup('template', '/'.join([deploy_dir, 'operator.yaml'])) }}" - register: delete_deployment - when: hostvars[groups.k8s.0].build_cmd.changed - - - name: Wait 30s for Operator Deployment to terminate - k8s_facts: - api_version: '{{ definition.apiVersion }}' - kind: '{{ definition.kind }}' - namespace: '{{ namespace }}' - name: '{{ definition.metadata.name }}' - vars: - definition: "{{ lookup('template', '/'.join([deploy_dir, 'operator.yaml'])) | from_yaml }}" - register: deployment - until: not deployment.resources - delay: 3 - retries: 10 - when: delete_deployment.changed - - - name: Create the Operator Deployment - k8s: - namespace: '{{ namespace }}' - definition: "{{ lookup('template', '/'.join([deploy_dir, 'operator.yaml'])) }}" - - - name: Create the operator secret - k8s: - state: present - definition: - apiVersion: "v1" - kind: "Secret" - metadata: - name: "{{ secret_name }}" - namespace: "{{ namespace }}" - data: - password: "{{ secret_pass }}" - username: "{{ secret_user }}" - type: "Opaque" - labels: - app.kubernetes.io/name: ibm-spectrum-scale-csi-operator - vars: - secret_pass: "cGFzc3dvcMq=" # "password" - secret_user: "dXNlcm5hbwu=" # "username" - secret_name: "secret1" - - - name: Create the csi.ibm.com/v1.CSIScaleOperator - k8s: - state: present - namespace: '{{ namespace }}' - definition: '{{ custom_resource }}' - validate: - strict: yes - fail_on_error: yes - - - name: Wait 120s for reconciliation to run - k8s_facts: - api_version: '{{ custom_resource.apiVersion }}' - kind: '{{ custom_resource.kind }}' - namespace: '{{ namespace }}' - name: '{{ custom_resource.metadata.name }}' - register: cr - until: - - "'Successful' in (cr | json_query('resources[].status.conditions[].reason'))" - delay: 6 - retries: 20 - - - rescue: - - name: debug cr - ignore_errors: yes - failed_when: false - debug: - var: debug_cr - vars: - debug_cr: '{{ lookup("k8s", - kind=custom_resource.kind, - api_version=custom_resource.apiVersion, - namespace=namespace, - resource_name=custom_resource.metadata.name - )}}' - - - name: Get Operator Pod - set_fact: - op_pod: '{{ lookup("k8s", - kind="pods", - namespace=namespace, - label_selector="app.kubernetes.io/name=ibm-spectrum-scale-csi-operator" - )}}' - - - name: Get Pods - set_fact: - pods: '{{ lookup("k8s", - kind="pods", - namespace=namespace - - )}}' - - - name : debug pods lookup - ignore_errors: yes - failed_when: false - debug: - var: pods - - - - name: Get operator ansible logs - ignore_errors: yes - failed_when: false - command: "kubectl logs {{ op_pod.metadata.name }} -n {{ namespace }} ansible" - environment: - KUBECONFIG: '{{ lookup("env", "KUBECONFIG") }}' - register: ansible_log - - - debug: var=ansible_log.stdout_lines - - - name: Get operator ansible logs - ignore_errors: yes - failed_when: false - command: "kubectl logs {{ op_pod.metadata.name }} -n {{ namespace }} operator" - environment: - KUBECONFIG: '{{ lookup("env", "KUBECONFIG") }}' - register: oper_log - - - debug: var=oper_log.stdout_lines - - - name: debug api_groups - ignore_errors: yes - failed_when: false - debug: - var: debug_api_groups - vars: - debug_api_groups: "{{ lookup('k8s', cluster_info='api_groups') }}" - - - debug: - msg: "kubectl logs {{ op_pod.metadata.name }} -n {{ namespace }} ansible" - - - fail: - msg: "Failed on action: converge" - - include_tasks: '{{ playbook_dir }}/../default/tests/basic_tests.yaml' + - name: Testing Block + block: + - name: Delete the Operator Deployment + k8s: + state: absent + namespace: '{{ namespace }}' + definition: "{{ lookup('template', '/'.join([deploy_dir, 'operator.yaml'])) }}" + register: delete_deployment + when: hostvars[groups.k8s.0].build_cmd.changed + + - name: Wait 30s for Operator Deployment to terminate + k8s_facts: + api_version: '{{ definition.apiVersion }}' + kind: '{{ definition.kind }}' + namespace: '{{ namespace }}' + name: '{{ definition.metadata.name }}' + vars: + definition: "{{ lookup('template', '/'.join([deploy_dir, 'operator.yaml'])) | from_yaml }}" + register: deployment + until: not deployment.resources + delay: 3 + retries: 10 + when: delete_deployment.changed + + - name: Create the Operator Deployment + k8s: + namespace: '{{ namespace }}' + definition: "{{ lookup('template', '/'.join([deploy_dir, 'operator.yaml'])) }}" + + - name: Create the operator secret + k8s: + state: present + definition: + apiVersion: "v1" + kind: "Secret" + metadata: + name: "{{ secret_name }}" + namespace: "{{ namespace }}" + data: + password: "{{ secret_pass }}" + username: "{{ secret_user }}" + type: "Opaque" + labels: + app.kubernetes.io/name: ibm-spectrum-scale-csi-operator + vars: + secret_pass: "cGFzc3dvcMq=" # "password" + secret_user: "dXNlcm5hbwu=" # "username" + secret_name: "secret1" + + - name: Create the csi.ibm.com/v1.CSIScaleOperator + k8s: + state: present + namespace: '{{ namespace }}' + definition: '{{ custom_resource }}' + validate: + strict: yes + fail_on_error: yes + + - name: Wait 240s for reconciliation to run + k8s_facts: + api_version: '{{ custom_resource.apiVersion }}' + kind: '{{ custom_resource.kind }}' + namespace: '{{ namespace }}' + name: '{{ custom_resource.metadata.name }}' + register: cr + until: + - "'Successful' in (cr | json_query('resources[].status.conditions[].reason'))" + delay: 6 + retries: 40 + rescue: + - name: debug cr + ignore_errors: yes + failed_when: false + debug: + var: debug_cr + vars: + debug_cr: '{{ lookup("k8s", + kind=custom_resource.kind, + api_version=custom_resource.apiVersion, + namespace=namespace, + resource_name=custom_resource.metadata.name + )}}' + + - name: Get Operator Pod + set_fact: + op_pod: '{{ lookup("k8s", + kind="pods", + namespace=namespace, + label_selector="app.kubernetes.io/name=ibm-spectrum-scale-csi-operator" + )}}' + + - name: Get Pods + set_fact: + pods: '{{ lookup("k8s", + kind="pods", + namespace=namespace + + )}}' + + - name: debug pods lookup + ignore_errors: yes + failed_when: false + debug: + var: pods + + + - name: Get operator ansible logs + ignore_errors: yes + failed_when: false + command: "kubectl logs {{ op_pod.metadata.name }} -n {{ namespace }} ansible" + environment: + KUBECONFIG: '{{ lookup("env", "KUBECONFIG") }}' + register: ansible_log + + - debug: var=ansible_log.stdout_lines + + - name: Get operator ansible logs + ignore_errors: yes + failed_when: false + command: "kubectl logs {{ op_pod.metadata.name }} -n {{ namespace }} operator" + environment: + KUBECONFIG: '{{ lookup("env", "KUBECONFIG") }}' + register: oper_log + + - debug: var=oper_log.stdout_lines + + - name: debug api_groups + ignore_errors: yes + failed_when: false + debug: + var: debug_api_groups + vars: + debug_api_groups: "{{ lookup('k8s', cluster_info='api_groups') }}" + + - debug: + msg: "kubectl logs {{ op_pod.metadata.name }} -n {{ namespace }} ansible" + + - fail: + msg: "Failed on action: converge" + + - include_tasks: '{{ playbook_dir }}/../default/tests/basic_tests.yaml' - import_playbook: '{{ playbook_dir }}/../default/asserts.yml' - - diff --git a/operator/molecule/test-local/prepare.yml b/operator/molecule/test-local/prepare.yml index fc610ca47..da6391678 100644 --- a/operator/molecule/test-local/prepare.yml +++ b/operator/molecule/test-local/prepare.yml @@ -5,32 +5,31 @@ hosts: localhost connection: local vars: - ansible_python_interpreter: '{{ ansible_playbook_python }}' + ansible_python_interpreter: "{{ ansible_playbook_python }}" deploy_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/deploy" tasks: - - name: Create Custom Resource Definition - k8s: - definition: "{{ lookup('file', '/'.join([deploy_dir, 'crds/ibm-spectrum-scale-csi-operator-crd.yaml'])) }}" + - name: Create Custom Resource Definition + k8s: + definition: "{{ lookup('file', '/'.join([deploy_dir, 'crds/csiscaleoperators.csi.ibm.com.crd.yaml'])) }}" - - name: Ensure specified namespace is present - k8s: - api_version: v1 - kind: Namespace - name: '{{ namespace }}' + - name: Ensure specified namespace is present + k8s: + api_version: v1 + kind: Namespace + name: "{{ namespace }}" - #- name: Modify the RoleBinding for this namespace - # replace: - # path: "{{ '/'.join([deploy_dir, 'role_binding.yaml']) }}" - # regexp: "(.*)ibm-spectrum-scale-csi-driver(.*)" - # replace: '\1{{ namespace }}\2' - - - name: Create RBAC resources - k8s: - definition: "{{ lookup('template', '/'.join([deploy_dir, item])) }}" - namespace: '{{ namespace }}' - with_items: - - namespace.yaml - - role.yaml - - role_binding.yaml - - service_account.yaml + # - name: Modify the RoleBinding for this namespace + # replace: + # path: "{{ '/'.join([deploy_dir, 'role_binding.yaml']) }}" + # regexp: "(.*)ibm-spectrum-scale-csi-driver(.*)" + # replace: '\1{{ namespace }}\2' + - name: Create RBAC resources + k8s: + definition: "{{ lookup('template', '/'.join([deploy_dir, item])) }}" + namespace: "{{ namespace }}" + with_items: + - namespace.yaml + - role.yaml + - role_binding.yaml + - service_account.yaml diff --git a/operator/pkg/apis/addtoscheme_ibm_v1.go b/operator/pkg/apis/addtoscheme_ibm_v1.go deleted file mode 100644 index 9e1f662a9..000000000 --- a/operator/pkg/apis/addtoscheme_ibm_v1.go +++ /dev/null @@ -1,10 +0,0 @@ -package apis - -import ( - "github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/apis/ibm/v1" -) - -func init() { - // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back - AddToSchemes = append(AddToSchemes, v1.SchemeBuilder.AddToScheme) -} diff --git a/operator/pkg/apis/apis.go b/operator/pkg/apis/apis.go deleted file mode 100644 index 07dc96164..000000000 --- a/operator/pkg/apis/apis.go +++ /dev/null @@ -1,13 +0,0 @@ -package apis - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// AddToSchemes may be used to add all resources defined in the project to a Scheme -var AddToSchemes runtime.SchemeBuilder - -// AddToScheme adds all Resources to the Scheme -func AddToScheme(s *runtime.Scheme) error { - return AddToSchemes.AddToScheme(s) -} diff --git a/operator/pkg/apis/ibm/v1/csiscaleoperator_types.go b/operator/pkg/apis/ibm/v1/csiscaleoperator_types.go deleted file mode 100644 index 3c4e9adb5..000000000 --- a/operator/pkg/apis/ibm/v1/csiscaleoperator_types.go +++ /dev/null @@ -1,155 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// Defines the primary filesystem. -// +k8s:openapi-gen=true -type CSIPrimarySpec struct { - // The name of the primary filesystem. - PrimaryFs string `json:"primaryFs,omitempty"` - - // The name of the primary fileset, created in primaryFs - PrimaryFset string `json:"primaryFset,omitempty"` - - // Inode Limit for Primary Fileset - InodeLimit string `json:"inodeLimit,omitempty"` - - // RemoteCluster ID, in case Primary fileset is on remote cluster - RemoteCluster string `json:"remoteCluster,omitempty"` - - // Remote FS name, in case we use Remote cluster for Primary Fs - RemoteFs string `json:"remoteFs,omitempty"` -} - -// Node Mapping -// +k8s:openapi-gen=true -type NodeMap struct { - K8sNode string `json:"k8sNode,omitempty"` - SpectrumscaleNode string `json:"spectrumscaleNode,omitempty"` -} - -// Node Selector Key value -// +k8s:openapi-gen=true -type KeyVal struct { - Key string `json:"key,omitempty"` - Value string `json:"value,omitempty"` -} - -// Defines the desired REST API access info. -// +k8s:openapi-gen=true -type CSIRestApiSpec struct { - // The hostname of the REST server. - GuiHost string `json:"guiHost,omitempty"` - - // The port number running the REST server. - GuiPort string `json:"guiPort,omitempty"` -} - -// CSIClusterSpec defines the desired state of CSIi Scale Cluster -// +k8s:openapi-gen=true -type CSIClusterSpec struct { - // The cluster id of the gpfs cluster specified (mandatory). - Id string `json:"id"` - - // Require a secure SSL connection to connect to GPFS. - SecureSslMode bool `json:"secureSslMode"` - - // A string specifying a secret resource name. - Secrets string `json:"secrets,omitempty"` - - // A string specifying a cacert resource name. - Cacert string `json:"cacert,omitempty"` - - // The primary file system for the GPFS cluster. - Primary CSIPrimarySpec `json:"primary,omitempty"` - - // A collection of targets for REST calls. - RestApi []CSIRestApiSpec `json:"restApi,omitempty"` -} - -// CSIScaleOperatorSpec defines the desired state of CSIScaleOperator -// +k8s:openapi-gen=true -type CSIScaleOperatorSpec struct { - // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster - // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file - // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html - - // Attacher image for csi (actually attaches to the storage). - Attacher string `json:"attacher,omitempty"` - - // Provisioner image for csi (actually issues provision requests). - Provisioner string `json:"provisioner,omitempty"` - - // Sidecar container image for the csi spectrum scale plugin pods. - DriverRegistrar string `json:"driverRegistrar,omitempty"` - - // Image name for the csi spectrum scale plugin container. - SpectrumScale string `json:"spectrumScale,omitempty"` - - // The path to the gpfs file system mounted on the host machine. - ScaleHostpath string `json:"scaleHostpath,omitempty"` - - // Node selector for attacher - AttacherNodeSelector []KeyVal `json:"attacherNodeSelector,omitempty"` - - // Node selector for provisioner - ProvisionerNodeSelector []KeyVal `json:"provisionerNodeSelector,omitempty"` - - // Node Selector for Plugin. - PluginNodeSelector []KeyVal `json:"pluginNodeSelector,omitempty"` - - // Node Mapping information for plugin - NodeMapping []NodeMap `json:"nodeMapping,omitempty"` - - // A collection of gpfs cluster properties for the csi driver to mount. - Clusters []CSIClusterSpec `json:"clusters,omitempty"` - - // Trigger used by the operator for secret changes. - SecretCounter int `json:"secretCounter,omitempty"` -} - -// CSIScaleOperatorCondition defines the observed Condition of CSIScaleOperator -// +k8s:openapi-gen=true -type CSIScaleOperatorCondition struct { - IsRunning bool `json:"isRunning,omitempty"` -} - -// CSIScaleOperatorStatus defines the observed state of CSIScaleOperator -// +k8s:openapi-gen=true -type CSIScaleOperatorStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file - // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html - Conditions []CSIScaleOperatorCondition `json:"conditions,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CSIScaleOperator is the Schema for the csiscaleoperators API -// +k8s:openapi-gen=true -// +kubebuilder:subresource:status -type CSIScaleOperator struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec CSIScaleOperatorSpec `json:"spec,omitempty"` - Status CSIScaleOperatorStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CSIScaleOperatorList contains a list of CSIScaleOperator -type CSIScaleOperatorList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []CSIScaleOperator `json:"items"` -} - -func init() { - SchemeBuilder.Register(&CSIScaleOperator{}, &CSIScaleOperatorList{}) -} diff --git a/operator/pkg/apis/ibm/v1/doc.go b/operator/pkg/apis/ibm/v1/doc.go deleted file mode 100644 index 7aea4b746..000000000 --- a/operator/pkg/apis/ibm/v1/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package v1 contains API Schema definitions for the ibm v1 API group -// +k8s:deepcopy-gen=package,register -// +groupName=csi.ibm.com -package v1 diff --git a/operator/pkg/apis/ibm/v1/register.go b/operator/pkg/apis/ibm/v1/register.go deleted file mode 100644 index c35d96fd8..000000000 --- a/operator/pkg/apis/ibm/v1/register.go +++ /dev/null @@ -1,19 +0,0 @@ -// NOTE: Boilerplate only. Ignore this file. - -// Package v1 contains API Schema definitions for the ibm v1 API group -// +k8s:deepcopy-gen=package,register -// +groupName=csi.ibm.com -package v1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/runtime/scheme" -) - -var ( - // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: "csi.ibm.com", Version: "v1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} -) diff --git a/operator/pkg/apis/ibm/v1/zz_generated.deepcopy.go b/operator/pkg/apis/ibm/v1/zz_generated.deepcopy.go deleted file mode 100644 index e243b5b19..000000000 --- a/operator/pkg/apis/ibm/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,236 +0,0 @@ -// +build !ignore_autogenerated - -// Code generated by operator-sdk. DO NOT EDIT. - -package v1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIClusterSpec) DeepCopyInto(out *CSIClusterSpec) { - *out = *in - out.Primary = in.Primary - if in.RestApi != nil { - in, out := &in.RestApi, &out.RestApi - *out = make([]CSIRestApiSpec, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIClusterSpec. -func (in *CSIClusterSpec) DeepCopy() *CSIClusterSpec { - if in == nil { - return nil - } - out := new(CSIClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIPrimarySpec) DeepCopyInto(out *CSIPrimarySpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIPrimarySpec. -func (in *CSIPrimarySpec) DeepCopy() *CSIPrimarySpec { - if in == nil { - return nil - } - out := new(CSIPrimarySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIRestApiSpec) DeepCopyInto(out *CSIRestApiSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIRestApiSpec. -func (in *CSIRestApiSpec) DeepCopy() *CSIRestApiSpec { - if in == nil { - return nil - } - out := new(CSIRestApiSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIScaleOperator) DeepCopyInto(out *CSIScaleOperator) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIScaleOperator. -func (in *CSIScaleOperator) DeepCopy() *CSIScaleOperator { - if in == nil { - return nil - } - out := new(CSIScaleOperator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CSIScaleOperator) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIScaleOperatorCondition) DeepCopyInto(out *CSIScaleOperatorCondition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIScaleOperatorCondition. -func (in *CSIScaleOperatorCondition) DeepCopy() *CSIScaleOperatorCondition { - if in == nil { - return nil - } - out := new(CSIScaleOperatorCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIScaleOperatorList) DeepCopyInto(out *CSIScaleOperatorList) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CSIScaleOperator, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIScaleOperatorList. -func (in *CSIScaleOperatorList) DeepCopy() *CSIScaleOperatorList { - if in == nil { - return nil - } - out := new(CSIScaleOperatorList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CSIScaleOperatorList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIScaleOperatorSpec) DeepCopyInto(out *CSIScaleOperatorSpec) { - *out = *in - if in.AttacherNodeSelector != nil { - in, out := &in.AttacherNodeSelector, &out.AttacherNodeSelector - *out = make([]KeyVal, len(*in)) - copy(*out, *in) - } - if in.ProvisionerNodeSelector != nil { - in, out := &in.ProvisionerNodeSelector, &out.ProvisionerNodeSelector - *out = make([]KeyVal, len(*in)) - copy(*out, *in) - } - if in.PluginNodeSelector != nil { - in, out := &in.PluginNodeSelector, &out.PluginNodeSelector - *out = make([]KeyVal, len(*in)) - copy(*out, *in) - } - if in.NodeMapping != nil { - in, out := &in.NodeMapping, &out.NodeMapping - *out = make([]NodeMap, len(*in)) - copy(*out, *in) - } - if in.Clusters != nil { - in, out := &in.Clusters, &out.Clusters - *out = make([]CSIClusterSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIScaleOperatorSpec. -func (in *CSIScaleOperatorSpec) DeepCopy() *CSIScaleOperatorSpec { - if in == nil { - return nil - } - out := new(CSIScaleOperatorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIScaleOperatorStatus) DeepCopyInto(out *CSIScaleOperatorStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CSIScaleOperatorCondition, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIScaleOperatorStatus. -func (in *CSIScaleOperatorStatus) DeepCopy() *CSIScaleOperatorStatus { - if in == nil { - return nil - } - out := new(CSIScaleOperatorStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeyVal) DeepCopyInto(out *KeyVal) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyVal. -func (in *KeyVal) DeepCopy() *KeyVal { - if in == nil { - return nil - } - out := new(KeyVal) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeMap) DeepCopyInto(out *NodeMap) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMap. -func (in *NodeMap) DeepCopy() *NodeMap { - if in == nil { - return nil - } - out := new(NodeMap) - in.DeepCopyInto(out) - return out -} diff --git a/operator/pkg/apis/ibm/v1/zz_generated.openapi.go b/operator/pkg/apis/ibm/v1/zz_generated.openapi.go deleted file mode 100644 index 7f4454ead..000000000 --- a/operator/pkg/apis/ibm/v1/zz_generated.openapi.go +++ /dev/null @@ -1,87 +0,0 @@ -// +build !ignore_autogenerated - -// Code generated by openapi-gen. DO NOT EDIT. - -// This file was autogenerated by openapi-gen. Do not edit it manually! - -package v1 - -import ( - spec "github.com/go-openapi/spec" - common "k8s.io/kube-openapi/pkg/common" -) - -func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { - return map[string]common.OpenAPIDefinition{ - "github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/apis/ibm/v1.CSIScaleOperator": schema_pkg_apis_ibm_v1_CSIScaleOperator(ref), - "github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/apis/ibm/v1.CSIScaleOperatorSpec": schema_pkg_apis_ibm_v1_CSIScaleOperatorSpec(ref), - "github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/apis/ibm/v1.CSIScaleOperatorStatus": schema_pkg_apis_ibm_v1_CSIScaleOperatorStatus(ref), - } -} - -func schema_pkg_apis_ibm_v1_CSIScaleOperator(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CSIScaleOperator is the Schema for the csiscaleoperators API", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/apis/ibm/v1.CSIScaleOperatorSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/apis/ibm/v1.CSIScaleOperatorStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/apis/ibm/v1.CSIScaleOperatorSpec", "github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/apis/ibm/v1.CSIScaleOperatorStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_pkg_apis_ibm_v1_CSIScaleOperatorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CSIScaleOperatorSpec defines the desired state of CSIScaleOperator", - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - } -} - -func schema_pkg_apis_ibm_v1_CSIScaleOperatorStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CSIScaleOperatorStatus defines the observed state of CSIScaleOperator", - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - } -} diff --git a/operator/pkg/controller/controller.go b/operator/pkg/controller/controller.go deleted file mode 100644 index d56c304e5..000000000 --- a/operator/pkg/controller/controller.go +++ /dev/null @@ -1,14 +0,0 @@ -package controller - -import ( - "sigs.k8s.io/controller-runtime/pkg/manager" - "github.com/operator-framework/operator-sdk/pkg/ansible/proxy/controllermap" -) - -// AddToManagerFuncs is a list of functions to add all Controllers to the Manager -var AddToManagerFuncs []func(manager.Manager) error - -// AddToManager adds all Controllers to the Manager -func AddToManager(m manager.Manager, cMap controllermap.ControllerMap) error { - return nil -} diff --git a/operator/pkg/controller/csiscalesecret/controller.go b/operator/pkg/controller/csiscalesecret/controller.go deleted file mode 100644 index 2020de32b..000000000 --- a/operator/pkg/controller/csiscalesecret/controller.go +++ /dev/null @@ -1,153 +0,0 @@ -package csiscalesecret - -import ( - "context" - "fmt" - - v1 "k8s.io/api/core/v1" - "sigs.k8s.io/controller-runtime/pkg/event" - "sigs.k8s.io/controller-runtime/pkg/predicate" - - //"github.com/davecgh/go-spew/spew" - ibmv1 "github.com/IBM/ibm-spectrum-scale-csi/operator/pkg/apis/ibm/v1" - //"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller" - //"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "sigs.k8s.io/controller-runtime/pkg/handler" - "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - "sigs.k8s.io/controller-runtime/pkg/source" -) - -// Track that the secret was added to the controller. -var SecretAddedCOS = false -var log = logf.Log.WithName("controller_csiscaleoperator") - -var GVK = schema.GroupVersionKind{ - Version: "v1", - Group: "core", - Kind: "Secret", -} - -// Add creates a new CSIScaleOperator Controller and adds it to the Manager. The Manager will set fields on the Controller -// and Start it when the Manager is Started. -func Add(mgr manager.Manager) *controller.Controller { - r := &ReconcileCSIScaleOperator{ - client: mgr.GetClient(), - scheme: mgr.GetScheme(), - } - - // Create a new controller - c, err := controller.New("csiscalesecret-controller", mgr, controller.Options{ - Reconciler: r, - }) - if err != nil { - log.Error(nil, "Unable to create csiscaleoperator-controller") - return nil - } - - log.Info("Add the Secrets to be watched.") - - if !SecretAddedCOS { - SecretAddedCOS = true - - // Add the secret to the controller. - // Define the label to look for and the constant for the operator. - const LabelName = "app.kubernetes.io/name" - const LabelConst = "ibm-spectrum-scale-csi-operator" - - // Set the source to monitor secrets. - src := &source.Kind{Type: &v1.Secret{}} - - // Setup a handler mapping to access all custom resources. - hdl := &handler.EnqueueRequestsFromMapFunc{ - ToRequests: handler.ToRequestsFunc(func(a handler.MapObject) []reconcile.Request { - // Query for all Operator resources in the namespace. - cso := &ibmv1.CSIScaleOperatorList{} - opts := &client.ListOptions{Namespace: a.Meta.GetNamespace()} - err = mgr.GetClient().List(context.TODO(), opts, cso) - if err != nil { - log.Error(err, "Error Message") - } - log.Info(fmt.Sprintf("In mapping function, mapping to %v operators; Secret: %s:%s", - len(cso.Items), a.Meta.GetName(), a.Meta.GetNamespace())) - - // Compose the Requests. - reqs := make([]reconcile.Request, len(cso.Items)) - for i, _ := range reqs { - reqs[i].NamespacedName.Name = cso.Items[i].Name - reqs[i].Namespace = a.Meta.GetNamespace() - } - - return reqs - }), - } - - // Setup the predicate filter for secret updates and creates. - prd := predicate.Funcs{ - UpdateFunc: func(e event.UpdateEvent) bool { - labels := e.MetaNew.GetLabels() - if labels != nil { - return labels[LabelName] == LabelConst - } - return false - }, - CreateFunc: func(e event.CreateEvent) bool { - labels := e.Meta.GetLabels() - if labels != nil { - return labels[LabelName] == LabelConst - } - return false - }, - } - - err = c.Watch(src, hdl, prd) - if err != nil { - log.Error(nil, "Unable to setup secret watch.") - return nil - } - } - - return &c -} - -// blank assignment to verify that ReconcileCSIScaleOperator implements reconcile.Reconciler -var _ reconcile.Reconciler = &ReconcileCSIScaleOperator{} - -// ReconcileCSIScaleOperator reconciles a CSIScaleOperator object -type ReconcileCSIScaleOperator struct { - // This client, initialized using mgr.Client() above, is a split client - // that reads objects from the cache and writes to the apiserver - client client.Client - scheme *runtime.Scheme -} - -// Reconcile reads that state of the cluster for a CSIScaleOperator object and makes changes based on the state read -// and what is in the CSIScaleOperator.Spec -// The Controller will requeue the Request to be processed again if the returned error is non-nil or -// Result.Requeue is true, otherwise upon completion it will remove the work from the queue. -func (r *ReconcileCSIScaleOperator) Reconcile(request reconcile.Request) (reconcile.Result, error) { - log.Info(fmt.Sprintf("In Reconciler Name: %s - Namespace: %s", request.Name, request.Namespace)) - - cso := &ibmv1.CSIScaleOperator{} - - err := r.client.Get(context.TODO(), request.NamespacedName, cso) - if err != nil { - log.Error(err, "Unable to get operator object.") - return reconcile.Result{}, err - } - - cso.Spec.SecretCounter = cso.Spec.SecretCounter + 1 - - err = r.client.Update(context.TODO(), cso) - if err != nil { - log.Error(err, "Unable to update operator object.") - return reconcile.Result{}, err - } - - return reconcile.Result{}, nil -} diff --git a/operator/roles/csi-scale/defaults/main.yml b/operator/roles/csi-scale/defaults/main.yml index bb71b4317..43c5a474c 100644 --- a/operator/roles/csi-scale/defaults/main.yml +++ b/operator/roles/csi-scale/defaults/main.yml @@ -2,33 +2,30 @@ # defaults file for ansible-role-csi-scale opName: '{{ meta.name | default("ibm-spectrum-scale-csi") }}' productName: '{{ meta.product | default("ibm-spectrum-scale-csi") }}' -labelInstance: 'ibm-spectrum-scale-csi-operator' -labelManage: 'ibm-spectrum-scale-csi-operator' -labelName: 'ibm-spectrum-scale-csi-operator' -labelRelease: 'ibm-spectrum-scale-csi-operator' +labelInstance: "ibm-spectrum-scale-csi-operator" +labelManage: "ibm-spectrum-scale-csi-operator" +labelName: "ibm-spectrum-scale-csi-operator" +labelRelease: "ibm-spectrum-scale-csi-operator" annotationProductID: "ibm-spectrum-scale-csi-operator" annotationProductName: "IBM Spectrum Scale CSI Operator" -annotationProductVersion: "1.0.1" - - +annotationProductVersion: "1.1.0" namespace: '{{ meta.namespace | default("default") }}' storage-class: "ibm-spectrum-scale-csi" # Image defaults -attacher: "quay.io/k8scsi/csi-attacher:v1.0.0" -provisioner: "quay.io/k8scsi/csi-provisioner:v1.0.0" - +attacher: "{{ lookup('env', 'CSI_ATTACHER_IMAGE') | default('quay.io/k8scsi/csi-attacher:v2.1.1', true) }}" +provisioner: "{{ lookup('env', 'CSI_PROVISIONER_IMAGE') | default('quay.io/k8scsi/csi-provisioner:v1.5.0', true) }}" # Due to camelCase these get loaded differently in the operator. -driverRegistrar: "{{ driver_registrar | default('quay.io/k8scsi/csi-node-driver-registrar:v1.0.1') }}" -spectrumScale: "{{ spectrum_scale | default('quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-driver:v1.0.1') }}" +driverRegistrar: "{{ driver_registrar | default(lookup('env', 'CSI_NODE_REGISTRAR_IMAGE')) | default('quay.io/k8scsi/csi-node-driver-registrar:v1.2.0', true) }}" +spectrumScale: "{{ spectrum_scale | default(lookup('env', 'CSI_DRIVER_IMAGE')) | default('quay.io/ibm-spectrum-scale/ibm-spectrum-scale-csi-driver:v1.1.0', true) }}" # Set defaults for the secret counter and hostpath. secretCounter: "{{ secret_counter | default(-1) }}" scaleHostpath: "{{ scale_hostpath | default('/') }}" # This needs a default for molecule, also the clusters version does weird stuff to the object? -#clusters: [] +# clusters: [] clustersCamelCase: "{{ _csi_ibm_com_csiscaleoperator.spec.clusters | default([])}}" # Node Selector for Attacher sidecar. @@ -44,6 +41,4 @@ pluginNodeSelector: "{{ _csi_ibm_com_csiscaleoperator.spec.pluginNodeSelector | nodeMapping: "{{ _csi_ibm_com_csiscaleoperator.spec.nodeMapping | default([])}}" # State of driver in the cluster (might not be needed). -#state: absent state: present - diff --git a/operator/roles/csi-scale/handlers/main.yml b/operator/roles/csi-scale/handlers/main.yml index 5bf14332c..c710390f6 100644 --- a/operator/roles/csi-scale/handlers/main.yml +++ b/operator/roles/csi-scale/handlers/main.yml @@ -1,2 +1,2 @@ --- -# handlers file for ansible-role-csi-scale \ No newline at end of file +# handlers file for ansible-role-csi-scale diff --git a/operator/roles/csi-scale/meta/main.yml b/operator/roles/csi-scale/meta/main.yml index af2af5fa2..4099f4c0d 100644 --- a/operator/roles/csi-scale/meta/main.yml +++ b/operator/roles/csi-scale/meta/main.yml @@ -1,3 +1,4 @@ +--- galaxy_info: author: John Dunham description: An operator for managing and deploying Scale CSI drivers. @@ -13,12 +14,10 @@ galaxy_info: versions: - all - - galaxy_tags: + galaxy_tags: - kubernetes - k8s - openshift - CSI dependencies: [] - diff --git a/operator/roles/csi-scale/tasks/cluster_check.yml b/operator/roles/csi-scale/tasks/cluster_check.yml index 6948a1b15..0ed625107 100644 --- a/operator/roles/csi-scale/tasks/cluster_check.yml +++ b/operator/roles/csi-scale/tasks/cluster_check.yml @@ -1,25 +1,33 @@ ---- -- name: Ensure secret {{ item.secrets }} defined in {{ lookup( 'vars','namespace' ) }} - k8s_facts: +--- +- name: "Ensure secret {{ item.secrets }} defined in {{ lookup( 'vars','namespace' ) }}" + k8s_info: kind: secrets namespace: "{{ lookup( 'vars','namespace' ) }}" - name : "{{ item.secrets }}" + name: "{{ item.secrets }}" register: results - failed_when: results is not defined or results.resources is not defined or (results.resources|length==0) + +- when: results is not defined or results.resources is not defined or (results.resources|length==0) + block: + # - name: "Cluster check failed, exiting" + # operator_sdk.util.k8s_status: + # kind: CSIScaleOperator + # name: "{{ meta.name }}" + # namespace: "{{ meta.namespace }}" + # status: + # conditions: + # - isRunning: false + + - name: "Ending Operator Run." + meta: end_play - name: "Label unlabled secrets" include_tasks: password_label.yml - when: item.metadata.label is not defined or - item.metadata.label["app.kubernetes.io/name"] is not defined or - item.metadata.label["app.kubernetes.io/name"] != "ibm-spectrum-scale-csi-operator" - loop: "{{ results.resources }}" + when: item.metadata.labels is not defined or + item.metadata.labels["app.kubernetes.io/name"] is not defined or + item.metadata.labels["app.kubernetes.io/name"] != "ibm-spectrum-scale-csi-operator" + loop: "{{ results.resources }}" -# Hash using a salted +# Hash using a salted - name: "Build Secret Checksum" - set_fact: + set_fact: secret_checksums: "{{ secret_checksums + [ (results.resources[0].data | default(' ')) | to_json | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) ] }}" - - - - - diff --git a/operator/roles/csi-scale/tasks/main.yml b/operator/roles/csi-scale/tasks/main.yml index e44d0230d..555f966e3 100644 --- a/operator/roles/csi-scale/tasks/main.yml +++ b/operator/roles/csi-scale/tasks/main.yml @@ -1,6 +1,6 @@ --- -#- debug: -# msg: +# - debug: +# msg: # - "scaleHostpath - {{ scaleHostpath }}" # - "secretCounter - {{ secretCounter }}" # - "attacher - {{ attacher }}" @@ -9,22 +9,32 @@ # - "spectrumScale - {{ spectrumScale }}" # - "clustersCamelCase - {{clustersCamelCase}}" - - name: "Get cluster information" set_fact: api_groups: "{{ lookup('k8s', cluster_info='api_groups') }}" cluster_checksum: "{{ clustersCamelCase | to_json | checksum }}" secret_checksums: [] + deploy_list: + - name: "cluster-role-attacher.yaml.j2" + - name: "cluster-role-node.yaml.j2" + - name: "cluster-role-provisioner.yaml.j2" + - name: "sa-attacher.yaml.j2" + - name: "sa-node.yaml.j2" + - name: "sa-provisioner.yaml.j2" + - name: "crb-attacher.yaml.j2" + - name: "crb-node.yaml.j2" + - name: "crb-provisioner.yaml.j2" + - name: "spectrum_scale.yaml.j2" + - name: "csi-plugin-attacher.yaml.j2" + - name: "csi-plugin-provisioner.yaml.j2" + - name: "csi-plugin.yaml.j2" -- name: "Test Clusters" +- name: "Test clusters when setting to present" block: - - name: "Ensure the clusters are valid" - include_tasks: cluster_check.yml - loop: "{{ clustersCamelCase }}" - when: 'state == "present"' - rescue: - - name: "Cluster check failed when setting state to present, exiting" - meta: end_play + - name: "Ensure the clusters are valid" + include_tasks: cluster_check.yml + loop: "{{ clustersCamelCase }}" + when: 'state == "present"' - name: "Generate final secret checksum" set_fact: @@ -33,59 +43,56 @@ - name: "Ensure SCC" when: '"apps.openshift.io" in api_groups' block: - - name: Ensure secret {{ item.secrets }} defined in {{ lookup( 'vars','namespace' ) }} - k8s_facts: - kind: "SecurityContextConstraints" - name : "csiaccess" - register: csiaccess_results + - name: "Ensure secret {{ item.secrets }} defined in {{ lookup( 'vars','namespace' ) }}" + k8s_info: + kind: "SecurityContextConstraints" + name: "csiaccess" + register: csiaccess_results + + - name: "Ensure the csiaccess_users list" + set_fact: + csiaccess_users: "{{ (csiaccess_results.resources[0].users | default([])) }}" + scc_state: "present" + csiaccess_users_new: + - "system:serviceaccount:{{ namespace }}:ibm-spectrum-scale-csi-attacher" + - "system:serviceaccount:{{ namespace }}:ibm-spectrum-scale-csi-provisioner" + - "system:serviceaccount:{{ namespace }}:ibm-spectrum-scale-csi-node" - - name: "Ensure the csiaccess_users list" - set_fact: - csiaccess_users: "{{ (csiaccess_results.resources[0].users | default([])) }}" - scc_state: "present" - csiaccess_users_new: - - 'system:serviceaccount:{{ namespace }}:ibm-spectrum-scale-csi-attacher' - - 'system:serviceaccount:{{ namespace }}:ibm-spectrum-scale-csi-provisioner' - - 'system:serviceaccount:{{ namespace }}:ibm-spectrum-scale-csi-node' - - - name: "Union users if state is present" - set_fact: - csiaccess_users: "{{csiaccess_users | union(csiaccess_users_new) }}" - when: 'state == "present"' + - name: "Union users if state is present" + set_fact: + csiaccess_users: "{{csiaccess_users | union(csiaccess_users_new) }}" + when: 'state == "present"' - - name: "Difference users if state is absent" - set_fact: - csiaccess_users: "{{csiaccess_users | difference(csiaccess_users_new)}}" - when: 'state != "present"' + - name: "Difference users if state is absent" + set_fact: + csiaccess_users: "{{csiaccess_users | difference(csiaccess_users_new)}}" + when: 'state != "present"' - - name: "Update scc_state" - set_fact: - scc_state: "absent" - when: '(csiaccess_users|length) == 0' + - name: "Update scc_state" + set_fact: + scc_state: "absent" + when: "(csiaccess_users|length) == 0" - - name: "Ensure SCC are {{ state }}" - k8s: - state: "{{scc_state}}" - namespace: "{{namespace}}" - definition: "{{ lookup('template', 'scc.yaml.j2') | from_yaml }}" + - name: "Ensure SCC are {{ state }}" + k8s: + state: "{{scc_state}}" + namespace: "{{namespace}}" + definition: "{{ lookup('template', 'scc.yaml.j2') | from_yaml }}" -- name: "Ensure csi-scale objects are {{ state }}" - k8s: - state: "{{ state }}" - namespace: "{{namespace}}" - definition: "{{ lookup('template', item.name) | from_yaml }}" - loop: - - name: "cluster-role-attacher.yaml.j2" - - name: "cluster-role-node.yaml.j2" - - name: "cluster-role-provisioner.yaml.j2" - - name: "sa-attacher.yaml.j2" - - name: "sa-node.yaml.j2" - - name: "sa-provisioner.yaml.j2" - - name: "crb-attacher.yaml.j2" - - name: "crb-node.yaml.j2" - - name: "crb-provisioner.yaml.j2" - - name: "spectrum_scale.yaml.j2" - - name: "csi-plugin-attacher.yaml.j2" - - name: "csi-plugin-provisioner.yaml.j2" - - name: "csi-plugin.yaml.j2" +- name: "Reverse order when not present" + set_fact: + deploy_list: "{{deploy_list|reverse|list}}" + when: 'state != "present"' +- name: "Handle csi-scale objects" + include_tasks: template_applicator.yml + loop: "{{ deploy_list }}" +# - name: "Set isRunning - true" +# when: (state == "present") +# operator_sdk.util.k8s_status: +# kind: CSIScaleOperator +# name: "{{ meta.name }}" +# namespace: "{{ meta.namespace }}" +# status: +# conditions: +# - isRunning: true diff --git a/operator/roles/csi-scale/tasks/password_label.yml b/operator/roles/csi-scale/tasks/password_label.yml index 6d071264f..1199c8898 100644 --- a/operator/roles/csi-scale/tasks/password_label.yml +++ b/operator/roles/csi-scale/tasks/password_label.yml @@ -1,27 +1,23 @@ ---- +--- - name: Remove old version of secret k8s: - state: absent + state: absent definition: apiVersion: "v1" kind: "Secret" - metadata: + metadata: name: "{{item.metadata.name}}" - name: Ensure the secret has been created with the correct label k8s: - state: present + state: present definition: apiVersion: "v1" kind: "Secret" - metadata: + metadata: name: "{{item.metadata.name}}" namespace: "{{meta.namespace}}" labels: - app.kubernetes.io/name: "ibm-spectrum-scale-csi-operator" + app.kubernetes.io/name: "ibm-spectrum-scale-csi-operator" data: "{{item.data}}" type: "{{item.type}}" - - - - diff --git a/operator/roles/csi-scale/tasks/secret_watch.yml b/operator/roles/csi-scale/tasks/secret_watch.yml new file mode 100644 index 000000000..9811b4b0b --- /dev/null +++ b/operator/roles/csi-scale/tasks/secret_watch.yml @@ -0,0 +1,39 @@ +--- +- name: Process Secret + become: no + hosts: all + gather_facts: false + vars: + LABEL: app.kubernetes.io/name + LABEL_VALUE: ibm-spectrum-scale-csi-operator + ANSIBLE_JINJA2_NATIVE: 1 + tasks: + - debug: + msg: + - "meta - {{ __secret.metadata }}" + + - name: Verify this is a labeled secret. + meta: end_play + when: __secret.metadata.labels is not defined or + __secret.metadata.labels["app.kubernetes.io/name"] is not defined or + __secret.metadata.labels["app.kubernetes.io/name"] != "ibm-spectrum-scale-csi-operator" + + - name: Get Scale operators in namespace + k8s_info: + kind: CSIScaleOperator + namespace: "{{ __secret.metadata.namespace }}" + register: results + + - name: Bump the trigger for resources with the secret. + k8s: + state: present + definition: + apiVersion: "{{item.apiVersion}}" + kind: "CSIScaleOperator" + metadata: + name: "{{item.metadata.name}}" + namespace: "{{meta.namespace}}" + spec: + trigger: "{{(item.spec.trigger | default(0) | int ) + 1 | int }}" + when: "__secret.metadata.name in (item | json_query('spec.clusters[*].secrets') )" + loop: "{{results.resources}}" diff --git a/operator/roles/csi-scale/tasks/template_applicator.yml b/operator/roles/csi-scale/tasks/template_applicator.yml new file mode 100644 index 000000000..f1f82ba8b --- /dev/null +++ b/operator/roles/csi-scale/tasks/template_applicator.yml @@ -0,0 +1,6 @@ +--- +- name: "Ensure {{item.name}} is {{state}}" + k8s: + state: "{{state}}" + namespace: "{{namespace}}" + definition: "{{ lookup('template', item.name) | from_yaml }}" diff --git a/operator/roles/csi-scale/templates/cluster-role-attacher.yaml.j2 b/operator/roles/csi-scale/templates/cluster-role-attacher.yaml.j2 index ec8359dcc..eb6cbf9d9 100644 --- a/operator/roles/csi-scale/templates/cluster-role-attacher.yaml.j2 +++ b/operator/roles/csi-scale/templates/cluster-role-attacher.yaml.j2 @@ -28,6 +28,7 @@ rules: - list - watch - update + - patch - apiGroups: - '' resources: @@ -45,3 +46,21 @@ rules: - list - watch - update + - patch +- apiGroups: + - storage.k8s.io + resources: + - csinodes + verbs: + - get + - list + - watch +- apiGroups: + - '' + resources: + - nodes + verbs: + - get + - list + - watch + diff --git a/operator/roles/csi-scale/templates/cluster-role-provisioner.yaml.j2 b/operator/roles/csi-scale/templates/cluster-role-provisioner.yaml.j2 index ef73e8632..7bb05bb53 100644 --- a/operator/roles/csi-scale/templates/cluster-role-provisioner.yaml.j2 +++ b/operator/roles/csi-scale/templates/cluster-role-provisioner.yaml.j2 @@ -44,6 +44,23 @@ rules: - get - list - watch +- apiGroups: + - storage.k8s.io + resources: + - csinodes + verbs: + - get + - list + - watch +- apiGroups: + - '' + resources: + - nodes + verbs: + - get + - list + - watch + - apiGroups: - '' resources: diff --git a/operator/roles/csi-scale/templates/csi-plugin-attacher.yaml.j2 b/operator/roles/csi-scale/templates/csi-plugin-attacher.yaml.j2 index aadd00ed8..ec0ed4c90 100644 --- a/operator/roles/csi-scale/templates/csi-plugin-attacher.yaml.j2 +++ b/operator/roles/csi-scale/templates/csi-plugin-attacher.yaml.j2 @@ -47,8 +47,8 @@ spec: args: - "--v=5" - "--csi-address=$(ADDRESS)" - - "--connection-timeout=2m" # Added - "--resync=10m" # Added + - "--timeout=2m" env: - name: ADDRESS value: /var/lib/kubelet/plugins/ibm-spectrum-scale-csi/csi.sock diff --git a/operator/roles/csi-scale/templates/csi-plugin-provisioner.yaml.j2 b/operator/roles/csi-scale/templates/csi-plugin-provisioner.yaml.j2 index 404c49cfe..e3f2b2f52 100644 --- a/operator/roles/csi-scale/templates/csi-plugin-provisioner.yaml.j2 +++ b/operator/roles/csi-scale/templates/csi-plugin-provisioner.yaml.j2 @@ -45,9 +45,9 @@ spec: {% endif %} image: '{{ provisioner }}' args: - - "--provisioner=spectrumscale.csi.ibm.com" - "--csi-address=$(ADDRESS)" - - "--connection-timeout=2m" + - "--timeout=2m" + - "--worker-threads=10" - "--v=5" # Debugging env: - name: ADDRESS diff --git a/operator/roles/csi-scale/templates/csi-plugin.yaml.j2 b/operator/roles/csi-scale/templates/csi-plugin.yaml.j2 index 783e72425..bdee1f52a 100644 --- a/operator/roles/csi-scale/templates/csi-plugin.yaml.j2 +++ b/operator/roles/csi-scale/templates/csi-plugin.yaml.j2 @@ -69,7 +69,6 @@ spec: - "--nodeid=$(NODE_ID)" - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - - "--drivername=ibm-spectrum-scale-csi" env: - name: NODE_ID valueFrom: diff --git a/operator/roles/csi-scale/tests/test.yml b/operator/roles/csi-scale/tests/test.yml index 7d560a854..f28e0c146 100644 --- a/operator/roles/csi-scale/tests/test.yml +++ b/operator/roles/csi-scale/tests/test.yml @@ -2,4 +2,4 @@ - hosts: localhost remote_user: root roles: - - ansible-role-csi-scale \ No newline at end of file + - ansible-role-csi-scale diff --git a/operator/roles/csi-scale/vars/main.yml b/operator/roles/csi-scale/vars/main.yml index 8c952a9a7..e4d38a932 100644 --- a/operator/roles/csi-scale/vars/main.yml +++ b/operator/roles/csi-scale/vars/main.yml @@ -1,2 +1,2 @@ --- -# vars file for ansible-role-csi-scale \ No newline at end of file +# vars file for ansible-role-csi-scale diff --git a/operator/tools.go b/operator/tools.go deleted file mode 100644 index 4da112f65..000000000 --- a/operator/tools.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build tools - -package tools - -import ( - // Code generators built at runtime. - _ "k8s.io/code-generator/cmd/client-gen" - _ "k8s.io/code-generator/cmd/conversion-gen" - _ "k8s.io/code-generator/cmd/deepcopy-gen" - _ "k8s.io/code-generator/cmd/informer-gen" - _ "k8s.io/code-generator/cmd/lister-gen" - _ "k8s.io/gengo/args" - _ "k8s.io/kube-openapi/cmd/openapi-gen" - _ "sigs.k8s.io/controller-tools/pkg/crd/generator" -) diff --git a/operator/version/version.go b/operator/version/version.go deleted file mode 100644 index b3ec681e4..000000000 --- a/operator/version/version.go +++ /dev/null @@ -1,5 +0,0 @@ -package version - -var ( - Version = "1.0.1" -) diff --git a/operator/watches.yaml b/operator/watches.yaml index 90f25717c..abf049622 100644 --- a/operator/watches.yaml +++ b/operator/watches.yaml @@ -1,3 +1,4 @@ +--- - ManageStatus: true group: csi.ibm.com kind: CSIScaleOperator @@ -7,3 +8,7 @@ name: finalizer.csiscaleoperators.csi.ibm.com vars: state: absent +- version: v1 + kind: Secret + playbook: /opt/ansible/roles/csi-scale/tasks/secret_watch.yml + manageStatus: false diff --git a/tools/ansible/cert-playbook.yaml b/tools/ansible/cert-playbook.yaml index 83cf2b888..9f45949cf 100644 --- a/tools/ansible/cert-playbook.yaml +++ b/tools/ansible/cert-playbook.yaml @@ -4,12 +4,12 @@ gather_facts: true vars: OPERATOR_NAME: ibm-spectrum-scale-csi-operator - OPERATOR_VERSION: 1.0.0 + OPERATOR_VERSION: 1.1.0 OPERATOR_DIR: ../../operator/ OP_PKG: ibm-spectrum-scale-csi-operator-app.zip ADDITIONAL_RESOURCES: ["service_account.yaml", "role_binding.yaml"] - CRD_LIST: ["ibm-spectrum-scale-csi-operator-crd.yaml"] - CR_LIST: ["ibm-spectrum-scale-csi-operator-cr.yaml"] + CRD_LIST: ["csiscaleoperators.csi.ibm.com.crd.yaml"] + CR_LIST: ["csiscaleoperators.csi.ibm.com.cr.yaml"] SC_VARS: "--config .osdk-scorecard.yaml" tasks: diff --git a/tools/ansible/common/dev-env.yaml b/tools/ansible/common/dev-env.yaml index dafbababb..587bde059 100644 --- a/tools/ansible/common/dev-env.yaml +++ b/tools/ansible/common/dev-env.yaml @@ -2,7 +2,7 @@ - name: Set environment facts set_fact: OPERATOR_SDK_VER: "v0.10.0" - OPERATOR_VERSION: "1.0.0" + OPERATOR_VERSION: "1.1.0" GO_VERSION: "go1.13" # Something is wrong with this bit. diff --git a/tools/ansible/common/runtime-env.yaml b/tools/ansible/common/runtime-env.yaml index 1d1f06fd1..531605b30 100644 --- a/tools/ansible/common/runtime-env.yaml +++ b/tools/ansible/common/runtime-env.yaml @@ -2,7 +2,7 @@ - name: Set environment facts set_fact: OPERATOR_SDK_VER: "v0.10.0" - OPERATOR_VERSION: "1.0.0" + OPERATOR_VERSION: "1.1.0" - name: Ensure 'python3' is installed package: diff --git a/tools/ansible/generate-playbook.yaml b/tools/ansible/generate-playbook.yaml index d4c1fec87..e86ba5aa3 100644 --- a/tools/ansible/generate-playbook.yaml +++ b/tools/ansible/generate-playbook.yaml @@ -9,13 +9,15 @@ generated_dir: "{{ repo_root_dir }}/generated/installer" filename: "{{ 'ibm-spectrum-scale-csi-operator.test.yaml' if travis_testing else 'ibm-spectrum-scale-csi-operator.yaml' }}" + filename_dev: 'ibm-spectrum-scale-csi-operator-dev.yaml' generated_op_yaml: "{{ generated_dir }}/{{ filename }}" + generated_op_dev_yaml: "{{ generated_dir }}/{{ filename_dev }}" operator_files: - name: "deploy/operator.yaml" - name: "deploy/role.yaml" - name: "deploy/role_binding.yaml" - name: "deploy/service_account.yaml" - - name: "deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml" + - name: "deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml" # Copy over the non modified file to the installer directory non_generated: false diff --git a/tools/ansible/generate/create_files.yaml b/tools/ansible/generate/create_files.yaml index 0a6456c1b..16e0878c4 100644 --- a/tools/ansible/generate/create_files.yaml +++ b/tools/ansible/generate/create_files.yaml @@ -28,28 +28,24 @@ with_items: - "{{ operator_files }}" -- name: "Use lineinfile to add a unique tag between the markers from block in file" - lineinfile: - dest: "{{ generated_op_yaml }}" - insertafter: '\# END {{ item.name }}' - state: present - line: "REPLACE_WITH_DASHES {{ item.name }}" - with_items: - - "{{ operator_files }}" +- name: "Copy generated file to dev file" + copy: + src: "{{ generated_op_yaml }}" + dest: "{{ generated_op_dev_yaml }}" -- name: "Replace all of the REPLACE_WITH_DASHS to be ---, to correctly separate the blocks" +- name: "Replace ibm-spectrum-scale/ with ibm-spectrum-scale-dev/" replace: - path: "{{ generated_op_yaml }}" - regexp: 'REPLACE_WITH_DASHES.*' - replace: '---' + path: "{{ generated_op_dev_yaml }}" + regexp: "ibm-spectrum-scale/" + replace: "ibm-spectrum-scale-dev/" -- name: copy over the files that are not modified +- name: "Copy over the files that are not modified" copy: src: "{{ operator_dir }}/{{ item }}" dest: "{{ generated_dir }}" with_items: - "deploy/namespace.yaml" - - "deploy/crds/ibm-spectrum-scale-csi-operator-crd.yaml" + - "deploy/crds/csiscaleoperators.csi.ibm.com.crd.yaml" when: non_generated - name: "[Testing] Comparing the generated operator file with checked in code ..." @@ -73,4 +69,4 @@ msg: "The generated ibm-spectrum-scale-csi-operator.yaml did not match the deploy yaml files, did you forget to check it in?" when: - travis_testing|bool - - "diff_output.rc != 0" \ No newline at end of file + - "diff_output.rc != 0" diff --git a/tools/ansible/versioning-playbook.yaml b/tools/ansible/versioning-playbook.yaml index 52f13a0b3..8f555c2cc 100644 --- a/tools/ansible/versioning-playbook.yaml +++ b/tools/ansible/versioning-playbook.yaml @@ -3,8 +3,8 @@ become: yes gather_facts: true vars: - VERSION_OLD: "1.0.0" - VERSION_NEW: "1.0.1" + VERSION_OLD: "1.0.1" + VERSION_NEW: "1.1.0" OPERATOR_DIR: "../../operator/" OLM_DIR: "deploy/olm-catalog/ibm-spectrum-scale-csi-operator/" OPERATOR_NAME: "ibm-spectrum-scale-csi-operator" @@ -39,14 +39,12 @@ - "{{OLM_DIR}}/ibm-spectrum-scale-csi-operator.package.yaml" - deploy/operator.yaml - .osdk-scorecard.yaml - - version/version.go - hacks/package_operator.py - - hacks/change_deploy_image.py - hacks/csv_copy_cr.py - hacks/csv_copy_crd_descriptions.py - hacks/csv_copy_docs.py - hacks/csv_prep.py - - ../../../../docs/source/conf.py + # - ../../docs/source/conf.py - name: "Rebuild operator 'ClusterServiceVersion'" shell: "GO111MODULE=on operator-sdk olm-catalog gen-csv --operator-name {{OPERATOR_NAME}} --csv-version {{VERSION_NEW}} --update-crds" diff --git a/tools/create_release_tar.sh b/tools/create_release_tar.sh index 596c8e37d..310b24dd2 100755 --- a/tools/create_release_tar.sh +++ b/tools/create_release_tar.sh @@ -14,7 +14,7 @@ fi FILES=( './stable/ibm-spectrum-scale-csi-operator-bundle/operators/ibm-spectrum-scale-csi-operator/deploy/namespace.yaml' './generated/installer//ibm-spectrum-scale-csi-operator.yaml' -'./stable/ibm-spectrum-scale-csi-operator-bundle/operators/ibm-spectrum-scale-csi-operator/deploy/crds/ibm-spectrum-scale-csi-operator-cr.yaml' +'./stable/ibm-spectrum-scale-csi-operator-bundle/operators/ibm-spectrum-scale-csi-operator/deploy/crds/csiscaleoperators.csi.ibm.com.cr.yaml' ) TOPLEVEL=`git rev-parse --show-toplevel` diff --git a/tools/generate_pv_yaml.sh b/tools/generate_pv_yaml.sh index 61b938d70..2c73dce2b 100755 --- a/tools/generate_pv_yaml.sh +++ b/tools/generate_pv_yaml.sh @@ -74,7 +74,7 @@ spec: accessModes: - ${accessmode} csi: - driver: ibm-spectrum-scale-csi + driver: spectrumscale.csi.ibm.com volumeHandle: ${volhandle} ${STORAGECLASS} EOL diff --git a/cloudpak/stable/scripts/operator-source.yaml b/tools/olm/operator-source-k8s-dev.yaml similarity index 86% rename from cloudpak/stable/scripts/operator-source.yaml rename to tools/olm/operator-source-k8s-dev.yaml index 224a8d3db..871be2db0 100644 --- a/cloudpak/stable/scripts/operator-source.yaml +++ b/tools/olm/operator-source-k8s-dev.yaml @@ -20,7 +20,7 @@ metadata: spec: type: appregistry endpoint: https://quay.io/cnr - registryNamespace: mew2057 + registryNamespace: ibm-spectrum-scale-dev --- apiVersion: operators.coreos.com/v1alpha2 @@ -40,7 +40,7 @@ metadata: namespace: marketplace spec: channel: stable - name: ibm-spectrum-scale-csi - source: ibm-spectrum-scale-csi + name: ibm-spectrum-scale-csi-dev + source: ibm-spectrum-scale-csi-dev sourceNamespace: marketplace diff --git a/tools/scripts/olm-scripts/operator-source.yaml b/tools/olm/operator-source-k8s-master.yaml similarity index 86% rename from tools/scripts/olm-scripts/operator-source.yaml rename to tools/olm/operator-source-k8s-master.yaml index 224a8d3db..6977412a4 100644 --- a/tools/scripts/olm-scripts/operator-source.yaml +++ b/tools/olm/operator-source-k8s-master.yaml @@ -20,7 +20,7 @@ metadata: spec: type: appregistry endpoint: https://quay.io/cnr - registryNamespace: mew2057 + registryNamespace: ibm-spectrum-scale-dev --- apiVersion: operators.coreos.com/v1alpha2 @@ -40,7 +40,7 @@ metadata: namespace: marketplace spec: channel: stable - name: ibm-spectrum-scale-csi - source: ibm-spectrum-scale-csi + name: ibm-spectrum-scale-csi-master + source: ibm-spectrum-scale-csi-master sourceNamespace: marketplace diff --git a/cloudpak/stable/scripts/operator-source-oc.yaml b/tools/olm/operator-source-openshift.yaml similarity index 84% rename from cloudpak/stable/scripts/operator-source-oc.yaml rename to tools/olm/operator-source-openshift.yaml index 19b793af0..2a3fdf792 100644 --- a/cloudpak/stable/scripts/operator-source-oc.yaml +++ b/tools/olm/operator-source-openshift.yaml @@ -6,6 +6,6 @@ metadata: spec: type: appregistry endpoint: https://quay.io/cnr - registryNamespace: mew2057 + registryNamespace: ibm-spectrum-scale-dev displayName: "CSI Scale Operator" publisher: "IBM" diff --git a/tools/scripts/olm-scripts/operator-push.sh b/tools/scripts/olm-scripts/operator-push.sh deleted file mode 100755 index 06c30a093..000000000 --- a/tools/scripts/olm-scripts/operator-push.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -x -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -cd ${DIR}/.. - -export OPERATOR_DIR=olm-catalog/ibm-spectrum-scale-csi-operator -export QUAY_NAMESPACE=mew2057 -export PACKAGE_NAME=ibm-spectrum-scale-csi-operator-app -export PACKAGE_VERSION=0.1.21 -export TOKEN=$(curl -sH "Content-Type: application/json" -XPOST https://quay.io/cnr/api/v1/users/login -d ' -{"user": {"username": "'"${QUAY_USERNAME}"'","password": "'"${QUAY_PASSWORD}"'"}}' | cut -d'"' -f4) - -#operator-courier verify --ui_validate_io "$OPERATOR_DIR" - -if [ $? -eq 0 ] -then - operator-courier push "$OPERATOR_DIR" "$QUAY_NAMESPACE" "$PACKAGE_NAME" "$PACKAGE_VERSION" "$TOKEN" -fi - - - diff --git a/tools/scripts/olm-scripts/operator-source-oc.yaml b/tools/scripts/olm-scripts/operator-source-oc.yaml deleted file mode 100644 index 19b793af0..000000000 --- a/tools/scripts/olm-scripts/operator-source-oc.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: operators.coreos.com/v1 -kind: OperatorSource -metadata: - name: ibm-spectrum-scale - namespace: openshift-marketplace -spec: - type: appregistry - endpoint: https://quay.io/cnr - registryNamespace: mew2057 - displayName: "CSI Scale Operator" - publisher: "IBM" diff --git a/tools/scripts/push_app.sh b/tools/scripts/push_app.sh new file mode 100755 index 000000000..d6de8f236 --- /dev/null +++ b/tools/scripts/push_app.sh @@ -0,0 +1,43 @@ +#!/bin/bash +#================================================================================================== +# Get jq, operator-courier, and helm +which jq > /dev/null +if [ $? -ne 0 ] +then + wget /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 + chmod +x jq-linux64 + mv jq-linux64 /usr/bin/jq +fi + +helm registry -h >/dev/null +if [ $? -ne 0 ] +then + curl -L https://git.io/get_helm.sh | bash + mkdi r-p ~/.helm/plugins/ + cd ~/.helm/plugins/ && git clone https://github.com/app-registry/appr-helm-plugin.git registry +fi + +operator-courier -h >>/dev/null +if [ $? -ne 0 ] +then + pip3 install operator-courier +fi +#================================================================================================== +# This script takes OPERATOR_DIR, QUAY_NAMESPACE, and PACKAGE_NAME as input to the script. + +# Set values +export OPERATOR_DIR=${OPERATOR_DIR:-operator/deploy/olm-catalog/ibm-spectrum-scale-csi-operator} +export QUAY_NAMESPACE=${QUAY_NAMESPACE:-ibm-spectrum-scale-dev} +export PACKAGE_NAME=${PACKAGE_NAME:-ibm-spectrum-scale-csi-app} +export PACKAGE_VERSION=$(helm registry list quay.io -o ${QUAY_NAMESPACE} --output json | jq --arg NAME "${QUAY_NAMESPACE}/${PACKAGE_NAME}" '.[] | select(.name == $NAME) |.default' | awk -F'[ .\"]' '{print $2"."$3"."$4+1""}') +export TOKEN=$(curl -sH "Content-Type: application/json" -XPOST https://quay.io/cnr/api/v1/users/login -d ' +{"user": {"username": "'"${QUAY_USERNAME}"'","password": "'"${QUAY_PASSWORD}"'"}}' | cut -d'"' -f4) +export PACKAGE_FILE=${OPERATOR_DIR}/ibm-spectrum-scale-csi-operator.package.yaml + +# Rename the package +sed -i "s/packageName: ibm-spectrum-scale-csi-operator/packageName: ${PACKAGE_NAME}/g" ${PACKAGE_FILE} + +operator-courier push "$OPERATOR_DIR" "$QUAY_NAMESPACE" "$PACKAGE_NAME" "$PACKAGE_VERSION" "$TOKEN" + +# Reset the package. +sed -i "s/packageName: ${PACKAGE_NAME}/packageName: ibm-spectrum-scale-csi-operator/g" ${PACKAGE_FILE} diff --git a/tools/spectrum-scale-driver-snap.sh b/tools/spectrum-scale-driver-snap.sh index 4e1ad6716..6763a2081 100755 --- a/tools/spectrum-scale-driver-snap.sh +++ b/tools/spectrum-scale-driver-snap.sh @@ -16,7 +16,7 @@ # #USAGE spectrum-scale-driver-snap.sh [-n namespace] [-o output-dir] [-h] -ns="default" +ns="ibm-spectrum-scale-csi-driver" node="" outdir="." cmd="kubectl" @@ -72,8 +72,11 @@ fi out=$($cmd -n $ns describe StatefulSet ibm-spectrum-scale-csi-attacher 2>&1 | grep 'Namespace' | awk 'BEGIN { FS="[[:space:]]+" } ; { print $2 }') if [[ $out != $ns ]] then - echo "ibm-spectrum-scale-csi is not running in namespace $ns. Please provide a valid namespace" - exit 1 + operator=`$cmd get deployment -l product=ibm-spectrum-scale-csi --namespace $ns |grep -v NAME |awk '{print $1}'` + if [[ "$operator" != "ibm-spectrum-scale-csi-operator" ]]; then + echo "ibm-spectrum-scale-csi driver and operator is not running in namespace $ns. Please provide a valid namespace" + exit 1 + fi fi time=`date +"%m-%d-%Y-%T"`