2022-12-15 14:27:57 +00:00
|
|
|
{{- if .Values.snapshotController.enabled }}
|
2022-01-11 13:25:46 +00:00
|
|
|
kind: StatefulSet
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: snapshot-controller
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
{{- include "kubezero-lib.labels" . | nindent 4 }}
|
|
|
|
spec:
|
|
|
|
serviceName: "snapshot-controller"
|
|
|
|
replicas: {{ .Values.snapshotController.replicas }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: snapshot-controller
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: snapshot-controller
|
|
|
|
spec:
|
|
|
|
affinity:
|
|
|
|
podAntiAffinity:
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
- labelSelector:
|
|
|
|
matchExpressions:
|
|
|
|
- key: app
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- snapshot-controller
|
|
|
|
topologyKey: "kubernetes.io/hostname"
|
|
|
|
serviceAccount: snapshot-controller
|
|
|
|
containers:
|
|
|
|
- name: snapshot-controller
|
|
|
|
image: k8s.gcr.io/sig-storage/snapshot-controller:v4.0.0
|
|
|
|
args:
|
|
|
|
- "--v={{ .Values.snapshotController.logLevel }}"
|
|
|
|
{{- if gt (int .Values.snapshotController.replicas) 1 }}
|
|
|
|
- "--leader-election=true"
|
|
|
|
{{- end }}
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
resources:
|
|
|
|
{{- toYaml .Values.snapshotController.resources | nindent 12 }}
|
2022-01-11 13:42:07 +00:00
|
|
|
{{- with .Values.snapshotController.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.snapshotController.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2022-12-15 14:27:57 +00:00
|
|
|
{{- end }}
|