79 lines
2.7 KiB
YAML
79 lines
2.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Values.controllerManager.name }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ .Chart.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/component: controller-manager
|
|
spec:
|
|
replicas: {{ .Values.controllerManager.replicas }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ .Chart.Name }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/component: controller-manager
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ .Chart.Name }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/component: controller-manager
|
|
spec:
|
|
{{- if .Values.serviceAccount }}
|
|
serviceAccount: {{ .Values.serviceAccount }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: {{ .Values.controllerManager.name }}-config
|
|
- name: hints
|
|
downwardAPI:
|
|
defaultMode: 420
|
|
items:
|
|
- path: pause
|
|
fieldRef:
|
|
fieldPath: metadata.annotations['pause']
|
|
{{- if .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{ toYaml .Values.imagePullSecrets | indent 6}}
|
|
{{- end }}
|
|
{{- with .Values.controllerManager.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.controllerManager.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.controllerManager.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: polardbx-operator
|
|
{{- if .Values.useLatestImage }}
|
|
image: {{ .Values.imageRepo }}{{ "/" }}{{ .Values.images.polardbxOperator }}:latest
|
|
{{- else }}
|
|
image: {{ .Values.imageRepo }}{{ "/" }}{{ .Values.images.polardbxOperator }}:{{ .Values.imageTag | default .Chart.AppVersion }}
|
|
{{- end }}
|
|
imagePullPolicy: {{ .Values.imagePullPolicy | default "IfNotPresent" }}
|
|
ports:
|
|
- containerPort: 9443
|
|
name: "webhook"
|
|
resources:
|
|
{{ toYaml .Values.controllerManager.resources | indent 10 }}
|
|
volumeMounts:
|
|
- mountPath: /etc/operator/polardbx
|
|
name: config
|
|
- mountPath: /etc/operator/hints
|
|
name: hints
|
|
command:
|
|
- /polardbx-operator
|
|
args:
|
|
- -config-path=/etc/operator/polardbx
|
|
{{- if .Values.controllerManager.featureGates }}
|
|
- -feature-gates={{ .Values.controllerManager.featureGates | join "," }}
|
|
{{- end }} |