Skip to content

fix(ci): generate kube config#2040

Merged
universal-itengineer merged 2 commits into
mainfrom
fix/ci/generate-kube-config
Mar 2, 2026
Merged

fix(ci): generate kube config#2040
universal-itengineer merged 2 commits into
mainfrom
fix/ci/generate-kube-config

Conversation

@universal-itengineer
Copy link
Copy Markdown
Member

@universal-itengineer universal-itengineer commented Mar 2, 2026

Description

Improved test/dvp-static-cluster/scripts/gen-kubeconfig.sh kubeconfig generation flow and error handling.

  • Refactored retry logic to avoid redundant checks of the same kubeconfig and made retries explicit at generation level.
  • Added robust failure handling and clearer exit behavior:
    • strict bash mode (set -Eeuo pipefail)
    • centralized error-exit helper (exit_with_error)
    • signal/error traps with meaningful exit codes and diagnostics

Why do we need it, and what problem does it solve?

Sometimes the token for kubeconfig is generated incorrectly.

users:
- name: nested-sa
  user:
    token: ��e. #<--

What is the expected result?

Kubeconfig generation retries are performed in one place with predictable attempt count and delay.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: ci
type: chore
summary: fix generate kube config

Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
@universal-itengineer universal-itengineer added this to the v1.7.0 milestone Mar 2, 2026
@universal-itengineer universal-itengineer marked this pull request as ready for review March 2, 2026 12:06
@universal-itengineer universal-itengineer merged commit 37aacc5 into main Mar 2, 2026
31 of 33 checks passed
@universal-itengineer universal-itengineer deleted the fix/ci/generate-kube-config branch March 2, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants