This repository has been archived on 2026-05-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
app/charts/groombook/templates/api-deployment.yaml
T
groombook-engineer[bot] a7bcce8b80 fix(GRO-887): wire OIDC + BETTER_AUTH env vars into API deployment (#369)
Wire BETTER_AUTH_URL, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, BETTER_AUTH_SECRET
into API deployment. Add conditional OIDC_INTERNAL_BASE env var. Add new values
betterAuthUrl + internalBaseUrl in values.yaml. Add authSecretName helper.

Cherry-picked from e26718b (original GRO-898 fix).

Co-authored-by: Paperclip <paperclip@noreply.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-05-03 17:44:10 +00:00

92 lines
3.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "groombook.fullname" . }}-api
labels:
{{- include "groombook.labels" . | nindent 4 }}
app.kubernetes.io/component: api
spec:
replicas: {{ .Values.api.replicas }}
progressDeadlineSeconds: 300
selector:
matchLabels:
{{- include "groombook.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: api
template:
metadata:
labels:
{{- include "groombook.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: api
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "groombook.serviceAccountName" . }}
containers:
- name: api
image: {{ include "groombook.apiImage" . }}
imagePullPolicy: {{ .Values.api.image.pullPolicy }}
ports:
- containerPort: 3000
name: http
protocol: TCP
env:
- name: PORT
value: {{ .Values.api.env.port | quote }}
- name: NODE_ENV
value: {{ .Values.api.env.nodeEnv | quote }}
- name: AUTH_DISABLED
value: {{ .Values.api.env.authDisabled | quote }}
{{- if .Values.api.env.corsOrigin }}
- name: CORS_ORIGIN
value: {{ .Values.api.env.corsOrigin | quote }}
{{- end }}
{{- if .Values.api.env.oidcIssuer }}
- name: OIDC_ISSUER
value: {{ .Values.api.env.oidcIssuer | quote }}
{{- end }}
{{- if .Values.api.env.oidcAudience }}
- name: OIDC_AUDIENCE
value: {{ .Values.api.env.oidcAudience | quote }}
{{- end }}
{{- if .Values.api.env.internalBaseUrl }}
- name: OIDC_INTERNAL_BASE
value: {{ .Values.api.env.internalBaseUrl | quote }}
{{- end }}
- name: BETTER_AUTH_URL
value: {{ .Values.api.env.betterAuthUrl | quote }}
- name: OIDC_CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ include "groombook.authSecretName" . }}
key: OIDC_CLIENT_ID
- name: OIDC_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ include "groombook.authSecretName" . }}
key: OIDC_CLIENT_SECRET
- name: BETTER_AUTH_SECRET
valueFrom:
secretKeyRef:
name: {{ include "groombook.authSecretName" . }}
key: BETTER_AUTH_SECRET
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: {{ include "groombook.databaseSecretName" . }}
key: {{ include "groombook.databaseSecretKey" . }}
resources:
{{- toYaml .Values.api.resources | nindent 12 }}
readinessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 15
periodSeconds: 30