charts/mcs-controller-manager/templates/deployment.yaml (102 lines of code) (raw):
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "mcs-controller-manager.fullname" . }}
namespace: {{ .Values.fleetSystemNamespace }}
labels:
{{- include "mcs-controller-manager.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "mcs-controller-manager.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "mcs-controller-manager.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ include "mcs-controller-manager.fullname" . }}-sa
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- --leader-election-namespace={{ .Values.leaderElectionNamespace }}
- --fleet-system-namespace={{ .Values.fleetSystemNamespace }}
- --tls-insecure={{ .Values.tlsClientInsecure }}
- --v={{ .Values.logVerbosity }}
- --add_dir_header
- --enable-v1alpha1-apis={{ .Values.enableV1Alpha1APIs }}
- --enable-v1beta1-apis={{ .Values.enableV1Beta1APIs }}
ports:
- containerPort: 8080
name: hubmetrics
protocol: TCP
- containerPort: 8081
name: hubhealthz
protocol: TCP
- containerPort: 8090
name: membermetrics
protocol: TCP
- containerPort: 8091
name: memberhealthz
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: hubhealthz
readinessProbe:
httpGet:
path: /readyz
port: hubhealthz
env:
- name: HUB_SERVER_URL
value: "{{ .Values.config.hubURL }}"
- name: CONFIG_PATH
value: "/config/token"
- name: MEMBER_CLUSTER_NAME
value: "{{ .Values.config.memberClusterName }}"
- name: HUB_CERTIFICATE_AUTHORITY
value: "{{ .Values.config.hubCA }}"
volumeMounts:
- name: provider-token
mountPath: /config
resources:
{{- toYaml .Values.resources | nindent 12 }}
- name: refresh-token
image: "{{ .Values.refreshtoken.repository }}:{{ .Values.refreshtoken.tag }}"
imagePullPolicy: {{ .Values.refreshtoken.pullPolicy }}
args:
{{ $provider := .Values.config.provider }}
- {{ $provider }}
{{ range $key, $value := (index .Values $provider) }}
- --{{ $key }}={{ $value }}
{{ end }}
- --v={{ .Values.logVerbosity }}
ports:
- name: http
containerPort: 4000
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: provider-token
mountPath: /config
volumes:
- name: provider-token
emptyDir: {}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}