-
Notifications
You must be signed in to change notification settings - Fork 135
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
Allow specifying custom labels and annotations from values.yaml #119
Comments
Hi, can you please share more details on your use case? If I got you right, Helm already does similar stuff for labels. There is a named template in {{/*
Common labels
*/}}
{{- define "app.labels" -}}
helm.sh/chart: {{ include "app.chart" . }}
{{ include "app.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }} And then these labels are added to all chart manifests: apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "app.fullname" . }}-myapp
labels:
app: myapp
{{- include "app.labels" . | nindent 4 }} Which results to: apiVersion: apps/v1
kind: Deployment
metadata:
name: test-app-myapp
labels:
app: myapp
helm.sh/chart: app-0.1.0
app.kubernetes.io/name: app
app.kubernetes.io/instance: test
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm You can modify PS |
I think the original requirement was to introduce into
which are extra added after those annotations/labels provided by built-in named templates. I.e., same thing as what allows an empty helm chart create via
Updating |
@vholer we use I like the idea of this being top-level values |
Got something draft in #139 , will hopefully add annotations soon. |
any progress on this? |
We have a need to add specific annotations to helm chart releases per environment. Adding a way to set those at helm install time would be very helpful.
If this is a useful feature i would be willing to contribute it myself if desired
The text was updated successfully, but these errors were encountered: