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
emerconnelly opened this issue Oct 5, 2023 · 1 comment
Open

Adhere to K8s & Helm label best practices #8

emerconnelly opened this issue Oct 5, 2023 · 1 comment

Comments

@emerconnelly
Copy link

emerconnelly 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:
@emerconnelly
Copy link
Author

emerconnelly 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.

@emerconnelly emerconnelly changed the title Update labels to follow the Kubernetes & Helm best practice Update labels to follow Oct 5, 2023
@emerconnelly emerconnelly changed the title Update labels to follow Adhere to K8s & Helm label best practices Oct 5, 2023
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

1 participant