From 27186660427ad9e6bb7adc847c2d9fbb69f06b11 Mon Sep 17 00:00:00 2001 From: "olof.pettersson" Date: Thu, 11 Dec 2025 15:53:46 +0100 Subject: [PATCH] New chart version --- defaults.yaml | 8 +++++++ templates/deployment-app.yaml | 4 ++-- templates/ingress.yaml | 42 +++++++++++++++++++++++++++++++++++ templates/secret.yaml | 6 +++-- values.yaml | 37 +++++------------------------- 5 files changed, 62 insertions(+), 35 deletions(-) create mode 100644 defaults.yaml diff --git a/defaults.yaml b/defaults.yaml new file mode 100644 index 0000000..9ba1d98 --- /dev/null +++ b/defaults.yaml @@ -0,0 +1,8 @@ +# defaults.yaml (inside the chart) +image: + repository: solidtime/solidtime + tag: latest +service: + type: ClusterIP +secret: + existingSecret: "" # Left empty by default \ No newline at end of file diff --git a/templates/deployment-app.yaml b/templates/deployment-app.yaml index 646c6a0..603fecb 100644 --- a/templates/deployment-app.yaml +++ b/templates/deployment-app.yaml @@ -24,10 +24,10 @@ spec: - name: DB_PASSWORD valueFrom: secretKeyRef: - name: {{ include "solidtime.fullname" . }}-secret + name: {{ .Values.secret.existingSecret | default (printf "%s-secret" (include "solidtime.fullname" .)) }} key: DB_PASSWORD - name: APP_KEY valueFrom: secretKeyRef: - name: {{ include "solidtime.fullname" . }}-secret + name: {{ .Values.secret.existingSecret | default (printf "%s-secret" (include "solidtime.fullname" .)) }} key: APP_KEY \ No newline at end of file diff --git a/templates/ingress.yaml b/templates/ingress.yaml index e69de29..659421d 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -0,0 +1,42 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "solidtime.fullname" . -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "solidtime.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ $fullName }} + port: + number: {{ .port | default $.Values.service.port }} + {{- end }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/templates/secret.yaml b/templates/secret.yaml index 38c9594..dcfc059 100644 --- a/templates/secret.yaml +++ b/templates/secret.yaml @@ -1,8 +1,10 @@ +{{- if not .Values.secret.existingSecret }} apiVersion: v1 kind: Secret metadata: name: {{ include "solidtime.fullname" . }}-secret type: Opaque stringData: - APP_KEY: {{ .Values.appKey | quote }} - DB_PASSWORD: {{ .Values.postgresql.auth.password | quote }} \ No newline at end of file + APP_KEY: {{ .Values.secret.appKey | quote }} + DB_PASSWORD: {{ .Values.secret.dbPassword | quote }} +{{- end }} \ No newline at end of file diff --git a/values.yaml b/values.yaml index aad5aac..9ba1d98 100644 --- a/values.yaml +++ b/values.yaml @@ -1,33 +1,8 @@ -domain: "time.northernlighthouseinteractive.com" - +# defaults.yaml (inside the chart) image: repository: solidtime/solidtime - pullPolicy: IfNotPresent - tag: "latest" # Pin this to a specific version in production! - -# Generates the Laravel App Key. Change this! -# Run `php artisan key:generate --show` locally to get one. -appKey: "base64:YOUR_GENERATED_KEY_HERE" - -ingress: - enabled: true - className: "nginx" - annotations: - cert-manager.io/cluster-issuer: "letsencrypt-prod" - hosts: - - host: time.northernlighthouseinteractive.com - paths: - - path: / - pathType: Prefix - -# Database Dependency Configuration -postgresql: - enabled: true - auth: - username: solidtime - password: securepassword - database: solidtime - primary: - persistence: - enabled: true - size: 10Gi \ No newline at end of file + tag: latest +service: + type: ClusterIP +secret: + existingSecret: "" # Left empty by default \ No newline at end of file