From 914191b5c00b7a6153d4219b8893d2b96946a738 Mon Sep 17 00:00:00 2001 From: Automated Release Date: Wed, 30 Oct 2024 22:30:49 +0000 Subject: [PATCH 1/5] Update Submariner dependencies to v0.20.0-m0 Signed-off-by: Automated Release --- api/v1alpha1/versions.go | 6 +++--- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/api/v1alpha1/versions.go b/api/v1alpha1/versions.go index 2245174d0..d9ff61e60 100644 --- a/api/v1alpha1/versions.go +++ b/api/v1alpha1/versions.go @@ -20,7 +20,7 @@ package v1alpha1 var ( DefaultRepo = "quay.io/submariner" - DefaultSubmarinerOperatorVersion = "0.19.0-m3" - DefaultSubmarinerVersion = "0.19.0-m3" - DefaultLighthouseVersion = "0.19.0-m3" + DefaultSubmarinerOperatorVersion = "0.20.0-m0" + DefaultSubmarinerVersion = "0.20.0-m0" + DefaultLighthouseVersion = "0.20.0-m0" ) diff --git a/go.mod b/go.mod index 2086bf476..7d6d6b39f 100644 --- a/go.mod +++ b/go.mod @@ -12,10 +12,10 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.76.2 github.com/prometheus-operator/prometheus-operator/pkg/client v0.76.2 - github.com/prometheus/client_golang v1.20.2 - github.com/submariner-io/admiral v0.19.0-m3 - github.com/submariner-io/shipyard v0.19.0-m3 - github.com/submariner-io/submariner v0.19.0-m3 + github.com/prometheus/client_golang v1.20.5 + github.com/submariner-io/admiral v0.20.0-m0 + github.com/submariner-io/shipyard v0.20.0-m0 + github.com/submariner-io/submariner v0.20.0-m0 golang.org/x/net v0.30.0 golang.org/x/text v0.19.0 k8s.io/api v0.31.2 @@ -23,7 +23,7 @@ require ( k8s.io/apimachinery v0.31.2 k8s.io/client-go v0.31.2 k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 - sigs.k8s.io/controller-runtime v0.19.0 + sigs.k8s.io/controller-runtime v0.19.1 sigs.k8s.io/yaml v1.4.0 ) @@ -71,7 +71,7 @@ require ( golang.org/x/oauth2 v0.22.0 // indirect golang.org/x/sys v0.26.0 // indirect golang.org/x/term v0.25.0 // indirect - golang.org/x/time v0.6.0 // indirect + golang.org/x/time v0.7.0 // indirect golang.org/x/tools v0.24.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/protobuf v1.34.2 // indirect diff --git a/go.sum b/go.sum index eb6217b50..3aaa9f7cd 100644 --- a/go.sum +++ b/go.sum @@ -339,8 +339,8 @@ github.com/prometheus-operator/prometheus-operator/pkg/client v0.76.2/go.mod h1: github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg= -github.com/prometheus/client_golang v1.20.2/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -395,12 +395,12 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/submariner-io/admiral v0.19.0-m3 h1:LTkYxCvB8S1210P2FZtCb6dzjaPpIgBrRQxZkH/snDo= -github.com/submariner-io/admiral v0.19.0-m3/go.mod h1:xRpP1rDOblEdPHr0qrC+plcTNfShYJAOH2fexqOmI1A= -github.com/submariner-io/shipyard v0.19.0-m3 h1:NliwAktRPF4OsLj1TDgpaOJD/bmmZW/FH9+mJmWgxbk= -github.com/submariner-io/shipyard v0.19.0-m3/go.mod h1:BY1ceSnPz1/hN5F9uljcSzy5n5qgAOENsIvZpJ+XPOU= -github.com/submariner-io/submariner v0.19.0-m3 h1:UHfG15WNOFH05WF6keLtj4+y1nxL7HiDmQqG6uk+EEI= -github.com/submariner-io/submariner v0.19.0-m3/go.mod h1:0Am9/udIvtZO8hM7YvRTbIsEWGD8YrCR2JHzNmTGyHg= +github.com/submariner-io/admiral v0.20.0-m0 h1:1CnVJQ9VFxHSu0k0iO55QzKFpWJku5a38NL0JLkwR/c= +github.com/submariner-io/admiral v0.20.0-m0/go.mod h1:SNwCDY4MmhfcXfueh6qv/bVwV57Dj3e/TPB1+dtn1UA= +github.com/submariner-io/shipyard v0.20.0-m0 h1:w1GS62iQL458skQtJZbpkkddr45TjX5UDA3ecaus3xA= +github.com/submariner-io/shipyard v0.20.0-m0/go.mod h1:2A1RY9TJeVuWiAh+u51VsznQlKyvl5KdnBLBjKeylTA= +github.com/submariner-io/submariner v0.20.0-m0 h1:QKmpaV9+k2RUK38tjRICZvmFIbh0GCCzxHfHBDMm0g8= +github.com/submariner-io/submariner v0.20.0-m0/go.mod h1:5lbMkVCS+x9QSrTsXQXZDedHDVzUdP3hSlfqUdqYEqs= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -526,8 +526,8 @@ golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -646,8 +646,8 @@ k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1 k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/controller-runtime v0.6.1/go.mod h1:XRYBPdbf5XJu9kpS84VJiZ7h/u1hF3gEORz0efEja7A= -sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= -sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= +sigs.k8s.io/controller-runtime v0.19.1 h1:Son+Q40+Be3QWb+niBXAg2vFiYWolDjjRfO8hn/cxOk= +sigs.k8s.io/controller-runtime v0.19.1/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= From 54cae5f641c42310a30a70cbf3412a1269f1bcb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 05:51:43 +0000 Subject: [PATCH 2/5] Bump the github-actions group with 6 updates Bumps the github-actions group with 6 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4.2.0` | `4.2.2` | | [github/codeql-action](https://github.com/github/codeql-action) | `3.26.10` | `3.27.0` | | [anchore/scan-action](https://github.com/anchore/scan-action) | `4.1.2` | `5.2.0` | | [sonarsource/sonarcloud-github-action](https://github.com/sonarsource/sonarcloud-github-action) | `3.0.0` | `3.1.0` | | [actions/setup-go](https://github.com/actions/setup-go) | `5.0.2` | `5.1.0` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.4.0` | `4.4.3` | Updates `actions/checkout` from 4.2.0 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/d632683dd7b4114ad314bca15554477dd762a938...11bd71901bbe5b1630ceea73d27597364c9af683) Updates `github/codeql-action` from 3.26.10 to 3.27.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/e2b3eafc8d227b0241d48be5f425d47c2d750a13...662472033e021d55d94146f66f6058822b0b39fd) Updates `anchore/scan-action` from 4.1.2 to 5.2.0 - [Release notes](https://github.com/anchore/scan-action/releases) - [Changelog](https://github.com/anchore/scan-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/anchore/scan-action/compare/64a33b277ea7a1215a3c142735a1091341939ff5...5ed195cc06065322983cae4bb31e2a751feb86fd) Updates `sonarsource/sonarcloud-github-action` from 3.0.0 to 3.1.0 - [Release notes](https://github.com/sonarsource/sonarcloud-github-action/releases) - [Commits](https://github.com/sonarsource/sonarcloud-github-action/compare/eb211723266fe8e83102bac7361f0a05c3ac1d1b...383f7e52eae3ab0510c3cb0e7d9d150bbaeab838) Updates `actions/setup-go` from 5.0.2 to 5.1.0 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32...41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed) Updates `actions/upload-artifact` from 4.4.0 to 4.4.3 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/50769540e7f4bd5e21e526ee35c689e35e0d6874...b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: anchore/scan-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: sonarsource/sonarcloud-github-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/codeowners.yml | 2 +- .github/workflows/e2e-all-k8s.yml | 2 +- .github/workflows/e2e-full.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/flake_finder.yml | 4 ++-- .github/workflows/linting.yml | 34 +++++++++++++++--------------- .github/workflows/multiarch.yml | 2 +- .github/workflows/periodic.yml | 2 +- .github/workflows/prometheus.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/report.yml | 16 +++++++------- .github/workflows/subctl-unit.yml | 8 +++---- .github/workflows/system.yml | 2 +- .github/workflows/unit.yml | 4 ++-- .github/workflows/upgrade-e2e.yml | 2 +- 15 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/codeowners.yml b/.github/workflows/codeowners.yml index 66385cb70..2cfcad25f 100644 --- a/.github/workflows/codeowners.yml +++ b/.github/workflows/codeowners.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Delete current CODEOWNERS file run: rm CODEOWNERS - name: Run gen-codeowners to rebuild CODEOWNERS file diff --git a/.github/workflows/e2e-all-k8s.yml b/.github/workflows/e2e-all-k8s.yml index 5d3fa3ca2..0c7d1695a 100644 --- a/.github/workflows/e2e-all-k8s.yml +++ b/.github/workflows/e2e-all-k8s.yml @@ -31,7 +31,7 @@ jobs: globalnet: 'globalnet' steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run E2E deployment and tests uses: submariner-io/shipyard/gh-actions/e2e@devel diff --git a/.github/workflows/e2e-full.yml b/.github/workflows/e2e-full.yml index c43190de0..094fbfde7 100644 --- a/.github/workflows/e2e-full.yml +++ b/.github/workflows/e2e-full.yml @@ -31,7 +31,7 @@ jobs: - k8s_version: '1.28' steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run E2E deployment and tests uses: submariner-io/shipyard/gh-actions/e2e@devel diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0e9a33465..a3cb94305 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run E2E deployment and tests uses: submariner-io/shipyard/gh-actions/e2e@devel diff --git a/.github/workflows/flake_finder.yml b/.github/workflows/flake_finder.yml index 3b06b1b8f..f63b5f0e5 100644 --- a/.github/workflows/flake_finder.yml +++ b/.github/workflows/flake_finder.yml @@ -26,7 +26,7 @@ jobs: - k8s_version: '1.26' steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run E2E deployment and tests uses: submariner-io/shipyard/gh-actions/e2e@devel @@ -46,7 +46,7 @@ jobs: fail-fast: false steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Install an old cluster, upgrade it and check it uses: submariner-io/shipyard/gh-actions/upgrade-e2e@devel diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index af6550d1b..4f913e861 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Create the bundle and validate it run: make bundle @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run make manifests to update CRDs run: make manifests - name: Validate that nothing has changed @@ -58,7 +58,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - name: Run gitlint @@ -69,7 +69,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run golangci-lint run: make golangci-lint @@ -78,7 +78,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Check the licenses run: make licensecheck @@ -88,7 +88,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run markdown-link-check uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec @@ -102,7 +102,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run markdownlint run: make markdownlint @@ -111,7 +111,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run packagedoc-lint run: make packagedoc-lint @@ -120,7 +120,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run shellcheck run: make shellcheck @@ -129,13 +129,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Initialize CodeQL - uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 + uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd with: languages: go - name: Run CodeQL variant analysis - uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 + uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd - name: Show CodeQL scan SARIF report if: always() run: cat ../results/go.sarif @@ -145,9 +145,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run Anchore vulnerability scanner - uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 + uses: anchore/scan-action@5ed195cc06065322983cae4bb31e2a751feb86fd id: scan with: path: "." @@ -158,7 +158,7 @@ jobs: run: cat ${{ steps.scan.outputs.sarif }} - name: Upload Anchore scan SARIF report if: always() - uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 + uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd with: sarif_file: ${{ steps.scan.outputs.sarif }} @@ -167,7 +167,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run yamllint run: make yamllint @@ -176,7 +176,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run make pkg/embeddedyamls/yamls.go to update embedded YAMLs run: make pkg/embeddedyamls/yamls.go - name: Validate that nothing has changed diff --git a/.github/workflows/multiarch.yml b/.github/workflows/multiarch.yml index 406d1ba57..651d94ee3 100644 --- a/.github/workflows/multiarch.yml +++ b/.github/workflows/multiarch.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Set up QEMU (to support building on non-native architectures) uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf - name: Build the multi-arch images diff --git a/.github/workflows/periodic.yml b/.github/workflows/periodic.yml index 12a22a48f..96de4f945 100644 --- a/.github/workflows/periodic.yml +++ b/.github/workflows/periodic.yml @@ -16,7 +16,7 @@ jobs: issues: write steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run markdown-link-check uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec diff --git a/.github/workflows/prometheus.yml b/.github/workflows/prometheus.yml index 93cb89d1d..80d72405d 100644 --- a/.github/workflows/prometheus.yml +++ b/.github/workflows/prometheus.yml @@ -17,7 +17,7 @@ jobs: || ( github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'check-prometheus') ) steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Reclaim free space run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e8dc00ab..f486d251c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index 432fa4ecb..b462580e4 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 @@ -24,7 +24,7 @@ jobs: run: make unit - name: Run SonarScan, upload Go test results and coverage - uses: sonarsource/sonarcloud-github-action@eb211723266fe8e83102bac7361f0a05c3ac1d1b + uses: sonarsource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} @@ -36,13 +36,13 @@ jobs: security-events: write steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Initialize CodeQL - uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 + uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd with: languages: go - name: Run CodeQL variant analysis - uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 + uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd - name: Show CodeQL scan SARIF report if: always() run: cat ../results/go.sarif @@ -55,9 +55,9 @@ jobs: security-events: write steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Run Anchore vulnerability scanner - uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 + uses: anchore/scan-action@5ed195cc06065322983cae4bb31e2a751feb86fd id: scan with: path: "." @@ -65,6 +65,6 @@ jobs: - name: Show Anchore scan SARIF report run: cat ${{ steps.scan.outputs.sarif }} - name: Upload Anchore scan SARIF report - uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 + uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd with: sarif_file: ${{ steps.scan.outputs.sarif }} diff --git a/.github/workflows/subctl-unit.yml b/.github/workflows/subctl-unit.yml index 10d9fcd72..e9f7030b3 100644 --- a/.github/workflows/subctl-unit.yml +++ b/.github/workflows/subctl-unit.yml @@ -12,12 +12,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the submariner-operator repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: path: submariner-operator - name: Check out the subctl repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: repository: submariner-io/subctl path: subctl @@ -26,14 +26,14 @@ jobs: - name: Check out the shipyard repository # This is required so that we can run a build involving multiple # repositories (using LOCAL_BUILD=1) - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: repository: submariner-io/shipyard path: shipyard ref: ${{ github.base_ref }} - name: Set up Go - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 + uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed with: go-version: '1.22' check-latest: true diff --git a/.github/workflows/system.yml b/.github/workflows/system.yml index bcfd1a24a..28320e2a1 100644 --- a/.github/workflows/system.yml +++ b/.github/workflows/system.yml @@ -17,7 +17,7 @@ jobs: globalnet: ['', 'globalnet'] steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Deploy the environment and run the tests uses: submariner-io/shipyard/gh-actions/e2e@devel diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 932d172c3..08a314f97 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Create artifacts directory run: mkdir artifacts @@ -33,7 +33,7 @@ jobs: done - name: Upload artifacts - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: name: Unit test artifacts path: artifacts diff --git a/.github/workflows/upgrade-e2e.yml b/.github/workflows/upgrade-e2e.yml index 0825971c5..074b80720 100644 --- a/.github/workflows/upgrade-e2e.yml +++ b/.github/workflows/upgrade-e2e.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false steps: - name: Check out the repository - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Install an old cluster, upgrade it and check it uses: submariner-io/shipyard/gh-actions/upgrade-e2e@devel From 186fd63cbd626132f14de465a46e50d5f4bb8dad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 05:49:24 +0000 Subject: [PATCH 3/5] Bump sigs.k8s.io/controller-tools from 0.16.4 to 0.16.5 in /tools Bumps [sigs.k8s.io/controller-tools](https://github.com/kubernetes-sigs/controller-tools) from 0.16.4 to 0.16.5. - [Release notes](https://github.com/kubernetes-sigs/controller-tools/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-tools/blob/main/envtest-releases.yaml) - [Commits](https://github.com/kubernetes-sigs/controller-tools/compare/v0.16.4...v0.16.5) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-tools dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- tools/go.mod | 16 ++++++++-------- tools/go.sum | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index c2dfe97ff..3d284c7c6 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/operator-framework/operator-sdk v1.37.0 github.com/uw-labs/lichen v0.1.7 - sigs.k8s.io/controller-tools v0.16.4 + sigs.k8s.io/controller-tools v0.16.5 sigs.k8s.io/kustomize/kustomize/v3 v3.10.0 ) @@ -55,7 +55,7 @@ require ( github.com/evanphx/json-patch v5.7.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.8.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect - github.com/fatih/color v1.17.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/fatih/structtag v1.1.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -216,13 +216,13 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect helm.sh/helm/v3 v3.14.4 // indirect - k8s.io/api v0.31.1 // indirect - k8s.io/apiextensions-apiserver v0.31.1 // indirect - k8s.io/apimachinery v0.31.1 // indirect - k8s.io/apiserver v0.31.1 // indirect + k8s.io/api v0.31.2 // indirect + k8s.io/apiextensions-apiserver v0.31.2 // indirect + k8s.io/apimachinery v0.31.2 // indirect + k8s.io/apiserver v0.31.2 // indirect k8s.io/cli-runtime v0.29.3 // indirect - k8s.io/client-go v0.31.1 // indirect - k8s.io/component-base v0.31.1 // indirect + k8s.io/client-go v0.31.2 // indirect + k8s.io/component-base v0.31.2 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/kubectl v0.29.3 // indirect diff --git a/tools/go.sum b/tools/go.sum index 064e03280..d17821326 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -168,8 +168,8 @@ github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/fatih/structtag v1.1.0 h1:6j4mUV/ES2duvnAzKMFkN6/A5mCaNYPD3xfbAkLLOF8= github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -1067,20 +1067,20 @@ helm.sh/helm/v3 v3.14.4/go.mod h1:Tje7LL4gprZpuBNTbG34d1Xn5NmRT3OWfBRwpOSer9I= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= -k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= -k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40= -k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ= -k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= -k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/apiserver v0.31.1 h1:Sars5ejQDCRBY5f7R3QFHdqN3s61nhkpaX8/k1iEw1c= -k8s.io/apiserver v0.31.1/go.mod h1:lzDhpeToamVZJmmFlaLwdYZwd7zB+WYRYIboqA1kGxM= +k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= +k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/apiextensions-apiserver v0.31.2 h1:W8EwUb8+WXBLu56ser5IudT2cOho0gAKeTOnywBLxd0= +k8s.io/apiextensions-apiserver v0.31.2/go.mod h1:i+Geh+nGCJEGiCGR3MlBDkS7koHIIKWVfWeRFiOsUcM= +k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= +k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apiserver v0.31.2 h1:VUzOEUGRCDi6kX1OyQ801m4A7AUPglpsmGvdsekmcI4= +k8s.io/apiserver v0.31.2/go.mod h1:o3nKZR7lPlJqkU5I3Ove+Zx3JuoFjQobGX1Gctw6XuE= k8s.io/cli-runtime v0.29.3 h1:r68rephmmytoywkw2MyJ+CxjpasJDQY7AGc3XY2iv1k= k8s.io/cli-runtime v0.29.3/go.mod h1:aqVUsk86/RhaGJwDhHXH0jcdqBrgdF3bZWk4Z9D4mkM= -k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= -k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= -k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= -k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= +k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= +k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/component-base v0.31.2 h1:Z1J1LIaC0AV+nzcPRFqfK09af6bZ4D1nAOpWsy9owlA= +k8s.io/component-base v0.31.2/go.mod h1:9PeyyFN/drHjtJZMCTkSpQJS3U9OXORnHQqMLDz0sUQ= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= @@ -1098,8 +1098,8 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsA sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/controller-runtime v0.17.4 h1:AMf1E0+93/jLQ13fb76S6Atwqp24EQFCmNbG84GJxew= sigs.k8s.io/controller-runtime v0.17.4/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= -sigs.k8s.io/controller-tools v0.16.4 h1:VXmar78eDXbx1by/H09ikEq1hiq3bqInxuV3lMr3GmQ= -sigs.k8s.io/controller-tools v0.16.4/go.mod h1:kcsZyYMXiOFuBhofSPtkB90zTSxVRxVVyvtKQcx3q1A= +sigs.k8s.io/controller-tools v0.16.5 h1:5k9FNRqziBPwqr17AMEPPV/En39ZBplLAdOwwQHruP4= +sigs.k8s.io/controller-tools v0.16.5/go.mod h1:8vztuRVzs8IuuJqKqbXCSlXcw+lkAv/M2sTpg55qjMY= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kubebuilder/v3 v3.14.2 h1:LMZW8Y5eItnP4kh9tpp4Gs2Gd5V3DgLgzbNnXfMAShY= From bc063dac4fe0067626eaf358a5191e13404a8303 Mon Sep 17 00:00:00 2001 From: Aswin A Date: Mon, 4 Nov 2024 18:23:46 +0530 Subject: [PATCH 4/5] Enhance flannel discovery by listing DaemonSets across all namespaces Signed-off-by: Aswin A Contributes to: https://github.com/submariner-io/submariner/issues/3210 --- pkg/discovery/network/canal.go | 3 ++- pkg/discovery/network/flannel.go | 39 ++++++++++++++++++--------- pkg/discovery/network/flannel_test.go | 31 ++++++++++++++++++++- 3 files changed, 59 insertions(+), 14 deletions(-) diff --git a/pkg/discovery/network/canal.go b/pkg/discovery/network/canal.go index 86d602297..ffb40946e 100644 --- a/pkg/discovery/network/canal.go +++ b/pkg/discovery/network/canal.go @@ -43,8 +43,9 @@ func discoverCanalFlannelNetwork(ctx context.Context, client controllerClient.Cl return nil, nil } + // Pass the namespace to the function call clusterNetwork, err := extractCIDRsFromFlannelConfigMap(ctx, client, findFlannelConfigMapName( - daemonsets.Items[0].Spec.Template.Spec.Volumes)) + daemonsets.Items[0].Spec.Template.Spec.Volumes), metav1.NamespaceSystem) if err != nil || clusterNetwork == nil { return nil, err } diff --git a/pkg/discovery/network/flannel.go b/pkg/discovery/network/flannel.go index 9e23c6058..a2fc25c9b 100644 --- a/pkg/discovery/network/flannel.go +++ b/pkg/discovery/network/flannel.go @@ -28,7 +28,6 @@ import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" controllerClient "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -36,35 +35,51 @@ import ( func discoverFlannelNetwork(ctx context.Context, client controllerClient.Client) (*ClusterNetwork, error) { daemonsets := &appsv1.DaemonSetList{} - err := client.List(ctx, daemonsets, controllerClient.InNamespace(metav1.NamespaceSystem)) + // List all DaemonSets across all namespaces that have the label "k8s-app=flannel" + // This is used to identify if the cluster is running Flannel as its CNI plugin. + err := client.List(ctx, daemonsets, controllerClient.MatchingLabels{"k8s-app": "flannel"}) if err != nil { return nil, errors.WithMessage(err, "error listing the Daemonsets for flannel discovery") } + var flannelDaemonSet *appsv1.DaemonSet volumes := make([]corev1.Volume, 0) - // look for a daemonset matching "flannel" - for k := range daemonsets.Items { - if strings.Contains(daemonsets.Items[k].Name, "flannel") { - volumes = daemonsets.Items[k].Spec.Template.Spec.Volumes + + // Find the first DaemonSet with "flannel" in its name and store its reference and volumes. + for i := range daemonsets.Items { + ds := &daemonsets.Items[i] + if strings.Contains(ds.Name, "flannel") { + flannelDaemonSet = ds + volumes = ds.Spec.Template.Spec.Volumes + + break } } - if len(volumes) < 1 { + if flannelDaemonSet == nil || len(volumes) < 1 { return nil, nil } - clusterNetwork, err := extractCIDRsFromFlannelConfigMap(ctx, client, findFlannelConfigMapName(volumes)) - if err != nil || clusterNetwork == nil { + // Extract the ConfigMap name from the DaemonSet's volumes and check in the same namespace + configMapName := findFlannelConfigMapName(volumes) + + clusterNetwork, err := extractCIDRsFromFlannelConfigMap(ctx, client, configMapName, flannelDaemonSet.Namespace) + if err != nil { return nil, err } + if clusterNetwork == nil { + return nil, errors.New("cluster network is nil") + } + clusterNetwork.NetworkPlugin = cni.Flannel return clusterNetwork, nil } //nolint:nilnil // Intentional as the purpose is to discover. -func extractCIDRsFromFlannelConfigMap(ctx context.Context, client controllerClient.Client, configMapName string) (*ClusterNetwork, error) { +func extractCIDRsFromFlannelConfigMap(ctx context.Context, client controllerClient.Client, configMapName, namespace string, +) (*ClusterNetwork, error) { var podCIDR *string if configMapName == "" { @@ -75,11 +90,11 @@ func extractCIDRsFromFlannelConfigMap(ctx context.Context, client controllerClie podCIDR = &podIPRange } else { - // look for the configmap details using the configmap name discovered from the daemonset + // Look for the ConfigMap in the specified namespace cm := &corev1.ConfigMap{} err := client.Get(ctx, controllerClient.ObjectKey{ - Namespace: metav1.NamespaceSystem, + Namespace: namespace, Name: configMapName, }, cm) if err != nil { diff --git a/pkg/discovery/network/flannel_test.go b/pkg/discovery/network/flannel_test.go index 67ebd1d5a..6bda2ed9e 100644 --- a/pkg/discovery/network/flannel_test.go +++ b/pkg/discovery/network/flannel_test.go @@ -50,6 +50,32 @@ var _ = Describe("Flannel Network", func() { }) }) + When("a DaemonSet exists without the flannel label", func() { + It("should return a ClusterNetwork with the generic plugin", func(ctx SpecContext) { + nonFlannelDaemonSet := appsv1.DaemonSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: "non-flannel-ds", + Namespace: metav1.NamespaceSystem, + Labels: map[string]string{"k8s-app": "non-flannel"}, + }, + Spec: appsv1.DaemonSetSpec{ + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"k8s-app": "non-flannel"}, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{flannelCfgVolume}, + }, + }, + }, + } + + clusterNet := testDiscoverNetworkSuccess(ctx, &nonFlannelDaemonSet) + Expect(clusterNet).NotTo(BeNil()) + Expect(clusterNet.NetworkPlugin).To(Equal(cni.Generic)) + }) + }) + When("the flannel ConfigMap does not exist", func() { It("should return a ClusterNetwork with the generic plugin", func(ctx SpecContext) { clusterNet := testDiscoverNetworkSuccess(ctx, &flannelDaemonSet) @@ -63,10 +89,13 @@ var flannelDaemonSet = appsv1.DaemonSet{ ObjectMeta: metav1.ObjectMeta{ Name: "kube-flannel-ds", Namespace: metav1.NamespaceSystem, + Labels: map[string]string{"k8s-app": "flannel"}, }, Spec: appsv1.DaemonSetSpec{ Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"k8s-app": "flannel"}, + }, Spec: corev1.PodSpec{ Volumes: []corev1.Volume{flannelCfgVolume}, }, From d3faa11e124231d44afac2fee1514490d2cbe974 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:42:53 +0000 Subject: [PATCH 5/5] Bump golang.org/x/net from 0.30.0 to 0.31.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.30.0 to 0.31.0. - [Commits](https://github.com/golang/net/compare/v0.30.0...v0.31.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 7d6d6b39f..ed9784db3 100644 --- a/go.mod +++ b/go.mod @@ -16,8 +16,8 @@ require ( github.com/submariner-io/admiral v0.20.0-m0 github.com/submariner-io/shipyard v0.20.0-m0 github.com/submariner-io/submariner v0.20.0-m0 - golang.org/x/net v0.30.0 - golang.org/x/text v0.19.0 + golang.org/x/net v0.31.0 + golang.org/x/text v0.20.0 k8s.io/api v0.31.2 k8s.io/apiextensions-apiserver v0.31.2 k8s.io/apimachinery v0.31.2 @@ -69,8 +69,8 @@ require ( github.com/x448/float16 v0.8.4 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/oauth2 v0.22.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/term v0.26.0 // indirect golang.org/x/time v0.7.0 // indirect golang.org/x/tools v0.24.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 3aaa9f7cd..aa4e7c4c4 100644 --- a/go.sum +++ b/go.sum @@ -471,8 +471,8 @@ golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -512,17 +512,17 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=