Skip to content

Commit

Permalink
helm: Add additional labels (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Nov 3, 2019
1 parent c735dd1 commit 041ef1a
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 62 deletions.
26 changes: 21 additions & 5 deletions helm/charts/hive-selfservice-ui-node/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "hive-selfservice-ui-node.fullname" . }}
{{- if .Release.Namespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{ include "hive-selfservice-ui-node.labels" . | indent 4 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- with .Values.deployment.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -13,8 +23,14 @@ spec:
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "hive-selfservice-ui-node.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{ include "hive-selfservice-ui-node.labels" . | indent 8 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- with .Values.deployment.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -53,16 +69,16 @@ spec:
path: /health
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
{{- toYaml .Values.deployment.resources | nindent 12 }}
{{- with .Values.deployment.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.deployment.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
47 changes: 32 additions & 15 deletions helm/charts/hive-selfservice-ui-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,38 @@ ingress:
# hosts:
# - chart-example.local

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []

deployment:
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

# Node labels for pod assignment.
nodeSelector: {}
# If you do want to specify node labels, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'annotations:'.
# foo: bar

# Configure node tolerations.
tolerations: []

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"

affinity: {}

Expand Down
29 changes: 15 additions & 14 deletions helm/charts/hive/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "hive.fullname" . }}
{{- if .Release.Namespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{ include "hive.labels" . | indent 4 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deployment.annotations }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deployment.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -21,15 +23,14 @@ spec:
template:
metadata:
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 }}
{{ include "hive.labels" . | indent 8 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
29 changes: 15 additions & 14 deletions helm/charts/hydra/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "hydra.fullname" . }}
{{- if .Release.Namespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{ include "hydra.labels" . | indent 4 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deployment.annotations }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deployment.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -21,15 +23,14 @@ spec:
template:
metadata:
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 }}
{{ include "hydra.labels" . | indent 8 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
27 changes: 13 additions & 14 deletions helm/charts/oathkeeper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ metadata:
{{- end }}
labels:
{{ include "oathkeeper.labels" . | indent 4 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deployment.annotations }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deployment.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -24,15 +24,14 @@ spec:
template:
metadata:
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 }}
{{ include "oathkeeper.labels" . | indent 8 }}
{{- with .Values.deployment.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down

0 comments on commit 041ef1a

Please sign in to comment.