Skip to content

Commit 9b86583

Browse files
committed
Merge remote-tracking branch 'origin/main' into k0s-1-29
2 parents 5c389b8 + 98b5540 commit 9b86583

File tree

182 files changed

+9869
-1029
lines changed

Some content is hidden

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

182 files changed

+9869
-1029
lines changed

.github/actions/e2e/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ runs:
7979
external_ids:ovn-encap-type=geneve \
8080
external_ids:ovn-encap-ip=127.0.0.1
8181
- name: Free up runner disk space
82-
if: ${{ inputs.is-large-runner == 'false' }}
8382
uses: ./.github/actions/free-disk-space
8483
- name: Set AppArmor mode to complain
8584
shell: bash

.github/actions/free-disk-space/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ runs:
99
run: |
1010
df -h
1111
12-
# Don't enable these as they take a long time to run (sometimes over 10 minutes)
13-
# sudo docker system prune -af
14-
# sudo rm -rf /usr/local/lib/android
12+
# these take a long time to run (sometimes over 10 minutes) but we need disk space...
13+
sudo docker system prune -af
14+
sudo rm -rf /usr/local/lib/android
1515
1616
sudo rm -rf \
1717
/opt/hostedtoolcache/CodeQL \

.github/actions/scan-image/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ runs:
2626
ignore-unfixed: true
2727
severity: CRITICAL,HIGH,MEDIUM
2828
exit-code: 1
29+
trivyignores: .trivyignore
2930

3031
- name: Output sarif
3132
uses: aquasecurity/[email protected]

.github/dependabot.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,11 @@
22
version: 2
33
updates:
44
- package-ecosystem: "gomod"
5-
directory: "/"
6-
open-pull-requests-limit: 25
7-
schedule:
8-
interval: "weekly"
9-
day: "saturday"
10-
labels:
11-
- "dependencies"
12-
- "go"
13-
- "type::chore"
14-
groups:
15-
security:
16-
update-types:
17-
- "patch"
18-
19-
- package-ecosystem: "gomod"
20-
directory: "/kinds/"
5+
directories:
6+
- "/"
7+
- "/kinds/"
8+
- "/utils/"
9+
- "/dagger/"
2110
open-pull-requests-limit: 25
2211
schedule:
2312
interval: "weekly"
@@ -30,6 +19,12 @@ updates:
3019
security:
3120
update-types:
3221
- "patch"
22+
k8s.io:
23+
patterns:
24+
- "k8s.io/*"
25+
aws-sdk-go-v2:
26+
patterns:
27+
- "github.com/aws/aws-sdk-go-v2*"
3328

3429
- package-ecosystem: "github-actions"
3530
directory: "/"

.github/workflows/ci.yaml

Lines changed: 141 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162

