-
Notifications
You must be signed in to change notification settings - Fork 3
chore(ci): add static config for deploy nested cluster and configure ci for nightly e2e tests #1876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
d40af14 to
6908b14
Compare
Signed-off-by: Nikita Korolev <[email protected]>
Signed-off-by: Nikita Korolev <[email protected]>
Signed-off-by: Nikita Korolev <[email protected]>
6908b14 to
247ca1f
Compare
Signed-off-by: Nikita Korolev <[email protected]>
Signed-off-by: Nikita Korolev <[email protected]>
Signed-off-by: Nikita Korolev <[email protected]>
be94996 to
3b8a7c1
Compare
Signed-off-by: Nikita Korolev <[email protected]>
Signed-off-by: Nikita Korolev <[email protected]>
97b4b99 to
1d82a46
Compare
| required: false | ||
| type: string | ||
| default: "1.24.5" | ||
| default: "1.24.6" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
| echo "login to master" | ||
| echo "os-release master" | ||
| d8vssh 'cat /etc/os-release' | ||
| echo "" | ||
| echo "hostname master" | ||
| d8vssh 'hostname' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 2 connections?
| 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 "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| CONFIG=$(cat ${kubeConfigPath} | base64 -w 0) | ||
| CONFIG=$(echo $CONFIG | base64 -w 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 2 commands?
| CONFIG=$(cat ${kubeConfigPath} | base64 -w 0) | |
| CONFIG=$(echo $CONFIG | base64 -w 0) | |
| CONFIG=$(cat ${kubeConfigPath} | base64 -w 0 | base64 -w 0) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
| kubeconfig-content: ${{ steps.generate-kubeconfig.outputs.config }} | ||
| storage-type: ${{ steps.vars.outputs.storage_type }} | ||
| nested-storageclass-name: ${{ steps.vars.outputs.nested_storageclass_name }} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # 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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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}}" |
There was a problem hiding this comment.
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"'"}]' |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
test/dvp-static-cluster/charts/infra/templates/jump-host/deploy.yaml
Outdated
Show resolved
Hide resolved
test/dvp-static-cluster/charts/cluster-config/templates/modules-dvp-base.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: Nikita Korolev <[email protected]>
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
Changelog entries