Skip to content

Add --ns-follows-kube-context global flag for using the kubeconfig context namespace - #5831

Merged
matheuscscp merged 1 commit into
fluxcd:mainfrom
jtyr:jtyr-context-ns
Apr 30, 2026
Merged

matheuscscp merged 1 commit into
fluxcd:mainfrom
jtyr:jtyr-context-ns

Conversation

@jtyr

@jtyr jtyr commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The flux CLI ignores the namespace set in the current kubeconfig context and always defaults to flux-system when --namespace is not explicitly provided. This means users who set a namespace via kubectl config set-context --current --namespace=... still have to pass -n on every flux command.

Fix: #3453

Fix

Resolve the namespace from the kubeconfig context when neither --namespace nor FLUX_SYSTEM_NAMESPACE is set. The flux-system default is preserved as the final fallback.

The resulting priority order (highest to lowest):

  1. --namespace / -n flag
  2. FLUX_SYSTEM_NAMESPACE environment variable
  3. Kubeconfig context namespace
  4. flux-system

The context lookup runs in PersistentPreRunE (after flag parsing), so it correctly respects --context and --kubeconfig flags when determining which context to read from.

Testing

Added unit tests covering:

  • Namespace returned from the current context
  • --context flag selecting a different context's namespace
  • Context with no namespace set (empty string)
  • Non-existent context
  • FLUX_SYSTEM_NAMESPACE taking precedence over context namespace
  • --namespace flag taking precedence over context namespace
  • Fallback to flux-system when context has no namespace

@jtyr
jtyr force-pushed the jtyr-context-ns branch 2 times, most recently from 168c848 to 78b99e0 Compare April 10, 2026 07:34
@stefanprodan

stefanprodan commented Apr 10, 2026 •

Copy link
Copy Markdown
Member

This is a major breaking change that we can not accept. Imagine how many CI pipelines and custom scripts we are going to break with this, e.g. you have flux bootstrap in your pipeline, the default namespace in kubeconfig is to some namespace, with this change new clusters will end up with Flux in the selected namespace instead of flux-system.

@jtyr
jtyr force-pushed the jtyr-context-ns branch from 78b99e0 to 642533e Compare April 10, 2026 08:00
@matheuscscp

Copy link
Copy Markdown
Member

We had lots of discussions around this over the years. This is a bug that became expected behavior at this point, so we cannot break it.


However, across discussions someone suggested an env var for opting into this behavior, which would not be a breaking change and I'd be ok with it. Env var or flag, not sure what's best, though.

@jtyr

jtyr commented Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, @stefanprodan. I understand your concern.

This behavior was discussed and classified as a bug in #3453, with the consensus being that the kubeconfig context namespace should be respected (see #3453 (comment)). That said, I understand the concern about breaking existing CI pipelines and scripts that rely on flux-system being the implicit default.

Would an opt-in approach work for now? For example, introducing a FLUX_NS_FOLLOWS_KUBE_CONTEXT environment variable that users can set to enable the context namespace resolution, while keeping the current behavior as the default. This way existing workflows remain unaffected and users who want this can explicitly opt in, with the option to make it the default in a future major version.

Or would you prefer a different approach entirely?

@jtyr

jtyr commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for joining the discussion, @matheuscscp. How about supporting both?

  • A --ns-follows-kube-context flag, which can also be set via an alias (alias flux='/usr/bin/flux --ns-follows-kube-context')
  • A FLUX_NS_FOLLOWS_KUBE_CONTEXT environment variable (export FLUX_NS_FOLLOWS_KUBE_CONTEXT=1)

This follows the existing pattern where FLUX_SYSTEM_NAMESPACE provides an env var alternative. The flag gives per-command control, while the env var allows setting it globally in a shell profile or CI environment.

Would that be acceptable?

@matheuscscp

Copy link
Copy Markdown
Member

I have no objections to this solution

@jtyr
jtyr force-pushed the jtyr-context-ns branch 3 times, most recently from e16ed58 to a1ddbb5 Compare April 10, 2026 13:22
@jtyr

jtyr commented Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

@matheuscscp @stefanprodan I have updated the implementation to make the context namespace resolution opt-in. It can be enabled via one of the following:

  • --ns-follows-kube-context flag (e.g. alias flux='flux --ns-follows-kube-context')
  • FLUX_NS_FOLLOWS_KUBE_CONTEXT env var (e.g. export FLUX_NS_FOLLOWS_KUBE_CONTEXT=1)

Without either of these, the existing behavior is preserved (flux-system remains the default).

