rancher-partner-charts/charts/aquarist-labs/s3gw/templates/deployment.yaml

88 lines
2.2 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "s3gw.labels" . | indent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "s3gw.selectorLabels" . | indent 6 }}
strategy: {}
template:
metadata:
labels:
{{ include "s3gw.selectorLabels" . | indent 8 }}
spec:
{{- if .Values.imageCredentials }}
imagePullSecrets:
- name: {{ .Chart.Name }}-image-pull-secret
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: {{ include "s3gw.image" . | quote }}
imagePullPolicy: {{ default "IfNotPresent" .Values.imagePullPolicy }}
args:
{{- if .Values.ingress.enabled }}
- "--rgw-dns-name"
- {{ .Values.hostname }}
{{- end }}
- "--rgw-backend-store"
- $(RGW_BACKEND_STORE)
- "--debug-rgw"
- $(DEBUG_RGW)
ports:
- containerPort: 7480
name: s3
envFrom:
- configMapRef:
name: s3gw-config
- secretRef:
name: s3gw-secret
volumeMounts:
- name: s3gw-lh-store
mountPath: /data
volumes:
- name: s3gw-lh-store
persistentVolumeClaim:
claimName: {{ .Release.Name }}-pvc
{{- if .Values.ui.enabled }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: '{{ .Chart.Name }}-ui'
namespace: {{ .Release.Namespace }}
labels:
{{ include "s3gw.labels" . | indent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "s3gw-ui.selectorLabels" . | indent 6 }}
strategy: {}
template:
metadata:
labels:
{{ include "s3gw-ui.selectorLabels" . | indent 8}}
spec:
{{- if .Values.imageCredentials }}
imagePullSecrets:
- name: {{ .Chart.Name }}-image-pull-secret
{{- end }}
containers:
- name: s3gw-ui
image: {{ include "s3gw-ui.image" . | quote }}
imagePullPolicy: {{ default "IfNotPresent" .Values.ui.imagePullPolicy }}
ports:
- containerPort: 8080
envFrom:
- configMapRef:
name: s3gw-config
- secretRef:
name: s3gw-secret
{{- end }}