Add Templates to pretty config
This commit is contained in:
parent
65bc5a070b
commit
b3089c3415
@ -24,7 +24,7 @@ EOF
|
||||
else
|
||||
export $(jq -r .[0].object.data.vars $BINDING_CONTEXT_PATH)
|
||||
export SP_CUSTOMER_ID=$(jq -r .[0].object.metadata.namespace $BINDING_CONTEXT_PATH)
|
||||
export SP_ENVIRONMENT=$(jq -r .[0].object.metadata.name $BINDING_CONTEXT_PATH)
|
||||
export SP_CONFIG_NAME=$(jq -r .[0].object.metadata.name $BINDING_CONTEXT_PATH)
|
||||
export SP_APPLICATION=$(jq -r .[0].object.data.values $BINDING_CONTEXT_PATH | base64 -d | yq '.helm.release')
|
||||
|
||||
flux create source helm $SP_APPLICATION \
|
||||
@ -35,12 +35,12 @@ else
|
||||
--source=HelmRepository/$SP_APPLICATION \
|
||||
--namespace=$SP_CUSTOMER_ID \
|
||||
--chart=helmrelease \
|
||||
--values-from Secret/$SP_APPLICATION \
|
||||
--values-from Secret/$SP_CONFIG_NAME \
|
||||
--kubeconfig-secret-ref=$SP_CUSTOMER_ID-config \
|
||||
--target-namespace=default --export \
|
||||
| yq '.spec.storageNamespace="helm-installations"' \
|
||||
| kubectl create -f -
|
||||
flux reconcile helmrelease --namespace=$SP_ACCOUNT $SP_APPLICATION
|
||||
flux reconcile helmrelease --namespace=$SP_CUSTOMER_ID $SP_APPLICATION
|
||||
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user