OctopusDeploy / helm-charts

Helm chart for deploying Octopus Deploy into a Kubernetes cluster
Apache License 2.0
8 stars 4 forks source link

Adhere to K8s & Helm `label` best practices #8

Open emerconn opened 12 months ago

emerconn commented 12 months ago

Both Kubernetes & Helm have released official label best practices.

These labels are consumed by K8s tooling, such as Lens.

The label translations I've identified are:

emerconn commented 12 months ago

In K8s, with kind StatefulSet the spec.selector.matchLabels is immutable post-creation. Upgrading a pre-existing Helm releases will fail on this error:

Error: UPGRADE FAILED: cannot patch "<release-name>" with kind StatefulSet: StatefulSet.apps "<release-name>" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden

I have not identified a simple workaround for this.

liam-mackie commented 2 months ago

Thank you for your suggestion, and sorry for the long time until a reply was given - I've taken this feedback on-board for the official v1 of this helm chart. Due to us already making some breaking changes (specifically, adding app.kubernetes.io/component to the chart), users are already going to have to recreate their statefulsets. Thanks for your input!