From cd33654a0431a45fc14c2bffed1985b1922fcf56 Mon Sep 17 00:00:00 2001 From: "Schiller, Tjorben" Date: Tue, 30 Jul 2024 19:20:25 +0200 Subject: [PATCH] fix: remove postgres persistence --- .../templates/deployment.yaml | 8 +++-- .../charts/terminfinder-backend/values.yaml | 36 ++----------------- terminfinder-chart/values.yaml | 5 +-- 3 files changed, 10 insertions(+), 39 deletions(-) diff --git a/terminfinder-chart/charts/terminfinder-backend/templates/deployment.yaml b/terminfinder-chart/charts/terminfinder-backend/templates/deployment.yaml index ab9993e..6086e76 100644 --- a/terminfinder-chart/charts/terminfinder-backend/templates/deployment.yaml +++ b/terminfinder-chart/charts/terminfinder-backend/templates/deployment.yaml @@ -1,4 +1,4 @@ -{{- $svc := .Values.global.postgresql.service.name | default (printf "%s-postgresql" .Release.Name) }} +{{- $svc := printf "%s-postgresql" .Release.Name }} apiVersion: apps/v1 kind: Deployment metadata: @@ -39,7 +39,7 @@ spec: - name: DB_DATABASE value: {{ .Values.global.postgresql.auth.database }} - name: DB_PORT - value: {{ .Values.global.postgresql.service.ports.postgresql | quote }} + value: "5432" - name: DB_ADDRESS value: {{ printf "%s" $svc }} - name: DB_USERNAME @@ -65,6 +65,10 @@ spec: - name: http containerPort: 8080 protocol: TCP + command: + - "dotnet" + - "Dataport.Terminfinder.WebAPI.dll" + - "--dbmigrate" startupProbe: failureThreshold: 3 periodSeconds: 10 diff --git a/terminfinder-chart/charts/terminfinder-backend/values.yaml b/terminfinder-chart/charts/terminfinder-backend/values.yaml index 054945d..ac2a40a 100644 --- a/terminfinder-chart/charts/terminfinder-backend/values.yaml +++ b/terminfinder-chart/charts/terminfinder-backend/values.yaml @@ -7,13 +7,6 @@ global: auth: username: terminfinder database: terminfinder - existingSecret: "" # if not set, default: "{{ Release.Name }}-postgres" - secretKeys: - userPasswordKey: "" # if not set, default: "password" - service: - name: "" # if not set, default: "{{ Release.Name }}-postgres" - ports: - postgresql: 5432 # Default port replicaCount: 1 @@ -97,29 +90,6 @@ tolerations: [ ] affinity: { } postgresql: - enabled: true - - serviceAccount: - create: true - - ## Set permissions for the data volume - ## Only needed when volume has not correct permissions - volumePermissions: - enabled: true - - image: - registry: docker.io # Notice, may this is not allowed - repository: bitnami/bitnami-shell - # tag: 11-debian-11-r77 - # pullPolicy: Always - # pullSecrets: [] - - initdb: - # Enabling the UUID-OSSP - scripts: - 99-enable-uuid.sql: | - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; - ALTER EXTENSION "uuid-ossp" SET SCHEMA public; - - # More variables / parameters can be found here: - # https://github.com/bitnami/charts/tree/main/bitnami/postgresql#parameters + primary: + persistence: + enabled: false diff --git a/terminfinder-chart/values.yaml b/terminfinder-chart/values.yaml index 2dd7bf5..65e8530 100644 --- a/terminfinder-chart/values.yaml +++ b/terminfinder-chart/values.yaml @@ -226,10 +226,7 @@ terminfinder-backend: ## Enable persistence using Persistent Volume Claims ## For BSI compliance, we need to use non-root user persistence: - enabled: true - accessModes: - - ReadWriteOnce - size: 8Gi + enabled: false # Resources (minimal) resources: