Skip to content

Commit f5bdb81

Browse files
sgalsalehlaveryaemosbaugh
authored
V2 upgrades without manager (#1757)
* V2 upgrades without manager * overrides for ha migration * fix build * clean error message when upgrading addons and extensions * include logs in support bundle * record upgrade failures * run all v1 install tests in v2 (#1775) * remove TestInstallWithoutEmbed * use new install * check postupgrade override labels * fix extension upgrade messages * further improve wording * fix nil map issue when upgrading operator * f * Update pkg/extensions/upgrade.go * Update pkg/extensions/upgrade.go --------- Co-authored-by: Salah Al Saleh <[email protected]> * yaml v3 * handle panics * use slog * replace join with join2 (#1780) * fix build * fix ha join * fix lint (#1781) * add comments to ignore deprecated BuiltinConfigs field * fix linting * mount charts dir * feat(v2): enable v2 restore (#1776) * fix upgrades * fix TestLocalArtifactMirror and TestCommandsRequireSudo (#1782) * chore: no spinner if no terminal (#1778) * fix panic in TestHostPreflightCustomSpec * fix compile * require license for install2 * f * f * use single-node-install.sh in LAM e2e test * improve sudo test logging * ??? * see if it's just one thing failing in sudo test * use join2 command in 'node join'. Hide 'node' commands * improve how we are requiring the license flag for installation --------- Co-authored-by: Ethan Mosbaugh <[email protected]> * chore(ci): fix TestGetInstallation migrate data dirs (#1786) * feat(v2): fix e2e TestVersion (#1784) * feat(v2): fix e2e TestVersion * f * f * fix operator upgrade in airgap * fix velero airgap upgrades * fix airgap upgrades * chore(v2): e2e test multiple upgrades (#1783) * chore(v2): e2e test multiple upgrades * f * f * f * f * f * f * f * remove use of ecUpgrade2TargetVersion * f * f * f * f * f * f * f * f * f * f * f * f * f * f * f * f * f --------- Co-authored-by: Andrew Lavery <[email protected]> * fix TestHostPreflightCustomSpec and TestUnsupportedOverrides (#1787) * create an app release to test unsupported overrides with * f * simplify unsupported overrides test * update TestHostPreflightCustomSpec to use real releases * f * disable old installations * better logging * remove operator/pkg/charts as it is now unused (#1795) * remove operator/pkg/charts as it is now unused * run the operator even when the version does not match * add unit tests * feat(v2): support for restore (#1794) * feat(v2): support for restore * feat(v2): support for restore * feat(v2): support for restore * f * f * f * check chart contents directly instead of using k0s chart object (#1798) * check chart contents directly instead of using k0s chart object * simplify by no longer checking chart values, just results * feat(v2): restore ha (#1797) * feat(v2): restore ha * f * f * f * Fix dryrun tests (#1800) * disable TestOldVersionUpgrade test * feat(v2): fix extensions apply (#1799) * fix validate-success --------- Co-authored-by: Andrew Lavery <[email protected]> Co-authored-by: Ethan Mosbaugh <[email protected]>
1 parent 381a48e commit f5bdb81

File tree

210 files changed

+5864
-9021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

210 files changed

+5864
-9021
lines changed

.github/workflows/ci.yaml

Lines changed: 25 additions & 271 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ jobs:
6464
runs-on: ubuntu-latest
6565
needs:
6666
- int-tests-kind
67-
- int-tests-manager
6867
steps:
6968
- name: Succeed if all tests passed
7069
run: echo "Integration tests succeeded"
@@ -89,21 +88,6 @@ jobs:
8988
run: |
9089
make -C tests/integration test-kind
9190
92-
int-tests-manager:
93-
name: Integration tests (manager)
94-
runs-on: ubuntu-latest
95-
steps:
96-
- name: Checkout
97-
uses: actions/checkout@v4
98-
- name: Setup go
99-
uses: actions/setup-go@v5
100-
with:
101-
go-version-file: go.mod
102-
cache-dependency-path: "**/*.sum"
103-
- name: Run tests
104-
run: |
105-
make -C tests/integration test-manager
106-
10791
dryrun-tests:
10892
name: Dryrun tests
10993
runs-on: ubuntu-latest
@@ -587,6 +571,24 @@ jobs:
587571
export APP_VERSION="appver-${SHORT_SHA}"
588572
export RELEASE_YAML_DIR=e2e/kots-release-install
589573
./scripts/ci-release-app.sh
574+
575+
# then install a version with alternate unsupported overrides
576+
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')"
577+
export APP_VERSION="appver-${SHORT_SHA}-unsupported-overrides"
578+
export RELEASE_YAML_DIR=e2e/kots-release-unsupported-overrides
579+
./scripts/ci-release-app.sh
580+
581+
# then install a version with additional failing host preflights
582+
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')"
583+
export APP_VERSION="appver-${SHORT_SHA}-failing-preflights"
584+
export RELEASE_YAML_DIR=e2e/kots-release-install-failing-preflights
585+
./scripts/ci-release-app.sh
586+
587+
# then install a version with additional warning host preflights
588+
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')"
589+
export APP_VERSION="appver-${SHORT_SHA}-warning-preflights"
590+
export RELEASE_YAML_DIR=e2e/kots-release-install-warning-preflights
591+
./scripts/ci-release-app.sh
590592
591593
# promote a release with improved dr support
592594
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-legacydr"
@@ -640,6 +642,12 @@ jobs:
640642
export RELEASE_YAML_DIR=e2e/kots-release-install-legacydr
641643
./scripts/ci-release-app.sh
642644
645+
# then a noop upgrade
646+
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')"
647+
export APP_VERSION="appver-${SHORT_SHA}-noop"
648+
export RELEASE_YAML_DIR=e2e/kots-release-install
649+
./scripts/ci-release-app.sh
650+
643651
# and finally an app upgrade
644652
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-upgrade"
645653
export APP_VERSION="appver-${SHORT_SHA}-upgrade"
@@ -701,10 +709,9 @@ jobs:
701709
- TestSingleNodeUpgradePreviousStable
702710
- TestInstallFromReplicatedApp
703711
- TestUpgradeFromReplicatedApp
704-
- TestInstallWithoutEmbed
705712
- TestUpgradeEC18FromReplicatedApp
706713
- TestResetAndReinstall
707-
- TestOldVersionUpgrade
714+
# - TestOldVersionUpgrade
708715
- TestInstallSnapshotFromReplicatedApp
709716
- TestMultiNodeInstallation
710717
- TestMultiNodeHAInstallation
@@ -885,243 +892,6 @@ jobs:
885892
k0s-version-previous-stable: ${{ needs.find-previous-stable.outputs.k0s_version }}
886893
version-specifier: ${{ needs.export-version-specifier.outputs.version_specifier }}
887894

888-
889-
# e2e-docker-install2 runs the e2e tests inside a docker container rather than a full VM
890-
e2e-docker-install2:
891-
name: E2E Docker (install2)
892-
runs-on: ubuntu-latest
893-
needs:
894-
- git-sha
895-
- build-current
896-
- build-legacydr
897-
- build-previous-k0s
898-
- build-upgrade
899-
- find-previous-stable
900-
- release-app
901-
- export-version-specifier
902-
strategy:
903-
fail-fast: false
904-
matrix:
905-
test:
906-
- TestSingleNodeInstall2UpgradeUbuntuJammy
907-
- TestSingleNodeInstall2UpgradeAlmaLinux8
908-
- TestSingleNodeInstall2UpgradeDebian11
909-
- TestSingleNodeInstall2UpgradeDebian12
910-
steps:
911-
- name: Checkout
912-
uses: actions/checkout@v4
913-
- name: Download binary
914-
uses: actions/download-artifact@v4
915-
with:
916-
name: current-release
917-
path: output/bin
918-
- name: Download new DR binary
919-
uses: actions/download-artifact@v4
920-
with:
921-
name: legacydr-release
922-
path: output/bin
923-
- name: Setup go
924-
uses: actions/setup-go@v5
925-
with:
926-
go-version-file: go.mod
927-
cache-dependency-path: "**/*.sum"
928-
- name: Login to DockerHub to avoid rate limiting
929-
uses: docker/login-action@v3
930-
with:
931-
username: ${{ secrets.DOCKERHUB_USER }}
932-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
933-
- name: Free up runner disk space
934-
uses: ./.github/actions/free-disk-space
935-
- name: Write license files
936-
run: |
937-
echo "${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE }}" | base64 --decode > e2e/license.yaml
938-
echo "${{ secrets.STAGING_EMBEDDED_CLUSTER_SNAPSHOT_LICENSE }}" | base64 --decode > e2e/snapshot-license.yaml
939-
- name: Run test
940-
env:
941-
SHORT_SHA: dev-${{ needs.git-sha.outputs.git_sha }}
942-
LICENSE_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE_ID }}
943-
AIRGAP_LICENSE_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_AIRGAP_LICENSE_ID }}
944-
SNAPSHOT_LICENSE_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_SNAPSHOT_LICENSE_ID }}
945-
AIRGAP_SNAPSHOT_LICENSE_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_AIRGAP_SNAPSHOT_LICENSE_ID }}
946-
DR_AWS_S3_ENDPOINT: https://s3.amazonaws.com
947-
DR_AWS_S3_REGION: us-east-1
948-
DR_AWS_S3_BUCKET: kots-testim-snapshots
949-
DR_AWS_S3_PREFIX: ${{ matrix.test }}-${{ github.run_id }}-${{ github.run_attempt }}
950-
DR_AWS_S3_PREFIX_AIRGAP: ${{ matrix.test }}-${{ github.run_id }}-${{ github.run_attempt }}-airgap
951-
DR_AWS_ACCESS_KEY_ID: ${{ secrets.TESTIM_AWS_ACCESS_KEY_ID }}
952-
DR_AWS_SECRET_ACCESS_KEY: ${{ secrets.TESTIM_AWS_SECRET_ACCESS_KEY }}
953-
EXPECT_K0S_VERSION: ${{ needs.build-current.outputs.k0s_version }}
954-
EXPECT_K0S_VERSION_PREVIOUS: ${{ needs.build-previous-k0s.outputs.k0s_version }}
955-
EXPECT_K0S_VERSION_PREVIOUS_STABLE: ${{ needs.find-previous-stable.outputs.k0s_version }}
956-
run: |
957-
make e2e-test TEST_NAME=${{ matrix.test }}
958-
- name: Troubleshoot
959-
if: ${{ !cancelled() }}
960-
uses: ./.github/actions/e2e-troubleshoot
961-
with:
962-
test-name: '${{ matrix.test }}'
963-
964-
# e2e-docker-install2-failing runs the e2e tests inside a docker container rather than a full VM
965-
# the tests here are expected to fail and should be moved to e2e-docker-install2 once they are fixed
966-
e2e-docker-install2-failing:
967-
name: E2E Docker (install2, failing)
968-
if: contains(github.event.pull_request.labels.*.name, 'run-failing-install2-tests')
969-
runs-on: ubuntu-latest
970-
needs:
971-
- git-sha
972-
- build-current
973-
- build-legacydr
974-
- build-previous-k0s
975-
- build-upgrade
976-
- find-previous-stable
977-
- release-app
978-
- export-version-specifier
979-
strategy:
980-
fail-fast: false
981-
matrix:
982-
test:
983-
- TestAlwaysFail
984-
steps:
985-
- name: Checkout
986-
uses: actions/checkout@v4
987-
- name: Download binary
988-
uses: actions/download-artifact@v4
989-
with:
990-
name: current-release
991-
path: output/bin
992-
- name: Download new DR binary
993-
uses: actions/download-artifact@v4
994-
with:
995-
name: legacydr-release
996-
path: output/bin
997-
- name: Setup go
998-
uses: actions/setup-go@v5
999-
with:
1000-
go-version-file: go.mod
1001-
cache-dependency-path: "**/*.sum"
1002-
- name: Login to DockerHub to avoid rate limiting
1003-
uses: docker/login-action@v3
1004-
with:
1005-
username: ${{ secrets.DOCKERHUB_USER }}
1006-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
1007-
- name: Free up runner disk space
1008-
uses: ./.github/actions/free-disk-space
1009-
- name: Write license files
1010-
run: |
1011-
echo "${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE }}" | base64 --decode > e2e/license.yaml
1012-
echo "${{ secrets.STAGING_EMBEDDED_CLUSTER_SNAPSHOT_LICENSE }}" | base64 --decode > e2e/snapshot-license.yaml
1013-
- name: Run test
1014-
env:
1015-
SHORT_SHA: dev-${{ needs.git-sha.outputs.git_sha }}
1016-
LICENSE_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE_ID }}
1017-
AIRGAP_LICENSE_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_AIRGAP_LICENSE_ID }}
1018-
SNAPSHOT_LICENSE_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_SNAPSHOT_LICENSE_ID }}
1019-
AIRGAP_SNAPSHOT_LICENSE_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_AIRGAP_SNAPSHOT_LICENSE_ID }}
1020-
DR_AWS_S3_ENDPOINT: https://s3.amazonaws.com
1021-
DR_AWS_S3_REGION: us-east-1
1022-
DR_AWS_S3_BUCKET: kots-testim-snapshots
1023-
DR_AWS_S3_PREFIX: ${{ matrix.test }}-${{ github.run_id }}-${{ github.run_attempt }}
1024-
DR_AWS_S3_PREFIX_AIRGAP: ${{ matrix.test }}-${{ github.run_id }}-${{ github.run_attempt }}-airgap
1025-
DR_AWS_ACCESS_KEY_ID: ${{ secrets.TESTIM_AWS_ACCESS_KEY_ID }}
1026-
DR_AWS_SECRET_ACCESS_KEY: ${{ secrets.TESTIM_AWS_SECRET_ACCESS_KEY }}
1027-
EXPECT_K0S_VERSION: ${{ needs.build-current.outputs.k0s_version }}
1028-
EXPECT_K0S_VERSION_PREVIOUS: ${{ needs.build-previous-k0s.outputs.k0s_version }}
1029-
EXPECT_K0S_VERSION_PREVIOUS_STABLE: ${{ needs.find-previous-stable.outputs.k0s_version }}
1030-
run: |
1031-
make e2e-test TEST_NAME=${{ matrix.test }}
1032-
- name: Troubleshoot
1033-
if: ${{ !cancelled() }}
1034-
uses: ./.github/actions/e2e-troubleshoot
1035-
with:
1036-
test-name: '${{ matrix.test }}'
1037-
1038-
e2e-install2:
1039-
name: E2E Install2
1040-
runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
1041-
needs:
1042-
- build-current
1043-
- build-legacydr
1044-
- build-previous-k0s
1045-
- build-upgrade
1046-
- find-previous-stable
1047-
- release-app
1048-
- export-version-specifier
1049-
strategy:
1050-
fail-fast: false
1051-
matrix:
1052-
test:
1053-
- TestSingleNodeAirgapInstall2
1054-
steps:
1055-
- name: Checkout
1056-
uses: actions/checkout@v4
1057-
- name: Download current binary
1058-
uses: actions/download-artifact@v4
1059-
with:
1060-
name: current-release
1061-
path: output/bin
1062-
1063-
- uses: ./.github/actions/e2e
1064-
with:
1065-
test-name: '${{ matrix.test }}'
1066-
is-large-runner: ${{ matrix.runner == 'embedded-cluster' }}
1067-
airgap-license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_AIRGAP_LICENSE_ID }}
1068-
snapshot-license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_SNAPSHOT_LICENSE_ID }}
1069-
snapshot-license: ${{ secrets.STAGING_EMBEDDED_CLUSTER_SNAPSHOT_LICENSE }}
1070-
airgap-snapshot-license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_AIRGAP_SNAPSHOT_LICENSE_ID }}
1071-
license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE_ID }}
1072-
license: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE }}
1073-
dr-aws-access-key-id: ${{ secrets.TESTIM_AWS_ACCESS_KEY_ID }}
1074-
dr-aws-secret-access-key: ${{ secrets.TESTIM_AWS_SECRET_ACCESS_KEY }}
1075-
k0s-version: ${{ needs.build-current.outputs.k0s_version }}
1076-
k0s-version-previous: ${{ needs.build-previous-k0s.outputs.k0s_version }}
1077-
k0s-version-previous-stable: ${{ needs.find-previous-stable.outputs.k0s_version }}
1078-
version-specifier: ${{ needs.export-version-specifier.outputs.version_specifier }}
1079-
1080-
e2e-install2-failing:
1081-
name: E2E Install2 Failing
1082-
if: contains(github.event.pull_request.labels.*.name, 'run-failing-install2-tests')
1083-
runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
1084-
needs:
1085-
- build-current
1086-
- build-legacydr
1087-
- build-previous-k0s
1088-
- build-upgrade
1089-
- find-previous-stable
1090-
- release-app
1091-
- export-version-specifier
1092-
strategy:
1093-
fail-fast: false
1094-
matrix:
1095-
test:
1096-
- TestSingleNodeAirgapInstall2Upgrade
1097-
- TestAlwaysFail
1098-
steps:
1099-
- name: Checkout
1100-
uses: actions/checkout@v4
1101-
- name: Download current binary
1102-
uses: actions/download-artifact@v4
1103-
with:
1104-
name: current-release
1105-
path: output/bin
1106-
1107-
- uses: ./.github/actions/e2e
1108-
with:
1109-
test-name: '${{ matrix.test }}'
1110-
is-large-runner: ${{ matrix.runner == 'embedded-cluster' }}
1111-
airgap-license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_AIRGAP_LICENSE_ID }}
1112-
snapshot-license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_SNAPSHOT_LICENSE_ID }}
1113-
snapshot-license: ${{ secrets.STAGING_EMBEDDED_CLUSTER_SNAPSHOT_LICENSE }}
1114-
airgap-snapshot-license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_AIRGAP_SNAPSHOT_LICENSE_ID }}
1115-
license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE_ID }}
1116-
license: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE }}
1117-
dr-aws-access-key-id: ${{ secrets.TESTIM_AWS_ACCESS_KEY_ID }}
1118-
dr-aws-secret-access-key: ${{ secrets.TESTIM_AWS_SECRET_ACCESS_KEY }}
1119-
k0s-version: ${{ needs.build-current.outputs.k0s_version }}
1120-
k0s-version-previous: ${{ needs.build-previous-k0s.outputs.k0s_version }}
1121-
k0s-version-previous-stable: ${{ needs.find-previous-stable.outputs.k0s_version }}
1122-
version-specifier: ${{ needs.export-version-specifier.outputs.version_specifier }}
1123-
1124-
1125895
# this job will validate that all the tests passed
1126896
# it is used for the github branch protection rule
1127897
validate-success:
@@ -1137,10 +907,6 @@ jobs:
1137907
- dryrun-tests
1138908
- check-images
1139909
- check-operator-crds
1140-
- e2e-docker-install2
1141-
- e2e-docker-install2-failing
1142-
- e2e-install2
1143-
- e2e-install2-failing
1144910
if: always()
1145911
steps:
1146912
# https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context
@@ -1165,17 +931,5 @@ jobs:
1165931
- name: fail if check-operator-crds job was not successful
1166932
if: needs.check-operator-crds.result != 'success'
1167933
run: exit 1
1168-
- name: fail if e2e-docker-install2 job was not successful
1169-
if: needs.e2e-docker-install2.result != 'success'
1170-
run: exit 1
1171-
- name: fail if e2e-docker-install2-failing job WAS successful
1172-
if: needs.e2e-docker-install2-failing.result == 'success'
1173-
run: exit 1
1174-
- name: fail if e2e-install2 job was not successful
1175-
if: needs.e2e-install2.result != 'success'
1176-
run: exit 1
1177-
- name: fail if e2e-install2-failing job WAS successful
1178-
if: needs.e2e-install2-failing.result == 'success'
1179-
run: exit 1
1180934
- name: succeed if everything else passed
1181935
run: echo "Validation succeeded"

0 commit comments

Comments
 (0)