Skip to content

Commit

Permalink
fix: add missing pod annotations and labels to deployment spec (ratif…
Browse files Browse the repository at this point in the history
…y-project#1949)

Signed-off-by: akashsinghal <[email protected]>
  • Loading branch information
akashsinghal authored Nov 26, 2024
1 parent 67cd411 commit aae1aa6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion charts/ratify/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ Expand the name of the chart.

{{- define "ratify.podLabels" -}}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- toYaml .Values.podLabels }}
{{- end }}
{{- end }}

{{- define "ratify.podAnnotations" -}}
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations }}
{{- end }}
{{- end }}

Expand Down
2 changes: 2 additions & 0 deletions charts/ratify/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ spec:
template:
metadata:
labels:
{{- include "ratify.podLabels" . | nindent 8 }}
{{- include "ratify.selectorLabels" . | nindent 8 }}
{{- if ne .Values.azureWorkloadIdentity.clientId "" }}
azure.workload.identity/use: "true"
{{- end }}
annotations:
{{- include "ratify.podAnnotations" . | nindent 8 }}
{{- if eq .Values.instrumentation.metricsType "prometheus" }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ .Values.instrumentation.metricsPort | quote }}
Expand Down
2 changes: 1 addition & 1 deletion charts/ratify/templates/upgrade-crds-hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
annotations:
{{- toYaml .Values.podAnnotations | trim | nindent 8 }}
labels:
{{- include "ratify.podLabels" . }}
{{- include "ratify.podLabels" . | nindent 8 }}
app: '{{ template "ratify.name" . }}'
chart: '{{ template "ratify.name" . }}'
ratify.sh/system: "yes"
Expand Down

0 comments on commit aae1aa6

Please sign in to comment.