From 05c8be46fa6f059a24f8da656af274ac631c513f Mon Sep 17 00:00:00 2001 From: Torsten Egenolf Date: Sat, 21 Oct 2023 00:57:33 +0200 Subject: [PATCH] feat(kds-deployment): fixes deployment - gh image - pull secret - seperate postgres mountpath for kds --- .../charts/tngkds-backend/templates/deployment.yaml | 6 ++---- k8s/helm/tngkds/charts/tngkds-backend/values.yaml | 8 ++++++-- .../charts/tngkds-postgres/templates/deployment.yaml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/k8s/helm/tngkds/charts/tngkds-backend/templates/deployment.yaml b/k8s/helm/tngkds/charts/tngkds-backend/templates/deployment.yaml index 52cbe17..e2ae738 100644 --- a/k8s/helm/tngkds/charts/tngkds-backend/templates/deployment.yaml +++ b/k8s/helm/tngkds/charts/tngkds-backend/templates/deployment.yaml @@ -20,15 +20,13 @@ spec: labels: {{- include "tngkds-backend.labels" . | nindent 8 }} spec: - {{- with .Values.imagePullSecrets }} imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} + - name: {{ .Values.imagePullSecrets }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: {{ range .Values.service.ports }} diff --git a/k8s/helm/tngkds/charts/tngkds-backend/values.yaml b/k8s/helm/tngkds/charts/tngkds-backend/values.yaml index bb21de2..8f9db12 100644 --- a/k8s/helm/tngkds/charts/tngkds-backend/values.yaml +++ b/k8s/helm/tngkds/charts/tngkds-backend/values.yaml @@ -5,12 +5,16 @@ replicaCount: 1 image: + # Create this image before your local installing with: "docker build -t kds:0.0.1" and load + # this image into your local minikube cluster with: "minikube image load kds:0.0.1" repository: ghcr.io/worldhealthorganization/tng-key-distribution/tng-key-distribution pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "" + tag: "0.0.1-2840d04" -imagePullSecrets: [] +#kubectl -n create secret docker-registry --docker-server=ghcr.io --docker-username= --docker-password= --docker-email= -o yaml +#kubectl -n kds create secret docker-registry tng-distribution-pull-secret --docker-server=ghcr.io --docker-username=anonymous --docker-password= --docker-email=anonymous@example.com -o yaml +imagePullSecrets: tng-distribution-pull-secret nameOverride: "" fullnameOverride: "" diff --git a/k8s/helm/tngkds/charts/tngkds-postgres/templates/deployment.yaml b/k8s/helm/tngkds/charts/tngkds-postgres/templates/deployment.yaml index d46629a..5745ff2 100644 --- a/k8s/helm/tngkds/charts/tngkds-postgres/templates/deployment.yaml +++ b/k8s/helm/tngkds/charts/tngkds-postgres/templates/deployment.yaml @@ -41,7 +41,7 @@ spec: - containerPort: 5432 name: postgres volumeMounts: - - mountPath: /var/lib/postgresql/data + - mountPath: /var/lib/postgresql/kds/data name: postgres-persistance-storage volumes: - name: postgres-persistance-storage