Update createServiceAccount.sh
All checks were successful
Build docker container / Build image (push) Successful in 13s
All checks were successful
Build docker container / Build image (push) Successful in 13s
This commit is contained in:
parent
6e264e8093
commit
452c426df4
@ -1,19 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Extract namespace from values.yaml using yq
|
||||
NAMESPACE=$(yq e '.namespace' values.yaml)
|
||||
|
||||
# Set the ServiceAccount, Role, and RoleBinding names based on the namespace
|
||||
SA_NAME="${NAMESPACE}-cicd"
|
||||
|
||||
# Capture Helm template output directly with dynamic subchartData
|
||||
helm dependency build .
|
||||
HELM_OUTPUT=$(helm template -g --set-json="subchartData=$(yq '.dependencies[0]' Chart.yaml -ojson | jq -rc)" .)
|
||||
|
||||
# Extract unique apiVersion and kind pairs using yq and jq
|
||||
resources=$(echo "$HELM_OUTPUT" | yq -o=json | jq -rc '{apiVersion, kind}' | sort | uniq)
|
||||
|
||||
echo "$resources"
|
||||
|
||||
cat <<EOFFF
|
||||
|
||||
# Step 1: Set kubeconfig
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user