Commit 338f4b69 authored by walkafwalka's avatar walkafwalka

Changed AutoDevops function k8s_prefixed_variables to temp file

parent 1b3c6e0e
...@@ -611,22 +611,16 @@ rollout 100%: ...@@ -611,22 +611,16 @@ rollout 100%:
track="${1-stable}" track="${1-stable}"
export APPLICATION_SECRET_NAME=$(application_secret_name "$track") export APPLICATION_SECRET_NAME=$(application_secret_name "$track")
bash -c ' env | sed -n "s/^K8S_SECRET_\(.*\)$/\1/p" > k8s_prefixed_variables
function k8s_prefixed_variables() {
env | sed -n "s/^K8S_SECRET_\(.*\)$/\1/p" kubectl create secret \
} -n "$KUBE_NAMESPACE" generic "$APPLICATION_SECRET_NAME" \
--from-env-file k8s_prefixed_variables -o yaml --dry-run |
kubectl create secret \ kubectl replace -n "$KUBE_NAMESPACE" --force -f -
-n "$KUBE_NAMESPACE" generic "$APPLICATION_SECRET_NAME" \
--from-env-file <(k8s_prefixed_variables) -o yaml --dry-run | export APPLICATION_SECRET_CHECKSUM=$(cat k8s_prefixed_variables | sha256sum | cut -d ' ' -f 1)
kubectl replace -n "$KUBE_NAMESPACE" --force -f -
' rm k8s_prefixed_variables
function k8s_prefixed_variables() {
env | sed -n "s/^K8S_SECRET_\(.*\)$/\1/p"
}
APPLICATION_SECRET_CHECKSUM=$(k8s_prefixed_variables | sha256sum | cut -d ' ' -f 1)
} }
function deploy_name() { function deploy_name() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment