Handle app deployment guardrail suggestions
This commit is contained in:
@@ -17,6 +17,7 @@ check_required kubectl
|
||||
check_required helm
|
||||
check_required sops
|
||||
check_required python3
|
||||
check_required curl
|
||||
|
||||
if command -v kubectl >/dev/null 2>&1; then
|
||||
if kubectl cnpg --help >/dev/null 2>&1; then
|
||||
|
||||
@@ -12,6 +12,7 @@ INTER_HUB_RELEASE="${INTER_HUB_RELEASE:-inter-hub}"
|
||||
INTER_HUB_NAMESPACE="${INTER_HUB_NAMESPACE:-inter-hub}"
|
||||
INTER_HUB_CHART="${INTER_HUB_CHART:-charts/inter-hub}"
|
||||
INTER_HUB_VALUES="${INTER_HUB_VALUES:-helm/inter-hub-values.yaml}"
|
||||
INTER_HUB_IMAGE_TAG="${INTER_HUB_IMAGE_TAG:-}"
|
||||
DRY_RUN_CREATE_NAMESPACES="${DRY_RUN_CREATE_NAMESPACES:-false}"
|
||||
|
||||
for cmd in kubectl helm; do
|
||||
@@ -38,6 +39,10 @@ fi
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
trap 'rm -rf "$tmpdir"' EXIT
|
||||
inter_hub_image_args=()
|
||||
if [[ -n "$INTER_HUB_IMAGE_TAG" ]]; then
|
||||
inter_hub_image_args=(--set "image.tag=$INTER_HUB_IMAGE_TAG")
|
||||
fi
|
||||
|
||||
helm template "$VERGABE_RELEASE" "$VERGABE_CHART" \
|
||||
--namespace "$VERGABE_NAMESPACE" \
|
||||
@@ -47,6 +52,7 @@ helm template "$VERGABE_RELEASE" "$VERGABE_CHART" \
|
||||
helm template "$INTER_HUB_RELEASE" "$INTER_HUB_CHART" \
|
||||
--namespace "$INTER_HUB_NAMESPACE" \
|
||||
-f "$INTER_HUB_VALUES" \
|
||||
"${inter_hub_image_args[@]}" \
|
||||
> "$tmpdir/inter-hub.yaml"
|
||||
|
||||
echo "server dry-run: committed manifests"
|
||||
|
||||
Reference in New Issue
Block a user