Add Templates to pretty config
This commit is contained in:
parent
6a3bffceff
commit
bc15214bf0
@ -26,6 +26,7 @@ else
|
|||||||
export SP_CUSTOMER_ID=$(jq -r .[0].object.metadata.namespace $BINDING_CONTEXT_PATH)
|
export SP_CUSTOMER_ID=$(jq -r .[0].object.metadata.namespace $BINDING_CONTEXT_PATH)
|
||||||
export SP_CONFIG_NAME=$(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.yaml"' $BINDING_CONTEXT_PATH | base64 -d | yq '.helm.release')
|
export SP_APPLICATION=$(jq -r '.[0].object.data."values.yaml"' $BINDING_CONTEXT_PATH | base64 -d | yq '.helm.release')
|
||||||
|
export SP_ENVIRONMENT_ID=$(jq -r .[0].object.metadata.labels.environment)
|
||||||
|
|
||||||
flux create source helm $SP_APPLICATION \
|
flux create source helm $SP_APPLICATION \
|
||||||
--namespace=$SP_CUSTOMER_ID \
|
--namespace=$SP_CUSTOMER_ID \
|
||||||
@ -36,7 +37,7 @@ else
|
|||||||
--namespace=$SP_CUSTOMER_ID \
|
--namespace=$SP_CUSTOMER_ID \
|
||||||
--chart=helmrelease \
|
--chart=helmrelease \
|
||||||
--values-from Secret/$SP_CONFIG_NAME \
|
--values-from Secret/$SP_CONFIG_NAME \
|
||||||
--kubeconfig-secret-ref=$SP_CUSTOMER_ID-config \
|
--kubeconfig-secret-ref=$SP_ENVIRONMENT_ID-config \
|
||||||
--target-namespace=default --export \
|
--target-namespace=default --export \
|
||||||
| yq '.spec.storageNamespace="helm-installations"' \
|
| yq '.spec.storageNamespace="helm-installations"' \
|
||||||
| kubectl apply -f -
|
| kubectl apply -f -
|
||||||
|
Loading…
Reference in New Issue
Block a user