feat(chart): add helm chart for zfs local pv (#247)

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
This commit is contained in:
Shubham Bajpai 2021-01-07 10:44:45 +05:30 committed by GitHub
parent 90ecfe9c73
commit bd6df9b31d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 2555 additions and 1 deletions

View file

@ -0,0 +1,127 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ template "zfslocalpv.fullname" . }}-controller
{{- with .Values.zfsController.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "zfslocalpv.zfsController.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "zfslocalpv.zfsController.matchLabels" . | nindent 6 }}
serviceName: "{{ .Values.zfsController.serviceName }}"
replicas: {{ .Values.zfsController.replicas }}
template:
metadata:
{{- with .Values.zfsController.podAnnotations }}
annotations: {{ toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "zfslocalpv.zfsController.labels" . | nindent 8 }}
{{- with .Values.zfsController.podLabels}}
{{ toYaml . | nindent 8 }}
{{- end}}
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- openebs-zfs-controller
topologyKey: "kubernetes.io/hostname"
priorityClassName: system-cluster-critical
serviceAccount: {{ .Values.serviceAccount.zfsController.name }}
containers:
- name: {{ .Values.zfsController.resizer.name }}
image: "{{ .Values.zfsController.resizer.image.registry }}{{ .Values.zfsController.resizer.image.repository }}:{{ .Values.zfsController.resizer.image.tag }}"
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
imagePullPolicy: {{ .Values.zfsController.resizer.image.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: {{ .Values.zfsController.snapshotter.name }}
image: "{{ .Values.zfsController.snapshotter.image.registry }}{{ .Values.zfsController.snapshotter.image.repository }}:{{ .Values.zfsController.snapshotter.image.tag }}"
imagePullPolicy: {{ .Values.zfsController.snapshotter.image.pullPolicy }}
args:
- "--csi-address=$(ADDRESS)"
- "--leader-election"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: {{ .Values.zfsController.snapshotController.name }}
image: "{{ .Values.zfsController.snapshotController.image.registry }}{{ .Values.zfsController.snapshotController.image.repository }}:{{ .Values.zfsController.snapshotController.image.tag }}"
args:
- "--v=5"
- "--leader-election=true"
imagePullPolicy: {{ .Values.zfsController.snapshotController.image.pullPolicy }}
- name: {{ .Values.zfsController.provisioner.name }}
image: "{{ .Values.zfsController.provisioner.image.registry }}{{ .Values.zfsController.provisioner.image.repository }}:{{ .Values.zfsController.provisioner.image.tag }}"
imagePullPolicy: {{ .Values.zfsController.provisioner.image.pullPolicy }}
args:
- "--csi-address=$(ADDRESS)"
- "--v=5"
- "--feature-gates=Topology=true"
- "--strict-topology"
- "--leader-election"
- "--extra-create-metadata=true"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: {{ .Values.zfsPlugin.name }}
image: "{{ .Values.zfsPlugin.image.registry }}{{ .Values.zfsPlugin.image.repository }}:{{ .Values.zfsPlugin.image.tag }}"
imagePullPolicy: {{ .Values.zfsPlugin.image.pullPolicy }}
env:
- name: OPENEBS_CONTROLLER_DRIVER
value: controller
- name: OPENEBS_CSI_ENDPOINT
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
- name: OPENEBS_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OPENEBS_IO_INSTALLER_TYPE
value: "zfs-localpv-helm"
- name: OPENEBS_IO_ENABLE_ANALYTICS
value: "{{ .Values.analytics.enabled }}"
args :
- "--endpoint=$(OPENEBS_CSI_ENDPOINT)"
- "--plugin=$(OPENEBS_CONTROLLER_DRIVER)"
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
volumes:
- name: socket-dir
emptyDir: {}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 2 }}
{{- end }}
{{- if .Values.zfsController.nodeSelector }}
nodeSelector:
{{ toYaml .Values.zfsController.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.zfsController.securityContext }}
securityContext:
{{ toYaml .Values.zfsController.securityContext | indent 8 }}
{{- end }}
{{- if .Values.zfsController.tolerations }}
tolerations:
{{ toYaml .Values.zfsController.tolerations | indent 8 }}
{{- end }}