Argo CD Operator Release Process¶
Prerequisites¶
Before beginning, make sure you have push access to the following repositories in quay.io:
- https://quay.io/repository/argoprojlabs/argocd-operator-util
- http://quay.io/argoprojlabs/argocd-operator
- http://quay.io/argoprojlabs/argocd-operator-registry
Lastly, make sure you are listed as a maintainer for argocd-operator in order to tag and publish releases.
argocd-operator changes¶
VERSIONin Makefile defines the project version for the bundle. You will need to update this value when you want to upgrade the version of your project.
VERSION ?= 0.2.0
-
Ensure that the
replacesfield inconfig/manifests/bases/argocd-operator.clusterserviceversion.yamlis set to the version you are planning to release. -
Ensure that the
currentCSVfield indeploy/olm-catalog/argocd-operator/argocd-operator.package.yamlis set to the version you are planning to release. -
Build the
argocd-operator-utilimage.
make util-build
- Push the
argocd-operator-utilimage to quay.io
make util-push
-
Copy the SHA digest of utility container image from the above command. Set this value to
ArgoCDDefaultExportJobVersionincommon/defaults.go. -
Build the operator container image. (Below command assumes the release version as
v0.2.0; please change the command accordingly.)
make docker-build IMG=quay.io/argoprojlabs/argocd-operator:v0.2.0-rc1
- Push the operator container image. (Below command assumes the release version as
v0.2.0; please change the command accordingly.)
make docker-push IMG=quay.io/argoprojlabs/argocd-operator:v0.2.0-rc1
- Create the bundle artifacts using the SHA of the operator container image.
make bundle IMG=quay.io/argoprojlabs/argocd-operator@sha256:d894c0f7510c8f41b48900b52eac94f623885fd409ebf2660793cd921b137bde
- The step above will create some changes to the control-plane code that must be reverted:
- In
bundle/manifests/argocd-operator.clusterserviceversion.yamland indeploy/olm-catalog/argocd-operator/[your-version]/argocd-operator.[your-version].clusterserviceversion.yaml, under thespec.install.spec.deploymentsadd the control-plane label and change the deploymentspec.selector.matchLabels.control-planefromargocd-operatortocontroller-manager, like so:
- In
deployments:
- label:
control-plane: controller-manager
name: argocd-operator-controller-manager
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
strategy: {}
template:
metadata:
labels:
control-plane: controller-manager
- In
bundle/manifests/argocd-operator-controller-manager-metrics-service_v1_service.yamlanddeploy/olm-catalog/argocd-operator/[your-version]/argocd-operator-controller-manager-metrics-service_v1_service.yaml, update the control-plane labels fromargocd-operatortocontroller-manager, like so:
metadata:
creationTimestamp: null
labels:
control-plane: controller-manager
name: argocd-operator-controller-manager-metrics-service
spec:
ports:
- name: https
port: 8443
targetPort: 8080
selector:
control-plane: controller-manager
- In
bundle/manifests/argocd-operator-webhook-service_v1_service.yamlanddeploy/olm-catalog/argocd-operator/[your-version]/argocd-operator-webhook-service_v1_service.yaml, update the control-plane label fromargocd-operatortocontroller-manager, like so:
selector:
control-plane: controller-manager
- Create the registry image. (Below command assumes the release version as
v0.2.0; please change the command accordingly.)
make registry-build REGISTRY_IMG=quay.io/argoprojlabs/argocd-operator-registry:v0.2.0-rc1
- Push the registry image. (Below command assumes the release version as
v0.2.0; please change the command accordingly.)
make registry-push REGISTRY_IMG=quay.io/argoprojlabs/argocd-operator-registry:v0.2.0-rc1
-
Update
deploy/catalog_source.yamlwith the SHA of the operator registry image. -
Once all testing has been done, from the quay.io user interface, add the actual release tags (e.g. 'v0.2.0') to the
argocd-operatorandargocd-operator-registryimages. -
Commit and push the changes, then create a PR and get it merged.
-
Go to the argocd-operator GitHub repo and create (aka draft) a new release. Make sure to include release notes detailing what's changed and contributors. GitHub can help you generate new release notes (make sure to only include changes since the previous release, there is a dropdown option on the GitHub UI when drafting release notes to specify the previous tag).
Steps to create a PR for Kubernetes OperatorHub Community Operators¶
-
Fork and clone kubernetes community operators.
-
Go to the
community-operators/operators/argocd-operatorfolder. -
Copy the relevant release folder from the actual argocd-operator's
deploy/olm-catalog/argocd-operatorfolder into this folder. -
Edit the
argocd-operator.package.yamlfile and update the value of thecurrentCSVfield. -
Edit the CSV file in the new release folder, and add a
containerImagetag to the metadata section. Copy the value from theimagetag already found in the file. -
Commit and push the changes, then create a PR. The PR merge process should be automatic if all the checks pass; once the PR is merged then continue on to the next step.
Steps to create a PR for Red Hat Operators¶
-
Fork and clone redhat community operators.
-
Go to the
community-operators-prod/operators/argocd-operatorfolder. -
Copy the relevant release folder from the actual argocd-operator's
deploy/olm-catalog/argocd-operatorfolder into this folder. -
Edit the
argocd-operator.package.yamlfile and update the value of thecurrentCSVfield. -
Edit the CSV file in the new release folder, and add a
containerImagetag to the metadata section. Copy the value from theimagetag already found in the file. -
Commit and push the changes, then create a PR. The PR process should be automatic for this repository as well.
Setting up the next version¶
-
In the
argocd-operatorrepo, synchronize any changes in the release folder underdeploy/olm-catalog/argocd-operatoron the release branch back to the master branch (ensure the folder is an exact copy of what's on the release branch). -
Update the
VERSIONin the Makefile in theargocd-operatorrepo's master branch to the next version (e.g. from `0.2.0 to 0.3.0). -
In
config/manifests/bases/argocd-operator.clusterserviceversion.yaml, update thereplaces:field to be the current version (the one you just released), and theversion:field to be the next version. -
Run
make bundleto generate the intial bundle manifests for the next version. (You may need to also rungo mod vendorandgo mod tidy) -
Commit and push the changes, then create a PR to argocd-operator's master branch.