Skip to content

Commit

Permalink
Merge pull request #61 from tnadalie/feat/handle-custom-annotations
Browse files Browse the repository at this point in the history
Helm: handle custom controller annotations
  • Loading branch information
mplachter authored Mar 15, 2023
2 parents dac12d6 + 355dfe9 commit cec2ed9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/prom-aggregation-gateway/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: prom-aggregation-gateway
version: 0.5.1
version: 0.5.2
home: https://github.com/zapier/prom-aggregation-gateway
maintainers:
- name: djeebus
Expand Down
4 changes: 4 additions & 0 deletions charts/prom-aggregation-gateway/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{- define "prom-aggregation-gateway.annotations" -}}
{{ toYaml .Values.controller.annotations }}
{{- end }}

{{- define "prom-aggregation-gateway.selectorLabels" -}}
app.kubernetes.io/name: {{ include "prom-aggregation-gateway.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
Expand Down
5 changes: 4 additions & 1 deletion charts/prom-aggregation-gateway/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ metadata:
{{- if .Values.controller.labels }}
{{- toYaml .Values.controller.labels | nindent 4 }}
{{- end }}

{{- if .Values.controller.annotations }}
annotations:
{{- include "prom-aggregation-gateway.annotations" . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down
6 changes: 6 additions & 0 deletions charts/prom-aggregation-gateway/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
},
"apiPort": {
"type": "integer"
},
"annotations": {
"type": "object",
"patternProperties": {
".*": {"type": "string"}
}
}
},
"required": [
Expand Down

0 comments on commit cec2ed9

Please sign in to comment.