Skip to content

Commit

Permalink
Create secrets credentials when generating manifest
Browse files Browse the repository at this point in the history
Signed-off-by: gabriel-farache <[email protected]>
  • Loading branch information
gabriel-farache committed Jul 15, 2024
1 parent adf06d5 commit 4153999
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions create-ocp-project/secrets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTIFICATIONS_BEARER_TOKEN=
1 change: 1 addition & 0 deletions escalation/secrets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTIFICATIONS_BEARER_TOKEN=
1 change: 1 addition & 0 deletions modify-vm-resources/secrets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTIFICATIONS_BEARER_TOKEN=
1 change: 1 addition & 0 deletions move2kube/secrets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTIFICATIONS_BEARER_TOKEN=
1 change: 1 addition & 0 deletions mta-v6.x/secrets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTIFICATIONS_BEARER_TOKEN=
1 change: 1 addition & 0 deletions mta-v7.x/secrets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTIFICATIONS_BEARER_TOKEN=
1 change: 1 addition & 0 deletions mta/secrets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTIFICATIONS_BEARER_TOKEN=
1 change: 1 addition & 0 deletions mtv-migration/secrets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTIFICATIONS_BEARER_TOKEN=
1 change: 1 addition & 0 deletions mtv-plan/secrets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTIFICATIONS_BEARER_TOKEN=
1 change: 1 addition & 0 deletions request-vm-cnv/secrets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTIFICATIONS_BEARER_TOKEN=
13 changes: 13 additions & 0 deletions scripts/gen_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ else
echo "kn cli already available"
fi

if [ ! -f kubectl ]; then
echo "Installing kubectl CLI"
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
else
echo "kubectl cli already available"
fi


cd "${WORKFLOW_ID}" || exit

echo -e "\nquarkus.flyway.migrate-at-start=true" >> application.properties
Expand Down Expand Up @@ -47,6 +56,10 @@ yq --inplace eval '.metadata.annotations["sonataflow.org/profile"] = "prod"' "${
yq --inplace ".spec.podTemplate.container.image=\"quay.io/orchestrator/serverless-workflow-${workflow_id}:latest\"" "${SONATAFLOW_CR}"
yq --inplace ".spec.podTemplate.container.envFrom=[{\"secretRef\": { \"name\": \"${workflow_id}-creds\"}}]" "${SONATAFLOW_CR}"

if test -f "secrets.properties"; then
../kubectl create -n sonataflow-infra secret generic "${workflow_id}-creds" --from-env-file=secrets.properties --dry-run=client -oyaml > "manifests/00-secrets_${workflow_id}.yaml"
fi

if [ "$ENABLE_PERSISTENCE" = false ]; then
exit
fi
Expand Down

0 comments on commit 4153999

Please sign in to comment.