-
Notifications
You must be signed in to change notification settings - Fork 328
fix(helm): deploymentAnnotations value #8164
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ### Enable annotations on deployments via Helm Chart ([PR #8164](https://github.com/apollographql/router/pull/8164)) | ||
|
|
||
| The Helm chart previously did not allow customization of annotations on the deployment itself (as opposed to the pods within it, which is done with `podAnnotations`); this can now be done with the `deploymentAnnotations` value. | ||
|
|
||
| By [@glasser](https://github.com/glasser) in https://github.com/apollographql/router/pull/8164 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,6 +121,7 @@ serviceAccount: | |
| name: "" | ||
|
|
||
| podAnnotations: {} | ||
| deploymentAnnotations: {} | ||
|
|
||
| podSecurityContext: | ||
| {} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,19 +7,21 @@ metadata: | |
| {{- if .Values.extraLabels }} | ||
| {{- include "apollographql.templatizeExtraLabels" . | trim | nindent 4 }} | ||
| {{- end }} | ||
| annotations: | ||
| {{/* There may not be much configuration so check that there is something */}} | ||
| {{/* NOTE: metrics configuration moved under telemetry.exporters in Router 1.35.0 */}} | ||
| {{- if ((((((.Values.router).configuration).telemetry).exporters).metrics).prometheus).enabled }} | ||
| annotations: | ||
| prometheus.io/path: {{ .Values.router.configuration.telemetry.exporters.metrics.prometheus.path | default "/metrics" }} | ||
| prometheus.io/port: {{ (splitList ":" .Values.router.configuration.telemetry.exporters.metrics.prometheus.listen | last) | default "9090" | quote }} | ||
| prometheus.io/scrape: "true" | ||
| {{- else if (((((.Values.router).configuration).telemetry).metrics).prometheus).enabled }} | ||
| annotations: | ||
| prometheus.io/path: {{ .Values.router.configuration.telemetry.metrics.prometheus.path | default "/metrics" }} | ||
| prometheus.io/port: {{ (splitList ":" .Values.router.configuration.telemetry.metrics.prometheus.listen | last) | default "9090" | quote }} | ||
| prometheus.io/scrape: "true" | ||
| {{- end }} | ||
|
Comment on lines
10
to
21
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what were the annotations doing before? it looks like duplicate blocks of the same annotations? now, it looks like we have the duplicate entries under the same
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are specific annotations defined by this field. This PR lets you also add your own annotations too. We already let users add annotations to all sorts of other places, just not deployments. Providing hooks for arbitrary annotations is pretty standard for charts since Helm doesn't let you make these changes as a chart consumer without an explicit hook. |
||
| {{- if .Values.deploymentAnnotations }} | ||
| {{- toYaml .Values.deploymentAnnotations | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| {{- if not .Values.autoscaling.enabled }} | ||
| replicas: {{ .Values.replicaCount }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,6 +120,7 @@ serviceAccount: | |
| name: "" | ||
|
|
||
| podAnnotations: {} | ||
| deploymentAnnotations: {} | ||
|
|
||
| podSecurityContext: | ||
| {} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is ok in k8s for an object to just be
foo:with no values underneath.