From afe61a5944a90a8b52fad80d3ee91d5b2c49a456 Mon Sep 17 00:00:00 2001 From: Kochetkov S Date: Wed, 28 Oct 2026 15:47:31 +0300 Subject: [PATCH] ++ stand kafka plaintext and plan mode --- .gitea/workflows/contract.yml | 15 ++++++++++++++- environments/stand/infrastructure.yaml | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/contract.yml b/.gitea/workflows/contract.yml index ef2bb55..a266b01 100644 --- a/.gitea/workflows/contract.yml +++ b/.gitea/workflows/contract.yml @@ -8,6 +8,7 @@ on: env: INFRA_ENV: ${{ vars.INFRA_ENV }} STACKS: ${{ vars.STACKS }} + TF_MODE: ${{ vars.TF_MODE }} PG_ADMIN_HOST: ${{ vars.PG_ADMIN_HOST }} PG_ADMIN_PORT: ${{ vars.PG_ADMIN_PORT }} PG_ADMIN_USER: ${{ vars.PG_ADMIN_USER }} @@ -95,9 +96,21 @@ jobs: [ -f "$base/$u/terragrunt.hcl" ] && units="$units $u" done echo "units:$units" + changed="" for u in $units; do echo "::group::$u" - (cd "$base/$u" && terragrunt run -- apply -auto-approve -input=false) + if [ "${TF_MODE:-apply}" = "plan" ]; then + rc=0 + (cd "$base/$u" && terragrunt run -- plan -detailed-exitcode -input=false -lock=false) || rc=$? + [ "$rc" -eq 2 ] && changed="$changed $u" + [ "$rc" -ne 0 ] && [ "$rc" -ne 2 ] && exit "$rc" + else + (cd "$base/$u" && terragrunt run -- apply -auto-approve -input=false) + fi echo "::endgroup::" done + if [ -n "$changed" ]; then + echo "plan has changes in:$changed" + exit 2 + fi rm -f /tmp/infra-secret-values.yaml diff --git a/environments/stand/infrastructure.yaml b/environments/stand/infrastructure.yaml index c8c0955..d020b38 100644 --- a/environments/stand/infrastructure.yaml +++ b/environments/stand/infrastructure.yaml @@ -4,8 +4,8 @@ kafka_cluster_refs: host: kafka-kafka-contour.kafka.svc.cluster.local port: 9092 sasl_mechanism: SCRAM-SHA-512 - security_protocol: SASL_SSL - tls_enabled: true + security_protocol: SASL_PLAINTEXT + tls_enabled: false default_partitions: 3 default_replication_factor: 1 max_replication_factor: 1