Skip to content

Commit

Permalink
fix the default values that broke 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes committed Sep 13, 2024
1 parent 619f07f commit 5825435
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ To configure the Digger backend deployment with the Helm chart, you'll need to s
- `digger.annotations`: Add the needed annotations based on your ingress controller configuration.
- `digger.ingress.host`: The hostname to use for the Ingress resource (e.g., `digger-backend.test`).
- `digger.ingress.path`: The path for the Ingress resource (e.g., `/`).
- `digger.ingress.className`: the classname to use for ingress (only considered for kuberetes >= 1.18)
- `digger.ingress.tls.secretName`: The name of the TLS secret to use for Ingress encryption (e.g., `digger-backend-tls`).

- `digger.secret.*`: Various secrets needed for the application, such as `HTTP_BASIC_AUTH_PASSWORD` and `BEARER_AUTH_TOKEN`. You can provide them directly or reference an existing Kubernetes secret by setting `useExistingSecret` to `true` and specifying `existingSecretName`.
Expand Down
10 changes: 8 additions & 2 deletions charts/digger-backend/templates/backend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ spec:
secretKeyRef:
name: {{ .Values.postgres.secret.existingSecretName }}
key: postgres-password
{{- else if .Values.digger.postgres.existingSecretName }}
valueFrom:
secretKeyRef:
name: {{ .Values.digger.postgres.existingSecretName }}
key: {{ .Values.digger.postgres.existingSecretKey }}
{{- else }}
valueFrom:
secretKeyRef:
Expand All @@ -51,9 +56,10 @@ spec:
value: "1"
- name: DATABASE_URL
{{- if .Values.postgres.enabled }}
value: "postgres://postgres:$(POSTGRES_PASSWORD)@{{ include "digger-backend.fullname" . }}-postgres:5432/postgres?sslmode=disable"
value: postgres://postgres:$(POSTGRES_PASSWORD)@{{ include "digger-backend.fullname" . }}-postgres:5432/postgres?sslmode=disable
{{- else }}
value: "postgres://{{ .Values.digger.postgres.user }}:$(POSTGRES_PASSWORD)@{{ .Values.digger.postgres.host }}:{{ .Values.digger.postgres.port }}/{{ .Values.digger.postgres.database }}?sslmode=disable"
{{- $pg := .Values.digger.postgres }}
value: "postgres://{{ $pg.user }}:$(POSTGRES_PASSWORD)@{{ $pg.host }}:{{ $pg.port }}/{{ $pg.database }}?sslmode=disable"
{{- end }}
- name: ALLOW_DIRTY
value: "{{ .Values.digger.postgres.allow_dirty }}"
8 changes: 4 additions & 4 deletions charts/digger-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ digger:
# secretName: name of k8s secret for tls certs (default: "digger-backend-tls")
ingress:
enabled: true
className: "test"
className: ""
annotations:
{}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: 'true'
host: "example.org"
host: ""
path: /
tls:
secretName: "digger-backend-tls"
Expand Down Expand Up @@ -88,7 +88,7 @@ digger:
# if the DB connection string is already in a secret
# DB connection string should be in a key names DATABASE_URL
# compatible with https://github.com/kloeckner-i/db-operator, for example
existingSecretName: "new-pg-creds"
existingSecretName: ""
existingSecretKey: "postgres-password"

# to define connection details in chart:
Expand All @@ -102,7 +102,7 @@ digger:
# configure this section if you want to deploy a postgres db
# WARNING: use only for test purposes, no persistency has been configured
postgres:
enabled: true
enabled: false
image: postgres
tag: "14"
resources:
Expand Down

0 comments on commit 5825435

Please sign in to comment.