Skip to content

Commit

Permalink
helm: Add ability to set deployment labels and annotations (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Nov 2, 2019
1 parent 8cfb0bf commit c735dd1
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 3 deletions.
14 changes: 14 additions & 0 deletions helm/charts/hive/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "hive.labels" . | indent 4 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deployment.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -16,6 +23,13 @@ spec:
labels:
app.kubernetes.io/name: {{ include "hive.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
10 changes: 9 additions & 1 deletion helm/charts/hive/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,16 @@ deployment:
# Configure node tolerations.
tolerations: []

# Annotations
labels: {}
# If you do want to specify additional labels, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'labels:'.
# e.g. type: app

annotations: {}
# If you do want to specify annotations, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'annotations:'.
# e.g. sidecar.istio.io/rewriteAppHTTPProbers: "true"


# Configure node affinity
affinity: {}
Expand Down
10 changes: 10 additions & 0 deletions helm/charts/hydra/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{ include "hydra.labels" . | indent 4 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deployment.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -16,6 +23,9 @@ spec:
labels:
app.kubernetes.io/name: {{ include "hydra.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
Expand Down
5 changes: 5 additions & 0 deletions helm/charts/hydra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ deployment:
# cpu: 100m
# memory: 128Mi

labels: {}
# If you do want to specify additional labels, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'labels:'.
# e.g. type: app

annotations: {}
# If you do want to specify annotations, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'annotations:'.
Expand Down
12 changes: 11 additions & 1 deletion helm/charts/oathkeeper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ metadata:
{{- end }}
labels:
{{ include "oathkeeper.labels" . | indent 4 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deployment.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -19,10 +26,13 @@ spec:
labels:
app.kubernetes.io/name: {{ include "oathkeeper.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
11 changes: 10 additions & 1 deletion helm/charts/oathkeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,17 @@ deployment:
# Configure node tolerations.
tolerations: []

# Annotations
labels: {}
# If you do want to specify additional labels, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'labels:'.
# e.g. type: app

annotations: {}
# If you do want to specify annotations, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'annotations:'.
# e.g. sidecar.istio.io/rewriteAppHTTPProbers: "true"


# Configure node affinity
affinity: {}

Expand Down

0 comments on commit c735dd1

Please sign in to comment.