Skip to content

refactor(ci): workflows nested cluster#2414

Open
universal-itengineer wants to merge 24 commits into
mainfrom
refactor/ci/workflows-nested-cluster
Open

refactor(ci): workflows nested cluster#2414
universal-itengineer wants to merge 24 commits into
mainfrom
refactor/ci/workflows-nested-cluster

Conversation

@universal-itengineer
Copy link
Copy Markdown
Member

@universal-itengineer universal-itengineer commented May 28, 2026

Description

Refactors the nested-cluster E2E CI workflows and supporting automation.

This PR replaces large inline workflow shell blocks with versioned scripts under .github/scripts/bash/e2e, adds reusable composite actions for common setup, registry login, kubeconfig, run ID, and encrypted artifact handling, and splits the previous monolithic E2E workflows into dedicated nightly and release-oriented reusable pipelines.

It also adds lint gates for GitHub Actions and shell scripts, moves repeated E2E CI logic into task/script entrypoints, and unifies static cluster values rendering through a shared test/dvp-static-cluster/values.yaml.tmpl plus .github/scripts/bash/e2e/render-dvp-static-values.sh. Nightly and release flows now pass runtime differences through environment/input values such as ENABLED_MODULES and cluster_config_additional_disk_size.

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

The old nested-cluster E2E workflows mixed orchestration with long inline shell logic. That made changes difficult to review, duplicated release and nightly behavior, and left important CI code paths without direct lint coverage.

Moving operational logic into tracked scripts and composite actions makes the pipelines easier to maintain and reuse. The shared values template also removes drift between nightly and release cluster configuration while keeping release-specific settings explicit through workflow inputs.

What is the expected result?

Nested-cluster nightly and release E2E jobs continue to provision prerequisites, render static cluster values, configure storage and virtualization, run tests, collect encrypted artifacts, and clean up resources through the refactored workflows.

Validation for these changes is available with:

  • task lint:shellcheck
  • task lint:actionlint
  • task e2e:e2e:ci from the repository root
  • task e2e:ci inside test/e2e

Checklist

  • The code is covered by unit tests. Not applicable: this is CI workflow and scripting refactoring.
  • e2e tests passed.
  • Documentation updated according to the changes. Composite action README files were added.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: ci
type: chore
summary: Refactor nested-cluster E2E workflows into reusable pipelines, scripts, and composite actions.
impact_level: low

Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Move large nightly E2E shell blocks into reusable scripts so the workflow stays focused on orchestration and the scripts can be shellchecked directly.

Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
@universal-itengineer universal-itengineer force-pushed the refactor/ci/workflows-nested-cluster branch from 48cb015 to 39fbd69 Compare June 1, 2026 19:09
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Migrate the release pipeline Generate values.yaml step onto the shared
render-dvp-static-values.sh and unify nightly/release into a single
values.yaml.tmpl. The only previous difference (enabledModules: [console])
is now driven by the ENABLED_MODULES env var rendered as
"enabledModules: [${ENABLED_MODULES}]" (empty for nightly, which the
cluster-config chart treats as no enabled modules via default (list)).

Secrets and BOOTSTRAP_DEV_PROXY now flow through step env instead of
inline shell, two duplicate checkout steps are removed, and the worker
additionalDisks size becomes a workflow_call input
(cluster_config_additional_disk_size) flowing through ADDITIONAL_DISK_SIZE
(50Gi nightly, 250Gi release).

Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
@universal-itengineer universal-itengineer force-pushed the refactor/ci/workflows-nested-cluster branch from bb7b023 to 6b39c04 Compare June 2, 2026 07:30
Derive the envsubst whitelist from the template so it can no longer drift
from the placeholders actually used, decode the dev registry docker config
once and select the first auth entry explicitly, and write both discovered
registry values in a single yq invocation.

Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
@universal-itengineer universal-itengineer marked this pull request as ready for review June 2, 2026 10:09
@universal-itengineer universal-itengineer added this to the v1.9.0 milestone Jun 2, 2026
Comment on lines +24 to +26
echo "::add-mask::$USERNAME"
echo "::add-mask::$PASSWORD"
echo "$PASSWORD" | docker login "$REGISTRY" --username "$USERNAME" --password-stdin
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to test this

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The masking + login is correct by GitHub's docs:

  • The decoded username/password are freshly derived strings, so they aren't auto-masked — the explicit ::add-mask:: (lines 24-25) is required and is placed before the only command that uses them (docker login).
  • --password-stdin keeps the password out of the process args.
  • Steps run as bash --noprofile --norc -eo pipefail, so a broken base64 / missing auth will fail the step.

Masking with ::add-mask:: (manually masking values derived at runtime, like the decoded username/password):
- https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#masking-a-value-in-a-log
Note that auto-masking applies only to registered secrets: https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#about-secrets

Default bash shell flags -eo pipefail (and --noprofile --norc):
- https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsshell (see the "bash" row in the default-shell table / exit-code handling)

Comment thread .github/scripts/bash/e2e/configure-virtualization.sh Outdated
Comment thread .github/workflows/e2e-test-releases-reusable-pipeline.yml Outdated
Comment thread test/e2e/Taskfile.yaml Outdated
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Remove the unused task_run_ci.sh entrypoint together with its run:ci
task, and rename the actual GitHub Actions e2e task from e2e:ci to
run:ci so it groups with run/runp and avoids the e2e:e2e: stutter when
invoked from the repo root. Update the workflow invocation accordingly.

Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Drop duplicated require_env calls, scope phase-specific env validation
to each case branch, and replace the set +e/-e block around ginkgo with
a single exit-code capture. Add comments explaining the indirect env
read helper and the cd into the test/e2e Go module.

Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
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.

2 participants