urlaubsverwaltung chart: naming scheme, configurable probes, flexible ingress
- Rename all resources from <chart>-<release>-uv-<kind> to the repo standard <release>-<chart>-<kind> (deployment, service, ingress, both OnePasswordItem secrets); drop the uv infix. No PVCs in this chart, so no storage migration is needed. - TLS secret renamed to the standard tls-<release>-<chart>-ingress (was tls-<chart>-<release>-ingress). - Probes lifted into values (urlaubsverwaltung.livenessProbe/ readinessProbe/startupProbe); defaults are exactly the previously hardcoded, issue-#9-calibrated settings. - Repo-standard flexible ingress: ingress.className (default nginx), ingress.annotations merged with the cert-manager annotation, ingress.enabled flag; domain/clusterIssuer stay required. - Additive urlaubsverwaltung.env block rendered through tpl with value/secretKeyRef/configMapKeyRef forms. - CI fixtures updated to the new secret names. Major bump 4.1.2+up6.7.0 -> 5.0.0+up6.7.0 (resource renames).
This commit is contained in:
8 files changed
+91
-51
No files matched your search
@@ -1,11 +1,11 @@
|
|||||||
# Fixtures for the urlaubsverwaltung install-test: throwaway postgres, a dex
|
# Fixtures for the urlaubsverwaltung install-test: throwaway postgres, a dex
|
||||||
# OIDC provider (Spring performs OIDC discovery against the issuer at boot)
|
# OIDC provider (Spring performs OIDC discovery against the issuer at boot)
|
||||||
# and the secrets the 1Password operator would otherwise materialize.
|
# and the secrets the 1Password operator would otherwise materialize.
|
||||||
# Note: this chart names secrets <chart>-<release>-..., release name is ci.
|
# Note: secrets are named <release>-<chart>-..., release name is ci.
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: urlaubsverwaltung-ci-uv-db-secret
|
name: ci-urlaubsverwaltung-db-secret
|
||||||
stringData:
|
stringData:
|
||||||
jdbc-url: jdbc:postgresql://postgres:5432/urlaubsverwaltung
|
jdbc-url: jdbc:postgresql://postgres:5432/urlaubsverwaltung
|
||||||
username: ci
|
username: ci
|
||||||
@@ -14,7 +14,7 @@ stringData:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: urlaubsverwaltung-ci-uv-oidc-secret
|
name: ci-urlaubsverwaltung-oidc-secret
|
||||||
stringData:
|
stringData:
|
||||||
client-id: ci-client
|
client-id: ci-client
|
||||||
client-secret: ci-client-secret
|
client-secret: ci-client-secret
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ description: A Helm chart to deploy urlaubsverwaltung on Kubernetes
|
|||||||
icon: https://raw.githubusercontent.com/urlaubsverwaltung/urlaubsverwaltung/main/src/main/resources/static/favicons/apple-touch-icon.png
|
icon: https://raw.githubusercontent.com/urlaubsverwaltung/urlaubsverwaltung/main/src/main/resources/static/favicons/apple-touch-icon.png
|
||||||
type: application
|
type: application
|
||||||
|
|
||||||
version: 4.1.2+up6.7.0
|
version: 5.0.0+up6.7.0
|
||||||
appVersion: 6.7.0
|
appVersion: 6.7.0
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: onepassword.com/v1
|
apiVersion: onepassword.com/v1
|
||||||
kind: OnePasswordItem
|
kind: OnePasswordItem
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-db-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-db-secret
|
||||||
spec:
|
spec:
|
||||||
itemPath: {{ .Values.secrets.databaseSecretRef }}
|
itemPath: {{ .Values.secrets.databaseSecretRef }}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: onepassword.com/v1
|
apiVersion: onepassword.com/v1
|
||||||
kind: OnePasswordItem
|
kind: OnePasswordItem
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-oidc-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret
|
||||||
spec:
|
spec:
|
||||||
itemPath: {{ .Values.secrets.oidcSecretRef }}
|
itemPath: {{ .Values.secrets.oidcSecretRef }}
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-deployment
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
labels:
|
labels:
|
||||||
app: {{ .Chart.Name }}-{{ .Release.Name }}
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
spec:
|
spec:
|
||||||
replicas: {{ include "urlaubsverwaltung.replicas" (dict "scaleDown" .Values.scaleDown "replicas" .Values.urlaubsverwaltung.replicas) }}
|
replicas: {{ include "urlaubsverwaltung.replicas" (dict "scaleDown" .Values.scaleDown "replicas" .Values.urlaubsverwaltung.replicas) }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: {{ .Chart.Name }}-{{ .Release.Name }}-uv-deployment
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-deployment
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
labels:
|
labels:
|
||||||
app: {{ .Chart.Name }}-{{ .Release.Name }}-uv-deployment
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
spec:
|
spec:
|
||||||
automountServiceAccountToken: false
|
automountServiceAccountToken: false
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.urlaubsverwaltung.securityContext.pod | nindent 8 }}
|
{{- toYaml .Values.urlaubsverwaltung.securityContext.pod | nindent 8 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-container
|
- name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
image: "urlaubsverwaltung/urlaubsverwaltung:{{ .Chart.AppVersion }}"
|
image: "urlaubsverwaltung/urlaubsverwaltung:{{ .Chart.AppVersion }}"
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
securityContext:
|
securityContext:
|
||||||
@@ -38,17 +38,17 @@ spec:
|
|||||||
- name: SPRING_DATASOURCE_URL
|
- name: SPRING_DATASOURCE_URL
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-db-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-db-secret
|
||||||
key: jdbc-url
|
key: jdbc-url
|
||||||
- name: SPRING_DATASOURCE_USERNAME
|
- name: SPRING_DATASOURCE_USERNAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-db-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-db-secret
|
||||||
key: username
|
key: username
|
||||||
- name: SPRING_DATASOURCE_PASSWORD
|
- name: SPRING_DATASOURCE_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-db-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-db-secret
|
||||||
key: password
|
key: password
|
||||||
# Mail
|
# Mail
|
||||||
- name: UV_MAIL_FROM
|
- name: UV_MAIL_FROM
|
||||||
@@ -72,17 +72,17 @@ spec:
|
|||||||
- name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_DEFAULT_CLIENT-ID
|
- name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_DEFAULT_CLIENT-ID
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-oidc-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret
|
||||||
key: client-id
|
key: client-id
|
||||||
- name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_DEFAULT_CLIENT-SECRET
|
- name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_DEFAULT_CLIENT-SECRET
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-oidc-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret
|
||||||
key: client-secret
|
key: client-secret
|
||||||
- name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_DEFAULT_CLIENT-NAME
|
- name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_DEFAULT_CLIENT-NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-oidc-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret
|
||||||
key: issuer-name
|
key: issuer-name
|
||||||
- name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_DEFAULT_PROVIDER
|
- name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_DEFAULT_PROVIDER
|
||||||
value: default
|
value: default
|
||||||
@@ -93,49 +93,50 @@ spec:
|
|||||||
- name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_DEFAULT_REDIRECT-URI
|
- name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_DEFAULT_REDIRECT-URI
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-oidc-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret
|
||||||
key: redirect-uri
|
key: redirect-uri
|
||||||
- name: SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_DEFAULT_ISSUER-URI
|
- name: SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_DEFAULT_ISSUER-URI
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-oidc-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret
|
||||||
key: issuer-uri
|
key: issuer-uri
|
||||||
- name: SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI
|
- name: SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-oidc-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret
|
||||||
key: jwt-issuer-uri
|
key: jwt-issuer-uri
|
||||||
- name: UV_SECURITY_OIDC_CLAIM-MAPPERS_GROUP-CLAIM_ENABLED
|
- name: UV_SECURITY_OIDC_CLAIM-MAPPERS_GROUP-CLAIM_ENABLED
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: UV_SECURITY_OIDC_CLAIM-MAPPERS_GROUP-CLAIM_CLAIM-NAME
|
- name: UV_SECURITY_OIDC_CLAIM-MAPPERS_GROUP-CLAIM_CLAIM-NAME
|
||||||
value: "groups"
|
value: "groups"
|
||||||
|
{{- range $value := .Values.urlaubsverwaltung.env }}
|
||||||
|
{{- if $value.value }}
|
||||||
|
- name: {{ $value.name | quote }}
|
||||||
|
value: {{ tpl $value.value $ | quote }}
|
||||||
|
{{- else if $value.valueFrom }}
|
||||||
|
{{- if $value.valueFrom.secretKeyRef }}
|
||||||
|
- name: {{ $value.name }}
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ tpl $value.valueFrom.secretKeyRef.name $ | quote }}
|
||||||
|
key: {{ tpl $value.valueFrom.secretKeyRef.key $ | quote }}
|
||||||
|
{{- else if $value.valueFrom.configMapKeyRef }}
|
||||||
|
- name: {{ $value.name }}
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ tpl $value.valueFrom.configMapKeyRef.name $ | quote }}
|
||||||
|
key: {{ tpl $value.valueFrom.configMapKeyRef.key $ | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
resources:
|
resources:
|
||||||
{{- include "urlaubsverwaltung.resources" .Values.urlaubsverwaltung.resources | nindent 12 }}
|
{{- include "urlaubsverwaltung.resources" .Values.urlaubsverwaltung.resources | nindent 12 }}
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
port: 8080
|
|
||||||
path: /actuator/health/readiness
|
|
||||||
periodSeconds: 5
|
|
||||||
failureThreshold: 3
|
|
||||||
successThreshold: 1
|
|
||||||
timeoutSeconds: 5
|
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
{{- toYaml .Values.urlaubsverwaltung.livenessProbe | nindent 12 }}
|
||||||
port: 8080
|
readinessProbe:
|
||||||
path: /actuator/health/liveness
|
{{- toYaml .Values.urlaubsverwaltung.readinessProbe | nindent 12 }}
|
||||||
periodSeconds: 10
|
|
||||||
failureThreshold: 3
|
|
||||||
successThreshold: 1
|
|
||||||
timeoutSeconds: 5
|
|
||||||
# The startup probe gates liveness/readiness. Spring Boot startup
|
|
||||||
# (JVM + Liquibase migrations) gets a budget of 10s * 30 = 300s.
|
|
||||||
startupProbe:
|
startupProbe:
|
||||||
httpGet:
|
{{- toYaml .Values.urlaubsverwaltung.startupProbe | nindent 12 }}
|
||||||
port: 8080
|
|
||||||
path: /actuator/health/liveness
|
|
||||||
periodSeconds: 10
|
|
||||||
failureThreshold: 30
|
|
||||||
timeoutSeconds: 5
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: tmp
|
- name: tmp
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
|
{{- if .Values.ingress.enabled }}
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-ingress
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: {{ required "A Cluster-Issuer must be provided" .Values.ingress.clusterIssuer}}
|
cert-manager.io/cluster-issuer: {{ required "A Cluster-Issuer must be provided" .Values.ingress.clusterIssuer }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: {{ .Values.ingress.className }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ required "A Domain/Host must be provided" .Values.ingress.domain }}
|
- host: {{ required "A Domain/Host must be provided" .Values.ingress.domain }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- backend:
|
- backend:
|
||||||
service:
|
service:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-service
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-service
|
||||||
port:
|
port:
|
||||||
name: http
|
name: http
|
||||||
path: /
|
path: /
|
||||||
@@ -20,4 +24,5 @@ spec:
|
|||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- {{ required "A Domain/Host must be provided" .Values.ingress.domain }}
|
- {{ required "A Domain/Host must be provided" .Values.ingress.domain }}
|
||||||
secretName: tls-{{ .Chart.Name }}-{{ .Release.Name }}-ingress
|
secretName: tls-{{ .Release.Name }}-{{ .Chart.Name }}-ingress
|
||||||
|
{{- end }}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Chart.Name }}-{{ .Release.Name }}-uv-service
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-service
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: {{ .Chart.Name }}-{{ .Release.Name }}-uv-deployment
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
|
|||||||
@@ -9,8 +9,13 @@ secrets:
|
|||||||
oidcSecretRef: null
|
oidcSecretRef: null
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
|
enabled: true
|
||||||
clusterIssuer: "letsencrypt-issuer"
|
clusterIssuer: "letsencrypt-issuer"
|
||||||
domain: null
|
domain: null
|
||||||
|
className: nginx
|
||||||
|
# Extra annotations for the Ingress; merged with the cert-manager
|
||||||
|
# cluster-issuer annotation the chart always sets.
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
urlaubsverwaltung:
|
urlaubsverwaltung:
|
||||||
# Replica count for this workload; 0 is allowed and scales it down.
|
# Replica count for this workload; 0 is allowed and scales it down.
|
||||||
@@ -31,6 +36,35 @@ urlaubsverwaltung:
|
|||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: 8080
|
||||||
|
path: /actuator/health/liveness
|
||||||
|
periodSeconds: 10
|
||||||
|
failureThreshold: 3
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: 8080
|
||||||
|
path: /actuator/health/readiness
|
||||||
|
periodSeconds: 5
|
||||||
|
failureThreshold: 3
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 5
|
||||||
|
# The startup probe gates liveness/readiness. Spring Boot startup
|
||||||
|
# (JVM + Liquibase migrations) gets a budget of 10s * 30 = 300s.
|
||||||
|
startupProbe:
|
||||||
|
httpGet:
|
||||||
|
port: 8080
|
||||||
|
path: /actuator/health/liveness
|
||||||
|
periodSeconds: 10
|
||||||
|
failureThreshold: 30
|
||||||
|
timeoutSeconds: 5
|
||||||
|
# Extra environment variables, appended to the ones the chart always sets.
|
||||||
|
# Values are rendered through tpl; value, secretKeyRef and configMapKeyRef
|
||||||
|
# forms are supported.
|
||||||
|
env: []
|
||||||
resources:
|
resources:
|
||||||
# Limits are optional: memory and ephemeral-storage limits default to
|
# Limits are optional: memory and ephemeral-storage limits default to
|
||||||
# limitFactor x the request, an explicitly set limit always wins, and a
|
# limitFactor x the request, an explicitly set limit always wins, and a
|
||||||
|
|||||||
Reference in new issue
Block a user