-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathcspc-operator.yaml
More file actions
90 lines (90 loc) · 3.97 KB
/
cspc-operator.yaml
File metadata and controls
90 lines (90 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "cstor.fullname" . }}-cspc-operator
{{- with .Values.cspcOperator.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "cstor.cspcOperator.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "cstor.cspcOperator.matchLabels" . | nindent 6 }}
replicas: {{ .Values.cspcOperator.replicas }}
strategy:
type: Recreate
template:
metadata:
{{- with .Values.cspcOperator.podAnnotations }}
annotations: {{ toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "cstor.cspcOperator.labels" . | nindent 8 }}
{{- if .Values.cspcOperator.podLabels }}
{{ toYaml .Values.cspcOperator.podLabels | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount.cstorOperator.name }}
containers:
- name: {{ template "cstor.fullname" . }}-cspc-operator
imagePullPolicy: {{ .Values.cspcOperator.image.pullPolicy }}
image: "{{ .Values.cspcOperator.image.registry }}{{ .Values.cspcOperator.image.repository }}:{{ .Values.cspcOperator.image.tag }}"
resources:
{{ toYaml .Values.cspcOperator.resources | indent 12 }}
env:
- name: OPENEBS_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OPENEBS_SERVICEACCOUNT_NAME
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
- name: CSPC_OPERATOR_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
{{- if .Values.cspcOperator.baseDir }}
# OPENEBS_IO_BASE_DIR is used to configure base directory for openebs on host path.
# Where OpenEBS can store required files. Default base path will be /var/openebs
- name: OPENEBS_IO_BASE_DIR
value: {{ .Values.cspcOperator.baseDir | quote }}
{{- end }}
{{- if .Values.cspcOperator.sparseDir }}
# OPENEBS_IO_CSTOR_POOL_SPARSE_DIR can be used to specify the hostpath
# to be used for saving the shared content between the side cars
# of cstor pool pod. This ENV is also used to indicate the location
# of the sparse devices.
# The default path used is /var/openebs/sparse
- name: OPENEBS_IO_CSTOR_POOL_SPARSE_DIR
value: "{{ .Values.cspcOperator.sparseDir }}"
{{- end }}
- name: OPENEBS_IO_CSPI_MGMT_IMAGE
value: "{{ .Values.cspcOperator.poolManager.image.registry }}{{ .Values.cspcOperator.poolManager.image.repository }}:{{ .Values.cspcOperator.poolManager.image.tag }}"
- name: OPENEBS_IO_CSTOR_POOL_IMAGE
value: "{{ .Values.cspcOperator.cstorPool.image.registry }}{{ .Values.cspcOperator.cstorPool.image.repository }}:{{ .Values.cspcOperator.cstorPool.image.tag }}"
- name: OPENEBS_IO_CSTOR_POOL_EXPORTER_IMAGE
value: "{{ .Values.cspcOperator.cstorPoolExporter.image.registry }}{{ .Values.cspcOperator.cstorPoolExporter.image.repository }}:{{ .Values.cspcOperator.cstorPoolExporter.image.tag }}"
- name: RESYNC_INTERVAL
value: "{{ .Values.cspcOperator.resyncInterval }}"
{{- if .Values.imagePullSecrets }}
- name: OPENEBS_IO_IMAGE_PULL_SECRETS
value: "{{- range $.Values.imagePullSecrets }}{{ .name }},{{- end }}"
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 2 }}
{{- end }}
{{- if .Values.cspcOperator.nodeSelector }}
nodeSelector:
{{ toYaml .Values.cspcOperator.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.cspcOperator.securityContext }}
securityContext:
{{ toYaml .Values.cspcOperator.securityContext | indent 8 }}
{{- end }}
{{- if .Values.cspcOperator.tolerations }}
tolerations:
{{ toYaml .Values.cspcOperator.tolerations | indent 8 }}
{{- end }}