From af765388d2938b9275feb7a687bd42bb5046951e Mon Sep 17 00:00:00 2001 From: Josh De Winne Date: Mon, 4 Nov 2024 08:51:30 -0800 Subject: [PATCH 1/4] Update conformance.yaml Signed-off-by: Josh De Winne --- .github/workflows/conformance.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conformance.yaml b/.github/workflows/conformance.yaml index 9f3f3785..0d167715 100644 --- a/.github/workflows/conformance.yaml +++ b/.github/workflows/conformance.yaml @@ -107,7 +107,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITPROVIDER_BOT_TOKEN }} - name: Create cluster id: create-cluster - uses: replicatedhq/compatibility-actions/create-cluster@77121785951d05387334b773644c356885191f14 # v1.16.2 + uses: replicatedhq/replicated-actions/create-cluster@77121785951d05387334b773644c356885191f14 # v1.16.2 with: api-token: ${{ secrets.REPLICATED_API_TOKEN }} kubernetes-distribution: "k3s" @@ -200,7 +200,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITPROVIDER_BOT_TOKEN }} - name: Create cluster id: create-cluster - uses: replicatedhq/compatibility-actions/create-cluster@77121785951d05387334b773644c356885191f14 # v1.16.2 + uses: replicatedhq/replicated-actions/create-cluster@77121785951d05387334b773644c356885191f14 # v1.16.2 with: api-token: ${{ secrets.REPLICATED_API_TOKEN }} kubernetes-distribution: "openshift" From 9abc802f15bebbbf220421f7a3078feb190fce56 Mon Sep 17 00:00:00 2001 From: h3nryc0ding <101796272+h3nryc0ding@users.noreply.github.com> Date: Sun, 10 Nov 2024 02:50:04 +0000 Subject: [PATCH 2/4] fix: error message for missing kind Signed-off-by: h3nryc0ding <101796272+h3nryc0ding@users.noreply.github.com> Signed-off-by: h3nryc0ding --- internal/flags/kustomization_source.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/flags/kustomization_source.go b/internal/flags/kustomization_source.go index 4dc124ab..3f339585 100644 --- a/internal/flags/kustomization_source.go +++ b/internal/flags/kustomization_source.go @@ -53,7 +53,7 @@ func (s *KustomizationSource) Set(str string) error { } if sourceKind == "" { if utils.ContainsItemString(supportedKustomizationSourceKinds, sourceName) { - return fmt.Errorf("no name given for source of kind '%s'", sourceName) + return fmt.Errorf("no kind specified for source '%s'", sourceName) } sourceKind = sourcev1.GitRepositoryKind } From 995e1dcc32c21c319b759010c13433e5434e58e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Wed, 13 Nov 2024 14:39:41 +0100 Subject: [PATCH 3/4] docs: Mention Flux upgrade guide in release notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/fluxcd/flux2/discussions/5072 Signed-off-by: Mateusz Łoskot --- docs/release/release-notes-template.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/release/release-notes-template.md b/docs/release/release-notes-template.md index 0b3a41de..2a05d5c5 100644 --- a/docs/release/release-notes-template.md +++ b/docs/release/release-notes-template.md @@ -43,6 +43,9 @@ The following template can be used for the GitHub release page: ``` +Typically, you want to link the [Flux upgrade](https://fluxcd.io/flux/installation/upgrade/) +guide to refer users for up to date information on upgrade options. + In some scenarios, you may want to include specific information about API changes and/or upgrade procedures. Consult [the formatting of `v2.0.0-rc.1`](https://github.com/fluxcd/flux2/releases/tag/v2.0.0-rc.1) for @@ -69,4 +72,4 @@ The following template can be used for the Slack release message: ``` For more concrete examples, see the pinned messages in the [Flux Slack -channel](https://cloud-native.slack.com/archives/CLAJ40HV3). \ No newline at end of file +channel](https://cloud-native.slack.com/archives/CLAJ40HV3). From 7697699e6542b2b776823013b1db0d87419f61ad Mon Sep 17 00:00:00 2001 From: Milas Bowman Date: Tue, 12 Nov 2024 11:58:13 -0500 Subject: [PATCH 4/4] fix: skip remote Kustomizations on recursive diff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When recursively diffing Kustomization objects on a cluster, each Kustomization is built and then a server-side dry-run apply is performed. This isn't practical to perform if the Kustomization references a remote cluster via `kubeConfig.secretRef`. Currently, because it's not skipped, it's treated as though it's being applied to the context cluster, not the remote cluter, which results in an incorrect diff. Instead, write out special message / warnings indicating that it has been skipped: ``` ► Kustomization/my-ns/my-kst skipped: diff not supported for remote clusters ``` Signed-off-by: Milas Bowman --- internal/build/diff.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/internal/build/diff.go b/internal/build/diff.go index e13ecbb4..17002202 100644 --- a/internal/build/diff.go +++ b/internal/build/diff.go @@ -146,14 +146,18 @@ func (b *Builder) diff() (string, bool, error) { } if !kustomizationsEqual(k, b.kustomization) { - subOutput, subCreatedOrDrifted, err := b.kustomizationDiff(k) - if err != nil { - diffErrs = append(diffErrs, err) - } - if subCreatedOrDrifted { - createdOrDrifted = true - output.WriteString(bunt.Sprint(fmt.Sprintf("📁 %s changed\n", ssautil.FmtUnstructured(obj)))) - output.WriteString(subOutput) + if k.Spec.KubeConfig != nil { + output.WriteString(writeString(fmt.Sprintf("⚠️ %s skipped: diff not supported for remote clusters\n", ssautil.FmtUnstructured(obj)), bunt.Orange)) + } else { + subOutput, subCreatedOrDrifted, err := b.kustomizationDiff(k) + if err != nil { + diffErrs = append(diffErrs, err) + } + if subCreatedOrDrifted { + createdOrDrifted = true + output.WriteString(bunt.Sprint(fmt.Sprintf("📁 %s changed\n", ssautil.FmtUnstructured(obj)))) + output.WriteString(subOutput) + } } // finished with Kustomization diff