Skip to content

Commit 01091c4

Browse files
author
Andreas Mautsch
committed
secrets
1 parent f5a13cf commit 01091c4

File tree

2 files changed

+14
-0
lines changed
  • helm/example
    • quarkus/callee-service/application
    • spring/person-service/application

2 files changed

+14
-0
lines changed

helm/example/quarkus/callee-service/application/stack

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ IMAGE_ARCH=$2
55
[[ `kubectl get configmaps authentication-config --ignore-not-found -o jsonpath='{.data.authentication}' -n default` = "oidc" ]] && INGRESS_AUTHENTICATION="--set ingress.authentication=oidc"
66

77
function up() {
8+
kubectl create secret generic postgresql-secret -n example \
9+
--from-literal=spring.datasource.username=main \
10+
--from-literal=spring.datasource.password=postgres \
11+
--from-literal=quarkus.datasource.username=main \
12+
--from-literal=quarkus.datasource.password=postgres
13+
814
helm install --create-namespace \
915
--set image.arch=$IMAGE_ARCH $INGRESS_AUTHENTICATION \
1016
--set ingress.hosts=`kubectl get configmaps cluster-config -o jsonpath='{.data.hostname}' -n default` \
@@ -15,6 +21,7 @@ function up() {
1521
}
1622

1723
function down() {
24+
kubectl delete secret generic postgresql-secret -n example
1825
helm uninstall \
1926
--namespace `pwd | rev | cut -d '/' -f4 | rev` \
2027
`cat ./Chart.yaml | grep "name" | cut -d':' -f2 | xargs`

helm/example/spring/person-service/application/stack

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ IMAGE_ARCH=$2
55
[[ `kubectl get configmaps authentication-config --ignore-not-found -o jsonpath='{.data.authentication}' -n default` = "oidc" ]] && INGRESS_AUTHENTICATION="--set ingress.authentication=oidc"
66

77
function up() {
8+
kubectl create secret generic postgresql-secret -n example \
9+
--from-literal=spring.datasource.username=main \
10+
--from-literal=spring.datasource.password=postgres \
11+
--from-literal=quarkus.datasource.username=main \
12+
--from-literal=quarkus.datasource.password=postgres
13+
814
helm install --create-namespace \
915
--set image.arch=$IMAGE_ARCH $INGRESS_AUTHENTICATION \
1016
--set ingress.hosts=`kubectl get configmaps cluster-config -o jsonpath='{.data.hostname}' -n default` \
@@ -15,6 +21,7 @@ function up() {
1521
}
1622

1723
function down() {
24+
kubectl delete secret generic postgresql-secret -n example
1825
helm uninstall \
1926
--namespace `pwd | rev | cut -d '/' -f4 | rev` \
2027
`cat ./Chart.yaml | grep "name" | cut -d':' -f2 | xargs`

0 commit comments

Comments
 (0)