-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds template to determine database and keycloak secret name
- Loading branch information
Showing
11 changed files
with
86 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
name: shogun-common | ||
description: Common utils for SHOGun helm | ||
type: library | ||
version: 0.0.1 | ||
appVersion: 0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{/* | ||
Create the name of the database host to use | ||
*/}} | ||
{{- define "shogun-common.database.host" -}} | ||
{{- $name := default "postgis" .Values.postgres.host }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{- define "shogun-common.database.shogun.credentialsSecret" -}} | ||
{{- $name := default "postgis-shogun-credentials" .Values.postgres.credentialsSecret }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{- define "shogun-common.database.shogun.credentialsSecretKeyPassword" -}} | ||
{{- $name := default "shogun-password" .Values.postgres.credentialsSecretKeyPassword }} | ||
{{- printf "%s" $name }} | ||
{{- end }} |
19 changes: 19 additions & 0 deletions
19
charts/shogun/charts/shogun-common/templates/_keycloak.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- define "shogun-common.keycloak.credentialsSecret" -}} | ||
{{- $name := default "keycloak" .Values.keycloak.passwordSecret }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{- define "shogun-common.keycloak.credentialsSecretKeyPassword" -}} | ||
{{- $name := default "admin-password" .Values.keycloak.secretKeyPassword }} | ||
{{- printf "%s" $name }} | ||
{{- end }} | ||
|
||
{{- define "shogun-common.keycloak.postgis.credentialsSecret" -}} | ||
{{- $name := default "postgis-keycloak-credentials" .Values.keycloak.externalDatabase.existingSecret }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{- define "shogun-common.keycloak.postgis.credentialsSecretKeyPassword" -}} | ||
{{- $name := default "custom-user-password" .Values.keycloak.externalDatabase.existingSecretPasswordKey }} | ||
{{- printf "%s" $name }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Default values for shogun-common. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters