Skip to content

Commit

Permalink
Merge pull request #745 from uselagoon/mysql-image-support
Browse files Browse the repository at this point in the history
chore: support db vendor change
  • Loading branch information
tobybellwood authored Jan 31, 2025
2 parents 43e7e0c + 7671c2c commit cf2126c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 18 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ OPENSEARCH_INTEGRATION_ENABLED = false
CLEAR_API_DATA = false
DOCKER_NETWORK = kind
LAGOON_SSH_PORTAL_LOADBALANCER =
CORE_DATABASE_VENDOR = mariadb

# install lagoon dependencies by default with the install-lagoon target
INSTALL_LAGOON_DEPENDENCIES = true
Expand Down Expand Up @@ -380,6 +381,7 @@ endif
$$([ $(IMAGE_REGISTRY) ] && [ $(INSTALL_STABLE_CORE) != true ] && echo '--set actionsHandler.image.repository=$(IMAGE_REGISTRY)/actions-handler') \
$$([ $(IMAGE_REGISTRY) ] && [ $(INSTALL_STABLE_CORE) != true ] && echo '--set api.image.repository=$(IMAGE_REGISTRY)/api') \
$$([ $(IMAGE_REGISTRY) ] && [ $(INSTALL_STABLE_CORE) != true ] && echo '--set apiDB.image.repository=$(IMAGE_REGISTRY)/api-db') \
--set apiDB.vendor=$(CORE_DATABASE_VENDOR) \
$$([ $(IMAGE_REGISTRY) ] && [ $(INSTALL_STABLE_CORE) != true ] && echo '--set apiRedis.image.repository=$(IMAGE_REGISTRY)/api-redis') \
$$([ $(IMAGE_REGISTRY) ] && [ $(INSTALL_STABLE_CORE) != true ] && echo '--set authServer.image.repository=$(IMAGE_REGISTRY)/auth-server') \
--set autoIdler.enabled=false \
Expand All @@ -392,6 +394,7 @@ endif
--set insightsHandler.enabled=false \
$$([ $(IMAGE_REGISTRY) ] && [ $(INSTALL_STABLE_CORE) != true ] && echo '--set keycloak.image.repository=$(IMAGE_REGISTRY)/keycloak') \
$$([ $(IMAGE_REGISTRY) ] && [ $(INSTALL_STABLE_CORE) != true ] && echo '--set keycloakDB.image.repository=$(IMAGE_REGISTRY)/keycloak-db') \
--set keycloakDB.vendor=$(CORE_DATABASE_VENDOR) \
$$([ $(IMAGE_REGISTRY) ] && [ $(INSTALL_STABLE_CORE) != true ] && echo '--set logs2notifications.image.repository=$(IMAGE_REGISTRY)/logs2notifications') \
$$([ $(INSTALL_MAILPIT) = true ] && echo '--set logs2notifications.additionalEnvs.EMAIL_HOST=mailpit-smtp.mailpit.svc') \
$$([ $(INSTALL_MAILPIT) = true ] && echo '--set logs2notifications.additionalEnvs.EMAIL_PORT="25"') \
Expand Down
15 changes: 1 addition & 14 deletions charts/lagoon-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,4 @@ dependencies:
annotations:
artifacthub.io/changes: |
- kind: changed
description: update lagoon-core appVersion to v2.23.0
links:
- name: Lagoon 2.23.0 release notes
url: https://docs.lagoon.sh/releases/2.23.0
- kind: changed
description: add KEYCLOAK_ADMIN_API_CLIENT_SECRET variable to keycloak and api deployment
- kind: changed
description: update uselagoon/lagoon-ssh-portal/ssh-portal-api from v0.41.3 to v0.41.4
- kind: changed
description: update uselagoon/lagoon-ssh-portal/ssh-token from v0.41.3 to v0.41.4
- kind: changed
description: update uselagoon/lagoon-opensearch-sync from v0.8.0 to v0.8.1
- kind: changed
description: update NATS chart dependency to 1.2.8
description: initial support for changing the database vendor
2 changes: 1 addition & 1 deletion charts/lagoon-core/templates/api-db.statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
image: "{{ .Values.apiDB.image.repository }}:{{ coalesce .Values.apiDB.image.tag .Values.imageTag .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.apiDB.image.pullPolicy }}
env:
- name: MARIADB_PASSWORD
- name: API_DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "lagoon-core.apiDB.fullname" . }}
Expand Down
2 changes: 1 addition & 1 deletion charts/lagoon-core/templates/keycloak-db.statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
image: "{{ .Values.keycloakDB.image.repository }}:{{ coalesce .Values.keycloakDB.image.tag .Values.imageTag .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.keycloakDB.image.pullPolicy }}
env:
- name: MARIADB_PASSWORD
- name: KEYCLOAK_DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "lagoon-core.keycloak.fullname" . }}
Expand Down
4 changes: 3 additions & 1 deletion charts/lagoon-core/templates/keycloak.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ spec:
- name: KEYCLOAK_ADMIN_EMAIL
value: {{ . | quote }}
{{- end }}
- name: DB_VENDOR
value: {{ .Values.keycloakDB.vendor }}
- name: LAGOON_DB_HOST
value: {{ include "lagoon-core.apiDB.fullname" . }}
- name: LAGOON_DB_VENDOR
value: mariadb
value: {{ .Values.apiDB.vendor }}
- name: LAGOON_DB_USER
value: api
- name: LAGOON_DB_DATABASE
Expand Down
4 changes: 3 additions & 1 deletion charts/lagoon-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ api:
# targetMemoryUtilizationPercentage: 80

apiDB:
vendor: mariadb
image:
repository: uselagoon/api-db
pullPolicy: Always
Expand Down Expand Up @@ -186,7 +187,7 @@ apiDB:
command:
- test
- -f
- /tmp/mariadb-init-complete
- /tmp/startup-init-complete

livenessProbe:
exec:
Expand Down Expand Up @@ -291,6 +292,7 @@ keycloak:
# - chart-example.local

keycloakDB:
vendor: mariadb
replicaCount: 1
image:
repository: uselagoon/keycloak-db
Expand Down

0 comments on commit cf2126c

Please sign in to comment.