40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: {{ .Release.Name }}-mongo-express
|
|
labels:
|
|
app: mongo-express
|
|
spec:
|
|
serviceName: "{{ .Release.Name }}-mongo-express"
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app: mongo-express
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mongo-express
|
|
spec:
|
|
containers:
|
|
- name: mongo-express
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
ports:
|
|
- containerPort: {{ .Values.service.targetPort }}
|
|
env:
|
|
- name: ME_CONFIG_BASICAUTH_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mongo-secret
|
|
key: {{ .Values.secret.usernameKey }}
|
|
- name: ME_CONFIG_BASICAUTH_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mongo-secret
|
|
key: {{ .Values.secret.passwordKey }}
|
|
imagePullSecrets:
|
|
{{- if .Values.imagePullSecrets }}
|
|
{{- range .Values.imagePullSecrets }}
|
|
- name: {{ .name }}
|
|
{{- end }}
|
|
{{- end }}
|