Be able to define extra labels for pods and services for ui and controller

This commit is contained in:
Samuel Wyma 2019-09-02 20:17:41 +01:00
parent 77e638f55d
commit 365c1da217
5 changed files with 20 additions and 0 deletions

View file

@ -13,6 +13,9 @@ spec:
labels: labels:
app: {{ .Release.Name }}-{{ .Values.ui.name}} app: {{ .Release.Name }}-{{ .Values.ui.name}}
release: {{ .Release.Name }} release: {{ .Release.Name }}
{{- if .Values.ui.podLabels }}
{{- toYaml .Values.ui.podLabels | nindent 8 }}
{{- end }}
{{- if .Values.ui.podAnnotations }} {{- if .Values.ui.podAnnotations }}
annotations: annotations:
{{ toYaml .Values.ui.podAnnotations | indent 8}}{{- end }} {{ toYaml .Values.ui.podAnnotations | indent 8}}{{- end }}

View file

@ -7,6 +7,9 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
{{- if .Values.ui.serviceLabels }}
{{- toYaml .Values.ui.serviceLabels | nindent 4 }}
{{- end }}
{{- if .Values.ui.serviceAnnotations }} {{- if .Values.ui.serviceAnnotations }}
annotations: annotations:
{{ toYaml .Values.ui.serviceAnnotations | indent 4}}{{- end }} {{ toYaml .Values.ui.serviceAnnotations | indent 4}}{{- end }}

View file

@ -13,6 +13,9 @@ spec:
labels: labels:
app: {{ .Release.Name }}-{{ .Values.controller.name}} app: {{ .Release.Name }}-{{ .Values.controller.name}}
release: {{ .Release.Name }} release: {{ .Release.Name }}
{{- if .Values.controller.podLabels }}
{{ toYaml .Values.controller.podLabels | nindent 8}}
{{- end }}
{{- if .Values.controller.podAnnotations }} {{- if .Values.controller.podAnnotations }}
annotations: annotations:
{{ toYaml .Values.controller.podAnnotations | indent 8}}{{- end }} {{ toYaml .Values.controller.podAnnotations | indent 8}}{{- end }}

View file

@ -8,6 +8,9 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
{{- if .Values.controller.serviceLabels }}
{{ toYaml .Values.controller.serviceLabels | nindent 4}}
{{- end }}
{{- if .Values.controller.serviceAnnotations }} {{- if .Values.controller.serviceAnnotations }}
annotations: annotations:
{{ toYaml .Values.controller.serviceAnnotations | indent 4}}{{- end }} {{ toYaml .Values.controller.serviceAnnotations | indent 4}}{{- end }}

View file

@ -21,6 +21,8 @@ controller:
tag: "" tag: ""
# podAnnotations is an optional map of annotations to be applied to the controller Pods # podAnnotations is an optional map of annotations to be applied to the controller Pods
podAnnotations: {} podAnnotations: {}
# Optional labels to add to the controller pods
podLabels: {}
metricsConfig: metricsConfig:
enabled: false enabled: false
path: /metrics path: /metrics
@ -53,6 +55,8 @@ controller:
telemetryServicePort: 8081 telemetryServicePort: 8081
# Annotations to be applied to the controller Service # Annotations to be applied to the controller Service
serviceAnnotations: {} serviceAnnotations: {}
# Optional labels to add to the controller Service
serviceLabels: {}
# Source ranges to allow access to service from. Only applies to # Source ranges to allow access to service from. Only applies to
# service type `LoadBalancer` # service type `LoadBalancer`
loadBalancerSourceRanges: [] loadBalancerSourceRanges: []
@ -72,12 +76,16 @@ ui:
tag: "" tag: ""
# optional map of annotations to be applied to the ui Pods # optional map of annotations to be applied to the ui Pods
podAnnotations: {} podAnnotations: {}
# Optional labels to add to the UI pods
podLabels: {}
name: ui name: ui
serviceType: ClusterIP serviceType: ClusterIP
servicePort: 80 servicePort: 80
serviceAccount: argo-ui serviceAccount: argo-ui
# Annotations to be applied to the UI Service # Annotations to be applied to the UI Service
serviceAnnotations: {} serviceAnnotations: {}
# Optional labels to add to the UI Service
serviceLabels: {}
# Static IP address to assign to loadBalancer # Static IP address to assign to loadBalancer
# service type `LoadBalancer` # service type `LoadBalancer`
loadBalancerIP: "" loadBalancerIP: ""