@matheuscscp matheuscscp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jtyr
jtyr force-pushed the jtyr-context-ns branch 2 times, most recently from bb43542 to 39e6c46 Compare April 13, 2026 07:40
Comment thread cmd/flux/main.go Outdated
// explicitly set and FLUX_SYSTEM_NAMESPACE env var is not set,
// respect the namespace from the kubeconfig context.
if (rootArgs.nsFollowsKubeContext || os.Getenv("FLUX_NS_FOLLOWS_KUBE_CONTEXT") != "") &&
!cmd.Flags().Changed("namespace") && os.Getenv("FLUX_SYSTEM_NAMESPACE") == "" {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand why FLUX_SYSTEM_NAMESPACE is checked here. I don't always care about that as my Flux resources may be scattered across multiple namespaces on the cluster. Why should this generally disregard the kubeconfig NS if FLUX_SYSTEM_NAMESPACE is set?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if FLUX_SYSTEM_NAMESPACE is not used when e.g. -n is set, then it makes no sense to be checked here, good catch!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the last commit.

Comment thread cmd/flux/main_context_ns_test.go Outdated
expectedNamespace: "context-ns",
},
{
name: "FLUX_SYSTEM_NAMESPACE takes precedence over context namespace",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this should be the expected behaviour as explained above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the last commit.

@jtyr
jtyr force-pushed the jtyr-context-ns branch 2 times, most recently from 7cd113a to cde48c1 Compare April 13, 2026 17:13
@jtyr

jtyr commented Apr 20, 2026

Copy link
Copy Markdown
Contributor Author

@stefanprodan Please could you review this again?

@jtyr
jtyr force-pushed the jtyr-context-ns branch from cde48c1 to 33d2168 Compare April 22, 2026 13:12
@jtyr

jtyr commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

@stefanprodan @matheuscscp Any idea why the E2E test is failing?

@matheuscscp

Copy link
Copy Markdown
Member

@stefanprodan @matheuscscp Any idea why the E2E test is failing?

@jtyr I investigated this for a while with Opus 4.7 and this is how far I got:

  Failure: The Run tests step (make test --tags=unit) fails in cmd/flux with:                                                                                                                                 
  - TestTrace/* — "deployments.apps 'podinfo' not found" (and similar for HelmRelease)                                                                                                                        
  - TestTree/* — "kustomizations... 'flux-system' not found"                                                                                                                                                  
                                                            
  Root cause: the new test file cmd/flux/main_context_ns_test.go (added in the PR) leaks state into subsequent tests. I reproduced it locally:                                                                
                                                                                                                                                                                                              
  - TestTrace alone → passes                                                                                                                                                                                  
  - TestContextNamespaceOptIn alone → passes                                                                                                                                                                  
  - Both together → TestTrace fails with "not found" against the envtest API server                                                                                                                           
                                                                                                                                                                                                              
  The new TestContextNamespaceOptIn test mutates the package-global kubeconfigArgs (a *genericclioptions.ConfigFlags): swaps KubeConfig/Context pointers, calls configureDefaultNamespace(), calls            
  getKubeconfigContextNamespace() (which invokes kubeconfigArgs.ToRawKubeConfigLoader()). Even though the test's t.Cleanup restores the visible pointer fields, ConfigFlags internally caches a clientConfig  
  (see cli-runtime/pkg/genericclioptions/config_flags.go — clientConfig + clientConfigLock), and that cache is not reset. The cached loader was bound to the per-subtest temp kubeconfig (which got           
  t.TempDir-deleted), and bisecting the 6 subtests shows the failure only triggers when multiple subtests run together — consistent with cumulative cache poisoning.

  Fix direction: the new test shouldn't mutate the package-global kubeconfigArgs. Either build a local *genericclioptions.ConfigFlags for the test (e.g. genericclioptions.NewConfigFlags(false)) and refactor
   getKubeconfigContextNamespace to take it as a parameter, or have cleanup replace kubeconfigArgs with a freshly constructed instance (and then re-kubeconfigArgs.KubeConfig = &testEnv.kubeConfigPath) so
  the internal cache is discarded.

@jtyr

jtyr commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for providing the analysis, @matheuscscp. I have refactored getKubeconfigContextNamespace to take a *genericclioptions.ConfigFlags parameter, eliminating its dependency on the package-global kubeconfigArgs. The getKubeconfigContextNamespace, called from PersistentPreRunE, now passes kubeconfigArgs explicitly. Tests now construct their own local genericclioptions.NewConfigFlags(false) instance per subtest. This means:

  • The internal clientConfig cache lives only on the local instance.
  • No mutation of kubeconfigArgs whatsoever.
  • No t.Cleanup needed for kubeconfigArgs state restoration.
  • Subsequent tests like TestTrace and TestTree see a clean global kubeconfigArgs.

Please run the tests again so we can see if it passes now.

@jtyr

jtyr commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

Cool, tests pass now. Can we merge it now? ;o)

@matheuscscp

Copy link
Copy Markdown
Member

This is a major breaking change that we can not accept. Imagine how many CI pipelines and custom scripts we are going to break with this, e.g. you have flux bootstrap in your pipeline, the default namespace in kubeconfig is to some namespace, with this change new clusters will end up with Flux in the selected namespace instead of flux-system.

@stefanprodan The implementation is no longer a breaking change, it's opt-in now. Can we merge?

@stefanprodan stefanprodan changed the title Respect kubeconfig context namespace Add --ns-follows-kube-context global flag for using the kubeconfig context namespace Apr 29, 2026
@stefanprodan stefanprodan added the enhancement New feature or request label Apr 29, 2026
@matheuscscp

Copy link
Copy Markdown
Member

@jtyr Please squash the commits into one matching the PR title and force-push so we can merge 🙏

@jtyr
jtyr force-pushed the jtyr-context-ns branch from de17330 to aae7027 Compare April 29, 2026 07:30
@jtyr

jtyr commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

@matheuscscp I have squashed the commits 👍

@jtyr
jtyr force-pushed the jtyr-context-ns branch from aae7027 to c031d0c Compare April 30, 2026 07:19
@matheuscscp
matheuscscp merged commit c8b4c4c into fluxcd:main Apr 30, 2026
6 checks passed
@matheuscscp

Copy link
Copy Markdown
Member

@jtyr Thanks very much! You may not realize, but this is quite a feature! Probably top 10 requested by users historically. We should do a bit of noise about it! Can you please open a PR here: https://github.com/fluxcd/website/blob/main/content/en/roadmap.md?plain=1#L108-L113

@makkes

makkes commented Apr 30, 2026

Copy link
Copy Markdown
Member

Absolutely agree that this is a feature much longed for! Thanks @jtyr.

hbjydev pushed a commit to hbjydev/phoebe that referenced this pull request Aug 27, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [aqua:fluxcd/flux2](https://github.com/fluxcd/flux2) | minor | `2.8.1` → `2.9.4` |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/141) for more information.

---

### Release Notes

<details>
<summary>fluxcd/flux2 (aqua:fluxcd/flux2)</summary>

### [`v2.9.4`](https://github.com/fluxcd/flux2/releases/tag/v2.9.4)

[Compare Source](fluxcd/flux2@v2.9.3...v2.9.4)

#### Highlights

Flux v2.9.4 is a patch release that ships various fixes to the Flux controllers, covering source-watcher tarball extraction and glob expansion limits, the refspecs accepted by `ImageUpdateAutomation`, the HTTP request limits of the notification-controller servers, and Helm repository index loading, OCI chart digest pinning, `Bucket` error handling and GCS static authentication in source-controller. On the CLI side, `flux migrate -f` now supports migrating repositories to Flux 2.9. Users are encouraged to upgrade for the best experience.

Note that this release contains CRD schema changes for `ArtifactGenerator` and `ImageUpdateAutomation`; both CRDs must be updated along with the controllers.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Confine tarball extraction and bound glob expansion (source-watcher)
- Disallow force-update and deletion via refspecs (image-automation-controller)
- Unify HTTP server request limits (notification-controller)
- Align Helm repository index loading with upstream Helm v4 (source-controller)
- Improve error handling in `Bucket` reconciliation (source-controller)
- Pin OCI chart verification by digest (source-controller)
- Limit GCS static authentication to service account keys (source-controller)
- Restrict the `allow-webhooks` network policy to the receiver port (flux CLI)

Improvements:

- Add support for migrating repositories to 2.9 in `flux migrate -f` (flux CLI)
- Update fluxcd/pkg dependencies, which align the ECR host detection with upstream (source-controller, image-reflector-controller, flux CLI)
- Update Bitbucket Cloud receiver guidance (notification-controller)

#### Components changelog

- source-controller [v1.9.4](https://github.com/fluxcd/source-controller/blob/v1.9.4/CHANGELOG.md)
- source-watcher [v2.2.3](https://github.com/fluxcd/source-watcher/blob/v2.2.3/CHANGELOG.md)
- notification-controller [v1.9.3](https://github.com/fluxcd/notification-controller/blob/v1.9.3/CHANGELOG.md)
- image-reflector-controller [v1.2.4](https://github.com/fluxcd/image-reflector-controller/blob/v1.2.4/CHANGELOG.md)
- image-automation-controller [v1.2.4](https://github.com/fluxcd/image-automation-controller/blob/v1.2.4/CHANGELOG.md)

#### CLI changelog

- \[release/v2.9.x] Add support for 2.9 in `migrate -f` by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;6021](fluxcd/flux2#6021)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;6026](fluxcd/flux2#6026)
- \[release/v2.9.x] fix: restrict `allow-webhooks` netpol to receiver port by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;6029](fluxcd/flux2#6029)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;6031](fluxcd/flux2#6031)

**Full Changelog**: <fluxcd/flux2@v2.9.3...v2.9.4>

### [`v2.9.3`](https://github.com/fluxcd/flux2/releases/tag/v2.9.3)

[Compare Source](fluxcd/flux2@v2.9.2...v2.9.3)

#### Highlights

Flux v2.9.3 is a patch release. It fixes empty lines vanishing from rendered Helm chart manifests, HelmReleases being marked as tested when their Helm test hooks never ran, and `spec.images` entries that set only some image fields discarding the remaining fields already declared for the same image in the `kustomization.yaml`. The latter affects both kustomize-controller and the `flux build|diff kustomization` commands. Users are encouraged to upgrade for the best experience.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Fix empty lines vanishing from rendered chart manifests (helm-controller)
- Fix `HasBeenTested` for all corner cases, where a release could be marked as tested although its Helm test hooks never ran (helm-controller)
- Fix a `spec.images` entry setting only some of the image fields discarding the remaining fields already declared for the same image in the `kustomization.yaml` at `spec.path`, e.g. overriding only `newName` produced an untagged image reference (kustomize-controller, flux CLI)

Improvements:

- Update fluxcd/pkg dependencies
- Include source-watcher in the OCI flux-manifests artifact

#### Components changelog

- kustomize-controller [v1.9.4](https://github.com/fluxcd/kustomize-controller/blob/v1.9.4/CHANGELOG.md)
- helm-controller [v1.6.3](https://github.com/fluxcd/helm-controller/blob/v1.6.3/CHANGELOG.md)

#### CLI changelog

- \[release/v2.9.x] Include source-watcher to oci flux-manifests by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5996](fluxcd/flux2#5996)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;6006](fluxcd/flux2#6006)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;6011](fluxcd/flux2#6011)

**Full Changelog**: <fluxcd/flux2@v2.9.2...v2.9.3>

### [`v2.9.2`](https://github.com/fluxcd/flux2/releases/tag/v2.9.2)

[Compare Source](fluxcd/flux2@v2.9.1...v2.9.2)

#### Highlights

Flux v2.9.2 is a patch release. The main fix addresses a regression introduced in
v2.9.1 where a Kustomization with `openapi.path` pointing to a URL failed to
reconcile with `failed to read OpenAPI schema`. This release also corrects several
CRD field descriptions that contained inaccurate or leaked content. Users are
encouraged to upgrade for the best experience.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Fix a regression where a Kustomization with `openapi.path` pointing to a URL failed to reconcile with `failed to read OpenAPI schema` (kustomize-controller)
- Fix the `HelmChart` CRD description for `.status.url`, which pointed users at `BucketStatus.Artifact` instead of `HelmChartStatus.Artifact` (source-controller)
- Fix the `ImageRepository` CRD description for `.status.observedExclusionList`, which referred to `spec.lastScanResult` instead of `status.lastScanResult` (image-reflector-controller)
- Fix the `ImageUpdateAutomation` CRD description for `.status.observedSourceRevision`, which had a stray Go struct declaration leaking into it (image-automation-controller)

Improvements:

- Update fluxcd/pkg dependencies

#### Components changelog

- source-controller [v1.9.3](https://github.com/fluxcd/source-controller/blob/v1.9.3/CHANGELOG.md)
- kustomize-controller [v1.9.3](https://github.com/fluxcd/kustomize-controller/blob/v1.9.3/CHANGELOG.md)
- helm-controller [v1.6.2](https://github.com/fluxcd/helm-controller/blob/v1.6.2/CHANGELOG.md)
- notification-controller [v1.9.2](https://github.com/fluxcd/notification-controller/blob/v1.9.2/CHANGELOG.md)
- image-reflector-controller [v1.2.3](https://github.com/fluxcd/image-reflector-controller/blob/v1.2.3/CHANGELOG.md)
- image-automation-controller [v1.2.3](https://github.com/fluxcd/image-automation-controller/blob/v1.2.3/CHANGELOG.md)
- source-watcher [v2.2.2](https://github.com/fluxcd/source-watcher/blob/v2.2.2/CHANGELOG.md)

#### CLI changelog

- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5984](fluxcd/flux2#5984)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5990](fluxcd/flux2#5990)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5994](fluxcd/flux2#5994)

**Full Changelog**: <fluxcd/flux2@v2.9.1...v2.9.2>

### [`v2.9.1`](https://github.com/fluxcd/flux2/releases/tag/v2.9.1)

[Compare Source](fluxcd/flux2@v2.9.0...v2.9.1)

#### Highlights

Flux v2.9.1 is a patch release. The main fix, applied across all controllers, disables Flux variable substitution on the Flux CRDs by annotating them with `kustomize.toolkit.fluxcd.io/substitute: disabled`, so that Kustomizations with post-build substitution enabled no longer corrupt the CRD schemas when they contain `${...}` sequences. Users are encouraged to upgrade for the best experience.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Disable Flux variable substitution on all Flux CRDs, preventing post-build substitution from corrupting CRD schemas that contain `${...}` sequences (all controllers)
- Update SOPS dependency to fix `.ini` file decryption (kustomize-controller)
- Fix a dry-run error where applying a resource with a strategic merge patch could fail with `<resource> is invalid` (kustomize-controller)
- Fix a breaking change in the in-memory Kustomization build (Flux CLI)

Improvements:

- Cache the registry authorization token during Notation verification, so it is fetched once per verification instead of once per request (source-controller)
- Update fluxcd/pkg dependencies

#### Components changelog

- source-controller [v1.9.2](https://github.com/fluxcd/source-controller/blob/v1.9.2/CHANGELOG.md)
- kustomize-controller [v1.9.2](https://github.com/fluxcd/kustomize-controller/blob/v1.9.2/CHANGELOG.md)
- helm-controller [v1.6.2](https://github.com/fluxcd/helm-controller/blob/v1.6.2/CHANGELOG.md)
- notification-controller [v1.9.2](https://github.com/fluxcd/notification-controller/blob/v1.9.2/CHANGELOG.md)
- image-reflector-controller [v1.2.2](https://github.com/fluxcd/image-reflector-controller/blob/v1.2.2/CHANGELOG.md)
- image-automation-controller [v1.2.2](https://github.com/fluxcd/image-automation-controller/blob/v1.2.2/CHANGELOG.md)
- source-watcher [v2.2.2](https://github.com/fluxcd/source-watcher/blob/v2.2.2/CHANGELOG.md)

#### CLI changelog

- \[release/v2.9.x] Fix breaking change in-memory kustomization build by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5971](fluxcd/flux2#5971)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5977](fluxcd/flux2#5977)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5979](fluxcd/flux2#5979)

**Full Changelog**: <fluxcd/flux2@v2.9.0...v2.9.1>

### [`v2.9.0`](https://github.com/fluxcd/flux2/releases/tag/v2.9.0)

[Compare Source](fluxcd/flux2@v2.8.8...v2.9.0)

#### Highlights

Flux v2.9.0 is a feature release. Users are encouraged to upgrade for the best experience.

For a compressive overview of new features and API changes included in this release, please refer to the [Announcing Flux 2.9 GA blog post](https://fluxcd.io/blog/2026/06/flux-v2.9.0/).

Overview of the new features:

- Flux CLI Plugin System with the Mirror and Schema plugins (`flux plugin`)
- Server-Side Apply field ignore rules for fine-grained drift control (`Kustomization`)
- SOPS decryption with the Age post-quantum cipher (`Kustomization`)
- Kubernetes Workload Identity authentication for OpenBao and Vault (`Kustomization`)
- Helm post-render strategies, including chart hooks support (`HelmRelease`)
- Literal mode for Helm values references mirroring `helm --set-literal` (`HelmRelease`)
- Allow empty kind in CEL health check expressions (`Kustomization`, `HelmRelease`)
- Git commit signing and verification with SSH keys (`GitRepository`, `ImageUpdateAutomation`)
- AWS CodeCommit authentication using Workload Identity (`GitRepository`)
- Custom Sigstore trusted root for keyless verification in air-gapped environments (`OCIRepository`)
- Path pattern directory discovery for monorepos (`ArtifactGenerator`)
- Secret-less, OIDC-secured webhook Receivers (`Receiver`)

❤️ Big thanks to all the Flux contributors that helped us with this release!

##### Kubernetes compatibility

This release is compatible with the following Kubernetes versions:

| Kubernetes version | Minimum required |
| ------------------ | ---------------- |
| `v1.34`            | `>= 1.34.1`      |
| `v1.35`            | `>= 1.35.0`      |
| `v1.36`            | `>= 1.36.0`      |

> \[!NOTE]
> Note that the Flux project offers support only for the latest three minor versions of Kubernetes.
> Backwards compatibility with older versions of Kubernetes and OpenShift is offered by vendors such as
> [ControlPlane](https://control-plane.io/enterprise-for-flux-cd/) that provide enterprise support for Flux.

##### OpenShift compatibility

Flux can be installed on Red Hat OpenShift cluster directly from OperatorHub using [Flux Operator](https://operatorhub.io/operator/flux-operator). The operator allows the configuration of Flux multi-tenancy lockdown, network policies, persistent storage, sharding, vertical scaling and the synchronization of the cluster state from Git repositories, OCI artifacts, and S3-compatible storage.

#### Upgrade procedure

:warning: The Flux APIs `image.toolkit.fluxcd.io/v1beta2` and `notification.toolkit.fluxcd.io/v1beta2`
have reached end-of-life and have been removed from the CRDs.

Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from older versions of Flux to v2.9.

#### Components changelog

- source-controller [v1.9.1](https://github.com/fluxcd/source-controller/blob/v1.9.1/CHANGELOG.md)
- kustomize-controller [v1.9.1](https://github.com/fluxcd/kustomize-controller/blob/v1.9.1/CHANGELOG.md)
- notification-controller [v1.9.1](https://github.com/fluxcd/notification-controller/blob/v1.9.1/CHANGELOG.md)
- helm-controller [v1.6.1](https://github.com/fluxcd/helm-controller/blob/v1.6.1/CHANGELOG.md)
- image-reflector-controller [v1.2.1](https://github.com/fluxcd/image-reflector-controller/blob/v1.2.1/CHANGELOG.md)
- image-automation-controller [v1.2.1](https://github.com/fluxcd/image-automation-controller/blob/v1.2.1/CHANGELOG.md)
- source-watcher [v2.2.1](https://github.com/fluxcd/source-watcher/blob/v2.2.1/CHANGELOG.md)

#### CLI changelog

- Add backport label for Flux 2.8 by [@&#8203;matheuscscp](https://github.com/matheuscscp) in [#&#8203;5732](fluxcd/flux2#5732)
- Remove no longer needed workaround for Flux 2.8 by [@&#8203;matheuscscp](https://github.com/matheuscscp) in [#&#8203;5733](fluxcd/flux2#5733)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5740](fluxcd/flux2#5740)
- Add missing things to release notes template by [@&#8203;matheuscscp](https://github.com/matheuscscp) in [#&#8203;5743](fluxcd/flux2#5743)
- ci: add top-level permissions to upgrade-fluxcd-pkg workflow by [@&#8203;gaganhr94](https://github.com/gaganhr94) in [#&#8203;5763](fluxcd/flux2#5763)
- build(deps): bump the ci group across 1 directory with 11 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;5764](fluxcd/flux2#5764)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5766](fluxcd/flux2#5766)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5769](fluxcd/flux2#5769)
- Add target branch name to update branch by [@&#8203;matheuscscp](https://github.com/matheuscscp) in [#&#8203;5773](fluxcd/flux2#5773)
- Fix/resume exit code by [@&#8203;Aman-Cool](https://github.com/Aman-Cool) in [#&#8203;5701](fluxcd/flux2#5701)
- Mark RFC 0010, 0011 and 0012 as implemented by [@&#8203;stefanprodan](https://github.com/stefanprodan) in [#&#8203;5776](fluxcd/flux2#5776)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5780](fluxcd/flux2#5780)
- Add --resolve-symlinks flag to build and push artifact commands by [@&#8203;rohansood10](https://github.com/rohansood10) in [#&#8203;5724](fluxcd/flux2#5724)
- fix: validate --source flag in create kustomization command by [@&#8203;gma1k](https://github.com/gma1k) in [#&#8203;5798](fluxcd/flux2#5798)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5821](fluxcd/flux2#5821)
- Add `--show-source` to `flux get ks` and `flux get hr`  by [@&#8203;rafaelperoco](https://github.com/rafaelperoco) in [#&#8203;5828](fluxcd/flux2#5828)
- Add `flux create secret receiver` command by [@&#8203;stefanprodan](https://github.com/stefanprodan) in [#&#8203;5835](fluxcd/flux2#5835)
- fix: handle multiple symlinks to same target in build artifact by [@&#8203;Iam-Karan-Suresh](https://github.com/Iam-Karan-Suresh) in [#&#8203;5833](fluxcd/flux2#5833)
- Add `--in-memory-build` to `flux build ks` and `flux diff ks` by [@&#8203;rycli](https://github.com/rycli) in [#&#8203;5794](fluxcd/flux2#5794)
- Migrate end-to-end test to latest cloud SDKs  by [@&#8203;stefanprodan](https://github.com/stefanprodan) in [#&#8203;5840](fluxcd/flux2#5840)
- docs: Add AI Coding Assistants Guidance  by [@&#8203;stefanprodan](https://github.com/stefanprodan) in [#&#8203;5841](fluxcd/flux2#5841)
- Add AI Agents guidance by [@&#8203;stefanprodan](https://github.com/stefanprodan) in [#&#8203;5847](fluxcd/flux2#5847)
- \[RFC-0013] Flux CLI Plugin System by [@&#8203;stefanprodan](https://github.com/stefanprodan) in [#&#8203;5795](fluxcd/flux2#5795)
- Add `--ignore-not-found` to `flux diff ks` by [@&#8203;rycli](https://github.com/rycli) in [#&#8203;5845](fluxcd/flux2#5845)
- \[RFC-0013] Implement plugin system by [@&#8203;stefanprodan](https://github.com/stefanprodan) in [#&#8203;5849](fluxcd/flux2#5849)
- build(deps): bump github.com/go-git/go-git/v5 from 5.17.1 to 5.18.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;5853](fluxcd/flux2#5853)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5856](fluxcd/flux2#5856)
- Add digest pinning support to `flux plugin install` by [@&#8203;Iam-Karan-Suresh](https://github.com/Iam-Karan-Suresh) in [#&#8203;5872](fluxcd/flux2#5872)
- Add `--ns-follows-kube-context` global flag for using the kubeconfig context namespace by [@&#8203;jtyr](https://github.com/jtyr) in [#&#8203;5831](fluxcd/flux2#5831)
- include source-watcher in install.yaml manifests by [@&#8203;tmmorin](https://github.com/tmmorin) in [#&#8203;5881](fluxcd/flux2#5881)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5890](fluxcd/flux2#5890)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5903](fluxcd/flux2#5903)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5907](fluxcd/flux2#5907)
- Validate Helm source URL schemes by [@&#8203;immanuwell](https://github.com/immanuwell) in [#&#8203;5909](fluxcd/flux2#5909)
- Introduce `flux trigger receiver` by [@&#8203;matheuscscp](https://github.com/matheuscscp) in [#&#8203;5908](fluxcd/flux2#5908)
- refactor(api): migrate MakeDependsOn to shared apis/meta func by [@&#8203;vecil](https://github.com/vecil) in [#&#8203;5912](fluxcd/flux2#5912)
- Update to Kubernetes 1.36 and Go 1.26 by [@&#8203;stefanprodan](https://github.com/stefanprodan) in [#&#8203;5924](fluxcd/flux2#5924)
- build(deps): bump the ci group across 1 directory with 19 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;5925](fluxcd/flux2#5925)
- Run conformance tests for Kubernetes 1.36 by [@&#8203;stefanprodan](https://github.com/stefanprodan) in [#&#8203;5926](fluxcd/flux2#5926)
- Add support for AWS CodeCommit to `flux bootstrap git` by [@&#8203;taraspos](https://github.com/taraspos) in [#&#8203;5868](fluxcd/flux2#5868)
- Validate plugin binary path by [@&#8203;stefanprodan](https://github.com/stefanprodan) in [#&#8203;5927](fluxcd/flux2#5927)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5928](fluxcd/flux2#5928)
- fix: preserve invalid metadata.labels in `flux build ks` by [@&#8203;raffis](https://github.com/raffis) in [#&#8203;5906](fluxcd/flux2#5906)
- build: target host arch for local builds/envtest by [@&#8203;stealthybox](https://github.com/stealthybox) in [#&#8203;5932](fluxcd/flux2#5932)
- build(deps): bump the ci group with 6 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;5938](fluxcd/flux2#5938)
- Support specifing sparseCheckout in flux bootstrap by [@&#8203;piny940](https://github.com/piny940) in [#&#8203;5918](fluxcd/flux2#5918)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5944](fluxcd/flux2#5944)
- Honor `ks.spec.postBuild.substituteStrategy` by [@&#8203;matheuscscp](https://github.com/matheuscscp) in [#&#8203;5945](fluxcd/flux2#5945)
- Add DriftIgnoreRules support to flux diff kustomization by [@&#8203;dipti-pai](https://github.com/dipti-pai) in [#&#8203;5923](fluxcd/flux2#5923)
- Allow signing commits using SSH key by [@&#8203;hiddeco](https://github.com/hiddeco) in [#&#8203;5920](fluxcd/flux2#5920)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5950](fluxcd/flux2#5950)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5937](fluxcd/flux2#5937)
- cmd: support `type!=status` in get --status-selector by [@&#8203;3uzbcqje](https://github.com/3uzbcqje) in [#&#8203;5952](fluxcd/flux2#5952)
- Fix `flux get all --status-selector` for empty results and notification resources by [@&#8203;matheuscscp](https://github.com/matheuscscp) in [#&#8203;5954](fluxcd/flux2#5954)
- Upgrade go-git-providers to v0.27.0 by [@&#8203;matheuscscp](https://github.com/matheuscscp) in [#&#8203;5956](fluxcd/flux2#5956)
- Fix using Receiver adapter for ArtifactGenerator by [@&#8203;matheuscscp](https://github.com/matheuscscp) in [#&#8203;5957](fluxcd/flux2#5957)
- feat: Install Plugins alongside Flux setup in gh actions by [@&#8203;gat786](https://github.com/gat786) in [#&#8203;5955](fluxcd/flux2#5955)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5960](fluxcd/flux2#5960)
- Add CLI support for OCIRepository.spec.layerSelector in flux create source oci by [@&#8203;dme86](https://github.com/dme86) in [#&#8203;5892](fluxcd/flux2#5892)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5963](fluxcd/flux2#5963)

#### New Contributors

- [@&#8203;gaganhr94](https://github.com/gaganhr94) made their first contribution in [#&#8203;5763](fluxcd/flux2#5763)
- [@&#8203;rohansood10](https://github.com/rohansood10) made their first contribution in [#&#8203;5724](fluxcd/flux2#5724)
- [@&#8203;gma1k](https://github.com/gma1k) made their first contribution in [#&#8203;5798](fluxcd/flux2#5798)
- [@&#8203;rafaelperoco](https://github.com/rafaelperoco) made their first contribution in [#&#8203;5828](fluxcd/flux2#5828)
- [@&#8203;Iam-Karan-Suresh](https://github.com/Iam-Karan-Suresh) made their first contribution in [#&#8203;5833](fluxcd/flux2#5833)
- [@&#8203;rycli](https://github.com/rycli) made their first contribution in [#&#8203;5794](fluxcd/flux2#5794)
- [@&#8203;jtyr](https://github.com/jtyr) made their first contribution in [#&#8203;5831](fluxcd/flux2#5831)
- [@&#8203;tmmorin](https://github.com/tmmorin) made their first contribution in [#&#8203;5881](fluxcd/flux2#5881)
- [@&#8203;immanuwell](https://github.com/immanuwell) made their first contribution in [#&#8203;5909](fluxcd/flux2#5909)
- [@&#8203;vecil](https://github.com/vecil) made their first contribution in [#&#8203;5912](fluxcd/flux2#5912)
- [@&#8203;taraspos](https://github.com/taraspos) made their first contribution in [#&#8203;5868](fluxcd/flux2#5868)
- [@&#8203;piny940](https://github.com/piny940) made their first contribution in [#&#8203;5918](fluxcd/flux2#5918)
- [@&#8203;3uzbcqje](https://github.com/3uzbcqje) made their first contribution in [#&#8203;5952](fluxcd/flux2#5952)
- [@&#8203;gat786](https://github.com/gat786) made their first contribution in [#&#8203;5955](fluxcd/flux2#5955)
- [@&#8203;dme86](https://github.com/dme86) made their first contribution in [#&#8203;5892](fluxcd/flux2#5892)

**Full Changelog**: <fluxcd/flux2@v2.8.0...v2.9.0>

### [`v2.8.8`](https://github.com/fluxcd/flux2/releases/tag/v2.8.8)

[Compare Source](fluxcd/flux2@v2.8.7...v2.8.8)

#### Highlights

Flux v2.8.8 is a patch release that includes CVE fixes via go-git v5.19.1 (source-controller, image-automation-controller), reliability fixes in helm-controller and source-controller, the move of Helm back to upstream v4.2.0, support for GCP sovereign cloud artifact registries, and dependency updates. Users are encouraged to upgrade for the best experience.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Add a configurable HTTP timeout for artifact fetching, preventing fetches that could block indefinitely and stall reconciliations (helm-controller)
- Fix unbounded memory growth caused by a Kubernetes client transport retry wrapper accumulating on every reconcile (helm-controller)
- Stop force-applying non-CRD objects placed under a chart's `crds/` directory (helm-controller)
- Fix the Helm test action failing to find releases with names longer than 53 characters (helm-controller)
- Improve path handling in the source reconcilers (source-controller)
- Support Helm semver build-metadata encoding in OCIRepository tags (source-controller)

Improvements:

- Update go-git to v5.19.1 which fixes [CVE-2026-45571](GHSA-crhj-59gh-8x96) and [CVE-2026-45570](GHSA-m7cr-m3pv-hgrp) (source-controller, image-automation-controller)
- Move Helm back to upstream v4.2.0 (source-controller, helm-controller)
- Add support for GCP sovereign cloud artifact registries (source-controller, image-reflector-controller)
- Upgrade Kubernetes to 1.36.1 (source-controller, helm-controller)
- Update fluxcd/pkg dependencies

#### Components changelog

- helm-controller [v1.5.5](https://github.com/fluxcd/helm-controller/blob/v1.5.5/CHANGELOG.md)
- image-automation-controller [v1.1.4](https://github.com/fluxcd/image-automation-controller/blob/v1.1.4/CHANGELOG.md)
- image-reflector-controller [v1.1.2](https://github.com/fluxcd/image-reflector-controller/blob/v1.1.2/CHANGELOG.md)
- source-controller [v1.8.5](https://github.com/fluxcd/source-controller/blob/v1.8.5/CHANGELOG.md)

#### CLI changelog

- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5904](fluxcd/flux2#5904)

**Full Changelog**: <fluxcd/flux2@v2.8.7...v2.8.8>

### [`v2.8.7`](https://github.com/fluxcd/flux2/releases/tag/v2.8.7)

[Compare Source](fluxcd/flux2@v2.8.6...v2.8.7)

#### Highlights

Flux v2.8.7 is a patch release that includes a bug fix in kustomize-controller, a CVE fix in source-controller and image-automation-controller via go-git v5.19.0, and dependency updates. Users are encouraged to upgrade for the best experience.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Fix management of objects annotated with `kustomize.toolkit.fluxcd.io/ssa: IfNotPresent` where non-namespaced resources were being deleted and recreated on each reconciliation (kustomize-controller)

Improvements:

- Update go-git to v5.19.0 which fixes [CVE-2026-45022](GHSA-389r-gv7p-r3rp) (source-controller, image-automation-controller)
- Update fluxcd/pkg dependencies (source-controller, kustomize-controller, image-automation-controller)

#### Components changelog

- helm-controller [v1.5.4](https://github.com/fluxcd/helm-controller/blob/v1.5.4/CHANGELOG.md)
- image-automation-controller [v1.1.3](https://github.com/fluxcd/image-automation-controller/blob/v1.1.3/CHANGELOG.md)
- kustomize-controller [v1.8.5](https://github.com/fluxcd/kustomize-controller/blob/v1.8.5/CHANGELOG.md)
- notification-controller [v1.8.4](https://github.com/fluxcd/notification-controller/blob/v1.8.4/CHANGELOG.md)
- source-controller [v1.8.4](https://github.com/fluxcd/source-controller/blob/v1.8.4/CHANGELOG.md)

#### CLI changelog

- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5891](fluxcd/flux2#5891)

**Full Changelog**: <fluxcd/flux2@v2.8.6...v2.8.7>

### [`v2.8.6`](https://github.com/fluxcd/flux2/releases/tag/v2.8.6)

[Compare Source](fluxcd/flux2@v2.8.5...v2.8.6)

#### Highlights

Flux v2.8.6 is a patch release that includes bug fixes and improvements across helm-controller, image-automation-controller, kustomize-controller, notification-controller, and source-controller. Users are encouraged to upgrade for the best experience.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Fix a post-renderer conflict between overlapping hooks and templates (helm-controller)
- Ignore force replace when server-side apply is enabled (helm-controller)
- Fix a regression where generic providers would not forward commit status events (notification-controller)
- Require the `audience` field on the GCR Receiver secret for tighter verification — will become mandatory in Flux v2.9 (notification-controller)

Improvements:

- Introduce the `MigrateAPIVersion` feature gate for migrating the API version of resources in managed field entries (kustomize-controller)
- Update go-git to v5.18.0 bringing performance improvements for Git operations (source-controller, image-automation-controller)

#### Components changelog

- helm-controller [v1.5.4](https://github.com/fluxcd/helm-controller/blob/v1.5.4/CHANGELOG.md)
- image-automation-controller [v1.1.2](https://github.com/fluxcd/image-automation-controller/blob/v1.1.2/CHANGELOG.md)
- kustomize-controller [v1.8.4](https://github.com/fluxcd/kustomize-controller/blob/v1.8.4/CHANGELOG.md)
- notification-controller [v1.8.4](https://github.com/fluxcd/notification-controller/blob/v1.8.4/CHANGELOG.md)
- source-controller [v1.8.3](https://github.com/fluxcd/source-controller/blob/v1.8.3/CHANGELOG.md)

#### CLI changelog

- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5857](fluxcd/flux2#5857)

**Full Changelog**: <fluxcd/flux2@v2.8.5...v2.8.6>

### [`v2.8.5`](https://github.com/fluxcd/flux2/releases/tag/v2.8.5)

[Compare Source](fluxcd/flux2@v2.8.4...v2.8.5)

#### Highlights

Flux v2.8.5 is a patch release that includes bug fixes and improvements across kustomize-controller, source-controller, and notification-controller. Users are encouraged to upgrade for the best experience.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Fix a race condition where a cancelled reconciliation could leave stale data in the cache, causing Kustomizations to get stuck (kustomize-controller)
- Fix Azure Blob prefix option not being passed to the storage client (source-controller)

Improvements:

- Improve error message for encrypted SSH keys without password (source-controller)
- Add optional `email` and `audience` fields to the GCR Receiver for tighter verification (notification-controller)
- Add provider manifest example for Azure Event Hub managed identity authentication (notification-controller)

#### Components changelog

- kustomize-controller [v1.8.3](https://github.com/fluxcd/kustomize-controller/blob/v1.8.3/CHANGELOG.md)
- source-controller [v1.8.2](https://github.com/fluxcd/source-controller/blob/v1.8.2/CHANGELOG.md)
- notification-controller [v1.8.3](https://github.com/fluxcd/notification-controller/blob/v1.8.3/CHANGELOG.md)

#### CLI changelog

- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5822](fluxcd/flux2#5822)

**Full Changelog**: <fluxcd/flux2@v2.8.4...v2.8.5>

### [`v2.8.4`](https://github.com/fluxcd/flux2/releases/tag/v2.8.4)

[Compare Source](fluxcd/flux2@v2.8.3...v2.8.4)

#### Highlights

Flux v2.8.4 is a patch release that includes fixes for the Flux CLI. Users are encouraged to upgrade for the best experience.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Fix `flux build ks` and `flux diff ks` on Windows
- Fix `--source` flag validation in `create kustomization` command

#### CLI changelog

- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5796](fluxcd/flux2#5796)
- \[release/v2.8.x] fix: validate --source flag in create kustomization command by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5799](fluxcd/flux2#5799)

**Full Changelog**: <fluxcd/flux2@v2.8.3...v2.8.4>

### [`v2.8.3`](https://github.com/fluxcd/flux2/releases/tag/v2.8.3)

[Compare Source](fluxcd/flux2@v2.8.2...v2.8.3)

#### Highlights

Flux v2.8.3 is a patch release that fixes a regression in helm-controller. Users are encouraged to upgrade for the best experience.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Fix templating errors for charts that include `---` in the content, e.g. YAML separators, embedded scripts, CAs inside ConfigMaps (helm-controller)

#### Components changelog

- helm-controller [v1.5.3](https://github.com/fluxcd/helm-controller/blob/v1.5.3/CHANGELOG.md)

#### CLI changelog

- \[release/v2.8.x] Add target branch name to update branch by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5774](fluxcd/flux2#5774)
- Update toolkit components by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5779](fluxcd/flux2#5779)

**Full Changelog**: <fluxcd/flux2@v2.8.2...v2.8.3>

### [`v2.8.2`](https://github.com/fluxcd/flux2/releases/tag/v2.8.2)

[Compare Source](fluxcd/flux2@v2.8.1...v2.8.2)

#### Highlights

Flux v2.8.2 is a patch release that comes with various fixes. Users are encouraged to upgrade for the best experience.

ℹ️ Please follow the [Upgrade Procedure for Flux v2.7+](fluxcd/flux2#5572) for a smooth upgrade from Flux v2.6 to the latest version.

Fixes:

- Fix enqueuing new reconciliation requests for events on source Flux objects when they are already reconciling the revision present in the watch event (kustomize-controller, helm-controller)
- Fix the Go templates bug of YAML separator `---` getting concatenated to `apiVersion:` by updating to Helm 4.1.3 (helm-controller)
- Fix canceled HelmReleases getting stuck when they don't have a retry strategy configured by introducing a new feature gate `DefaultToRetryOnFailure` that improves the experience when the `CancelHealthCheckOnNewRevision` is enabled (helm-controller)
- Fix the auth scope for Azure Container Registry to use the ACR-specific scope (source-controller, image-reflector-controller)
- Fix potential Denial of Service (DoS) during TLS handshakes (CVE-2026-27138) by building all controllers with Go 1.26.1

#### Components changelog

- source-controller [v1.8.1](https://github.com/fluxcd/source-controller/blob/v1.8.1/CHANGELOG.md)
- kustomize-controller [v1.8.2](https://github.com/fluxcd/kustomize-controller/blob/v1.8.2/CHANGELOG.md)
- notification-controller [v1.8.2](https://github.com/fluxcd/notification-controller/blob/v1.8.2/CHANGELOG.md)
- helm-controller [v1.5.2](https://github.com/fluxcd/helm-controller/blob/v1.5.2/CHANGELOG.md)
- image-reflector-controller [v1.1.1](https://github.com/fluxcd/image-reflector-controller/blob/v1.1.1/CHANGELOG.md)
- image-automation-controller [v1.1.1](https://github.com/fluxcd/image-automation-controller/blob/v1.1.1/CHANGELOG.md)
- source-watcher [v2.1.1](https://github.com/fluxcd/source-watcher/blob/v2.1.1/CHANGELOG.md)

#### CLI changelog

- \[release/v2.8.x] build(deps): bump the ci group across 1 directory with 11 updates by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5765](fluxcd/flux2#5765)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5767](fluxcd/flux2#5767)
- Update toolkit components by [@&#8203;matheuscscp](https://github.com/matheuscscp) in [#&#8203;5770](fluxcd/flux2#5770)
- Update fluxcd/pkg dependencies by [@&#8203;fluxcdbot](https://github.com/fluxcdbot) in [#&#8203;5771](fluxcd/flux2#5771)

**Full Changelog**: <fluxcd/flux2@v2.8.1...v2.8.2>

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/London)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjAuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI2MC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL21pbm9yIl19-->

Reviewed-on: https://forgejo.hayden.moe/hayden/phoebe/pulls/356
@jbrardport

Copy link
Copy Markdown

Great feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flux CLI tool doesn't respect context namespace

5 participants