163163
- name: Install dagger
164164
run: |
165-
curl -fsSL https://dl.dagger.io/dagger/install.sh | sh
165+
curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=v0.14.0 sh
166166
sudo mv ./bin/dagger /usr/local/bin/dagger
167167
168168
- name: Build
@@ -182,7 +182,6 @@ jobs:
182182
run: |
183183
export K0S_VERSION=$(make print-K0S_VERSION)
184184
export EC_VERSION=$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')
185-
export SHORT_SHA=dev-${{ needs.git-sha.outputs.git_sha }}
186185
export APP_VERSION=appver-dev-${{ needs.git-sha.outputs.git_sha }}
187186
# avoid rate limiting
188187
export FIO_VERSION=$(gh release list --repo axboe/fio --json tagName,isLatest | jq -r '.[] | select(.isLatest==true)|.tagName' | cut -d- -f2)
@@ -205,6 +204,75 @@ jobs:
205204
echo "K0S_VERSION=\"$K0S_VERSION\""
206205
echo "k0s_version=$K0S_VERSION" >> "$GITHUB_OUTPUT"
207206
207+
build-legacydr:
208+
name: Build legacy DR
209+
runs-on: embedded-cluster
210+
needs:
211+
- git-sha
212+
outputs:
213+
k0s_version: ${{ steps.export.outputs.k0s_version }}
214+
steps:
215+
- name: Checkout
216+
uses: actions/checkout@v4
217+
with:
218+
fetch-depth: 0
219+
220+
- name: Cache embedded bins
221+
uses: actions/cache@v4
222+
with:
223+
path: |
224+
output/bins
225+
key: bins-cache
226+
227+
- name: Setup go
228+
uses: actions/setup-go@v5
229+
with:
230+
go-version-file: go.mod
231+
cache-dependency-path: "**/*.sum"
232+
233+
- name: Install dagger
234+
run: |
235+
curl -fsSL https://dl.dagger.io/dagger/install.sh | sh
236+
sudo mv ./bin/dagger /usr/local/bin/dagger
237+
238+
- name: Build
239+
env:
240+
APP_CHANNEL_ID: 2cHXb1RCttzpR0xvnNWyaZCgDBP
241+
APP_CHANNEL_SLUG: ci
242+
RELEASE_YAML_DIR: e2e/kots-release-install-legacydr
243+
S3_BUCKET: "tf-staging-embedded-cluster-bin"
244+
USES_DEV_BUCKET: "0"
245+
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_KEY_ID }}
246+
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_SECRET }}
247+
AWS_REGION: "us-east-1"
248+
USE_CHAINGUARD: "1"
249+
UPLOAD_BINARIES: "1"
250+
SKIP_RELEASE: "1"
251+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
252+
run: |
253+
export K0S_VERSION=$(make print-K0S_VERSION)
254+
export EC_VERSION=$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-legacydr
255+
export APP_VERSION=appver-dev-${{ needs.git-sha.outputs.git_sha }}-legacydr
256+
# avoid rate limiting
257+
export FIO_VERSION=$(gh release list --repo axboe/fio --json tagName,isLatest | jq -r '.[] | select(.isLatest==true)|.tagName' | cut -d- -f2)
258+
259+
./scripts/build-and-release.sh
260+
cp output/bin/embedded-cluster output/bin/embedded-cluster-legacydr
261+
262+
- name: Upload release
263+
uses: actions/upload-artifact@v4
264+
with:
265+
name: legacydr-release
266+
path: |
267+
output/bin/embedded-cluster-legacydr
268+
269+
- name: Export k0s version
270+
id: export
271+
run: |
272+
K0S_VERSION="$(make print-K0S_VERSION)"
273+
echo "K0S_VERSION=\"$K0S_VERSION\""
274+
echo "k0s_version=$K0S_VERSION" >> "$GITHUB_OUTPUT"
275+
208276
build-previous-k0s:
209277
name: Build previous k0s
210278
runs-on: embedded-cluster
@@ -233,7 +301,7 @@ jobs:
233301

234302
- name: Install dagger
235303
run: |
236-
curl -fsSL https://dl.dagger.io/dagger/install.sh | sh
304+
curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=v0.14.0 sh
237305
sudo mv ./bin/dagger /usr/local/bin/dagger
238306
239307
- name: Build
@@ -260,6 +328,7 @@ jobs:
260328
export FIO_VERSION=$(gh release list --repo axboe/fio --json tagName,isLatest | jq -r '.[] | select(.isLatest==true)|.tagName' | cut -d- -f2)
261329
262330
./scripts/build-and-release.sh
331+
cp output/bin/embedded-cluster output/bin/embedded-cluster-previous-k0s
263332
264333
- name: Upload release
265334
uses: actions/upload-artifact@v4
@@ -337,7 +406,7 @@ jobs:
337406

