-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Most of the code is simplifying/refactoring, but there are few fixes: * increase LB upstream healthcheck interval to 1 minute * pass a logger to the LB (as otherwise it creates its own) * shutdown the LB by waiting for it to shutdown * close the LB even when it fails to start to avoid leaking health check goroutines Additionally, add an integration test for workload proxying. Co-authored-by: Utku Ozdemir <[email protected]> Signed-off-by: Andrey Smirnov <[email protected]> Signed-off-by: Utku Ozdemir <[email protected]>
- Loading branch information
1 parent
a173c8a
commit dcd123d
Showing
13 changed files
with
668 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-07-23T13:55:08Z by kres faf91e3. | ||
# Generated on 2024-08-16T15:47:13Z by kres 7be2a05. | ||
|
||
name: default | ||
concurrency: | ||
|
@@ -596,3 +596,81 @@ jobs: | |
!~/.talos/clusters/**/swtpm.log | ||
retention-days: "5" | ||
continue-on-error: true | ||
e2e-workload-proxy: | ||
runs-on: | ||
- self-hosted | ||
- omni | ||
if: contains(fromJSON(needs.default.outputs.labels), 'integration/e2e') || contains(fromJSON(needs.default.outputs.labels), 'integration/e2e-workload-proxy') | ||
needs: | ||
- default | ||
steps: | ||
- name: gather-system-info | ||
id: system-info | ||
uses: kenchan0130/[email protected] | ||
continue-on-error: true | ||
- name: print-system-info | ||
run: | | ||
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024)) | ||
OUTPUTS=( | ||
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}" | ||
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}" | ||
"Hostname: ${{ steps.system-info.outputs.hostname }}" | ||
"NodeName: ${NODE_NAME}" | ||
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}" | ||
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}" | ||
"Name: ${{ steps.system-info.outputs.name }}" | ||
"Platform: ${{ steps.system-info.outputs.platform }}" | ||
"Release: ${{ steps.system-info.outputs.release }}" | ||
"Total memory: ${MEMORY_GB} GB" | ||
) | ||
for OUTPUT in "${OUTPUTS[@]}";do | ||
echo "${OUTPUT}" | ||
done | ||
continue-on-error: true | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Unshallow | ||
run: | | ||
git fetch --prune --unshallow | ||
- name: Set up Docker Buildx | ||
id: setup-buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver: remote | ||
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234 | ||
timeout-minutes: 10 | ||
- name: Mask secrets | ||
run: | | ||
echo -e "$(sops -d .secrets.yaml | yq -e '.secrets | to_entries[] | "::add-mask::" + .value')" | ||
- name: Set secrets for job | ||
run: | | ||
sops -d .secrets.yaml | yq -e '.secrets | to_entries[] | .key + "=" + .value' >> "$GITHUB_ENV" | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: artifacts | ||
path: _out | ||
- name: Fix artifact permissions | ||
run: | | ||
xargs -a _out/executable-artifacts -I {} chmod +x {} | ||
- name: run-integration-test | ||
env: | ||
INTEGRATION_RUN_E2E_TEST: "false" | ||
INTEGRATION_TEST_ARGS: --test.run CleanState/|WorkloadProxy | ||
RUN_TALEMU_TESTS: "false" | ||
TALEMU_TEST_ARGS: --test.run ImmediateClusterDestruction/|EncryptedCluster/|SinglenodeCluster/|ScaleUpAndDown/|ScaleUpAndDownMachineClassBasedMachineSets/|TalosUpgrades/|KubernetesUpgrades/|MaintenanceDowngrade/|ClusterTemplate/ | ||
WITH_DEBUG: "true" | ||
run: | | ||
sudo -E make run-integration-test | ||
- name: save-talos-logs-artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: talos-logs-e2e-workload-proxy | ||
path: |- | ||
~/.talos/clusters/**/*.log | ||
!~/.talos/clusters/**/swtpm.log | ||
retention-days: "5" | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-08-15T23:44:03Z by kres 7be2a05. | ||
|
||
name: e2e-workload-proxy-cron | ||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
"on": | ||
schedule: | ||
- cron: 30 1 * * * | ||
jobs: | ||
default: | ||
runs-on: | ||
- self-hosted | ||
- omni | ||
steps: | ||
- name: gather-system-info | ||
id: system-info | ||
uses: kenchan0130/[email protected] | ||
continue-on-error: true | ||
- name: print-system-info | ||
run: | | ||
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024)) | ||
OUTPUTS=( | ||
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}" | ||
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}" | ||
"Hostname: ${{ steps.system-info.outputs.hostname }}" | ||
"NodeName: ${NODE_NAME}" | ||
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}" | ||
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}" | ||
"Name: ${{ steps.system-info.outputs.name }}" | ||
"Platform: ${{ steps.system-info.outputs.platform }}" | ||
"Release: ${{ steps.system-info.outputs.release }}" | ||
"Total memory: ${MEMORY_GB} GB" | ||
) | ||
for OUTPUT in "${OUTPUTS[@]}";do | ||
echo "${OUTPUT}" | ||
done | ||
continue-on-error: true | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Unshallow | ||
run: | | ||
git fetch --prune --unshallow | ||
- name: Set up Docker Buildx | ||
id: setup-buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver: remote | ||
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234 | ||
timeout-minutes: 10 | ||
- name: Mask secrets | ||
run: | | ||
echo -e "$(sops -d .secrets.yaml | yq -e '.secrets | to_entries[] | "::add-mask::" + .value')" | ||
- name: Set secrets for job | ||
run: | | ||
sops -d .secrets.yaml | yq -e '.secrets | to_entries[] | .key + "=" + .value' >> "$GITHUB_ENV" | ||
- name: run-integration-test | ||
env: | ||
INTEGRATION_RUN_E2E_TEST: "false" | ||
INTEGRATION_TEST_ARGS: --test.run CleanState/|WorkloadProxy | ||
RUN_TALEMU_TESTS: "false" | ||
TALEMU_TEST_ARGS: --test.run ImmediateClusterDestruction/|EncryptedCluster/|SinglenodeCluster/|ScaleUpAndDown/|ScaleUpAndDownMachineClassBasedMachineSets/|TalosUpgrades/|KubernetesUpgrades/|MaintenanceDowngrade/|ClusterTemplate/ | ||
WITH_DEBUG: "true" | ||
run: | | ||
sudo -E make run-integration-test | ||
- name: save-talos-logs-artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: talos-logs | ||
path: |- | ||
~/.talos/clusters/**/*.log | ||
!~/.talos/clusters/**/swtpm.log | ||
retention-days: "5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.