aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/minio/templates/statefulset.yaml
diff options
context:
space:
mode:
authorPramod <pramod.raghavendra.jayathirth@intel.com>2019-04-17 15:02:56 -0700
committerPramod <pramod.raghavendra.jayathirth@intel.com>2019-04-17 15:06:13 -0700
commitc8038e7451fb5bf2b9d5e7b70e5a29d56f9202a7 (patch)
tree113ad9f20181c6a63e53a79ffc1b7a2694c289c9 /vnfs/DAaaS/minio/templates/statefulset.yaml
parent2b21e905e3fa4593ec7c2f1dd16ffb28a97eb56d (diff)
Fixed the chart name for Minio Model repo
The Chart name is incosistent with the minio related manifests. Change-Id: I42b6e9597651faba4c79cbeb77db2adffe191952 Issue-ID: ONAPARC-487 Signed-off-by: Pramod <pramod.raghavendra.jayathirth@intel.com>
Diffstat (limited to 'vnfs/DAaaS/minio/templates/statefulset.yaml')
-rw-r--r--vnfs/DAaaS/minio/templates/statefulset.yaml141
1 files changed, 141 insertions, 0 deletions
diff --git a/vnfs/DAaaS/minio/templates/statefulset.yaml b/vnfs/DAaaS/minio/templates/statefulset.yaml
new file mode 100644
index 00000000..447b671d
--- /dev/null
+++ b/vnfs/DAaaS/minio/templates/statefulset.yaml
@@ -0,0 +1,141 @@
+{{- if eq .Values.mode "distributed" }}
+{{ $nodeCount := .Values.replicas | int }}
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+ name: {{ template "minio.fullname" . }}
+ labels:
+ app: {{ template "minio.name" . }}
+ chart: {{ template "minio.chart" . }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ updateStrategy:
+ type: {{ .Values.StatefulSetUpdate.updateStrategy }}
+ serviceName: {{ template "minio.fullname" . }}
+ replicas: {{ .Values.replicas }}
+ selector:
+ matchLabels:
+ app: {{ template "minio.name" . }}
+ release: {{ .Release.Name }}
+ template:
+ metadata:
+ name: {{ template "minio.fullname" . }}
+ labels:
+ app: {{ template "minio.name" . }}
+ release: {{ .Release.Name }}
+ {{- if .Values.podAnnotations }}
+ annotations:
+{{ toYaml .Values.podAnnotations | indent 8 }}
+ {{- end }}
+ spec:
+ {{- if .Values.priorityClassName }}
+ priorityClassName: "{{ .Values.priorityClassName }}"
+ {{- end }}
+ containers:
+ - name: {{ .Chart.Name }}
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ {{- if .Values.tls.enabled }}
+ command: [ "/bin/sh",
+ "-ce",
+ "/usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} server
+ {{- range $i := until $nodeCount }}
+ https://{{ template `minio.fullname` $ }}-{{ $i }}.{{ template `minio.fullname` $ }}.{{ $.Release.Namespace }}.svc.{{ $.Values.clusterDomain }}{{ $.Values.mountPath }}
+ {{- end }}" ]
+ {{ else }}
+ command: [ "/bin/sh",
+ "-ce",
+ "/usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} server
+ {{- range $i := until $nodeCount }}
+ http://{{ template `minio.fullname` $ }}-{{ $i }}.{{ template `minio.fullname` $ }}.{{ $.Release.Namespace }}.svc.{{ $.Values.clusterDomain }}{{ $.Values.mountPath }}
+ {{- end }}" ]
+ {{ end }}
+ volumeMounts:
+ - name: export
+ mountPath: {{ .Values.mountPath }}
+ {{- if and .Values.persistence.enabled .Values.persistence.subPath }}
+ subPath: "{{ .Values.persistence.subPath }}"
+ {{- end }}
+ - name: minio-config-dir
+ mountPath: {{ .Values.configPath }}
+ {{- if .Values.tls.enabled }}
+ - name: cert-secret-volume
+ mountPath: {{ .Values.configPath }}certs
+ {{ end }}
+ ports:
+ - name: service
+ containerPort: 9000
+ env:
+ - name: MINIO_ACCESS_KEY
+ valueFrom:
+ secretKeyRef:
+ name: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{ else }}{{ template "minio.fullname" . }}{{ end }}
+ key: accesskey
+ - name: MINIO_SECRET_KEY
+ valueFrom:
+ secretKeyRef:
+ name: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{ else }}{{ template "minio.fullname" . }}{{ end }}
+ key: secretkey
+ {{- range $key, $val := .Values.environment }}
+ - name: {{ $key }}
+ value: {{ $val | quote }}
+ {{- end}}
+ livenessProbe:
+ httpGet:
+ path: /minio/health/live
+ port: service
+ {{- if .Values.tls.enabled }}
+ scheme: HTTPS
+ {{ else }}
+ scheme: HTTP
+ {{- end }}
+ initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.livenessProbe.successThreshold }}
+ failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
+ resources:
+{{ toYaml .Values.resources | indent 12 }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml . | indent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+{{ toYaml . | indent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+{{ toYaml . | indent 8 }}
+ {{- end }}
+ volumes:
+ - name: minio-user
+ secret:
+ secretName: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{ else }}{{ template "minio.fullname" . }}{{ end }}
+ - name: minio-config-dir
+ emptyDir: {}
+ {{- if .Values.tls.enabled }}
+ - name: cert-secret-volume
+ secret:
+ secretName: {{ .Values.tls.certSecret }}
+ items:
+ - key: {{ .Values.tls.publicCrt }}
+ path: public.crt
+ - key: {{ .Values.tls.privateKey }}
+ path: private.key
+ - key: {{ .Values.tls.publicCrt }}
+ path: CAs/public.crt
+ {{ end }}
+ volumeClaimTemplates:
+ - metadata:
+ name: export
+ spec:
+ accessModes: [ {{ .Values.persistence.accessMode | quote }} ]
+ {{- if .Values.persistence.storageClass }}
+ storageClassName: {{ .Values.persistence.storageClass }}
+ {{- end }}
+ resources:
+ requests:
+ storage: {{ .Values.persistence.size }}
+{{- end }}