The testing commands rely on having access to the following registries:
quay.io/opencloudio
hyc-cloud-private-scratch-docker-local.artifactory.swg-devops.com/ibmcom
If you do not have access or would prefer to use different registries then you can overwrite them with:
export QUAY_REGISTRY=<your_registry>
export REGISTRY=<your_registry>
The QUAY_REGISTRY value must point to a public registry because operator-sdk run bundle
does not work with private registries currently (as of v1.5.0).
If pushing an image to your quay.io registry with its first tag, the image repository may be set to private by default, so you will need to login to quay.io and change the repository settings to public.
Also create a CatalogSource
cat <<EOF | tee >(oc apply -f -) | cat
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: opencloud-operators
namespace: openshift-marketplace
spec:
displayName: opencloud-operators
publisher: IBM
sourceType: grpc
image: quay.io/opencloudio/ibm-common-service-catalog:3.7.1
updateStrategy:
registryPoll:
interval: 45m
EOF
The actual testing consist of:
- verify common-service operator pod is Running
- verify namespace scope operator and ODLM operator are installed
- verify secretshare and common-service-webhook pods are running
- verify functionality of common-service operator such as:
- size profile
- add features/fixes to repo
- change
image
value in config/manager/manager.yaml toquay.io/<your_namespace>/common-service-operator:dev
- and any of the operand image values if necessary
- build operator with changes
make build-dev-image
- build bundle containing changes and bundle image
make bundle-manifests RELEASE_VERSION=99.99.99
make build-bundle-image RELEASE_VERSION=dev
- deploy operator using bundle format
make run-bundle RELEASE_VERSION=dev
- run tests
- clean up
make cleanup-bundle
Similar to fresh installation test except you will first deploy the operator/bundle of the most recent release without any changes, i.e. the operator/bundle code from the most recent commit in master branch
- deploy unchanged operator with official bundle image
make run-bundle BUNDLE_IMAGE_NAME=ibm-common-service-operator-bundle
If using your own registries, you can pull the official bundle image, and then push it to your registry
docker pull quay.io/opencloudio/ibm-common-service-operator-bundle:<RELEASE_VERSION>
docker tag quay.io/opencloudio/ibm-common-service-operator-bundle:<RELEASE_VERSION> <your_registry>/dev-common-service-operator-bundle:<RELEASE_VERSION>
docker push <your_registry>/dev-common-service-operator-bundle:<RELEASE_VERSION>
make run-bundle
- add features/fixes to repo
- change
image
value in config/manager/manager.yaml toquay.io/<your_namespace>/common-service-operator:dev
- and any of the operand image values if necessary
- build operator with changes
make build-dev-image
- build bundle containing changes and bundle image
make bundle-manifests RELEASE_VERSION=99.99.99
make build-bundle-image RELEASE_VERSION=dev
- upgrade operator
make upgrade-bundle
- run tests
- clean up
make cleanup-bundle