Skip to content

Conversation

@universal-itengineer
Copy link
Member

@universal-itengineer universal-itengineer commented Jan 14, 2026

Description

add static config for deploy nested cluster and configure ci for nightly e2e tests

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

What is the expected result?

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:
type:
summary:

Copy link
Member

@fl64 fl64 left a comment

Choose a reason for hiding this comment

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

I suggest check all the sh scripts via https://www.shellcheck.net and fix all the issues.

@universal-itengineer universal-itengineer force-pushed the feat/ci/nightly-e2e-test-infra branch from d40af14 to 6908b14 Compare January 15, 2026 13:03
@universal-itengineer universal-itengineer force-pushed the feat/ci/nightly-e2e-test-infra branch from 6908b14 to 247ca1f Compare January 15, 2026 16:37
@universal-itengineer universal-itengineer force-pushed the feat/ci/nightly-e2e-test-infra branch from be94996 to 3b8a7c1 Compare January 16, 2026 10:08
Signed-off-by: Nikita Korolev <[email protected]>
Signed-off-by: Nikita Korolev <[email protected]>
@universal-itengineer universal-itengineer force-pushed the feat/ci/nightly-e2e-test-infra branch from 97b4b99 to 1d82a46 Compare January 16, 2026 12:35
required: false
type: string
default: "1.24.5"
default: "1.24.6"
Copy link
Member

Choose a reason for hiding this comment

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

"golang-alt-1.24" base image uses 1.24.11

Copy link
Member Author

Choose a reason for hiding this comment

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

For e2e tests we use golang v1.24.6

Comment on lines 270 to 276
echo "login to master"
echo "os-release master"
d8vssh 'cat /etc/os-release'
echo ""
echo "hostname master"
d8vssh 'hostname'
Copy link
Member

Choose a reason for hiding this comment

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

Why 2 connections?

Suggested change
echo "login to master"
echo "os-release master"
d8vssh 'cat /etc/os-release'
echo ""
echo "hostname master"
d8vssh 'hostname'
echo "Check connection to master"
d8vssh 'echo master os-release: ; cat /etc/os-release; echo master hostname: ; hostname'
echo ""

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Comment on lines 337 to 338
CONFIG=$(cat ${kubeConfigPath} | base64 -w 0)
CONFIG=$(echo $CONFIG | base64 -w 0)
Copy link
Member

Choose a reason for hiding this comment

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

Why 2 commands?

Suggested change
CONFIG=$(cat ${kubeConfigPath} | base64 -w 0)
CONFIG=$(echo $CONFIG | base64 -w 0)
CONFIG=$(cat ${kubeConfigPath} | base64 -w 0 | base64 -w 0)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

echo "[INFO] Kubeconf to github output"
CONFIG=$(cat ${kubeConfigPath} | base64 -w 0)
CONFIG=$(echo $CONFIG | base64 -w 0)
echo "config=$CONFIG" >> $GITHUB_OUTPUT
Copy link
Member

Choose a reason for hiding this comment

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

config seems too broad, may be name it kubeconfig ?

run: |
sudo chown -fR 1001:1001 ${{ env.SETUP_CLUSTER_TYPE_PATH }}
yq e '.deckhouse.registryDockerCfg = "None"' -i ./${{ env.SETUP_CLUSTER_TYPE_PATH }}/values.yaml
yq e 'select(.kind == "InitConfiguration") .deckhouse.registryDockerCfg = "None"' -i ./${{ env.SETUP_CLUSTER_TYPE_PATH }}/tmp/config.yaml || echo "The config.yaml file is not generated, skipping"
Copy link
Member

@diafour diafour Jan 16, 2026

Choose a reason for hiding this comment

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

Is yq expression ok? It seems | is missing after select.

Comment on lines +98 to +100
kubeconfig-content: ${{ steps.generate-kubeconfig.outputs.config }}
storage-type: ${{ steps.vars.outputs.storage_type }}
nested-storageclass-name: ${{ steps.vars.outputs.nested_storageclass_name }}
Copy link
Member

Choose a reason for hiding this comment

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

Please, make steps output names equal to job output names.

echo "[INFO] Show nodes in cluster"
kubectl config get-contexts
# some times kubectl get nodes returns error, so we need to retry
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# some times kubectl get nodes returns error, so we need to retry
# `kubectl get nodes` may return error, so we need to retry.

configure-virtualization:
name: Configure Virtualization (${{ inputs.storage_type }})
runs-on: ubuntu-22.04
Copy link
Member

@diafour diafour Jan 16, 2026

Choose a reason for hiding this comment

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

Workflow has different runs-on values (bootstrap and other configure jobs use ubuntu-latest, this one uses ubuntu-22.04). Why?

STORAGE_CLASS_NAME: ${{ inputs.nested_storageclass_name }}
working-directory: ./test/e2e/
run: |
GINKGO_RESULT=$(mktemp)
Copy link
Member

Choose a reason for hiding this comment

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

There is a temp directory for each run, no need to create one, just use $RUNNER_TEMP

echo vms:
kubectl -n {{ .NAMESPACE }} get vm
echo "Grafana URL https://grafana.{{ .NAMESPACE }}.{{ .DOMAIN }}"
echo "Default user/password [email protected]/{{ .PASSWORD}}"
Copy link
Member

Choose a reason for hiding this comment

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

Seems not secure

kubectl apply -f ${manifest}

DEFAULT_STORAGE_CLASS=nested-thin-r1
kubectl patch mc global --type='json' -p='[{"op": "replace", "path": "/spec/settings/defaultClusterStorageClass", "value": "'"$DEFAULT_STORAGE_CLASS"'"}]'
Copy link
Member

Choose a reason for hiding this comment

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

Also, add all other SC to /spec/settings/allowedStorageClasses array. (StorageClassChange test will fail is defaultClusterStorageClass is set without allowedStorageClasses)

users:
- default
- name: cloud
passwd: $6$rounds=4096$vln/.aPHBOI7BMYR$bBMkqQvuGs5Gyd/1H5DP4m9HjQSy.kgrxpaGEHwkX7KEFV8BS.HZWPitAtZ2Vd8ZqIZRqmlykRCagTgPejt1i.
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to store this password in github secrets?

Signed-off-by: Nikita Korolev <[email protected]>
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.

4 participants