Skip to content

Commit

Permalink
feat: allow setting service annotations via helm chart (#6894)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Deal <[email protected]>
  • Loading branch information
jamesduffy and jmdeal authored Oct 22, 2024
1 parent e1f2357 commit fd2b607
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion charts/karpenter/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "karpenter.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
{{- if or .Values.additionalAnnotations .Values.service.annotations }}
annotations:
{{- with .Values.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: ClusterIP
ports:
Expand Down
3 changes: 3 additions & 0 deletions charts/karpenter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ additionalAnnotations: {}
imagePullPolicy: IfNotPresent
# -- Image pull secrets for Docker images.
imagePullSecrets: []
service:
# -- Additional annotations for the Service.
annotations: {}
serviceAccount:
# -- Specifies if a ServiceAccount should be created.
create: true
Expand Down

0 comments on commit fd2b607

Please sign in to comment.