Skip to content
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

Merge latest changes into release-1.31 #829

Closed
wants to merge 122 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
de53534
Auto-update components in release-1.31 branch (#668)
addyess Sep 13, 2024
72808cd
use lxd 5.21/stable snap (#670)
kwmonroe Sep 14, 2024
522a161
Add unit tests for local storage (#665)
HomayoonAlimohammadi Sep 16, 2024
a47d342
k8sd cluster-recover: add non-interactive mode (#662)
petrutlucian94 Sep 16, 2024
407f739
[main] Update component versions (#674)
github-actions[bot] Sep 16, 2024
4d5f406
Add epa explanation docs (#595)
evilnick Sep 17, 2024
22f04c6
Update the issue template for creating release branches (#677)
addyess Sep 17, 2024
6748308
Automerge every 4 hours any labeled PR with passing tests (#675)
addyess Sep 17, 2024
969662f
Warnings that k8s service may not work (#657)
Sep 17, 2024
1a993cc
Epa howto (#658)
evilnick Sep 18, 2024
e8475bf
Add IPv6-only support for moonray (#664)
bschimke95 Sep 18, 2024
87eb341
Correct microcluster schema migration order (#676)
louiseschmidtgen Sep 18, 2024
6ee8863
Add how-to for capi in place upgrades (#671)
berkayoz Sep 18, 2024
de6fb4f
let all integration test run (#682)
bschimke95 Sep 18, 2024
e4dadd1
Create more tests on branches and recipes (#679)
addyess Sep 20, 2024
27c91c8
Do not stop Kubernetes services on node removal if annotation is set.…
bschimke95 Sep 20, 2024
cfa7f99
Add unit tests for coredns (#684)
Sep 20, 2024
d189816
Add certificate expiry endpoint (#683)
bschimke95 Sep 20, 2024
5fe3c27
Skip Go/K8s test suite when docs are changed (#685)
Sep 20, 2024
6b15893
Ignore part of cluster check (#688)
bschimke95 Sep 23, 2024
02f369b
Unit tests for Metrics Server k8sd feature (#691)
Sep 23, 2024
6ce90fa
Add version upgrade tests (#678)
bschimke95 Sep 24, 2024
a5d0ae4
Return non-zero exit code in case of errors (#690)
petrutlucian94 Sep 24, 2024
a2c00fb
Use map of struct instead of bool (#693)
HomayoonAlimohammadi Sep 24, 2024
c74b9f5
Restoring the Microcluster Schema Migration History (#689)
louiseschmidtgen Sep 26, 2024
d3c4a36
Add IPv6 unittests for cluster setup (#698)
bschimke95 Sep 27, 2024
9e0a43c
Point cilium to talk to the local apiserver or apiserver-proxy (#697)
berkayoz Sep 27, 2024
1a7bafd
fix unittests after rebase (#703)
bschimke95 Sep 27, 2024
2b9d49a
Add CAPI endpoints for Certificates Refresh (#699)
mateoflorido Sep 30, 2024
4215adc
Update dualstack.md (#706)
eaudetcobello Oct 1, 2024
27247c4
Validate pod CIDR and service CIDR (#695)
eaudetcobello Oct 1, 2024
edd536f
Mirror `libtirpc` to Launchpad (#708)
mateoflorido Oct 1, 2024
5af076a
Add "2ha.sh" script, managing 2-node Canonical K8s HA AA clusters (#692)
petrutlucian94 Oct 2, 2024
a646a0b
docs spec check (#707)
Oct 2, 2024
ed25214
Unit tests for contour k8sd feature (#705)
Oct 2, 2024
83ca3ed
Unittests for cilium k8sd feature (#704)
Oct 2, 2024
d44b5c5
Automatically generate config documentation (#711)
petrutlucian94 Oct 6, 2024
49a5da9
Ku 1824 doc fixes (#716)
evilnick Oct 7, 2024
43ab3b8
Improve Nightly Test runs to pass (#701)
addyess Oct 8, 2024
e64824c
Add refresh-certificates annotation to capi references (#717)
HomayoonAlimohammadi Oct 9, 2024
426d150
Bump Kubernetes version (#723)
bschimke95 Oct 9, 2024
45b544f
Create a test scenario for mixed version clustering (#720)
addyess Oct 10, 2024
d57414c
Removes lingering kubelet plugins on snap removal (#727)
claudiubelu Oct 11, 2024
ef30a2e
Removes lingering CSI plugin volume mounts on snap removal (#726)
claudiubelu Oct 11, 2024
c618f09
Add linter for Go (#710)
Oct 11, 2024
8c0f665
Enable bodyclose linter (#729)
bschimke95 Oct 15, 2024
610393f
Enable "Canonical Headers" linter (#730)
bschimke95 Oct 15, 2024
af047ce
Update sphinx (#712)
evilnick Oct 16, 2024
78a3a88
Update proxy.md (#742)
mateoflorido Oct 16, 2024
b6ee33b
Fix TiCS action's permission error (#694)
eaudetcobello Oct 16, 2024
8369545
Remove context lints (false-positives), Add copyloopvar (#731)
bschimke95 Oct 17, 2024
dc44838
Add Configure Custom Registries How-To (#744)
mateoflorido Oct 17, 2024
82985e3
Ku 1442 cis hardening (#725)
nhennigan Oct 17, 2024
db9fdd6
Add Approve Worker Nodes CSRs (#713)
mateoflorido Oct 18, 2024
2ee8e70
Enable error linting (#733)
bschimke95 Oct 18, 2024
95fe533
Enable forbidigo linter (#734)
bschimke95 Oct 18, 2024
18e1a24
IPv6-only address CIDR and Scope (#741)
bschimke95 Oct 18, 2024
cabc958
Add annotations for configuring which devices cilium use for routing …
berkayoz Oct 18, 2024
8ae6d48
Enable type assertions check (#735)
bschimke95 Oct 18, 2024
499a2db
Allow tests to override how long wait for slower clouds providers to …
addyess Oct 18, 2024
84a1769
retries and delay_s values should be ints (#753)
addyess Oct 19, 2024
f21e2a9
Fix conflict using manual trivy and the trivy action (#752)
addyess Oct 19, 2024
4d0d1cc
Remove stray TRIVY_* env vars for a manual run of trivy (#754)
addyess Oct 19, 2024
fea66ee
Enable gci linter for imports (#736)
bschimke95 Oct 20, 2024
65bb21d
Add Annotations Support for Cilium (#747)
mateoflorido Oct 20, 2024
ed8525e
add ginko linter (#737)
bschimke95 Oct 21, 2024
0b2daa5
Enable gocritic linter (#738)
bschimke95 Oct 21, 2024
6e585f1
Enable godot (#739)
bschimke95 Oct 21, 2024
6e343fc
Enable gofmt and gofumpt linter (#740)
bschimke95 Oct 22, 2024
e30d4ad
Strict interfaces test (#748)
louiseschmidtgen Oct 22, 2024
4469973
Add docs page for IPv6-only (#756)
bschimke95 Oct 24, 2024
abb6f7f
Add timeout to integration tests LXD container removal (#757)
bschimke95 Oct 24, 2024
577a5ff
[main] Update component versions (#760)
github-actions[bot] Oct 24, 2024
687df33
Replace Cilium LoadBalancer with MetalLB (#755)
bschimke95 Oct 24, 2024
13875ac
Fix certificate refresh and add e2e tests (#766)
petrutlucian94 Nov 6, 2024
c871eb9
Add feature annotations to the reference page (#759)
berkayoz Nov 6, 2024
7cce595
Update the snap version of via upstream .go-version (#762)
addyess Nov 7, 2024
851387c
Add How-To Refresh Certificates (CAPI) (#765)
mateoflorido Nov 7, 2024
03149aa
Doc build fix (#773)
evilnick Nov 7, 2024
d6de281
Add min-tls-version flag (#776)
bschimke95 Nov 8, 2024
953f4dd
Add minimum release for upgrade tests (#769)
bschimke95 Nov 8, 2024
ca54963
Fix SBOM generation (#780)
bschimke95 Nov 8, 2024
297bed5
remove kroki and replace with SVGS for now (#781)
evilnick Nov 8, 2024
528d459
Refactor file writing logic (#778)
HomayoonAlimohammadi Nov 8, 2024
92828c5
Remove IPv6-only on IPv6 only infra test (#768)
bschimke95 Nov 8, 2024
a741eaa
ci: run Trivy scans on release channels too (#782)
Nov 11, 2024
f6ef548
Temporary fix for sbom generation for metrics-server (#787)
berkayoz Nov 11, 2024
13689bd
KU-1983 Navigation (#783)
nhennigan Nov 11, 2024
00ab5b0
Pass localhost address from the start hook instead of embedding into …
berkayoz Nov 12, 2024
5bbb1bd
KU-2052 CIS hardening explanation page (#786)
nhennigan Nov 12, 2024
bf485e7
Update the containerd-related paths (#772)
claudiubelu Nov 12, 2024
86b5a29
Remove hardcoded annotations (#763)
eaudetcobello Nov 12, 2024
4291ca3
Fix flaky tests (#767)
petrutlucian94 Nov 13, 2024
5b032a9
Fix lint and sbom jobs (#791)
petrutlucian94 Nov 13, 2024
2e71353
Increase timeouts and log test timestamps (#792)
petrutlucian94 Nov 14, 2024
aa8b78f
Remove strict testing from PRs (#793)
berkayoz Nov 14, 2024
e1dd58e
Verify Microk8s Installation Status (#785)
eaudetcobello Nov 14, 2024
a8e140b
Cleanup left-over iptables rules from kubeproxy and cilium (#788)
berkayoz Nov 15, 2024
3528193
Add in-place upgrade explanation (#770)
HomayoonAlimohammadi Nov 15, 2024
b4055df
Arch diagrams (#801)
nhennigan Nov 15, 2024
81bb027
[Docs] How to use cloud storage (#794)
eaudetcobello Nov 15, 2024
79f3145
Spellcheck fixes (#749)
nhennigan Nov 15, 2024
be1e3a6
Fix formatting and update documentation after merge (#807)
eaudetcobello Nov 15, 2024
47810ae
Revert "Fix formatting and update documentation after merge" (#808)
eaudetcobello Nov 15, 2024
eb63322
revert spelling change (#809)
eaudetcobello Nov 18, 2024
99e7a5e
fix: ensure nf_conntrack module loaded for kube-proxy. (#743)
Nov 18, 2024
19b9957
Add registry mirrors, preload snapd and core20 (#799)
berkayoz Nov 19, 2024
00ea902
Update Cilium to 1.16.3 (#803)
berkayoz Nov 19, 2024
c17d3cf
Update metrics-server to 0.7.2 and chart to 3.12.2 (#804)
eaudetcobello Nov 19, 2024
db581ac
Update metallb version to 0.14.8 (#805)
eaudetcobello Nov 19, 2024
00236be
Update cilium version in sync-images.yaml (#812)
bschimke95 Nov 19, 2024
83c1ffb
Add containerd path marker file (#813)
bschimke95 Nov 20, 2024
8d20f34
Update coredns to 1.11.3 and coredns chart to 1.36.0 (#806)
eaudetcobello Nov 20, 2024
aa6c32a
KU-2068 reformatted annotations table (#789)
nhennigan Nov 20, 2024
7314175
Add permission token at topLevel in workflows (#816)
Nov 20, 2024
dd2cd3b
tutorials review (#814)
nhennigan Nov 20, 2024
2f1c021
Use new annotation path (#821)
bschimke95 Nov 20, 2024
bd42a49
Only log worker marker file error if exists (#820)
bschimke95 Nov 20, 2024
29feb03
Remove obsolete sync-images scripts (#818)
bschimke95 Nov 21, 2024
c648d82
Add security.md with policy (#822)
Nov 21, 2024
7f732c9
[main] Update component versions (#825)
github-actions[bot] Nov 21, 2024
376da2b
Cleans up all containerd-related resources on snap removal (#827)
claudiubelu Nov 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
57 changes: 18 additions & 39 deletions .github/ISSUE_TEMPLATE/create_release_branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ Make sure to follow the steps below and ensure all actions are completed and sig
- **K8s version**: 1.xx

<!-- Set this to the name of the person responsible for running the release tasks, e.g. @neoaggelos -->
- **Owner**:
- **Owner**: `who plans to do the work`

<!-- Set this to the name of the team-member that will sign-off the tasks -->
- **Reviewer**:
- **Reviewer**: `who plans to review the work`

<!-- Link to PR to initialize the release branch (see below) -->
- **PR**:
-
- **PR**: https://github.com/canonical/k8s-snap/pull/`<int>`

<!-- Link to PR to initialize auto-update job for the release branch (see below) -->
- **PR**:
- **PR**: https://github.com/canonical/k8s-snap/pull/`<int>`

#### Actions

Expand Down Expand Up @@ -53,7 +53,7 @@ The steps are to be followed in-order, each task must be completed by the person
- [ ] **Owner**: Create `release-1.xx` branch from latest `master` in k8s-dqlite
- `git clone [email protected]:canonical/k8s-dqlite.git ~/tmp/release-1.xx`
- `pushd ~/tmp/release-1.xx`
- `git switch main`
- `git switch master`
- `git pull`
- `git checkout -b release-1.xx`
- `git push origin release-1.xx`
Expand Down Expand Up @@ -89,7 +89,7 @@ The steps are to be followed in-order, each task must be completed by the person
- [ ] **Owner**: Create `release-1.xx` branch from latest `main` in rawfile-localpv
- `git clone [email protected]:canonical/rawfile-localpv.git ~/tmp/release-1.xx`
- `pushd ~/tmp/release-1.xx`
- `git switch main`
- `git switch rockcraft`
- `git pull`
- `git checkout -b release-1.xx`
- `git push origin release-1.xx`
Expand All @@ -98,7 +98,6 @@ The steps are to be followed in-order, each task must be completed by the person
- [ ] **Reviewer**: Ensure `release-1.xx` branch is based on latest changes on `main` at the time of the release cut.
- [ ] **Owner**: Create PR to initialize `release-1.xx` branch:
- [ ] Update `KUBERNETES_RELEASE_MARKER` to `stable-1.xx` in [/build-scripts/hack/update-component-versions.py][]
- [ ] Update `master` to `release-1.xx` in [/build-scripts/components/k8s-dqlite/version][]
- [ ] Update `"main"` to `"release-1.xx"` in [/build-scripts/hack/generate-sbom.py][]
- [ ] `git commit -m 'Release 1.xx'`
- [ ] Create PR against `release-1.xx` with the changes and request review from **Reviewer**. Make sure to update the issue `Information` section with a link to the PR.
Expand All @@ -107,43 +106,22 @@ The steps are to be followed in-order, each task must be completed by the person
- [ ] Add `release-1.xx` in [.github/workflows/update-components.yaml][]
- [ ] Remove unsupported releases from the list (if applicable, consult with **Reviewer**)
- [ ] Create PR against `main` with the changes and request review from **Reviewer**. Make sure to update the issue information with a link to the PR.
- [ ] **Reviewer**: On merge, confirm [Auto-update strict branch] action runs to completion and that the `autoupdate/release-1.xx-strict` branch is created.
- [ ] **Owner**: Create launchpad builders for `release-1.xx`
- [ ] Go to [lp:k8s][] and do **Import now** to pick up all latest changes.
- [ ] Under **Branches**, select `release-1.xx`, then **Create snap package**
- [ ] Set **Snap recipe name** to `k8s-snap-1.xx`
- [ ] Set **Owner** to `Canonical Kubernetes (containers)`
- [ ] Set **The project that this Snap is associated with** to `k8s`
- [ ] Set **Series** to Infer from snapcraft.yaml
- [ ] Set **Processors** to `AMD x86-64 (amd64)` and `ARM ARMv8 (arm64)`
- [ ] Enable **Automatically build when branch changes**
- [ ] Enable **Automatically upload to store**
- [ ] Set **Registered store name** to `k8s`
- [ ] In **Store Channels**, set **Track** to `1.xx-classic` and **Risk** to `edge`. Leave **Branch** empty
- [ ] Click **Create snap package** at the bottom of the page.
- [ ] **Owner**: Create launchpad builders for `release-1.xx-strict`
- [ ] Return to [lp:k8s][].
- [ ] Under **Branches**, select `autoupdate/release-1.xx-strict`, then **Create snap package**
- [ ] Set **Snap recipe name** to `k8s-snap-1.xx-strict`
- [ ] Set **Owner** to `Canonical Kubernetes (containers)`
- [ ] Set **The project that this Snap is associated with** to `k8s`
- [ ] Set **Series** to Infer from snapcraft.yaml
- [ ] Set **Processors** to `AMD x86-64 (amd64)` and `ARM ARMv8 (arm64)`
- [ ] Enable **Automatically build when branch changes**
- [ ] Enable **Automatically upload to store**
- [ ] Set **Registered store name** to `k8s`
- [ ] In **Store Channels**, set **Track** to `1.xx` and **Risk** to `edge`. Leave **Branch** empty
- [ ] Click **Create snap package** at the bottom of the page.
- [ ] **Reviewer**: On merge, confirm [Auto-update strict branch] action runs to completion and that the `autoupdate/release-1.xx-*` flavor branches are created.
- [ ] autoupdate/release-1.xx-strict
- [ ] autoupdate/release-1.xx-moonray
- [ ] **Owner**: Create launchpad builders for `release-1.xx` and flavors
- [ ] Run the [Confirm Snap Builds][] Action
- [ ] **Reviewer**: Ensure snap recipes are created in [lp:k8s/+snaps][]
- look for `k8s-snap-1.xx`
- look for `k8s-snap-1.xx-strict`
- [ ] look for `k8s-snap-1.xx-classic`
- [ ] look for `k8s-snap-1.xx-strict`
- [ ] look for `k8s-snap-1.xx-moonray`
- [ ] make sure each is "Authorized for Store Upload"

#### After release

- [ ] **Owner** follows up with the **Reviewer** and team about things to improve around the process.
- [ ] **Owner**: After a few weeks of stable CI, update default track to `1.xx/stable` via
- On the snap [releases page][], select `Track` > `1.xx`
- [ ] **Reviewer**: Ensure snap recipes are created in [lp:k8s/+snaps][]


<!-- LINKS -->
Expand All @@ -161,6 +139,7 @@ The steps are to be followed in-order, each task must be completed by the person
[.github/workflows/update-components.yaml]: ../workflows/update-components.yaml
[/build-scripts/components/hack/update-component-versions.py]: ../../build-scripts/components/hack/update-component-versions.py
[/build-scripts/components/k8s-dqlite/version]: ../../build-scripts/components/k8s-dqlite/version
[/build-scripts/hack/generate-sbom.py]: ../..//build-scripts/hack/generate-sbom.py
[/build-scripts/hack/generate-sbom.py]: ../../build-scripts/hack/generate-sbom.py
[lp:k8s]: https://code.launchpad.net/~cdk8s/k8s/+git/k8s-snap
[lp:k8s/+snaps]: https://launchpad.net/k8s/+snaps
[Confirm Snap Builds]: https://github.com/canonical/canonical-kubernetes-release-ci/actions/workflows/create-release-branch.yaml
29 changes: 29 additions & 0 deletions .github/workflows/auto-merge-successful-prs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Auto-merge Successful PRs

on:
workflow_dispatch:
schedule:
- cron: "0 */4 * * *" # Every 4 hours

permissions:
contents: read

jobs:
merge-successful-prs:
runs-on: ubuntu-latest

steps:
- name: Harden Runner
uses: step-security/harden-runner@v2

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: third-party GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
with:
egress-policy: audit
- name: Checking out repo
uses: actions/checkout@v4

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 1: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
- uses: actions/setup-python@v5

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 1: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
with:
python-version: '3.12'
- name: Auto-merge pull requests if all status checks pass
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
build-scripts/hack/auto-merge-successful-pr.py
10 changes: 6 additions & 4 deletions .github/workflows/automatic-doc-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ name: Core Documentation Checks
on:
- workflow_dispatch

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
documentation-checks:
uses: canonical/documentation-workflows/.github/workflows/documentation-checks.yaml@main
with:
working-directory: 'docs/moonray'

- uses: canonical/documentation-workflows/.github/workflows/documentation-checks.yaml@main
with:
working-directory: 'docs/moonray'
20 changes: 15 additions & 5 deletions .github/workflows/cron-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

permissions:
contents: read

jobs:
TICS:
permissions:
Expand All @@ -27,6 +27,9 @@
uses: actions/checkout@v4
with:
ref: ${{matrix.branch}}
- uses: actions/setup-python@v5

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 1: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
with:
python-version: '3.12'
- name: Install Go
uses: actions/setup-go@v5
with:
Expand All @@ -47,22 +50,22 @@

# TICS requires us to have the test results in cobertura xml format under the
# directory use below
make go.unit
sudo make go.unit
go install github.com/boumenot/gocover-cobertura@latest
gocover-cobertura < coverage.txt > coverage.xml
mkdir .coverage
mv ./coverage.xml ./.coverage/

# Install the TICS and staticcheck
go install honnef.co/go/tools/cmd/staticcheck@v0.4.7
go install honnef.co/go/tools/cmd/staticcheck@v0.5.1
. <(curl --silent --show-error 'https://canonical.tiobe.com/tiobeweb/TICS/api/public/v1/fapi/installtics/Script?cfg=default&platform=linux&url=https://canonical.tiobe.com/tiobeweb/TICS/')

# We need to have our project built
# We load the dqlite libs here instead of doing through make because TICS
# will try to build parts of the project itself
sudo add-apt-repository -y ppa:dqlite/dev
sudo apt install dqlite-tools libdqlite-dev -y
make clean
sudo make clean
go build -a ./...

TICSQServer -project k8s-snap -tmpdir /tmp/tics -branchdir $HOME/work/k8s-snap/k8s-snap/
Expand All @@ -79,6 +82,8 @@
- { branch: main, channel: latest/edge }
# Stable branches
# Add branches to test here
- { branch: release-1.30, channel: 1.30-classic/edge }
- { branch: release-1.31, channel: 1.31-classic/edge }

steps:
- name: Harden Runner
Expand All @@ -103,6 +108,8 @@
format: "sarif"
output: "trivy-k8s-repo-scan--results.sarif"
severity: "MEDIUM,HIGH,CRITICAL"
env:
TRIVY_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-db"
- name: Gather Trivy repo scan results
run: |
cp trivy-k8s-repo-scan--results.sarif ./sarifs/
Expand All @@ -111,7 +118,10 @@
snap download k8s --channel ${{ matrix.channel }}
mv ./k8s*.snap ./k8s.snap
unsquashfs k8s.snap
./trivy rootfs ./squashfs-root/ --format sarif > sarifs/snap.sarif
for var in $(env | grep -o '^TRIVY_[^=]*'); do
unset "$var"
done
./trivy --db-repository public.ecr.aws/aquasecurity/trivy-db rootfs ./squashfs-root/ --format sarif > sarifs/snap.sarif
- name: Get HEAD sha
run: |
SHA="$(git rev-parse HEAD)"
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/docs-spelling-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Documentation Spelling Check

on:
workflow_dispatch:
# pull_request:
# paths:
# - 'docs/**'
permissions:
contents: read

jobs:
spell-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 1: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
- name: Install aspell
run: sudo apt-get install aspell aspell-en
- id: spell-check
name: Spell Check
run: make spelling
working-directory: docs/canonicalk8s
continue-on-error: true
# - if: ${{ github.event_name == 'pull_request' && steps.spell-check.outcome == 'failure' }}
# uses: actions/github-script@v6
# with:
# script: |
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: 'Hi, looks like pyspelling job found some issues, you can check it [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})'
# })
18 changes: 18 additions & 0 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

on:
push:
paths-ignore:
- 'docs/**'
branches:
- main
- autoupdate/strict
Expand All @@ -10,6 +12,8 @@
- 'autoupdate/release-[0-9]+.[0-9]+-strict'
- 'autoupdate/sync/**'
pull_request:
paths-ignore:
- 'docs/**'

permissions:
contents: read
Expand All @@ -19,6 +23,7 @@
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment
checks: write # for golangci/golangci-lint-action to checks to allow the action to annotate code in the PR.
name: Unit Tests & Code Quality
runs-on: ubuntu-latest

Expand Down Expand Up @@ -67,6 +72,19 @@
# root ownership so the tests must be run as root:
run: sudo make go.unit

- name: dqlite-for-golangci-lint
working-directory: src/k8s
run: |
sudo add-apt-repository ppa:dqlite/dev
sudo apt update
sudo apt install dqlite-tools libdqlite-dev

- name: golangci-lint
uses: golangci/golangci-lint-action@v6

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 1: third-party GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
with:
version: v1.61
working-directory: src/k8s

test-binary:
name: Binaries
runs-on: ubuntu-latest
Expand Down
30 changes: 19 additions & 11 deletions .github/workflows/integration-informing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ name: Informing Integration Tests

on:
push:
paths-ignore:
- 'docs/**'
branches:
- main
- 'release-[0-9]+.[0-9]+'
- 'autoupdate/sync/**'
pull_request:
paths-ignore:
- 'docs/**'

permissions:
contents: read
Expand All @@ -17,7 +21,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
patch: ["strict", "moonray"]
patch: ["moonray"]
fail-fast: false
steps:
- name: Harden Runner
Expand Down Expand Up @@ -54,16 +58,16 @@ jobs:
strategy:
matrix:
os: ["ubuntu:20.04"]
patch: ["strict", "moonray"]
patch: ["moonray"]
fail-fast: false
runs-on: ubuntu-20.04
runs-on: ["self-hosted", "Linux", "AMD64", "jammy", "large"]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'
- name: Install tox
run: pip install tox
- name: Install lxd
Expand All @@ -72,29 +76,33 @@ jobs:
sudo lxd init --auto
sudo usermod --append --groups lxd $USER
sg lxd -c 'lxc version'
sudo iptables -I DOCKER-USER -i lxdbr0 -j ACCEPT
sudo iptables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
- name: Download snap
uses: actions/download-artifact@v4
with:
name: k8s-${{ matrix.patch }}.snap
path: build
path: ${{ github.workspace }}/build
- name: Apply ${{ matrix.patch }} patch
run: |
./build-scripts/patches/${{ matrix.patch }}/apply
- name: Run end to end tests
env:
TEST_SNAP: ${{ github.workspace }}/build/k8s-${{ matrix.patch }}.snap
TEST_SUBSTRATE: lxd
TEST_LXD_IMAGE: ${{ matrix.os }}
TEST_FLAVOR: ${{ matrix.patch }}
TEST_INSPECTION_REPORTS_DIR: ${{ github.workspace }}/inspection-reports
run: |
export TEST_SNAP="$PWD/build/k8s-${{ matrix.patch }}.snap"
export TEST_SUBSTRATE=lxd
export TEST_LXD_IMAGE=${{ matrix.os }}
export TEST_INSPECTION_REPORTS_DIR="$HOME/inspection-reports"
cd tests/integration && sg lxd -c 'tox -e integration'
- name: Prepare inspection reports
if: failure()
run: |
tar -czvf inspection-reports.tar.gz -C $HOME inspection-reports
tar -czvf inspection-reports.tar.gz -C ${{ github.workspace }} inspection-reports
echo "artifact_name=inspection-reports-${{ matrix.os }}-${{ matrix.patch }}" | sed 's/:/-/g' >> $GITHUB_ENV
- name: Upload inspection report artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: inspection-reports.tar.gz
path: ${{ github.workspace }}/inspection-reports.tar.gz
Loading
Loading