60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
{{ if .Values.mongodb.enabled }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "nebulous-gui-controller.fullname" . }}-mongodb
|
|
labels:
|
|
{{- include "nebulous-gui-controller.mongodb.labels" . | nindent 4 }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "nebulous-gui-controller.mongodb.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "nebulous-gui-controller.mongodb.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
containers:
|
|
- name: mongodb
|
|
image: "docker.io/mongodb/mongodb-community-server:4.4.29-ubuntu2004"
|
|
ports:
|
|
- name: mongodb
|
|
containerPort: 27017
|
|
protocol: TCP
|
|
env:
|
|
- name: MONGO_INITDB_ROOT_USERNAME
|
|
value: username
|
|
- name: MONGO_INITDB_ROOT_PASSWORD
|
|
value: password
|
|
- name: MONGO_INITDB_DATABASE
|
|
values: nebulous
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "nebulous-gui-controller.fullname" . }}-mongodb
|
|
labels:
|
|
{{- include "nebulous-gui-controller.mongodb.labels" . | nindent 4 }}
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 27017
|
|
targetPort: mongodb
|
|
protocol: TCP
|
|
name: mongodb
|
|
selector:
|
|
{{- include "nebulous-gui-controller.mongodb.selectorLabels" . | nindent 4 }}
|
|
{{ end }}
|