338407
- name: Install dagger
339408
run: |
340-
curl -fsSL https://dl.dagger.io/dagger/install.sh | sh
409+
curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=v0.14.0 sh
341410
sudo mv ./bin/dagger /usr/local/bin/dagger
342411
343412
- name: Build
@@ -363,6 +432,7 @@ jobs:
363432
export FIO_VERSION=$(gh release list --repo axboe/fio --json tagName,isLatest | jq -r '.[] | select(.isLatest==true)|.tagName' | cut -d- -f2)
364433
365434
./scripts/build-and-release.sh
435+
cp output/bin/embedded-cluster output/bin/embedded-cluster-upgrade
366436
367437
- name: Upload release
368438
uses: actions/upload-artifact@v4
@@ -439,6 +509,7 @@ jobs:
439509
needs:
440510
- git-sha
441511
- build-current
512+
- build-legacydr
442513
- build-previous-k0s
443514
- build-upgrade
444515
- find-previous-stable
@@ -492,6 +563,12 @@ jobs:
492563
export RELEASE_YAML_DIR=e2e/kots-release-install
493564
./scripts/ci-release-app.sh
494565
566+
# promote a release with improved dr support
567+
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-legacydr"
568+
export APP_VERSION="appver-${SHORT_SHA}-legacydr"
569+
export RELEASE_YAML_DIR=e2e/kots-release-install-legacydr
570+
./scripts/ci-release-app.sh
571+
495572
# then a noop upgrade
496573
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')"
497574
export APP_VERSION="appver-${SHORT_SHA}-noop"
@@ -532,6 +609,12 @@ jobs:
532609
export RELEASE_YAML_DIR=e2e/kots-release-install
533610
./scripts/ci-release-app.sh
534611
612+
# promote a release with improved dr support
613+
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-legacydr"
614+
export APP_VERSION="appver-${SHORT_SHA}-legacydr"
615+
export RELEASE_YAML_DIR=e2e/kots-release-install-legacydr
616+
./scripts/ci-release-app.sh
617+
535618
# and finally an app upgrade
536619
export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-upgrade"
537620
export APP_VERSION="appver-${SHORT_SHA}-upgrade"
@@ -571,6 +654,7 @@ jobs:
571654
needs:
572655
- git-sha
573656
- build-current
657+
- build-legacydr
574658
- build-previous-k0s
575659
- build-upgrade
576660
- find-previous-stable
@@ -600,6 +684,7 @@ jobs:
600684
- TestMultiNodeInstallation
601685
- TestMultiNodeHAInstallation
602686
- TestSingleNodeDisasterRecovery
687+
- TestSingleNodeLegacyDisasterRecovery
603688
- TestSingleNodeResumeDisasterRecovery
604689
- TestMultiNodeHADisasterRecovery
605690
- TestSingleNodeInstallationNoopUpgrade
@@ -618,6 +703,11 @@ jobs:
618703
with:
619704
name: current-release
620705
path: output/bin
706+
- name: Download new DR binary
707+
uses: actions/download-artifact@v4
708+
with:
709+
name: legacydr-release
710+
path: output/bin
621711
- name: Setup go
622712
uses: actions/setup-go@v5
623713
with:
@@ -664,6 +754,7 @@ jobs:
664754
runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
665755
needs:
666756
- build-current
757+
- build-legacydr
667758
- build-previous-k0s
668759
- build-upgrade
669760
- find-previous-stable
@@ -699,6 +790,48 @@ jobs:
699790
runner: embedded-cluster
700791
- test: TestMultiNodeAirgapHADisasterRecovery
701792
runner: embedded-cluster
793+
steps:
794+
- name: Checkout
795+
uses: actions/checkout@v4
796+
- name: Download current binary
797+
uses: actions/download-artifact@v4
798+
with:
799+
name: current-release
800+
path: output/bin
801+
802+
- uses: ./.github/actions/e2e
803+
with:
804+
test-name: '${{ matrix.test }}'
805+
is-large-runner: ${{ matrix.runner == 'embedded-cluster' }}
806+
airgap-license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_AIRGAP_LICENSE_ID }}
807+
snapshot-license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_SNAPSHOT_LICENSE_ID }}
808+
snapshot-license: ${{ secrets.STAGING_EMBEDDED_CLUSTER_SNAPSHOT_LICENSE }}
809+
airgap-snapshot-license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_AIRGAP_SNAPSHOT_LICENSE_ID }}
810+
license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE_ID }}
811+
license: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE }}
812+
dr-aws-access-key-id: ${{ secrets.TESTIM_AWS_ACCESS_KEY_ID }}
813+
dr-aws-secret-access-key: ${{ secrets.TESTIM_AWS_SECRET_ACCESS_KEY }}
814+
k0s-version: ${{ needs.build-current.outputs.k0s_version }}
815+
k0s-version-previous: ${{ needs.build-previous-k0s.outputs.k0s_version }}
816+
k0s-version-previous-stable: ${{ needs.find-previous-stable.outputs.k0s_version }}
817+
version-specifier: ${{ needs.export-version-specifier.outputs.version_specifier }}
818+
819+
e2e-main:
820+
name: E2E (on merge)
821+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
822+
runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
823+
needs:
824+
- build-current
825+
- build-legacydr
826+
- build-previous-k0s
827+
- build-upgrade
828+
- find-previous-stable
829+
- release-app
830+
- export-version-specifier
831+
strategy:
832+
fail-fast: false
833+
matrix:
834+
include:
702835
- test: TestFiveNodesAirgapUpgrade
703836
runner: embedded-cluster
704837
steps:
@@ -734,6 +867,7 @@ jobs:
734867
runs-on: ubuntu-20.04
735868
needs:
736869
- e2e
870+
- e2e-main
737871
- e2e-docker
738872
- sanitize
739873
- test
@@ -747,6 +881,9 @@ jobs:
747881
- name: fail if e2e job was not successful
748882
if: needs.e2e.result != 'success'
749883
run: exit 1
884+
- name: fail if e2e-main job was not successful
885+
if: needs.e2e-main.result != 'success' && needs.e2e-main.result != 'skipped'
886+
run: exit 1
750887
- name: fail if e2e-docker job was not successful
751888
if: needs.e2e-docker.result != 'success'
752889
run: exit 1

.github/workflows/image-scan.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Install dagger
3232
run: |
33-
curl -fsSL https://dl.dagger.io/dagger/install.sh | sh
33+
curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=v0.14.0 sh
3434
sudo mv ./bin/dagger /usr/local/bin/dagger
3535
3636
- name: Build and push local-artifact-mirror image

0 commit comments

Comments
 (0)