TykTechnologies/tyk-operator

TT-5469 Helm chart.yaml tracks latest docker tag

asoorm opened this issue · 0 comments

Expected Behavior

At any time, when running Helm Install from scratch, the CRDs and the version of Tyk Operator deployed to the Kubernetes cluster should be in-sync.

It should also be predictable when running helm install, which version of Tyk Operator will be installed.

Current Behavior

Following install instructions , helm install tyk-operator tyk-helm/tyk-operator -n tyk-operator-system will deploy the latest semantic tag of the CRDs, but install dockerhub latest of Tyk Operator because helm/chart.yaml references latest.

image:
  repository: tykio/tyk-operator
  pullPolicy: IfNotPresent
  tag: "latest"

This is unintended behaviour because there will likely be a mismatch between docker tyk-operator:latest (undefined behavior), and a versioned CRD. Often, dockerhub:tyk-operator:latest will be ahead of the CRDs that are deployed to the cluster and cause an installation failure. Even if a customer pinned to a chart version when installing the helm chart to ensure that the correct CRD version is installed, by default, values would still pull latest dockerhub version. Pinned CRD and docker version will naturally drift further apart over time.

Possible Solution 1 (like cert-manager)

Update the documentation to instructing the user to firstly install a specific version of the CRDs.

Secondly, when installing the Operator, document how to set an override to the default values.yaml e.g. --set .image.tag=v9.9.9

Because documentation is not currently dynamic - which version should the user deploy if copy pasting? It might be useful to dynamically inject a stable version number at the point of cutting a release.

Possible Solution 2 (like ISTIO)

As part of the GitHub Action workflow, when cutting a release, prior to helm package helm --version ${{ steps.chart-values.outputs.version }}, use SED or similar to replace latest inside values.yaml with the version ${{ steps.chart-values.outputs.version }}