KubeZero/charts/kubezero-storage/templates/snapshot-controller/controller.yaml

51 lines
1.5 KiB
YAML
Raw Normal View History

2022-12-15 14:27:57 +00:00
{{- if .Values.snapshotController.enabled }}
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 }}
{{- 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 }}