Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adhere to K8s & Helm label best practices #8

Open
emerconn opened this issue Oct 5, 2023 · 2 comments
Open

Adhere to K8s & Helm label best practices #8

emerconn opened this issue Oct 5, 2023 · 2 comments

Comments

@emerconn
Copy link

emerconn commented Oct 5, 2023

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:

  • app: > app.kubernetes.io/name:
  • chart: > helm.sh/chart:
  • release: > app.kubernetes.io/instance:
  • heritage: > app.kubernetes.io/managed-by:
@emerconn
Copy link
Author

emerconn commented Oct 5, 2023

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.

@emerconn emerconn changed the title Update labels to follow the Kubernetes & Helm best practice Update labels to follow Oct 5, 2023
@emerconn emerconn changed the title Update labels to follow Adhere to K8s & Helm label best practices Oct 5, 2023
@liam-mackie
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants