Skip to content

Commit

Permalink
cleanup dex config in profile and move common config to parent values…
Browse files Browse the repository at this point in the history
….yaml
  • Loading branch information
dejanzele committed Sep 13, 2024
1 parent 46fbf1d commit 7d3bbb4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 29 deletions.
25 changes: 2 additions & 23 deletions charts/testkube-enterprise/profiles/values.demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,34 +100,13 @@ dex:
enabled: true
configTemplate:
customConfig: ""
base: |
logger:
level: debug
format: json
web:
http: 0.0.0.0:5556
expiry:
deviceRequests: "5m"
signingKeys: "6h"
idTokens: "24h"
refreshTokens:
disableRotation: false
reuseInterval: "3s"
validIfNotUsedFor: "2160h" # 90 days
absoluteLifetime: "3960h" # 165 days
oauth2:
responseTypes: ["code"]
skipApprovalScreen: true
alwaysShowLoginScreen: false
passwordConnector: local
additionalStaticClients: []
additionalConfig: |
staticClients:
additionalStaticClients:
- id: testkube-enterprise
redirectURIs:
- http://localhost:8090/auth/callback
name: Testkube
secret: QWkVzs3nct6HZM5hxsPzwaZtq
additionalConfig: |
enablePasswordDB: true
staticPasswords:
- email: "admin@example.com"
Expand Down
12 changes: 6 additions & 6 deletions charts/testkube-enterprise/templates/dex-config-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ stringData:
config.yaml: |-
{{- .Values.dex.configTemplate.base | nindent 4 }}
storage:
{{- if .Values.dex.storage }}
{{- toYaml .Values.dex.storage | nindent 6 }}
{{- with .Values.dex.storage }}
{{- toYaml . | nindent 6 }}
{{- else }}
type: kubernetes
config:
Expand All @@ -34,11 +34,11 @@ stringData:
secret: '{{ $api.api.oauth.clientSecret }}'
redirectURIs:
- '{{ if .Values.global.domain }}https://{{ .Values.global.restApiSubdomain }}.{{ .Values.global.domain }}/auth/callback{{ else }}http://localhost:8090/auth/callback{{ end }}'
{{- if .Values.dex.configTemplate.additionalStaticClients }}
{{- toYaml .Values.dex.configTemplate.additionalStaticClients | nindent 6 }}
{{- with .Values.dex.configTemplate.additionalStaticClients }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.dex.configTemplate.additionalConfig }}
{{ .Values.dex.configTemplate.additionalConfig | nindent 4 }}
{{- with .Values.dex.configTemplate.additionalConfig }}
{{ . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/testkube-enterprise/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,22 @@ dex:
logger:
level: debug
format: json
web:
http: 0.0.0.0:5556
expiry:
deviceRequests: "5m"
signingKeys: "6h"
idTokens: "24h"
refreshTokens:
disableRotation: false
reuseInterval: "3s"
validIfNotUsedFor: "2160h" # 90 days
absoluteLifetime: "3960h" # 165 days
oauth2:
responseTypes: ["code"]
skipApprovalScreen: true
alwaysShowLoginScreen: false
passwordConnector: local
# -- Additional static clients which will be appended to the dex staticClients config
additionalStaticClients: []
# - id: testkube-cloud-local
Expand Down

0 comments on commit 7d3bbb4

Please sign in to comment.