Use the official MongoDB image

The bitnami variant seems to be flaky, let's use the official
offering.

Change-Id: Id9adb8b57fc63f79f4f5b91b525f7dc996290627
This commit is contained in:
Radosław Piliszek 2024-03-22 13:02:22 +01:00
parent e865d95a5c
commit bd07824107
4 changed files with 63 additions and 13 deletions

View File

@ -22,8 +22,3 @@ version: 0.1.0
# follow Semantic Versioning. They should reflect the version the application is using. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: "latest" appVersion: "latest"
dependencies:
- name: mongodb
version: 14.12.1
repository: "https://charts.bitnami.com/bitnami"

View File

@ -42,6 +42,15 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }} {{- end }}
{{- define "nebulous-gui-controller.mongodb.labels" -}}
helm.sh/chart: {{ include "nebulous-gui-controller.chart" . }}
{{ include "nebulous-gui-controller.mongodb.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/* {{/*
Selector labels Selector labels
*/}} */}}
@ -50,6 +59,11 @@ app.kubernetes.io/name: {{ include "nebulous-gui-controller.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }} {{- end }}
{{- define "nebulous-gui-controller.mongodb.selectorLabels" -}}
app.kubernetes.io/name: {{ include "nebulous-gui-controller.name" . }}-mongodb
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/* {{/*
Create the name of the service account to use Create the name of the service account to use
*/}} */}}

View File

@ -0,0 +1,45 @@
{{ 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:7.0.7-ubuntu2204"
ports:
- name: mongodb
containerPort: 27017
protocol: TCP
env:
- name: MONGO_INITDB_ROOT_USERNAME
value: username
- name: MONGO_INITDB_ROOT_PASSWORD
value: password
---
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 }}

View File

@ -82,12 +82,9 @@ tolerations: []
affinity: {} affinity: {}
mongodb: mongodb:
auth: # this enables the built-in mongodb deployment - not recommended for production
rootPassword: "nebulous-gui" enabled: true
username: "admin"
password: "nebulous-gui"
database: "gui-controller"
env: env:
- name: ACTIVEMQ_HOST - name: ACTIVEMQ_HOST
value: "nebulous-activemq" value: "nebulous-activemq"
@ -98,10 +95,9 @@ env:
- name: ACTIVEMQ_PASSWORD - name: ACTIVEMQ_PASSWORD
value: "nebulous" value: "nebulous"
- name: APOS_MONGODB_URI - name: APOS_MONGODB_URI
value: "mongodb://admin:nebulous-gui@nebulous-gui-controller-mongodb:27017/admin" value: "mongodb://username:password@nebulous-gui-controller-mongodb:27017/admin"
apostropheCMS: apostropheCMS:
user: user:
name: admin name: admin
password: admin password: admin