Skip to content

Commit d08f6ec

Browse files
committed
feat: updated kc operator chart and gitea config
1 parent 98d8bfe commit d08f6ec

File tree

5 files changed

+30
-8
lines changed

5 files changed

+30
-8
lines changed

charts/apl-keycloak-operator/templates/deployment.yaml

+20-5
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,34 @@ spec:
3131
{{- toYaml .Values.securityContext | nindent 12 }}
3232
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
3333
imagePullPolicy: {{ .Values.image.pullPolicy }}
34+
35+
command:
3436
{{- if (not (empty .Values.configs.tls.certificates)) }}
35-
command: ['/bin/sh', '-c']
36-
args: ['export NODE_EXTRA_CA_CERTS=/app/config/tls/certificate.crt && npm run operator:keycloak']
37+
- '/bin/sh'
38+
- '-c'
39+
{{- else }}
40+
- 'npm'
41+
- 'run'
42+
- 'operator:keycloak'
43+
{{- end }}
44+
args:
45+
{{- if (not (empty .Values.configs.tls.certificates)) }}
46+
- 'export NODE_EXTRA_CA_CERTS=/app/config/tls/certificate.crt'
47+
- '&&'
48+
- 'npm run operator:keycloak'
49+
{{- end }}
3750
env:
51+
{{- if (not (empty .Values.configs.tls.certificates)) }}
3852
- name: NODE_EXTRA_CA_CERTS
3953
value: "/app/config/tls/certificate.crt"
40-
{{- else }}
41-
command: ['npm', 'run', 'operator:keycloak']
54+
{{- end }}
55+
{{- with .Values.extraEnv }}
56+
{{- toYaml . | nindent 12 }}
4257
{{- end }}
4358
resources:
4459
{{- toYaml .Values.resources | nindent 12 }}
45-
{{- if (not (empty .Values.configs.tls.certificates)) }}
4660
volumeMounts:
61+
{{- if (not (empty .Values.configs.tls.certificates)) }}
4762
- name: tls-certs
4863
mountPath: /app/config/tls/certificate.crt
4964
subPath: certificate.crt

charts/apl-keycloak-operator/values.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ configs:
4040
tls:
4141
certificates: {}
4242

43+
extraEnv: []
44+
4345
resources: {}
4446
# We usually recommend not to specify default resources and to leave this as a conscious
4547
# choice for the user. This also increases chances charts run on environments with little

helmfile.d/snippets/defaults.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,10 @@ environments:
946946
memory: 1Gi
947947
_rawValues: {}
948948
apl-keycloak-operator:
949+
extraEnv:
950+
- name: KEYCLOAK_TOKEN_TTL
951+
value: "1h"
952+
-
949953
resources:
950954
operator:
951955
requests:

values/gitea/gitea.gotmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ gitea:
102102
COOKIE_SECURE: true
103103
DOMAIN: {{ $giteaDomain }}
104104
PROVIDER: memory
105-
GC_INTERVAL_TIME: 3600
106-
SESSION_LIFE_TIME: 3600
105+
GC_INTERVAL_TIME: 900
106+
SESSION_LIFE_TIME: 1800
107107
webhook:
108108
ALLOWED_HOST_LIST: "*"
109109
server:

values/oauth2-proxy/oauth2-proxy.gotmpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ extraArgs:
5555
- --cookie-secure=true
5656
# - # cookie-httponly=true
5757
- --reverse-proxy=true
58-
- --cookie-refresh=0h1m0s # set to the same as keycloak realm's accessCodeLifespan
58+
- --cookie-refresh=1m # set to the same as keycloak realm's accessCodeLifespan
59+
- --cookie-expire=3m
5960
- --pass-authorization-header=true
6061
# - # pass-basic-auth=true
6162
- --skip-auth-regex='/manifest.json'

0 commit comments

Comments
 (0)