Skip to content

Commit

Permalink
fix: keycloak idp.clientID value now generated
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice Faber committed Aug 27, 2021
1 parent fa4fda9 commit cd71691
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cmd/bootstrap.ts
Expand Up @@ -185,9 +185,9 @@ export const bootstrapValues = async (): Promise<void> => {
if (isChart()) {
const vals = await hfValues()

await nothrow($`kubectl create secret generic otomi-passwords --from-literal='admin'='${vals.otomi.adminPassword}'`)
await nothrow($`kubectl create secret generic otomi-password --from-literal='admin'='${vals.otomi.adminPassword}'`)
debug.log(
'A kubernetes secret has been created under the `otomi` namespace called `otomi-password` which contains all the generated passwords.',
'A kubernetes secret has been created in the `default` namespace called `otomi-password` which contains the `otomi.adminPassword`. You should know what to do with it ;)',
)
await mapValuesObjectIntoFiles(values)
}
Expand Down
1 change: 1 addition & 0 deletions values-schema.yaml
Expand Up @@ -1499,6 +1499,7 @@ properties:
type: string
clientID:
type: string
x-secret: '"otomi"'
clientSecret:
type: string
x-secret: 'randAlpha 20'
Expand Down
2 changes: 1 addition & 1 deletion values/gitea/gitea.gotmpl
Expand Up @@ -73,7 +73,7 @@ gitea:
prometheusSelector: system
oauth:
enabled: true
name: {{ $hasKeycloak | ternary $k.idp.alias "otomi" }}
name: {{ $hasKeycloak | ternary ($k | get "idp.alias" "otomi") "otomi" }}
provider: openidConnect
key: {{ $hasKeycloak | ternary $k.idp.clientID $o.clientID }}
secret: {{ $hasKeycloak | ternary $k.idp.clientSecret $o.clientSecret }}
Expand Down
2 changes: 1 addition & 1 deletion values/jobs/keycloak.gotmpl
Expand Up @@ -42,7 +42,7 @@ nativeSecrets:
KEYCLOAK_ADDRESS: https://keycloak.{{ $v.cluster.domainSuffix }}
KEYCLOAK_ADMIN: {{ $k | get "admin.username" "admin" }}
KEYCLOAK_ADMIN_PASSWORD: {{ $k | get "adminPassword" $v.otomi.adminPassword }}
KEYCLOAK_CLIENT_ID: {{ $k | get "idp.clientID" "otomi" }}
KEYCLOAK_CLIENT_ID: {{ $k.idp.clientID }}
KEYCLOAK_CLIENT_SECRET: {{ $k.idp.clientSecret }}
IDP_ALIAS: {{ $k | get "idp.alias" "otomi-idp" }}
IDP_USERNAME_CLAIM_MAPPER: {{ $v | get "oidc.usernameClaimMapper" "${CLAIM.upn}" }}
Expand Down

0 comments on commit cd71691

Please sign in to comment.