charts/charts-wip/radosgw/templates/statefulset.yaml

76 lines
2.4 KiB
YAML
Raw Normal View History

2019-07-06 21:17:57 +00:00
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "radosgw.fullname" . }}
labels:
{{ include "radosgw.labels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "radosgw.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
2019-07-07 06:01:00 +00:00
annotations:
checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
checksum/secrets: {{ include (print $.Template.BasePath "/keyring.yaml") . | sha256sum }}
2019-07-06 21:17:57 +00:00
labels:
app.kubernetes.io/name: {{ include "radosgw.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- mountPath:/etc/ceph/ceph.conf
name: ceph-conf
subPath: ceph.conf
readOnly: true
- mountPath:/etc/ceph/ceph.client.admin.keyring
name: ceph-keyring
subPath: client.admin.keyring
readOnly: true
- mountPath:/var/lib/ceph/bootstrap-rgw.keyring
name: ceph-keyring
subPath: bootstrap-rgw.keyring
readOnly: true
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: ceph-conf
configMap:
name: {{ include "radosgw.fullname" . }}
- name: ceph-keyring
secret:
secretName: {{ include "radosgw.fullname" . }}