Compare commits

...

647 Commits

Author SHA1 Message Date
Matheus Pimenta cf5702068b
Merge pull request #1286 from cappyzawa/feat/object-level-config-validation
Add object-level configuration validation
2025-08-17 17:17:35 +01:00
cappyzawa 5aa1414d79
Add object-level configuration validation
Validates that ObjectLevelWorkloadIdentity feature gate is enabled
when default kubeconfig service account flags are set. This prevents
misconfiguration where lockdown flags are used without enabling
the required feature gate.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-08-18 00:51:48 +09:00
Matheus Pimenta b549f4f76e
Merge pull request #1284 from cappyzawa/rfc-0010-multi-tenancy-lockdown
[RFC-0010] Add multi-tenancy lockdown for kubeconfig
2025-08-17 10:04:15 +01:00
cappyzawa 82fae0c8eb
[RFC-0010] Add multi-tenancy lockdown for kubeconfig
Adds new controller flag to enforce ServiceAccount usage in
multi-tenant clusters where administrators need to lock down workload
identity access:

- --default-kubeconfig-service-account

This flag complements the existing --default-service-account flag to
provide multi-tenancy lockdown coverage for kubeconfig ServiceAccount
fields in the HelmRelease API.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-08-17 17:44:14 +09:00
Stefan Prodan 5c7f2c8abf
Merge pull request #1282 from fluxcd/action-duration
Record the last Helm release action duration in status
2025-08-13 14:12:03 +03:00
Stefan Prodan acc61348b4
Record the last Helm release action duration in status
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-13 13:36:05 +03:00
Stefan Prodan 28bf06454e
Merge pull request #1280 from fluxcd/remove-v2beta1-api
Remove deprecated APIs in group `helm.toolkit.fluxcd.io/v2beta1`
2025-08-11 17:54:01 +03:00
Stefan Prodan d7cd9ae5be
Remove deprecated APIs in group `helm.toolkit.fluxcd.io/v2beta1`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-08 14:34:51 +03:00
Matheus Pimenta 8555152550
Merge pull request #1276 from fluxcd/fix-source-requeue
Fix requeue interval for SourceNotReady
2025-07-31 16:39:45 +01:00
Matheus Pimenta 593c05e0c8
Fix requeue interval for SourceNotReady
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-31 16:27:21 +01:00
Stefan Prodan 183a4f4ae7
Merge pull request #1271 from fluxcd/feat-dependson-cel
Extend the readiness evaluation of dependencies with CEL expressions
2025-07-29 08:28:00 +03:00
Stefan Prodan 40d128a05d
docs: Add dependency ready expression to API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-23 09:00:17 +03:00
Stefan Prodan 32f20f7344
controller: Implement CEL evaluation for dependency checks
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-23 09:00:10 +03:00
Stefan Prodan 9b6b090ca4
controller: Add `AdditiveCELDependencyCheck` feature gate
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-22 22:06:12 +03:00
Stefan Prodan 6d5856c00e
controller: Move manager and indexers to dedicated files
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-22 21:18:55 +03:00
Stefan Prodan 4ffe621c6b
api: Add the `readyExpr` field to `dependsOn`
Extend the readiness evaluation of dependencies with CEL expressions

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-22 21:09:30 +03:00
Matheus Pimenta fc12477df0
Merge pull request #1267 from ymettier/fix-issue-1265
Fix continuous drift due to unstable hashing of values
2025-07-21 09:38:47 +01:00
Yves Mettier d4cfe9de0e Fix continuous drift due to unstable hashing of values
Signed-off-by: Yves Mettier <ymettier@free.fr>
2025-07-21 09:21:56 +01:00
Matheus Pimenta 5a28a7610e
Merge pull request #1266 from fluxcd/fix-source-index
Fix watch index conflict between HelmChart and OCIRepository kinds
2025-07-19 18:40:16 +01:00
Matheus Pimenta 7780c45bf3
Fix watch index conflict between HelmChart and OCIRepository kinds
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-19 18:06:12 +01:00
Matheus Pimenta 3b75b3b8b8
Merge pull request #1262 from fluxcd/restconfig-azure-cloud
[RFC-0010] Support all Azure clouds for remote clusters at the controller level
2025-07-18 08:25:40 +01:00
Matheus Pimenta 29fd31c6eb
[RFC-0010] Support all Azure clouds for remote clusters at the controller level
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-18 08:11:02 +01:00
Matheus Pimenta 3bb7850483
Merge pull request #1258 from fluxcd/watch-label
Introduce label selector for watching ConfigMaps and Secrets
2025-07-17 10:38:46 +01:00
Matheus Pimenta 7c18470676
Introduce label selector for watching ConfigMaps and Secrets
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-17 10:28:09 +01:00
Stefan Prodan 0971d38c41
Merge pull request #1257 from fluxcd/dependabot-schedule
Update dependabot config
2025-07-15 10:53:11 +03:00
Stefan Prodan 1d4c164221
Update dependabot config
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-15 09:01:42 +03:00
Stefan Prodan 050b2ca508
Merge pull request #1246 from fluxcd/dependabot/github_actions/ci-f6eef230b4
Bump the ci group across 1 directory with 6 updates
2025-07-15 08:57:12 +03:00
dependabot[bot] 15635bc28f
Bump the ci group across 1 directory with 6 updates
Bumps the ci group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [korthout/backport-action](https://github.com/korthout/backport-action) | `3.2.0` | `3.2.1` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.10.0` | `3.11.1` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `6.17.0` | `6.18.0` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.8.2` | `3.9.1` |
| [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.20.0` | `0.20.1` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.28.18` | `3.29.0` |



Updates `korthout/backport-action` from 3.2.0 to 3.2.1
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](436145e922...0193454f0c)

Updates `docker/setup-buildx-action` from 3.10.0 to 3.11.1
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](b5ca514318...e468171a9d)

Updates `docker/build-push-action` from 6.17.0 to 6.18.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](1dc7386353...263435318d)

Updates `sigstore/cosign-installer` from 3.8.2 to 3.9.1
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](3454372f43...398d4b0eee)

Updates `anchore/sbom-action` from 0.20.0 to 0.20.1
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](e11c554f70...9246b90769)

Updates `github/codeql-action` from 3.28.18 to 3.29.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ff0a06e83c...ce28f5bb42)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-version: 3.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: docker/setup-buildx-action
  dependency-version: 3.11.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/build-push-action
  dependency-version: 6.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-version: 3.9.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-version: 0.20.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-version: 3.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-15 04:36:57 +00:00
Matheus Pimenta d992a7920f
Merge pull request #1249 from fluxcd/restconfig
[RFC-0010] Introduce workload identity auth for remote clusters
2025-07-14 18:46:02 +01:00
Matheus Pimenta 12ad940135
[RFC-0010] Introduce workload identity auth for remote clusters
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-14 16:56:11 +01:00
Matheus Pimenta 2bb5c51dfe
Merge pull request #1247 from cappyzawa/update-kustomize-v5.7.0
Update kustomize to v5.7.0
2025-06-30 11:06:27 +01:00
cappyzawa 4862194f41
Update kustomize to v5.7.0
Update kustomize from v5.6.0 to v5.7.0 for consistency across
FluxCD components, aligning with the kustomize-controller
update that addresses issues with multiple $patch: delete
strategic merge patches in a single patch file.

Updated dependencies:
- sigs.k8s.io/kustomize/api v0.19.0 -> v0.20.0
- sigs.k8s.io/kustomize/kyaml v0.19.0 -> v0.20.0

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-06-30 09:57:37 +09:00
Matheus Pimenta 68dc67620a
Merge pull request #1000 from hoffimar/deprecations
Move 'Deprecated' comments to own paragraph
2025-06-29 15:40:30 +01:00
Martin Hoffmann 0887009d50
Move 'Deprecated' comments to own paragraph
As described at https://go.dev/wiki/Deprecated, the `Deprecated` comments shall start a new paragraph. This way, the deprecation is also visible to other tools like staticcheck and vscode.

Signed-off-by: Martin Hoffmann <hoffimar@gmail.com>
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-06-29 15:26:43 +01:00
Matheus Pimenta bd9fad5238
Merge pull request #1236 from fluxcd/force-annotation
Use `reconcile.fluxcd.io/forceAt` annotation from fluxcd/pkg/apis/meta
2025-06-21 09:58:06 +01:00
Matheus Pimenta d89a6d12a3
Use reconcile.fluxcd.io/forceAt annotation from fluxcd/pkg/apis/meta
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-06-21 09:02:15 +01:00
Stefan Prodan 5cbc4a6fbd
Merge pull request #1223 from abhijith-darshan/feat/common_labels_annotations
feat: adds CommonMetadata to HelmRelease postrenderer
2025-06-17 12:01:05 +03:00
abhijith-darshan b62d7a8ad7
(chore): kustomize post-renderer with common-metadata
(chore): adds commonAnnotations and commonLabels to kustomize

if applied, this commit will pass the common labels and annotations specified in postRenderers kustomization and which gets propagated to all resources

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): generates updated api-docs

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): adds common metadata to spec

HelmRelease postRenderer uses `CommonMetadata` struct from kustomize controller to have a common CRD specification usage across flux API types

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): update helm release post renderer

HelmRelease kustomize post renderer uses the CommonMetadata type from kustomize controller to propagate common labels and annotations across all resources. Labels are not propagated to `selector.matchLabels`

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): generates updated CRD and api docs

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): adds common metadata types

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): removes common metadata

removes the insertion of common metadata info in `Kustomize.Run()`

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): adds common-metadata types

this commit adds CommonMetadata to HelmRelease spec as an optional field and when used will run a helm postRenderer to add specified labels and annotations resources contained in helm template. The digest of common metadata is stored as ObservedCommonMetadataDigest in the resource status

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): common post-renderer

this commit combines common metadata rendering and origin labels rendering into common_renderer.go with re-usable methods for label transformer and annotation transformer. Precedence is given to origin labels rendering over common metadata rendering.

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): trigger upgrade on commonMetadata value changes

this commit ensures that when commonMetadata value has changed after install triggers an upgrade action to re-render the new commonMetadata values to the helm release. The digest of commonMetadata values are stored in .status.ObservedCommonMetadataDigest for release state out-of-sync detection.

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(fix): adheres to import ordering

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(fix): revert go mod updates

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): updates copyright headers

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Abhijith Ravindra <137736216+abhijith-darshan@users.noreply.github.com>

(chore): adds copyright headers

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): updates copyright headers

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): keep go mod in sync with upstream/main

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): adds common metadata documentation

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): fix precedence of label application

This commit will ensure that OriginLabels run last so that it has a higher precedence over CommonMetadata.Labels

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>
2025-06-12 12:45:33 +02:00
Matheus Pimenta dc9e30967f
Merge pull request #1231 from fluxcd/update-labels
Add 1.3.x release label
2025-05-28 15:13:09 +01:00
Matheus Pimenta 395b8ef9a5
Add 1.3.x release label
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-28 15:00:04 +01:00
Matheus Pimenta 9a745206cf
Merge pull request #1230 from fluxcd/release/v1.3.x
Release/v1.3.x
2025-05-28 14:55:20 +01:00
Matheus Pimenta e47f47f128
Merge pull request #1229 from fluxcd/release-v1.3.0
Release v1.3.0
2025-05-28 14:32:44 +01:00
Matheus Pimenta aa70ca3df9
Release v1.3.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-28 14:14:08 +01:00
Matheus Pimenta 483f166c6a
Add changelog entry for v1.3.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-28 14:05:26 +01:00
Stefan Prodan b6d8e39ccc
Merge pull request #1227 from fluxcd/oci-ga
Update controller to OCIRepository v1 (GA)
2025-05-28 15:34:57 +03:00
Stefan Prodan 034ea18c4b
Update controller to OCIRepository v1 (GA)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-28 14:37:02 +03:00
Matheus Pimenta ff69170036
Update dependencies
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-28 10:46:46 +01:00
Stefan Prodan b2e904652c
Merge pull request #1221 from fluxcd/dependabot/github_actions/ci-5eaca88b60
Bump the ci group across 1 directory with 3 updates
2025-05-27 12:33:23 +03:00
dependabot[bot] 4653af4067
Bump the ci group across 1 directory with 3 updates
Bumps the ci group with 3 updates in the / directory: [docker/build-push-action](https://github.com/docker/build-push-action), [anchore/sbom-action](https://github.com/anchore/sbom-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/build-push-action` from 6.16.0 to 6.17.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](14487ce63c...1dc7386353)

Updates `anchore/sbom-action` from 0.19.0 to 0.20.0
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](9f73021414...e11c554f70)

Updates `github/codeql-action` from 3.28.17 to 3.28.18
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](60168efe1c...ff0a06e83c)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 6.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-version: 0.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-version: 3.28.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-26 03:06:56 +00:00
Matheus Pimenta 68883e40fb
Merge pull request #1220 from fluxcd/upgrade-deps
Upgrade fluxcd/pkg packages
2025-05-23 08:29:35 +01:00
Matheus Pimenta 95e69b5d4c
Upgrade fluxcd/pkg packages
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-17 20:11:16 +01:00
leigh capili 8710b4ae26
Merge pull request #1218 from fluxcd/upgrade-deps
Upgrade fluxcd/pkg packages
2025-05-16 20:39:16 -04:00
Matheus Pimenta da1d17bd7a
Upgrade fluxcd/pkg packages
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-16 15:51:32 +01:00
Stefan Prodan 2bee1224e0
Merge pull request #1206 from fluxcd/dependabot/github_actions/ci-4c7c75f92f
Bump the ci group across 1 directory with 14 updates
2025-05-12 09:38:03 +03:00
dependabot[bot] a6486334aa
Bump the ci group across 1 directory with 14 updates
Bumps the ci group with 14 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [korthout/backport-action](https://github.com/korthout/backport-action) | `3.1.0` | `3.2.0` |
| [actions/setup-go](https://github.com/actions/setup-go) | `5.3.0` | `5.4.0` |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3.4.0` | `3.6.0` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.9.0` | `3.10.0` |
| [actions/cache](https://github.com/actions/cache) | `4.2.0` | `4.2.3` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `6.13.0` | `6.16.0` |
| [docker/login-action](https://github.com/docker/login-action) | `3.3.0` | `3.4.0` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `5.6.1` | `5.7.0` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.8.0` | `3.8.2` |
| [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.18.0` | `0.19.0` |
| [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `6.2.1` | `6.3.0` |
| [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) | `2.0.0` | `2.1.0` |
| [fossa-contrib/fossa-action](https://github.com/fossa-contrib/fossa-action) | `3.0.0` | `3.0.1` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.28.9` | `3.28.16` |



Updates `korthout/backport-action` from 3.1.0 to 3.2.0
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](be567af183...436145e922)

Updates `actions/setup-go` from 5.3.0 to 5.4.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](f111f3307d...0aaccfd150)

Updates `docker/setup-qemu-action` from 3.4.0 to 3.6.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](4574d27a47...29109295f8)

Updates `docker/setup-buildx-action` from 3.9.0 to 3.10.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](f7ce87c1d6...b5ca514318)

Updates `actions/cache` from 4.2.0 to 4.2.3
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](1bd1e32a3b...5a3ec84eff)

Updates `docker/build-push-action` from 6.13.0 to 6.16.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](ca877d9245...14487ce63c)

Updates `docker/login-action` from 3.3.0 to 3.4.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](9780b0c442...74a5d14239)

Updates `docker/metadata-action` from 5.6.1 to 5.7.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](369eb591f4...902fa8ec7d)

Updates `sigstore/cosign-installer` from 3.8.0 to 3.8.2
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](c56c2d3e59...3454372f43)

Updates `anchore/sbom-action` from 0.18.0 to 0.19.0
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](f325610c9f...9f73021414)

Updates `goreleaser/goreleaser-action` from 6.2.1 to 6.3.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](90a3faa9d0...9c156ee8a1)

Updates `slsa-framework/slsa-github-generator` from 2.0.0 to 2.1.0
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases)
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/slsa-framework/slsa-github-generator/compare/v2.0.0...v2.1.0)

Updates `fossa-contrib/fossa-action` from 3.0.0 to 3.0.1
- [Release notes](https://github.com/fossa-contrib/fossa-action/releases)
- [Changelog](https://github.com/fossa-contrib/fossa-action/blob/master/CHANGELOG.md)
- [Commits](cdc5065bcd...3d2ef181b1)

Updates `github/codeql-action` from 3.28.9 to 3.28.16
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](9e8d0789d4...28deaeda66)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: actions/setup-go
  dependency-version: 5.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/setup-qemu-action
  dependency-version: 3.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/setup-buildx-action
  dependency-version: 3.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: actions/cache
  dependency-version: 4.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: docker/build-push-action
  dependency-version: 6.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/login-action
  dependency-version: 3.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/metadata-action
  dependency-version: 5.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-version: 3.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-version: 0.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: goreleaser/goreleaser-action
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: slsa-framework/slsa-github-generator
  dependency-version: 2.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: fossa-contrib/fossa-action
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-version: 3.28.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-12 03:26:40 +00:00
Stefan Prodan 724fae4a57
Merge pull request #1212 from fluxcd/DisableChartDigestTracking
Add `DisableChartDigestTracking` feature gate
2025-05-09 20:14:41 +03:00
Stefan Prodan da305300b3
Add DisableChartDigestTracking feature gate
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-08 01:03:17 +03:00
Stefan Prodan b91fd90c75
Merge pull request #1209 from fluxcd/k8s-1.33
Update to Kubernetes 1.33.0 and Go 1.24.0
2025-04-29 16:04:11 +03:00
Stefan Prodan 709b76a022
Update to Kubernetes 1.33.0 and Go 1.24.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-04-29 15:51:11 +03:00
Stefan Prodan 597dd184a9
Merge pull request #1204 from fluxcd/helm-v3.17.3
Update dependencies to Helm v3.17.3
2025-04-11 12:15:34 +03:00
Stefan Prodan 9134ee5788
Update dependencies to Helm v3.17.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-04-11 11:09:39 +03:00
Matheus Pimenta 8e02c59a8a
Merge pull request #1188 from drawdrop/main
fix: fix the wrong error return value
2025-03-04 11:33:50 +00:00
drawdrop 7cdf9dfbfe fix: fix the wrong error return value
Signed-off-by: drawdrop <cricis@icloud.com>
2025-03-03 22:13:43 +08:00
Matheus Pimenta 25c6bb691d
Merge pull request #1176 from fluxcd/update-labels
Add 1.2.x release label
2025-02-19 09:46:48 +00:00
Matheus Pimenta ebabf4ad3a
Add 1.2.x release label
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-19 09:11:51 +00:00
Matheus Pimenta 2e8c037d4e
Merge pull request #1175 from fluxcd/release/v1.2.x
Release/v1.2.x
2025-02-19 09:10:37 +00:00
Matheus Pimenta 8e4de326fa
Merge pull request #1174 from fluxcd/release-v1.2.0
Release v1.2.0
2025-02-19 08:45:35 +00:00
Matheus Pimenta 9463301e5e
Release v1.2.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-19 08:22:50 +00:00
Matheus Pimenta 94c60d50dc
Add changelog entry for v1.2.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-19 08:22:49 +00:00
Matheus Pimenta 34d0036cbd
Merge pull request #1170 from fluxcd/dependabot/go_modules/go-deps-d8ecef8942
Bump the go-deps group across 1 directory with 2 updates
2025-02-18 17:24:24 +00:00
dependabot[bot] e22eb2732d
Bump the go-deps group across 1 directory with 2 updates
Bumps the go-deps group with 2 updates in the / directory: [github.com/fluxcd/pkg/ssa](https://github.com/fluxcd/pkg) and [golang.org/x/text](https://github.com/golang/text).


Updates `github.com/fluxcd/pkg/ssa` from 0.44.0 to 0.45.1
- [Commits](https://github.com/fluxcd/pkg/compare/oci/v0.44.0...ssa/v0.45.1)

Updates `golang.org/x/text` from 0.21.0 to 0.22.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: github.com/fluxcd/pkg/ssa
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 16:57:21 +00:00
Matheus Pimenta 93eef0d99c
Merge pull request #1173 from fluxcd/upgrade-helm
Upgrade helm to v3.17.1
2025-02-18 16:47:20 +00:00
Matheus Pimenta 25f3db5d67
Upgrade helm to v3.17.1
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-18 14:06:29 +00:00
Stefan Prodan 3385e3f458
Merge pull request #1167 from fluxcd/dependabot/github_actions/ci-4ac27b1555
Bump the ci group across 1 directory with 2 updates
2025-02-18 15:23:49 +02:00
dependabot[bot] f80b06b1a7
Bump the ci group across 1 directory with 2 updates
Bumps the ci group with 2 updates in the / directory: [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `goreleaser/goreleaser-action` from 6.1.0 to 6.2.1
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](9ed2f89a66...90a3faa9d0)

Updates `github/codeql-action` from 3.28.8 to 3.28.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](dd746615b3...9e8d0789d4)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-14 03:33:14 +00:00
Matheus Pimenta da8af058ce
Merge pull request #1171 from fluxcd/upgrade-deps
Update source-controller API to v1.5.0
2025-02-13 16:34:56 +00:00
Matheus Pimenta 763e03c19c
Update source-controller API to v1.5.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-13 16:24:18 +00:00
Stefan Prodan 15d0dc8252
Merge pull request #1169 from sslavic/stevo-rollback-remed-max-hist
fix: use HelmRelease max history for rollback remediation
2025-02-11 16:52:33 +02:00
Stevo Slavic dda1d355b7 fix: use HelmRelease max history for rollback remediation
Signed-off-by: Stevo Slavic <sslavic@gmail.com>
2025-02-11 15:17:29 +01:00
Matheus Pimenta 8dfcca2cb0
Merge pull request #1168 from fluxcd/upgrade-deps
Upgrade pkg/runtime
2025-02-11 12:07:45 +00:00
Matheus Pimenta 679975691b
Upgrade pkg/runtime
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-11 11:52:03 +00:00
Stefan Prodan c2233b903b
Merge pull request #1165 from fluxcd/dependabot/github_actions/ci-05f176d660
Bump the ci group across 1 directory with 3 updates
2025-02-09 11:43:27 +02:00
dependabot[bot] 6252c3f045
Bump the ci group across 1 directory with 3 updates
Bumps the ci group with 3 updates in the / directory: [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action), [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) and [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer).


Updates `docker/setup-qemu-action` from 3.3.0 to 3.4.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](53851d1459...4574d27a47)

Updates `docker/setup-buildx-action` from 3.8.0 to 3.9.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](6524bf65af...f7ce87c1d6)

Updates `sigstore/cosign-installer` from 3.7.0 to 3.8.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](dc72c7d5c4...c56c2d3e59)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-07 04:06:00 +00:00
Stefan Prodan d854623221
Merge pull request #1158 from fluxcd/dependabot/github_actions/ci-fbaebe1433
Bump the ci group across 1 directory with 12 updates
2025-01-31 15:53:08 +02:00
dependabot[bot] f52212e47d
Bump the ci group across 1 directory with 12 updates
Bumps the ci group with 12 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.2.0` | `4.2.2` |
| [actions/setup-go](https://github.com/actions/setup-go) | `5.0.2` | `5.3.0` |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3.2.0` | `3.3.0` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.6.1` | `3.8.0` |
| [actions/cache](https://github.com/actions/cache) | `4.0.2` | `4.2.0` |
| [helm/kind-action](https://github.com/helm/kind-action) | `1.10.0` | `1.12.0` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `6.7.0` | `6.13.0` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `5.5.1` | `5.6.1` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.6.0` | `3.7.0` |
| [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.17.2` | `0.18.0` |
| [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `6.0.0` | `6.1.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.26.9` | `3.28.8` |



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](d632683dd7...11bd71901b)

Updates `actions/setup-go` from 5.0.2 to 5.3.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](0a12ed9d6a...f111f3307d)

Updates `docker/setup-qemu-action` from 3.2.0 to 3.3.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](49b3bc8e6b...53851d1459)

Updates `docker/setup-buildx-action` from 3.6.1 to 3.8.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](988b5a0280...6524bf65af)

Updates `actions/cache` from 4.0.2 to 4.2.0
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](0c45773b62...1bd1e32a3b)

Updates `helm/kind-action` from 1.10.0 to 1.12.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](0025e74a8c...a1b0e39133)

Updates `docker/build-push-action` from 6.7.0 to 6.13.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](5cd11c3a4c...ca877d9245)

Updates `docker/metadata-action` from 5.5.1 to 5.6.1
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](8e5442c4ef...369eb591f4)

Updates `sigstore/cosign-installer` from 3.6.0 to 3.7.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](4959ce089c...dc72c7d5c4)

Updates `anchore/sbom-action` from 0.17.2 to 0.18.0
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](61119d458a...f325610c9f)

Updates `goreleaser/goreleaser-action` from 6.0.0 to 6.1.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](286f3b13b1...9ed2f89a66)

Updates `github/codeql-action` from 3.26.9 to 3.28.8
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](461ef6c76d...dd746615b3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-31 13:40:23 +00:00
Stefan Prodan 22c809de3b
Merge pull request #1160 from fluxcd/helm-v3.17.0
Update dependencies to Helm v3.17.0 and Kustomize v5.6.0
2025-01-31 15:37:24 +02:00
Stefan Prodan 751d48a2e0
Update dependencies to Helm v3.17.0 and Kustomize v5.6.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-01-31 15:22:00 +02:00
Matheus Pimenta 8e6106b40d
Merge pull request #1142 from fluxcd/upgrade-runtime
Upgrade runtime
2025-01-10 13:59:11 +00:00
Matheus Pimenta 483cf06f4e
Upgrade runtime
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-01-10 13:43:57 +00:00
Matheus Pimenta 58d5812b33
Merge pull request #1123 from fluxcd/remove-subchart-crd
Fix install and upgrade applying subchart CRDs when condition is false
2025-01-10 12:22:30 +00:00
Matheus Pimenta dd3b66a3c5
Fix install and upgrade applying subchart CRDs when condition is false
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-01-10 12:09:40 +00:00
Stefan Prodan 9b78c2e670
Merge pull request #1140 from kumar-mallikarjuna/fix-1139
Add `disableTakeOwnership` to Helm install/upgrade actions
2025-01-10 13:45:35 +02:00
Kumar Mallikarjuna 53578dd43f Update API docs and descriptions
Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna.work@gmail.com>
2025-01-10 16:21:57 +05:30
Kumar Mallikarjuna 2ffd183ac1 Update `disableTakeOwnership` docs
Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna.work@gmail.com>
2025-01-10 16:12:19 +05:30
Kumar Mallikarjuna 1607808aea Fix `disableTakeOwnership` docs
Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna.work@gmail.com>
2025-01-10 16:09:35 +05:30
Kumar Mallikarjuna 0da7fbddc9 Add tests for `disableTakeOwnership`
Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna.work@gmail.com>
2025-01-09 15:26:48 +05:30
Kumar Mallikarjuna aad273dfb7 Change install->upgrade in docs
Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna.work@gmail.com>
2025-01-09 15:11:14 +05:30
Kumar Mallikarjuna 98622cd087 Add `disableTakeOwnership` to Helm install/upgrade actions
This change adds a new field called `disableTakeOwnership` to `.spec.install` and `.spec.upgrade`. The flag allows users to disable ignoring helm annotations and labels before taking ownership of existing resources during install and upgrade.

Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna.work@gmail.com>
2025-01-08 23:26:05 +05:30
Stefan Prodan e8986629e1
Merge pull request #1129 from fluxcd/k8s-1.32
Update dependencies to Kubernetes 1.32.0 and Go 1.23.0
2024-12-12 19:28:33 +02:00
Stefan Prodan e1f1022e2e
Update dependencies to Kubernetes 1.32.0 and Go 1.23.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-12 19:13:31 +02:00
Stefan Prodan 8991959261
Merge pull request #1126 from fluxcd/alias-ValuesReference
Make `ValuesReference` an alias for backwards compat
2024-12-12 16:39:03 +02:00
Stefan Prodan af516b84b0
Make `ValuesReference` an alias for backwards compat
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-12 16:27:54 +02:00
Stefan Prodan 66f024c654
Merge pull request #1127 from fluxcd/debug-helm-values
docs: Rendering the final Values locally
2024-12-11 15:57:53 +02:00
Stefan Prodan ebf412639e
docs: Rendering the final Values locally
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-11 14:13:34 +02:00
Stefan Prodan ee7554998e
Merge pull request #1122 from fluxcd/chartutil-v1.0.0
Refactor values composition to use `pkg/chartutil`
2024-12-10 12:22:50 +02:00
Stefan Prodan 9c58e02b62
Refactor values composition to use `pkg/chartutil`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-10 12:04:54 +02:00
Stefan Prodan f48671c020
Merge pull request #1121 from fluxcd/kustomize-v5.5
Update Kustomize packages to v5.5.0
2024-12-06 18:12:56 +02:00
Stefan Prodan 1c9a8b14f2
Update Kustomize packages to v5.5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-06 17:34:58 +02:00
Hidde Beydals d8eee36ffe
Merge pull request #1103 from fluxcd/dependabot/go_modules/go-deps-d4cf87f8bc 2024-11-16 20:30:45 +01:00
dependabot[bot] 5fe9108465
Bump the go-deps group across 1 directory with 2 updates
Bumps the go-deps group with 1 update in the / directory: [github.com/onsi/gomega](https://github.com/onsi/gomega).


Updates `github.com/onsi/gomega` from 1.34.2 to 1.35.1
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.34.2...v1.35.1)

Updates `golang.org/x/text` from 0.18.0 to 0.19.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-16 18:48:57 +00:00
Hidde Beydals 57737ba42a
Merge pull request #1084 from luisdavim/client_reties 2024-11-16 19:47:50 +01:00
Luis Davim 26bdaec567 fix: handle "leader changed" errors
Fixes fluxcd/flux2/#4804 by copying the solution used in helm/helm#11426

Signed-off-by: Luis Davim <luis.davim@gmail.com>
2024-11-16 13:03:48 +00:00
Stefan Prodan 5beaf80cfc
Merge pull request #1102 from baburciu/accept-underscore-ocirepo-tag-hr
Replace `_` with `+` when verifying the chart version matches the OCI artifact tag
2024-11-01 18:34:42 +02:00
Bogdan-Adrian Burciu caf49d2459 replace _ with + for OCI artifacts tags when pulled for helm
Signed-off-by: Bogdan-Adrian Burciu <bogdanadrian.burciu@yahoo.com>
2024-11-01 12:40:01 +00:00
Sunny c8ae4b6ad2
Merge pull request #1076 from fluxcd/label-sync
Label sync for release/v1.1.x
2024-09-27 19:47:51 +05:30
Sunny 9d14244a87 Label sync for release/v1.1.x
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-27 17:49:19 +05:30
Stefan Prodan e632ffdf4d
Merge pull request #1075 from fluxcd/release/v1.1.x
Merge `release/v1.1.x` back to `main`
2024-09-26 23:59:14 +03:00
Sunny 44247e2310
Merge pull request #1074 from fluxcd/release-v1.1.0
Release v1.1.0
2024-09-27 01:22:22 +05:30
Sunny d1a931ae8c Release v1.1.0
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-27 00:32:56 +05:30
Sunny 037bc864be Add changelog entry for v1.1.0
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-27 00:32:49 +05:30
Stefan Prodan b0010b0cd5
Merge pull request #1070 from fluxcd/deps-api-reader
Allow cross-shard dependency check
2024-09-26 21:33:41 +03:00
Stefan Prodan 72ec296d18
Allow cross-shard dependency check
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-26 21:15:31 +03:00
Stefan Prodan c71258e597
Merge pull request #1073 from fluxcd/update-sc
Update source-controller to v1.4.1
2024-09-26 21:04:11 +03:00
Sunny e3ab7cecbe Update source-controller to v1.4.1
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-26 17:19:14 +00:00
Stefan Prodan 2e3efaf633
Merge pull request #1072 from fluxcd/dependabot/github_actions/ci-74c3fc3a14
Bump the ci group across 1 directory with 2 updates
2024-09-26 11:04:30 +03:00
dependabot[bot] 2932347391
Bump the ci group across 1 directory with 2 updates
Bumps the ci group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 4.1.7 to 4.2.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](692973e3d9...d632683dd7)

Updates `github/codeql-action` from 3.26.4 to 3.26.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f0f3afee80...461ef6c76d)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-26 07:52:33 +00:00
Stefan Prodan 18d2406754
Merge pull request #1071 from fluxcd/deps-update
Update flux deps and k8s deps to 1.31.1
2024-09-26 10:20:14 +03:00
Sunny 5d1381215e Update SC in config/default
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-25 21:45:54 +00:00
Sunny 701ea28bc9 Update flux deps and k8s deps to 1.31.1
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-25 21:18:33 +00:00
Stefan Prodan 754c2ba1cb
Merge pull request #1068 from fluxcd/disable-schema-validation
Add `disableSchemaValidation` to Helm install/upgrade actions
2024-09-24 09:32:30 +03:00
Stefan Prodan 54f0b42b34
Add `disableSchemaValidation` to Helm install/upgrade actions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-20 22:28:51 +03:00
Stefan Prodan a7c83f6260
Merge pull request #1024 from cwrau/fix/dont-ignore-helm-errors
fix: remove digest check to never ignore helm errors
2024-09-20 21:17:38 +02:00
Sunny 7fee60ed7f Add docs for handling failed uninstall
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-18 23:16:29 +00:00
Sunny ad0d38c19a Add tests for uninstall error
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-18 22:20:51 +00:00
Chris Werner Rau f65b95b75d fix: remove digest check to never ignore helm errors
Closes #1021

Signed-off-by: Chris Werner Rau <cwrau@cwrau.info>
2024-09-19 03:33:41 +05:30
Stefan Prodan 037e21595a
Merge pull request #1064 from fluxcd/controller-gen-v0.16.1
Update controller-gen to v0.16.1
2024-09-13 16:22:58 +03:00
Stefan Prodan b36b123dcb
Add required kind field to tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-13 13:14:52 +03:00
Stefan Prodan 46f88f471d
Update controller-gen to v0.16.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-13 13:04:40 +03:00
Stefan Prodan 797461a3dc
Merge pull request #1062 from fluxcd/helm-v3.16.0
Update Helm to v3.16.1 and enable the adoption of existing resources
2024-09-13 13:02:57 +03:00
Stefan Prodan 9f5457d7ea
Update Helm to v3.16.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-13 12:51:19 +03:00
Stefan Prodan 3c0ef0e030
Enable `TakeOwnership` at install/upgrade
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-13 12:51:15 +03:00
Stefan Prodan bbd364f7a0
Update Helm to v3.16.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-13 12:51:14 +03:00
Stefan Prodan 94748cab5a
Merge pull request #1060 from Preisschild/feat/targetpath-allow-overwrite
Allow overwriting inline values with targetPath
2024-09-13 10:35:41 +03:00
Florian Ströger c07f10866b Allow overwriting inline values with targetPath
When using Helm with both a values file and --set, the set will always
have precedence over the values.yaml. This allows specifying the normal
config inside a yaml file and specifying a secret outside that yaml via
--set.

When using flux, this normally works too (using inline values to specify
most of the config and a reference with targetPath to get a secret), but
if you want to overwrite a secret key inside an array the inline values
will always overwrite the whole array and the referenced secret key will
not appear at all.

By making sure that when you specify a targetPath it has precedence over
inline values it will be merged properly.

Signed-off-by: Ströger Florian <florian@florianstroeger.com>
2024-09-08 16:12:51 +02:00
Stefan Prodan e05c4ffc4b
Merge pull request #1052 from fluxcd/dependabot/github_actions/ci-4516fd8e81
Bump the ci group across 1 directory with 3 updates
2024-08-22 10:07:33 +03:00
dependabot[bot] c3a8dbcbe9
Bump the ci group across 1 directory with 3 updates
Bumps the ci group with 3 updates in the / directory: [korthout/backport-action](https://github.com/korthout/backport-action), [anchore/sbom-action](https://github.com/anchore/sbom-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `korthout/backport-action` from 3.0.2 to 3.1.0
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](bd410d37cd...be567af183)

Updates `anchore/sbom-action` from 0.17.1 to 0.17.2
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](ab9d16d4b4...61119d458a)

Updates `github/codeql-action` from 3.26.2 to 3.26.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](429e197704...f0f3afee80)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-22 03:55:04 +00:00
Stefan Prodan 7177d4a402
Merge pull request #1049 from fluxcd/go-1.23
Build with Go 1.23
2024-08-15 12:31:41 +03:00
Stefan Prodan 73dd4d8172
Build with Go 1.23
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-15 12:10:30 +03:00
Stefan Prodan cd5214cff5
Merge pull request #1048 from fluxcd/k8s-1.31
Update dependencies to Kubernetes v1.31.0
2024-08-15 11:29:46 +03:00
Stefan Prodan e53d5c036b
Update dependencies to Kubernetes v1.31.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-15 11:15:19 +03:00
Stefan Prodan f681236b84
Merge pull request #1046 from fluxcd/dependabot/github_actions/ci-99774d93c7
Bump the ci group across 1 directory with 9 updates
2024-08-15 09:56:40 +03:00
dependabot[bot] b038750217
Bump the ci group across 1 directory with 9 updates
Bumps the ci group with 9 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.1.6` | `4.1.7` |
| [actions/setup-go](https://github.com/actions/setup-go) | `5.0.1` | `5.0.2` |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3.0.0` | `3.2.0` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.3.0` | `3.6.1` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `5.4.0` | `6.7.0` |
| [docker/login-action](https://github.com/docker/login-action) | `3.2.0` | `3.3.0` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.5.0` | `3.6.0` |
| [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.16.0` | `0.17.1` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.25.8` | `3.26.2` |



Updates `actions/checkout` from 4.1.6 to 4.1.7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a5ac7e51b4...692973e3d9)

Updates `actions/setup-go` from 5.0.1 to 5.0.2
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](cdcb360436...0a12ed9d6a)

Updates `docker/setup-qemu-action` from 3.0.0 to 3.2.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](68827325e0...49b3bc8e6b)

Updates `docker/setup-buildx-action` from 3.3.0 to 3.6.1
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](d70bba72b1...988b5a0280)

Updates `docker/build-push-action` from 5.4.0 to 6.7.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](ca052bb54a...5cd11c3a4c)

Updates `docker/login-action` from 3.2.0 to 3.3.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](0d4c9c5ea7...9780b0c442)

Updates `sigstore/cosign-installer` from 3.5.0 to 3.6.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](59acb6260d...4959ce089c)

Updates `anchore/sbom-action` from 0.16.0 to 0.17.1
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](e8d2a6937e...ab9d16d4b4)

Updates `github/codeql-action` from 3.25.8 to 3.26.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2e230e8fe0...429e197704)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-15 03:18:03 +00:00
Stefan Prodan 70dadf74f0
Merge pull request #1025 from octo/fix-conditions-usage
Fix incorrect use of format strings with the `conditions` package.
2024-07-12 11:15:13 +03:00
Florian Forster c94eb8ec21
Fix incorrect use of format strings with the `conditions` package.
The `Mark…` functions in the `conditions` package accept a format string and
(optional) arguments, just like `fmt.Printf` and friends.

In many places, the code passed an error message as the format string, causing
it to be interpreted as a format string by the `fmt` package. This leads to
issues when the message contains percent signs, e.g. URL-encoded values.

This PR adds a format string and shortens `err.Error()` to `err`, which yields
the same output.

This change is identical in principle to
fluxcd/source-controller#1529.

Signed-off-by: Florian Forster <fforster@gitlab.com>
2024-07-12 09:46:13 +02:00
souleb 655432b46d
Merge pull request #1010 from fluxcd/fix-1008
Re-enable logging json patch on StatusDrifted
2024-06-19 10:11:55 +02:00
Soule BA a3c4b4da62
Re-enable logging json patch on StatusDrifted
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-06-19 00:28:05 +02:00
Stefan Prodan ad7e418948
Merge pull request #1004 from fluxcd/dependabot/github_actions/ci-6e6887dbc2
Bump the ci group across 1 directory with 5 updates
2024-06-11 09:50:36 +03:00
Stefan Prodan ffeb21acbe
Adapt config to GoRelease v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-06-11 09:41:08 +03:00
dependabot[bot] c8c450a02f
Bump the ci group across 1 directory with 5 updates
Bumps the ci group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [korthout/backport-action](https://github.com/korthout/backport-action) | `2.5.0` | `3.0.2` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `5.3.0` | `5.4.0` |
| [docker/login-action](https://github.com/docker/login-action) | `3.1.0` | `3.2.0` |
| [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `5.1.0` | `6.0.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.25.6` | `3.25.8` |



Updates `korthout/backport-action` from 2.5.0 to 3.0.2
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](ef20d86abc...bd410d37cd)

Updates `docker/build-push-action` from 5.3.0 to 5.4.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](2cdde995de...ca052bb54a)

Updates `docker/login-action` from 3.1.0 to 3.2.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](e92390c5fb...0d4c9c5ea7)

Updates `goreleaser/goreleaser-action` from 5.1.0 to 6.0.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](5742e2a039...286f3b13b1)

Updates `github/codeql-action` from 3.25.6 to 3.25.8
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](9fdb3e4972...2e230e8fe0)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-11 03:58:19 +00:00
Max Jonas Werner ce58e47242
Merge pull request #990 from fluxcd/rev-vers 2024-05-27 07:58:26 +01:00
Max Jonas Werner 98ecb33ef4 Ignore 'v' version prefix in OCI artifact and Helm chart
Tools such as Bitnami's charts-syncer strip the `v` prefix from the
chart version so that the OCI artifact version differs from the
version defined in the chart's metadata. This leads to an error
similar to this returned from h-c:

```
artifact revision 1.14.5 does not match chart version v1.14.5
```

This commit makes h-c ignore a leading `v` prefix in either the chart
version of the OCI artifact tag.

Signed-off-by: Max Jonas Werner <max.werner@associmates.eu>
2024-05-26 19:47:50 +01:00
Stefan Prodan bd7e561811
Merge pull request #986 from sestegra/crd-default-values
doc: fix HelmRelease default value for `.spec.upgrade.crds`
2024-05-25 15:21:48 +03:00
Stéphane Este-Gracias b98fde5de4
Merge branch 'main' into crd-default-values 2024-05-25 13:24:00 +02:00
souleb f731a805b1
Merge pull request #994 from fluxcd/dependabot/github_actions/ci-c7f71143c6
build(deps): bump the ci group with 2 updates
2024-05-21 09:46:14 +02:00
dependabot[bot] 35976156df
---
updated-dependencies:
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 04:00:03 +00:00
souleb 7a6a2d430a
Merge pull request #991 from fluxcd/dependabot/github_actions/ci-a3f50e56c6
build(deps): bump the ci group across 1 directory with 2 updates
2024-05-17 12:07:51 +02:00
dependabot[bot] 6e47eac4fe
build(deps): bump the ci group across 1 directory with 2 updates
Bumps the ci group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 4.1.5 to 4.1.6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](44c2b7a8a4...a5ac7e51b4)

Updates `github/codeql-action` from 3.25.4 to 3.25.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ccf74c9479...b7cec75265)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-17 03:36:42 +00:00
souleb 5efa0aa970
Merge pull request #987 from fluxcd/dependabot/github_actions/ci-65bd204c79
build(deps): bump the ci group across 1 directory with 2 updates
2024-05-13 10:05:18 +02:00
dependabot[bot] 3f91647ef9
build(deps): bump the ci group across 1 directory with 2 updates
Bumps the ci group with 2 updates in the / directory: [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `goreleaser/goreleaser-action` from 5.0.0 to 5.1.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](7ec5c2b0c6...5742e2a039)

Updates `github/codeql-action` from 3.25.3 to 3.25.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](d39d31e687...ccf74c9479)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 03:26:18 +00:00
Stéphane Este-Gracias f8c9766f89
doc: fix helmrelease default value for .spec.upgrade.crds
Signed-off-by: Stéphane Este-Gracias <sestegra@gmail.com>
2024-05-10 19:21:50 +02:00
Stefan Prodan e7dc85eddc
Merge pull request #985 from fluxcd/pick-changelog-v1.0.1
Add changelog entry for v1.0.1
2024-05-10 18:26:32 +03:00
Soule BA e475c1ffe3
Add changelog entry for v1.0.1
Signed-off-by: Soule BA <bah.soule@gmail.com>
(cherry picked from commit 964e7500ad)
2024-05-10 18:13:10 +03:00
Stefan Prodan 1526d3a615
Merge pull request #982 from fluxcd/fix-upgrade
Fix: Allow upgrading from v2beta1 to v2 (GA)
2024-05-10 16:52:23 +03:00
Stefan Prodan d909c31b5e
Fix: Allow upgrading from v2beta1 to v2 (GA)
Add `.spec.chartRef` placeholder to v2beta1 to allow upgrading to v2 GA.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-10 16:27:15 +03:00
souleb bc1219fbc1
Merge pull request #980 from fluxcd/chartTemplate-as-pointer
Fix: Make `HelmChartTemplate` a pointer in `.spec.chart`
2024-05-10 12:58:01 +02:00
Soule BA 16b61c6f8a
Make chartTemplate a pointer in .spec.chart
If implemented, this will omit empty `.spec.chart` in rendered yamls.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-05-10 12:45:33 +02:00
Stefan Prodan 2c26ac1d62
Merge pull request #978 from fluxcd/release/v1.0.x
Housekeeping: merge `release/v1.0.x` back into `main`
2024-05-09 17:20:34 +03:00
Stefan Prodan 519df15ce6
Merge branch 'main' into release/v1.0.x 2024-05-09 15:50:51 +03:00
Stefan Prodan cee99531fb
Merge pull request #971 from fluxcd/release-v1.0.0
Release v1.0.0
2024-05-09 15:47:52 +03:00
Stefan Prodan 93702c7a57
Release v1.0.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-09 15:32:35 +03:00
Stefan Prodan 7ccb1cbfb3
Add changelog entry for v1.0.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-09 15:32:35 +03:00
Stefan Prodan 999b855107
Merge pull request #977 from fluxcd/backport-972-to-release/v1.0.x
[release/v1.0.x] PostRenderersDigest observation improvements
2024-05-09 15:31:52 +03:00
Sunny e0629b7967 PostRenderersDigest observation improvements
Move the post renderers digest set/update code from summarize() to
atomic release reconciler in order to update the observation only at the
end of a successful reconciliation. summarize() is for summarizing the
status conditions and is also called by all the other action
sub-reconcilers, which can update the post renderers digest observation
too early.
Updating the observed post renderers digest at the very end of a
reconciliation introduces an issue where a digest mismatch in
DetermineReleaseState() could result in the release to get stuck in a
loop as even after running an upgrade due to post renderers value, the
new observation isn't reflected immediately in the middle of atomic
reconciliation. This can be solved by checking post renderers digest
value only for new configurations where the object generation and the
ready status condition observed generations don't match, in other words
when the generation of a configuration has not be processed. This
assumes that an upgrade due to any other reason also takes into account
the post renderers value and need not be checked separately for the same
config generation.

Signed-off-by: Sunny <github@darkowlzz.space>
(cherry picked from commit 63f7a76319)
2024-05-09 12:21:35 +00:00
Stefan Prodan f88b3be818
Merge pull request #972 from fluxcd/improve-postrenderer-tracking
PostRenderersDigest observation improvements
2024-05-09 15:21:19 +03:00
Sunny 63f7a76319
PostRenderersDigest observation improvements
Move the post renderers digest set/update code from summarize() to
atomic release reconciler in order to update the observation only at the
end of a successful reconciliation. summarize() is for summarizing the
status conditions and is also called by all the other action
sub-reconcilers, which can update the post renderers digest observation
too early.
Updating the observed post renderers digest at the very end of a
reconciliation introduces an issue where a digest mismatch in
DetermineReleaseState() could result in the release to get stuck in a
loop as even after running an upgrade due to post renderers value, the
new observation isn't reflected immediately in the middle of atomic
reconciliation. This can be solved by checking post renderers digest
value only for new configurations where the object generation and the
ready status condition observed generations don't match, in other words
when the generation of a configuration has not be processed. This
assumes that an upgrade due to any other reason also takes into account
the post renderers value and need not be checked separately for the same
config generation.

Signed-off-by: Sunny <github@darkowlzz.space>
2024-05-09 10:58:41 +00:00
Stefan Prodan 44724ff2cd
Merge pull request #976 from fluxcd/backport-975-to-release/v1.0.x
[release/v1.0.x] Prevent snapshot drift when upgrading to API v2
2024-05-09 11:38:12 +03:00
Stefan Prodan 1f63b8a40a Prevent snapshot drift when upgrading to API v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
(cherry picked from commit 56b5f14b34)
2024-05-09 08:23:30 +00:00
Stefan Prodan 461d45db75
Merge pull request #975 from fluxcd/fix-snaphot-drift
Prevent snapshot drift when upgrading to API v2
2024-05-09 11:23:16 +03:00
Stefan Prodan 56b5f14b34
Prevent snapshot drift when upgrading to API v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-09 10:18:38 +03:00
Stefan Prodan 538d48e8ab
Merge pull request #973 from matheuscscp/new-release-label
Add 1.0.x release label
2024-05-08 17:29:06 +03:00
Matheus Pimenta b9386cea68 Add 1.0.x release label
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-05-08 15:15:30 +01:00
Stefan Prodan 57a3c1fcfd
Merge pull request #967 from fluxcd/dependabot/github_actions/ci-2057180a66
build(deps): bump the ci group across 1 directory with 2 updates
2024-05-08 09:43:57 +03:00
dependabot[bot] 457c80578f
build(deps): bump the ci group across 1 directory with 2 updates
Bumps the ci group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [actions/setup-go](https://github.com/actions/setup-go).


Updates `actions/checkout` from 4.1.4 to 4.1.5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](0ad4b8fada...44c2b7a8a4)

Updates `actions/setup-go` from 5.0.0 to 5.0.1
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](0c52d547c9...cdcb360436)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-08 03:34:21 +00:00
souleb acf98e9ea4
Merge pull request #966 from fluxcd/dependabot/go_modules/go-deps-134d2f154a
build(deps): bump golang.org/x/text from 0.14.0 to 0.15.0 in the go-deps group
2024-05-07 23:53:20 +02:00
dependabot[bot] ba10289963
build(deps): bump golang.org/x/text in the go-deps group
Bumps the go-deps group with 1 update: [golang.org/x/text](https://github.com/golang/text).


Updates `golang.org/x/text` from 0.14.0 to 0.15.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 23:41:54 +02:00
souleb 9da5599163
Merge pull request #965 from fluxcd/fix-964
Track changes in `.spec.postRenderers`
2024-05-07 23:23:34 +02:00
Soule BA 4b6febf48c
Add test cases for Summarize() and DetermineReleaseState()
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-05-07 23:13:47 +02:00
Soule BA 4069ad47e9
A better implementation for observing Postrenderers
This implementation update `.status.ObervedPostRenderersDigest` after a
successful reconciliation if `spec.postRenderers` is not nil.

Changes to `spec.postRenderers` are detected for `deployed` releases.
`Failed` and `Uninstalled` releases are detected earlier in the
reconciliation process.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-05-07 14:17:17 +02:00
Soule BA e58a102de9
document lastAttemptedPostRenderersDigest behavior
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-05-07 11:59:23 +02:00
Soule BA aa70ac2b31
fix: detect changes in spec.postRenderers
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-05-07 11:57:52 +02:00
Stefan Prodan 921def627c
Merge pull request #968 from fluxcd/app-version-meta-event
Add the chart app version to status and events metadata
2024-05-07 12:39:10 +03:00
Stefan Prodan 863d3115f3
Add app version to CRD manifests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-07 12:18:20 +03:00
Stefan Prodan 17633702fa
Add event example to API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-07 08:23:22 +03:00
Stefan Prodan 7f78cdc368
Add the chart app version to events metadata
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-07 00:14:55 +03:00
Stefan Prodan f8aa5b42a8
Merge pull request #963 from fluxcd/helm-ga
Promote `HelmRelease` API to v2 (GA)
2024-05-06 12:00:58 +03:00
Stefan Prodan 92ec780c98
Update API version in comments and docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-06 11:46:16 +03:00
Stefan Prodan f04e393645
docs: Add `layerSelector` to OCIRepository example
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-04 19:38:14 +03:00
Stefan Prodan 42fe4a39c1
Remove deprecated `patchesStrategicMerge` and `patchesJson6902` from v2 API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-04 12:41:24 +03:00
Stefan Prodan dfee7b086d
Set group version for GA API to v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-04 12:24:33 +03:00
Stefan Prodan 64d1236c17
Remove deprecated `.status.lastAppliedRevision` from v2 API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-04 12:24:33 +03:00
Stefan Prodan 2cbd2bd944
Remove deprecated `.spec.valuesFile` from v2 API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-04 12:24:32 +03:00
Stefan Prodan 23f2ebe86d
Update copyright year (GA API)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-03 17:35:01 +03:00
Stefan Prodan f76d6fe026
Update samples to GA APIs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-03 17:12:22 +03:00
Stefan Prodan c9c0beb261
Add API docs for `HelmRelease` v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-03 16:30:58 +03:00
Stefan Prodan 00785fbfa3
Promote `HelmRelease` API to v2 (GA)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-03 16:25:14 +03:00
Stefan Prodan 739d0a9cf9
Merge pull request #942 from isometry/feature/ignore-missing-values-files
Add `.spec.ignoreMissingValuesFiles` to HelmChartTemplate API
2024-05-03 16:13:33 +03:00
Robin Breathe bca7983d77
feat(HelmChartTemplateSpec): optionally ignore missing valuesFiles
Signed-off-by: Robin Breathe <robin@isometry.net>
2024-05-03 14:01:20 +02:00
Stefan Prodan 5eacdb24a0
Merge pull request #962 from fluxcd/helmchart-v1
Update `HelmChart` API to v1 (GA)
2024-05-03 14:37:22 +03:00
Stefan Prodan d0900635cf
Update `HelmChart` API to v1 (GA)
Bump source-controller to v1.3.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-03 13:43:51 +03:00
Stefan Prodan b31701ebf4
Merge pull request #885 from fluxcd/drift-correction-ready-condition
Update Ready condition during drift correction
2024-04-29 14:42:25 +03:00
Stefan Prodan 7289c17e86
Merge pull request #958 from fluxcd/dependabot/github_actions/ci-3daa6e97ec
build(deps): bump the ci group across 1 directory with 3 updates
2024-04-29 09:13:25 +03:00
dependabot[bot] fd91ff6a71
build(deps): bump the ci group across 1 directory with 3 updates
Bumps the ci group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [anchore/sbom-action](https://github.com/anchore/sbom-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 4.1.3 to 4.1.4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](1d96c772d1...0ad4b8fada)

Updates `anchore/sbom-action` from 0.15.10 to 0.15.11
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](ab5d7b5f48...7ccf588e3c)

Updates `github/codeql-action` from 3.25.2 to 3.25.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](8f596b4ae3...d39d31e687)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 03:33:06 +00:00
Stefan Prodan 23262e0f5e
Merge pull request #944 from fluxcd/kubernetes-1.30
Update dependencies to Kubernetes 1.30
2024-04-26 12:53:32 +03:00
Stefan Prodan ab237a97aa
Update dependencies to Kubernetes 1.30
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-26 12:24:28 +03:00
Stefan Prodan 839433f67b
Merge pull request #954 from fluxcd/dependabot/github_actions/ci-aa3e267b82
build(deps): bump the ci group across 1 directory with 6 updates
2024-04-23 11:53:18 +03:00
dependabot[bot] 14448aae4c
build(deps): bump the ci group across 1 directory with 6 updates
Bumps the ci group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.1.2` | `4.1.3` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.2.0` | `3.3.0` |
| [helm/kind-action](https://github.com/helm/kind-action) | `1.9.0` | `1.10.0` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.4.0` | `3.5.0` |
| [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) | `1.10.0` | `2.0.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.24.9` | `3.25.2` |



Updates `actions/checkout` from 4.1.2 to 4.1.3
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9bb56186c3...1d96c772d1)

Updates `docker/setup-buildx-action` from 3.2.0 to 3.3.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](2b51285047...d70bba72b1)

Updates `helm/kind-action` from 1.9.0 to 1.10.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](99576bfa6d...0025e74a8c)

Updates `sigstore/cosign-installer` from 3.4.0 to 3.5.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](e1523de757...59acb6260d)

Updates `slsa-framework/slsa-github-generator` from 1.10.0 to 2.0.0
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases)
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/slsa-framework/slsa-github-generator/compare/v1.10.0...v2.0.0)

Updates `github/codeql-action` from 3.24.9 to 3.25.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1b1aada464...8f596b4ae3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: slsa-framework/slsa-github-generator
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-23 08:43:31 +00:00
souleb 9f82dde128
Merge pull request #945 from fluxcd/enable-hc-sources
Add support for `HelmChart` as chartRef
2024-04-23 10:41:11 +02:00
souleb 8b95f3509c
Update docs/spec/v2beta2/helmreleases.md
Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: souleb <bah.soule@gmail.com>
2024-04-22 12:19:35 +02:00
Soule BA 1b5a62f5c9
document helmchart chart reference
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-22 11:26:57 +02:00
Soule BA 3bb715ad97
Enable HelmChart ChartRef
If implemented, user will be able to share an existing HelmChart custom
resource between HelmReleases.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 17:03:31 +02:00
souleb 5e760db4a8
Merge pull request #905 from fluxcd/enable-ocirepo-sources
Add support for `OCIRepository` as chartRef
2024-04-18 13:39:31 +02:00
Soule BA a98d9574d6
fix requestForOCIRepository change
Use artifact digest instead of revision to validate whether to trigger a
new reconciliation

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:42 +02:00
Soule BA f5447b4430
All observeFuncs make take into account existing OCI Digest in snapshots
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:41 +02:00
Soule BA 65a02c8c6c
Add a test when switching from chart template to chartRef
The test case successfully upgrade with the same chart because version
is not computed the same way (12 digits of digest appended for
OCIRepository source).

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:41 +02:00
Soule BA edec322a3d
Take into account the oci-digest
This commit add the oci artifact digest into the release observed
snapshot. This is used to later to add that value as an annotation.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:41 +02:00
Soule BA 49b47d4c44
adding a section for chartRef in the doc
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:41 +02:00
Soule BA aeac55dba9
Adding 12 first character of digest to chart version
This is needed for an OCIRepository source in order to detect change for
mutable tags.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:41 +02:00
souleb 7864e3a9a2
Apply suggestions from code review
Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: souleb <bah.soule@gmail.com>
2024-04-18 13:07:41 +02:00
Soule BA d1d2d0002e
adding an upgrade from ocirepo test
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:40 +02:00
Soule BA 686fe58f6e
address review comments
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:40 +02:00
Soule BA 157f806598
fix methods names
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:40 +02:00
souleb 350accfba9
Update api/v2beta2/helmrelease_types.go
Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com>
Signed-off-by: souleb <bah.soule@gmail.com>
2024-04-18 13:07:08 +02:00
Soule BA 20e14fe304
This commit enable reusing an existing OCIRepo as chartRef.
It takes into account switching from a chart
template to a referenced source (garbage collection).

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:05:04 +02:00
Sunny 56478cf1c8
Update Ready condition during drift correction
Update the Ready condition during drift correction to reflect the
current state of reconciliation. Without this, any previous Ready
condition value continues to persist on the object. If there was a
previous failure due to which Ready=False condition is present on the
object, the same value continues to persist if the atomic release
reconciliation enters a drift detection and correction loop. Resulting
in the status to show inaccurate state of the reconciliation.

Examples of two different scenarios that arise due to this issue:
- If a release without any dependency is installed, the status shows
  Ready=True for InstallSucceeded reason. But right after the
  installation, if a drift is detected the status continues to show the
  same Ready=True value. There's no indication that a drift correction
  is going on in the status. The events and logs do show that drift
  correction is taking place. But it can be confusing to see positive
  Ready value. Also, since the Ready condition message is copied for
  Reconciling condition, Reconciling=True with a "Helm install
  succeeded..." is seen.
- If a release depends on another release, and reconciliation results in
  dependency not ready error at first, Ready=False condition is added on
  the object. On subsequent runs, even when the dependencies are ready,
  the Ready=False condition isn't updated, resulting in stale Ready
  value until atomic release reconciliation completes. But if the atomic
  reconciliation enters a drift detection and correction loop, the
  Ready=False with dependency error persists in the status. This gives
  the impression that something is wrong with dependency check but based
  on the logs and events, the controller could be stuck in drift
  detection and correction loop.

Updating the Ready condition during drift detection shows the current
state of reconciliation, avoiding the confusing scenarios described
above.

Signed-off-by: Sunny <github@darkowlzz.space>
2024-04-17 19:59:54 +00:00
souleb 9059e7f176
Merge pull request #935 from fluxcd/fix-925
Fix patching on drift detection
2024-04-09 16:19:54 +02:00
Soule BA de6588422f
Fix patching on drift detection
Make sure that `/data` for configmaps are not masked

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-09 13:02:10 +02:00
Stefan Prodan d2371a2e46
Merge pull request #932 from fluxcd/kustomize-v5.4.0
Update dependencies to Kustomize v5.4.0
2024-04-05 16:30:14 +03:00
Stefan Prodan d3997fdafe
Update dependencies to Kustomize v5.4.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-05 10:25:07 +03:00
Stefan Prodan 64073a821b
Merge pull request #930 from fluxcd/add-notation-provider
Add `notation` verification provider to API
2024-04-03 12:43:35 +03:00
Stefan Prodan 6bbdf4707e
Add notation verification provider to API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-02 21:03:27 +03:00
Stefan Prodan 4e6692c9d2
Merge pull request #929 from fluxcd/dependabot/github_actions/ci-a098ba917e
build(deps): bump the ci group with 11 updates
2024-04-02 18:03:03 +03:00
dependabot[bot] 09281bb723
build(deps): bump the ci group with 11 updates
Bumps the ci group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.1.1` | `4.1.2` |
| [korthout/backport-action](https://github.com/korthout/backport-action) | `2.4.1` | `2.5.0` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.0.0` | `3.2.0` |
| [actions/cache](https://github.com/actions/cache) | `4.0.0` | `4.0.2` |
| [helm/kind-action](https://github.com/helm/kind-action) | `1.8.0` | `1.9.0` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `5.1.0` | `5.3.0` |
| [docker/login-action](https://github.com/docker/login-action) | `3.0.0` | `3.1.0` |
| [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.15.8` | `0.15.10` |
| [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) | `1.9.0` | `1.10.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.24.0` | `3.24.9` |
| [EndBug/label-sync](https://github.com/endbug/label-sync) | `2.3.2` | `2.3.3` |


Updates `actions/checkout` from 4.1.1 to 4.1.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](b4ffde65f4...9bb56186c3)

Updates `korthout/backport-action` from 2.4.1 to 2.5.0
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](e8161d6a0d...ef20d86abc)

Updates `docker/setup-buildx-action` from 3.0.0 to 3.2.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](f95db51fdd...2b51285047)

Updates `actions/cache` from 4.0.0 to 4.0.2
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](13aacd865c...0c45773b62)

Updates `helm/kind-action` from 1.8.0 to 1.9.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](dda0770415...99576bfa6d)

Updates `docker/build-push-action` from 5.1.0 to 5.3.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](4a13e500e5...2cdde995de)

Updates `docker/login-action` from 3.0.0 to 3.1.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](343f7c4344...e92390c5fb)

Updates `anchore/sbom-action` from 0.15.8 to 0.15.10
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](b6a39da807...ab5d7b5f48)

Updates `slsa-framework/slsa-github-generator` from 1.9.0 to 1.10.0
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases)
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/slsa-framework/slsa-github-generator/compare/v1.9.0...v1.10.0)

Updates `github/codeql-action` from 3.24.0 to 3.24.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e8893c57a1...1b1aada464)

Updates `EndBug/label-sync` from 2.3.2 to 2.3.3
- [Release notes](https://github.com/endbug/label-sync/releases)
- [Commits](da00f2c11f...5207415819)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: slsa-framework/slsa-github-generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: EndBug/label-sync
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 11:31:27 +00:00
Stefan Prodan 65b54580cf
Merge pull request #879 from fluxcd/helm-v3.14.0
Update controller to Helm v3.14.3 and Kubernetes v1.29.0
2024-04-02 14:29:09 +03:00
Stefan Prodan aa202e76cd
Build with Go 1.22
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-02 13:53:40 +03:00
Stefan Prodan 40ff025ff2
Update `fluxcd/pkg` dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-02 13:49:47 +03:00
Stefan Prodan 5ffeecb21f
Update controller to Helm v3.14.2 and Kubernetes v1.29.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-02 13:38:08 +03:00
souleb 07c0a0b315
Merge pull request #910 from fluxcd/update-controller-gen-0.14
Update controller-gen to v0.14.0
2024-03-12 14:12:06 +01:00
Soule BA 9e881d5210
updating controller-gen to v0.14.0
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-03-12 12:23:45 +01:00
souleb 5e83e51fcc
Merge pull request #908 from fluxcd/add-reconciliation-events
Use corev1 event type for sending events
2024-03-07 22:48:19 +01:00
Soule BA ff1421257e
fix: use corev1 event type for sending events
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-03-07 22:00:26 +01:00
souleb b79cad068d
Merge pull request #907 from fluxcd/add-reconciliation-events
Reintroduce missing events for helmChart reconciliation failures
2024-03-07 13:07:01 +01:00
Soule BA e283ead7f3
Reintroduce missing events for helmChart reconciliation
If implemented this PR reintroduce events for some failling action
during the reconciliation process, related to the helmChart retrieval
and loading of chart and values.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-03-06 15:52:41 +01:00
Stefan Prodan 493dd66190
Merge pull request #901 from gmolau/main
Remove `genclient:Namespaced` tag
2024-02-29 13:51:47 +00:00
Georg Molau ae301aa0ab Remove `genclient:Namespaced` tag
This tag isn't used by controller-tools, only `nonNamespaced` is.

Context: https://cloud-native.slack.com/archives/CLAJ40HV3/p1708794732147909
Signed-off-by: Georg Molau <georg.molau@gmail.com>
2024-02-27 22:23:27 +01:00
Sunny 0114b20936
Merge pull request #887 from fluxcd/release-v0.37.4
Release v0.37.4
2024-02-05 14:03:12 +05:30
Sunny 48781f2222
Release v0.37.4
Signed-off-by: Sunny <github@darkowlzz.space>
2024-02-05 08:19:18 +00:00
Sunny 0bd797a287
Merge pull request #884 from fluxcd/update-stale-ready-condition
Remove stale Ready=False conditions value to show more accurate status
2024-02-05 13:47:26 +05:30
Sunny 59c577a924 Remove stale Ready=False conditions values
When the reconciliation begins, while fulfilling the prerequisites,
Ready=False condition for various reasons are added on the object. On
failure, this reason is persisted on the object. On a subsequent
reconciliation, when the failure is recovered, the Ready=False condition
is not updates until the atomic reconciliation reaches a conclusion.
During this period if the atomic reconciliation enters a retry loop due
to constant drift detection and correction, the stale Ready=False
condition with incorrect reason persists on the object. The Ready=False
message is also copied to Reconciling=True condition, resulting in an
incorrect depiction of what's actually happening.
For example, if previously the HelmRelease failed with dependency not
ready error, on a subsequent reconciliation, even after going past the
dependency check and returning from atomic reconciliation due to drift
detection and correction loop scenario, the Ready=False condition
continues to show the stale dependency not ready error.

In order to show more accurate status, the Ready=False conditions added
while fulfilling prerequisites can be removed once those checks have
succeeded, updating Ready=False to Ready=Unknown with "reconciliation in
progress" message. If the atomic reconciliation gets stuck in the drift
detection and correction loop with this, the Ready and Reconciling
conditons would show "reconciliation in progress". This should be a
better indicator of what's going on. The events and logs can be checked
to determine accurately what's causing the reconciliation to be
progressing for ever.

Signed-off-by: Sunny <github@darkowlzz.space>
2024-02-05 13:31:05 +05:30
Stefan Prodan d370e73a17
Merge pull request #886 from fluxcd/dependabot/github_actions/ci-bb3c355948
build(deps): bump the ci group with 4 updates
2024-02-05 09:15:15 +02:00
dependabot[bot] 1c61870ed1
build(deps): bump the ci group with 4 updates
Bumps the ci group with 4 updates: [docker/metadata-action](https://github.com/docker/metadata-action), [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer), [anchore/sbom-action](https://github.com/anchore/sbom-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/metadata-action` from 5.5.0 to 5.5.1
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](dbef88086f...8e5442c4ef)

Updates `sigstore/cosign-installer` from 3.3.0 to 3.4.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](9614fae9e5...e1523de757)

Updates `anchore/sbom-action` from 0.15.6 to 0.15.8
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](c6aed38a43...b6a39da807)

Updates `github/codeql-action` from 3.23.2 to 3.24.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b7bf0a3ed3...e8893c57a1)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 03:13:24 +00:00
Sunny c2c1064a4c
Merge pull request #883 from fluxcd/release-v0.37.3
Release v0.37.3
2024-02-01 21:16:47 +05:30
Sunny 38c5d80410
Release v0.37.3
Signed-off-by: Sunny <github@darkowlzz.space>
2024-02-01 15:34:01 +00:00
Sunny 0d87c62d65
Merge pull request #882 from fluxcd/deps-update
Update source-controller dependency
2024-02-01 20:45:05 +05:30
Sunny d86240ae6a
Update source-controller dependency
Signed-off-by: Sunny <github@darkowlzz.space>
2024-02-01 14:50:58 +00:00
Stefan Prodan b4e4885181
Merge pull request #877 from fluxcd/dependabot/github_actions/ci-c0ab02bc06
build(deps): bump the ci group with 3 updates
2024-01-29 18:00:19 +02:00
dependabot[bot] 88905cc024
build(deps): bump the ci group with 3 updates
Bumps the ci group with 3 updates: [korthout/backport-action](https://github.com/korthout/backport-action), [anchore/sbom-action](https://github.com/anchore/sbom-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `korthout/backport-action` from 2.3.0 to 2.4.1
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](addffea45a...e8161d6a0d)

Updates `anchore/sbom-action` from 0.15.4 to 0.15.6
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](41f7a6c033...c6aed38a43)

Updates `github/codeql-action` from 3.23.1 to 3.23.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0b21cf2492...b7bf0a3ed3)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 15:44:54 +00:00
Stefan Prodan a5bcfc5dcc
Merge pull request #876 from fluxcd/dependabot/go_modules/go-deps-9b6914d736
Update controller to Kubernetes 1.28.6
2024-01-29 17:42:44 +02:00
Stefan Prodan 951accaba0
Update API to Kubernetes v1.28.6
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-01-29 17:30:39 +02:00
dependabot[bot] 9aa21f630d
build(deps): bump the go-deps group with 6 updates
Bumps the go-deps group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/fluxcd/cli-utils](https://github.com/fluxcd/cli-utils) | `0.36.0-flux.2` | `0.36.0-flux.3` |
| [github.com/fluxcd/pkg/apis/event](https://github.com/fluxcd/pkg) | `0.6.0` | `0.7.0` |
| [github.com/fluxcd/pkg/apis/kustomize](https://github.com/fluxcd/pkg) | `1.2.0` | `1.3.0` |
| [github.com/fluxcd/pkg/apis/meta](https://github.com/fluxcd/pkg) | `1.2.0` | `1.3.0` |
| [github.com/fluxcd/pkg/runtime](https://github.com/fluxcd/pkg) | `0.43.3` | `0.44.0` |
| [github.com/fluxcd/pkg/ssa](https://github.com/fluxcd/pkg) | `0.35.0` | `0.36.0` |


Updates `github.com/fluxcd/cli-utils` from 0.36.0-flux.2 to 0.36.0-flux.3
- [Commits](https://github.com/fluxcd/cli-utils/compare/v0.36.0-flux.2...v0.36.0-flux.3)

Updates `github.com/fluxcd/pkg/apis/event` from 0.6.0 to 0.7.0
- [Commits](https://github.com/fluxcd/pkg/compare/git/v0.6.0...git/v0.7.0)

Updates `github.com/fluxcd/pkg/apis/kustomize` from 1.2.0 to 1.3.0
- [Commits](https://github.com/fluxcd/pkg/compare/apis/meta/v1.2.0...apis/meta/v1.3.0)

Updates `github.com/fluxcd/pkg/apis/meta` from 1.2.0 to 1.3.0
- [Commits](https://github.com/fluxcd/pkg/compare/apis/meta/v1.2.0...apis/meta/v1.3.0)

Updates `github.com/fluxcd/pkg/runtime` from 0.43.3 to 0.44.0
- [Commits](https://github.com/fluxcd/pkg/compare/runtime/v0.43.3...runtime/v0.44.0)

Updates `github.com/fluxcd/pkg/ssa` from 0.35.0 to 0.36.0
- [Commits](https://github.com/fluxcd/pkg/compare/oci/v0.35.0...ssa/v0.36.0)

---
updated-dependencies:
- dependency-name: github.com/fluxcd/cli-utils
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: github.com/fluxcd/pkg/apis/event
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/fluxcd/pkg/apis/kustomize
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/fluxcd/pkg/apis/meta
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/fluxcd/pkg/runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/fluxcd/pkg/ssa
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 15:14:10 +00:00
Stefan Prodan d3abdcbb0a
Merge pull request #874 from fluxcd/dependabot-gomod
ci: Enable dependabot `gomod` updates
2024-01-29 17:13:01 +02:00
Stefan Prodan aaef3c8f6f
ci: Enable dependabot `gomod` updates
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-01-29 17:00:52 +02:00
Stefan Prodan df804884f2
Merge pull request #872 from fluxcd/go-1.21
Update Go to 1.21
2024-01-23 16:20:18 +02:00
Stefan Prodan d442ea336b
Update Go to 1.21
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-01-22 18:03:20 +02:00
Stefan Prodan 610f6e6d38
Merge pull request #871 from fluxcd/dependabot/github_actions/ci-da0b9f8a90
build(deps): bump the ci group with 3 updates
2024-01-22 09:02:35 +02:00
dependabot[bot] 3bb90c000f
build(deps): bump the ci group with 3 updates
Bumps the ci group with 3 updates: [actions/cache](https://github.com/actions/cache), [anchore/sbom-action](https://github.com/anchore/sbom-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/cache` from 3.3.3 to 4.0.0
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](e12d46a63a...13aacd865c)

Updates `anchore/sbom-action` from 0.15.3 to 0.15.4
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](c7f031d924...41f7a6c033)

Updates `github/codeql-action` from 3.23.0 to 3.23.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e5f05b81d5...0b21cf2492)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 03:19:54 +00:00
Stefan Prodan 5c340a14ac
Merge pull request #867 from fluxcd/dependabot/github_actions/ci-31f014aa78
build(deps): bump the ci group with 3 updates
2024-01-15 09:39:50 +02:00
dependabot[bot] b636a2f9db
build(deps): bump the ci group with 3 updates
Bumps the ci group with 3 updates: [actions/cache](https://github.com/actions/cache), [anchore/sbom-action](https://github.com/anchore/sbom-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/cache` from 3.3.2 to 3.3.3
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](704facf57e...e12d46a63a)

Updates `anchore/sbom-action` from 0.15.2 to 0.15.3
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](719133684c...c7f031d924)

Updates `github/codeql-action` from 3.22.12 to 3.23.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](012739e508...e5f05b81d5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 03:26:09 +00:00
Stefan Prodan 6875f5a9df
Merge pull request #865 from fluxcd/dependabot/github_actions/ci-9edfa6747d
build(deps): bump the ci group with 2 updates
2024-01-08 09:56:12 +02:00
dependabot[bot] 827a17336e
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [docker/metadata-action](https://github.com/docker/metadata-action) and [anchore/sbom-action](https://github.com/anchore/sbom-action).


Updates `docker/metadata-action` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](9dc751fe24...dbef88086f)

Updates `anchore/sbom-action` from 0.15.1 to 0.15.2
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](5ecf649a41...719133684c)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 03:48:10 +00:00
Stefan Prodan 45ed0538ee
Merge pull request #862 from fluxcd/dependabot/github_actions/ci-67e8f91c0c
build(deps): bump the ci group with 2 updates
2024-01-02 10:35:43 +02:00
dependabot[bot] f315821a49
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [docker/metadata-action](https://github.com/docker/metadata-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/metadata-action` from 5.3.0 to 5.4.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](31cebacef4...9dc751fe24)

Updates `github/codeql-action` from 3.22.11 to 3.22.12
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b374143c11...012739e508)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 08:22:57 +00:00
Stefan Prodan 17edadc2be
Merge pull request #860 from fluxcd/dependabot/go_modules/github.com/containerd/containerd-1.7.11
build(deps): bump github.com/containerd/containerd from 1.7.6 to 1.7.11
2024-01-02 10:20:50 +02:00
dependabot[bot] a52f65f09c
build(deps): bump github.com/containerd/containerd from 1.7.6 to 1.7.11
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.6 to 1.7.11.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.7.6...v1.7.11)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-19 21:23:45 +00:00
Hidde Beydals 24c6729a23
Merge pull request #859 from fluxcd/release-v0.37.2
Release v0.37.2
2023-12-19 17:24:41 +01:00
Hidde Beydals 9ffe94267d
Release v0.37.2
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-19 17:11:53 +01:00
Hidde Beydals 02fbbbe628
Merge pull request #858 from fluxcd/fix-namespace-selector
Properly configure namespace selector
2023-12-19 17:05:19 +01:00
Hidde Beydals 54eed52a6b
Properly configure namespace selector
This accidentally did not get `if`-wrapped in
eaa2a8c2fe, breaking the configuration
option to watch a single namespace, and thereby as by-effect the
breakage of sharding.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-19 16:52:50 +01:00
Hidde Beydals b993ca39f0
Merge pull request #856 from fluxcd/dependabot/go_modules/golang.org/x/crypto-0.17.0
build(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0
2023-12-19 09:37:37 +01:00
dependabot[bot] fe2255f7ac
build(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-19 00:08:03 +00:00
Hidde Beydals 8db699925d
Merge pull request #854 from fluxcd/dependabot/github_actions/ci-66820a5bfd
build(deps): bump the ci group with 3 updates
2023-12-18 08:51:10 +01:00
dependabot[bot] 754d2fa8bf
build(deps): bump the ci group with 3 updates
Bumps the ci group with 3 updates: [korthout/backport-action](https://github.com/korthout/backport-action), [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `korthout/backport-action` from 2.2.0 to 2.3.0
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](b982d297e3...addffea45a)

Updates `sigstore/cosign-installer` from 3.2.0 to 3.3.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](1fc5bd396d...9614fae9e5)

Updates `github/codeql-action` from 2.22.9 to 3.22.11
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](c0d1daa7f7...b374143c11)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 03:41:19 +00:00
Hidde Beydals 8094f19cee
Merge pull request #852 from fluxcd/release-v0.37.1
Release v0.37.1
2023-12-15 09:57:28 +01:00
Hidde Beydals 46a564b62f
Release v0.37.1
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-15 09:43:36 +01:00
Hidde Beydals 5c56856b7a
Merge pull request #851 from fluxcd/fix-bw-compat-v2beta1
api: ensure backwards compatibility v2beta1
2023-12-15 09:25:04 +01:00
Hidde Beydals 09366330f4
api: ensure backwards compatibility v2beta1
As we are (still) not making use of conversion webhooks, new fields can
only be introduced by including them in all served API versions. As
otherwise conversion will fail.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-15 08:45:51 +01:00
Hidde Beydals 603d3219da
Merge pull request #848 from fluxcd/remediation-stall
Early stall condition detection after remediation
2023-12-14 10:28:28 +01:00
Sunny fa5e284222 Early stall condition detection after remediation
Detect stall condition due to exhausted remediation retry right after
remediating. This helps return from AtomicRelease.Reconcile() with
proper stalled status condition and error. Without this, after
remediation, a stalled condition detection required a new
reconciliation, leaving the status of the object without any Reconciling
or Stalled condition.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-12-14 09:05:27 +01:00
Hidde Beydals abcdfef2de
Merge pull request #849 from fluxcd/update-helm
Update Helm to v3.13.3
2023-12-14 09:05:17 +01:00
Hidde Beydals 1c67732b23
Update Helm to v3.13.3
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-14 08:48:59 +01:00
Hidde Beydals 6921825f64
Merge pull request #846 from fluxcd/update-runtime
Update runtime to v0.43.3
2023-12-13 15:01:35 +01:00
Hidde Beydals 238880a10b
Update runtime to v0.43.3
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-13 14:41:25 +01:00
Hidde Beydals bafafe2c9d
Merge pull request #845 from fluxcd/retry-http-log-errors
loader: log HTTP errors to provide faster feedback
2023-12-13 11:42:07 +01:00
Hidde Beydals 07e204615b
loader: log HTTP errors to provide faster feedback
This configures a logger on the HTTP client used to load a Helm chart,
ensuring HTTP errors surface faster.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-13 11:30:37 +01:00
Hidde Beydals 259b8f812f
Merge pull request #844 from fluxcd/sc-hostname-overwrite
loader: allow overwrite of URL hostname again
2023-12-13 09:56:37 +01:00
Hidde Beydals 1e66201829
loader: allow overwrite of URL hostname again
This adds back the support for overwriting the host name a chart is
downloaded from (again) using the `SOURCE_CONTROLLER_LOCALHOST`
environment variable.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-13 09:35:05 +01:00
Hidde Beydals 8a6e68b4ea
Merge pull request #843 from fluxcd/fix-spec-typos
docs/spec: address typo
2023-12-13 09:09:32 +01:00
Hidde Beydals 504b268be8
docs/spec: address typo
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-13 08:52:04 +01:00
Hidde Beydals 50aab28614
Merge pull request #842 from fluxcd/release-v0.37.0
Release v0.37.0
2023-12-12 09:00:10 +01:00
Hidde Beydals 4cae41ce3e
Release v0.37.0
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-12 08:48:56 +01:00
Hidde Beydals 14a333d46a
Merge pull request #828 from fluxcd/document-v2beta2
docs/spec: document `v2beta2` API
2023-12-11 19:22:31 +01:00
Hidde Beydals bb5a03bbfb
docs: various doc nits
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:51:58 +01:00
Hidde Beydals d8966cd8de
docs/spec: refer to v2beta2 doc for design details
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:57 +01:00
Hidde Beydals 344bd829ca
docs/spec/v2beta2: address review comment
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:56 +01:00
Hidde Beydals 302978f1b2
docs/spec/v2beta2: add Ready characteristics
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:55 +01:00
Hidde Beydals 9eefbf7e1a
docs/spec/v2beta2: address review comments
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:53 +01:00
Hidde Beydals 2b80e30560
docs: add notes about drift detection support
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:52 +01:00
Hidde Beydals 015eba09ed
docs/spec/v2beta2: add README
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:51 +01:00
Hidde Beydals 0075f20efb
docs/spec/v2beta2: rewrite intro
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:51 +01:00
Hidde Beydals 8a9acd6ce7
docs/spec/v2beta2: document Status Conditions
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:50 +01:00
Hidde Beydals 875e605ea9
docs/spec/v2beta2: explain example
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:50 +01:00
Hidde Beydals 04600fe15a
docs/spec/v2beta2: document most Status fields
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:50 +01:00
Hidde Beydals 99303f3e19
docs/spec/v2beta2: document debugging section
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:49 +01:00
Hidde Beydals 1b0e5d71f8
docs/spec/v2beta2: make note of release triggers
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:49 +01:00
Hidde Beydals aeef72abbf
docs/spec/v2beta2: add uninstall warnings
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:48 +01:00
Hidde Beydals d741525b2f
docs/spec/v2beta2: document remote clusters
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:48 +01:00
Hidde Beydals 2c48cf280f
docs/spec/v2beta2: document failure handling
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:47 +01:00
Hidde Beydals eca86919be
doc/spec/v2beta2: document CRD lifecycle
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:47 +01:00
Hidde Beydals f26749231e
docs/spec/v2beta2: document RBAC
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:47 +01:00
Hidde Beydals 436860f061
docs/spec: start documenting v2beta2
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 18:28:46 +01:00
Stefan Prodan 7d0aecfa41
Merge pull request #841 from fluxcd/fix-test-flake
controller: address test flake
2023-12-11 17:11:14 +01:00
Hidde Beydals f64246ba86
controller: address test flake
As the Kubernetes client used in tests is cache backed, it can take a
tiny bit of time for the client to actually notice the removal.

Wrapping in `Eventually` should address this.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 16:59:55 +01:00
Hidde Beydals f3e4789d4d
Merge pull request #840 from fluxcd/update-deps
Update source-controller to v1.2.2
2023-12-11 15:42:39 +01:00
Hidde Beydals c9423cc721
Update github.com/fluxcd/pkg/runtime to v0.43.2
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 15:28:02 +01:00
Hidde Beydals c1d3f90bf7
Update source-controller to v1.2.2
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 15:26:42 +01:00
Hidde Beydals cca1d3a2c0
Merge pull request #839 from fluxcd/update-deps
Update Kustomize to v5.3.0
2023-12-11 10:24:17 +01:00
Hidde Beydals c44d615335
Update dependencies
This includes an update of Kustomize to v5.3.0.

- github.com/fluxcd/cli-utils to v0.36.0-flux.2
- github.com/fluxcd/pkg/runtime to v0.43.1
- k8s.io/utils to v0.0.0-20231127182322-b307cd553661
- sigs.k8s.io/kustomize/api to v0.16.0
- sigs.k8s.io/kustomize/kyaml to v0.16.0

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 09:57:26 +01:00
Hidde Beydals 9322e73f93
api: update (indirect) dependencies
- github.com/go-logr/logr to v1.3.0
- golang.org/x/net to v0.19.0
- golang.org/x/text to v0.14.0
- k8s.io/klog/v2 to v2.110.1
- k8s.io/utils to v0.0.0-20231127182322-b307cd553661
- sigs.k8s.io/structured-merge-diff/v4 to v4.4.1

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 09:57:25 +01:00
Hidde Beydals 2586fdd907
Merge pull request #838 from fluxcd/alpine-319
build: update Alpine to 3.19
2023-12-11 09:24:26 +01:00
Hidde Beydals 74da69e7fb
build: update `tonistiigi/xx` to 1.3.0
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 09:12:04 +01:00
Hidde Beydals c2f1d8f660
build: update Alpine to 3.19
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 09:11:43 +01:00
Stefan Prodan 8848fb81e6
Merge pull request #837 from fluxcd/dependabot/github_actions/ci-bf6ecd85f3
build(deps): bump the ci group with 3 updates
2023-12-11 08:40:48 +01:00
dependabot[bot] 19d25347b1
build(deps): bump the ci group with 3 updates
Bumps the ci group with 3 updates: [actions/setup-go](https://github.com/actions/setup-go), [anchore/sbom-action](https://github.com/anchore/sbom-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/setup-go` from 4.1.0 to 5.0.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](93397bea11...0c52d547c9)

Updates `anchore/sbom-action` from 0.15.0 to 0.15.1
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](fd74a6fb98...5ecf649a41)

Updates `github/codeql-action` from 2.22.8 to 2.22.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](407ffafae6...c0d1daa7f7)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 04:04:39 +00:00
Hidde Beydals 7d7f081610
Merge pull request #836 from fluxcd/address-test-flake 2023-12-08 20:05:35 +01:00
Hidde Beydals 8b19eb0aa2
ci: increase timeout delete-ns tests
This test has shown to be a flake on multiple ocassions.

After running it locally a dozen of times, my conclusion is that the
time it takes for Kubernetes to shutdown a Pod may sometimes be a tiny
bit longer than anticipated by the current timeout.

Therefore, increase it to 5 minutes and provide more context on the
state of the namespace in case a timeout occurs.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-08 18:17:24 +01:00
Hidde Beydals 56ceb305a5
Merge pull request #835 from fluxcd/update-sc
Update source-controller to v1.2.1
2023-12-08 14:56:16 +01:00
Hidde Beydals 17d4b726bd
Update source-controller to v1.2.1
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-08 14:13:48 +01:00
Sunny c4915d1154
Merge pull request #833 from fluxcd/stale-remediated-in-sync
Remove stale remediated condition when in-sync
2023-12-08 18:28:56 +05:30
Sunny 9eb596eb46 Remove stale remediated condition when in-sync
Remediation can roll back to a version that matches with the next good
config. In such situation, release will be in-sync and no action will be
performed. The status conditions will continue to show Remediated=True
and Released=False. Check and remove stale Remediated condition and add
a Released=True condition with message constructed from the latest
release.

Introduce replaceCondition() to replaces target condition with a
replacement condition, retaining the transition time. This helps ensure
that the last transition time of releases don't change when a release is
marked from remediated to released.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-12-08 18:14:52 +05:30
Hidde Beydals fe8569bae6
Merge pull request #834 from fluxcd/propagate-hc-msg
controller: enrich "HelmChart not ready" messages
2023-12-08 13:27:39 +01:00
Hidde Beydals 93d2118f71
controller: enrich "HelmChart not ready" messages
This propagates the reason a HelmChart is (likely) not ready to the
message of the Ready condition.

The goal of this is to make it easier for people to reason about a
potential failure that may be happening while retrieving the chart,
without having to inspect the HelmChart itself.

As at times, they may not have access (due to e.g. not being able to
access the namespace, while the controller is allowed to create the
object there), or are simply not aware of the fact that this object
is created by the controller for them.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-07 23:35:44 +01:00
Hidde Beydals ee8177e005
Merge pull request #832 from fluxcd/api-kus-deprecations
api: deprecate stragic merge and JSON 6902 patches
2023-12-07 17:59:24 +01:00
Hidde Beydals 35e914d159
api: deprecate stragic merge and JSON 6902 patches
They have been deprecated for a long time, and should be scheduled for
removal to ensure they can be removed in the final `v2` release.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-07 17:37:00 +01:00
Hidde Beydals b10947b269
Merge pull request #829 from fluxcd/remove-stale-testsuccess
reconcile: remove stale `TestSuccess` condition
2023-12-07 17:24:39 +01:00
Hidde Beydals 7ccfc93448
reconcile: remove stale `TestSuccess` condition
When a Helm install or upgrade is performed, to prevent confusion due to
reporting a stale test result.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-07 17:10:39 +01:00
Hidde Beydals 66ed0327be
Merge pull request #830 from fluxcd/tweak-chart-events
reconcile: do not emit HelmChartInSync event
2023-12-07 13:08:12 +01:00
Hidde Beydals 47fbb37f2a
reconcile: do not emit HelmChartInSync event
Due to the frequency, this would otherwise suppress other Kubernetes
Events which are more important. Especially when the `.spec.interval`
of the HelmRelease is set to a low value.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-07 12:53:13 +01:00
dependabot[bot] 842a9425fa
Merge pull request #827 from fluxcd/dependabot/github_actions/ci-22f61cdbb1 2023-12-04 13:01:30 +00:00
dependabot[bot] 2f9f39dd24
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [korthout/backport-action](https://github.com/korthout/backport-action) and [docker/metadata-action](https://github.com/docker/metadata-action).


Updates `korthout/backport-action` from 2.1.1 to 2.2.0
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](08bafb375e...b982d297e3)

Updates `docker/metadata-action` from 5.0.0 to 5.3.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](96383f4557...31cebacef4)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-04 12:50:23 +00:00
Hidde Beydals 0bde3275f0
Merge pull request #825 from fluxcd/various-minor-fixes
Various minor fixes
2023-12-04 13:47:18 +01:00
Hidde Beydals 67fd6fb724
reconcile: remove Remediated condition on release
This avoids having a confusing "stale" Remediated condition when a new
release has been attempted.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-01 18:49:06 +01:00
Hidde Beydals 05bc368de7
reconcile: add `ProgressingWithRetry` on retry
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-01 17:36:14 +01:00
Hidde Beydals 0919fb4c24
controller: remove deprecated metrics
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-01 17:23:52 +01:00
Hidde Beydals 51563d6012
reconcile: stall without rollback target
This ensures that if there is no target to roll back to due to all of
them being in a failed state, the controller stalls instead of ending up
in a loop of upgrade attempts.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-01 17:20:51 +01:00
Hidde Beydals 0a2041c338
controller: ensure object in cache before requeue
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-01 17:20:50 +01:00
Hidde Beydals 48cad68386
controller: unready dep should not bump obs gen
This ensures that any unfulfilled dependencies for which we requeue do
not prematurely bump the observed generation by introducing typed
errors.

These typed errors ensure that the logic to bump the observed generation
can continue to be the same, while ignoring them just in time before
returning the final error.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-01 14:14:40 +01:00
Hidde Beydals bc7fb25d27
api: limit maximum number of snapshots in history
This ensures that on repetitive failures, the number of snapshots does
not grow indefinitely due to there not being any in a superseded or
deployed state.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-01 11:38:56 +01:00
Hidde Beydals 7f9160c66c
Merge pull request #823 from fluxcd/reset-force-annotations
Introduce `forceAt` and `resetAt` annotations
2023-12-01 11:38:43 +01:00
Hidde Beydals 6b7789aadc
Implement `forceAt` and `resetAt` annotations
This makes the controller actually take the
`reconcile.fluxcd.io/forceAt` and `reconcile.fluxcd.io/resetAt` into
account.

For `reconcile.fluxcd.io/resetAt`, this means that the failure counts on
the `HelmRelease` object are reset when the token value of the
annotation equals `reconcile.fluxcd.io/requestedAt`. Allowing the
controller to start over with attempting to install or upgrade the
release until the retries count has been reached again.

For `reconcile.fluxcd.io/forceAt`, this means that a one-off Helm
install or upgrade is allowed to take place even if the object is out of
retries, in a failed state where it should be remediated, or in-sync.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-30 10:22:49 +01:00
Hidde Beydals 7a15000b4c
api: introduce `forceAt` and `resetAt` annotations
This introduces two new annotations:

- `reconcile.fluxcd.io/resetAt`: to reset the failure counts for a
  `HelmRelease` object.
- `reconcile.fluxcd.io/forceAt`: to allow a one-off Helm install or
  upgrade when the controller would otherwise do nothing (e.g. due to
  being out of retries, in-sync, in a failed state, etc.)

Both annotations require the `reconcile.fluxcd.io/requestedAt`
annotation to be set at the same time, with the same token value.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-30 10:22:48 +01:00
Hidde Beydals d310c8b2de
Merge pull request #822 from fluxcd/correct-drift-apply
Correct cluster drift using patches
2023-11-30 10:21:39 +01:00
Hidde Beydals 0131f2227b
action/diff: include Helm metadata in objects
This ensures that the metadata labels and annotations Helm adds during
the creation of resources are included while diffing them.

As they are not part of the manifest but should be restored in case
they are e.g. removed or modified.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-30 09:41:05 +01:00
Hidde Beydals ccd8f88282
Correct cluster drift using patches
This changes the cluster drift correction behavior from performing a
Helm upgrade to performing create and patch API requests based on the
JSON Patch data.

Doing this is much lighter than performing a full release cycle, and
deals with the issue of Helm being unable to restore state of Custom
Resources without the `--force` flag being set. Which has unwanted
side-effects like forcing objects through a deletion/creation cycle.

After a drift correction attempt a Kubernetes Event is emitted, which
contains a summary of the created and patched resources, and a
collection of any (potential) errors.

As the goal is to restore state as best as we can, the drift correction
will be re-attempted until all resources have been restored to the
desired state.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-29 20:34:45 +01:00
Stefan Prodan 113bf544d3
Merge pull request #821 from fluxcd/deprecate-v2beta1
Add deprecation warning to v2beta1 API
2023-11-27 16:53:35 +02:00
Stefan Prodan 92a535f6cd
Add deprecation warning to v2beta1 API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-11-27 16:41:50 +02:00
Hidde Beydals e0ecb05099
Merge pull request #820 from fluxcd/dependabot/github_actions/ci-9cf97fb57d
build(deps): bump the ci group with 3 updates
2023-11-27 09:52:36 +01:00
dependabot[bot] 4e59953180
build(deps): bump the ci group with 3 updates
Bumps the ci group with 3 updates: [anchore/sbom-action](https://github.com/anchore/sbom-action), [fossa-contrib/fossa-action](https://github.com/fossa-contrib/fossa-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `anchore/sbom-action` from 0.14.3 to 0.15.0
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](78fc58e266...fd74a6fb98)

Updates `fossa-contrib/fossa-action` from 2.0.0 to 3.0.0
- [Release notes](https://github.com/fossa-contrib/fossa-action/releases)
- [Changelog](https://github.com/fossa-contrib/fossa-action/blob/master/CHANGELOG.md)
- [Commits](6728dc6fe9...cdc5065bcd)

Updates `github/codeql-action` from 2.22.7 to 2.22.8
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](66b90a5db1...407ffafae6)

---
updated-dependencies:
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: fossa-contrib/fossa-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 03:28:56 +00:00
Hidde Beydals 6ec21aba4a
Merge pull request #818 from fluxcd/allow-digest-config
Allow configuration of snapshot digest algorithm
2023-11-24 18:33:00 +01:00
Hidde Beydals 7a70bd599f
Allow configuration of digest algorithm
This introduces a `--snapshot-digest-algo` flag to allow configuring a
different algorithm than SHA256.

This allows the user to for example configure `blake3`, which is
potentially faster (and less resource intensive) on modern hardware.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 18:19:53 +01:00
Hidde Beydals f7185d4c62
Merge pull request #819 from fluxcd/tidy-code
Remove obsolete code and tidy things
2023-11-24 18:19:42 +01:00
Hidde Beydals 841fca08fe
features: mark drift related flags as deprecated
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 18:01:07 +01:00
Hidde Beydals 2d927b9b9e
Miscellaneous tidying of minor things
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 17:59:45 +01:00
Hidde Beydals 0d30be93ec
Remove various verification functions
These functions are no longer in use by the actual code base, while the
same outcome can be achieved by using `LastRelease` in combination with
`VerifyReleaseObject`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 17:59:44 +01:00
Hidde Beydals 347cf24482
Remove obsolete `util` package
This code is now available in upstream controller-runtime.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 17:59:42 +01:00
Hidde Beydals be2c47e3b4
Remove obsolete `runner` sub-module
This used to drive the logic behind the `v2beta1` API, but has now
become obsolete with the `action` sub-module as its successor.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 17:59:39 +01:00
Hidde Beydals 85cac772eb
Merge pull request #815 from fluxcd/new-drift-detection
Allow configuration of drift detection on `HelmRelease`
2023-11-24 17:59:34 +01:00
Hidde Beydals 6b1effcd2f
diff: remove `Differ` code
In favor of the new `Diff` action.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 16:41:47 +01:00
Hidde Beydals bb6ad72654
reconcile: determine drift in cluster
This allows `DetermineReleaseState` to determine if the cluster state
has drifted from the manifest defined in the Helm storage. This allows
the atomic reconciler to determine if an upgrade should happen based
on the configuration of the `HelmRelease`.

If drift detection is `enabled` (or set to `warn`), it will report
drift via the controller logs and a Kubernetes Event. In addition, when
correction is enabled, it will instruct to perform a Helm upgrade to
correct the drift.

To summarize the detected drift in a compact message, summarize
utilities have been introduced to the `diff` package.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 16:41:45 +01:00
Hidde Beydals 98c4118818
action: introduce `Diff` action
The `Diff` action can be used to detect changes between the manifest
from a Helm release and the current cluster state.

Compared to the previous diff functionality, it allows for ignoring
specific fields in a resource using the newly introduced ignore rules
in the API.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 13:35:15 +01:00
Hidde Beydals a5db99a88c
api: allow configuration of drift detection
This adds the option to enable drift detection for a specific
`HelmRelease` instance using `.spec.driftDetection.mode`.

Supported configurations are `enabled` (detect and correct), `warn`
(detect) and `disabled`.

In addition to this, it allows defining a set of ignore rules using
`.spec.driftDetection.ignore`. Which can be used to ignore (portions
of) a resource using JSON pointers and target selectors.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 13:33:32 +01:00
Hidde Beydals c3f13a3844
Merge pull request #817 from fluxcd/update-k8s
Update to Kubernetes 1.28.x, Helm v3.13.2 and Kustomize v5.2.1
2023-11-24 13:32:33 +01:00
Hidde Beydals e441c251c3
api: change `yaml` field tag to `json`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 13:19:34 +01:00
Hidde Beydals 576c14e272
reconcile: slightly change "unmanaged" log message
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 12:52:17 +01:00
Hidde Beydals 6654b347fe
release: remove `Labels` field from `Observation`
Helm v3.13.x includes a change which causes labels to be magically
set during writes to the storage, without persisting them to the
release object which is passed to the interface.

Because of this, at the time of observing the initial write to the
storage we would not see them, but once we are verifying them we would.
Causing the calculated digest to always differ, and making the
controller think the storage item had changed.

While I am of opinion it would be better for Helm to set the labels on
the release object as soon as they are persisted to the storage, the
only solution now for us is to ignore them.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 12:47:24 +01:00
Hidde Beydals fb6221c4a3
yaml: adopt for `sigs.k8s.io/yaml` `v1.4.0`
Due to switch to a hard fork of goyaml.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 12:46:34 +01:00
Hidde Beydals eaa2a8c2fe
Update dependencies
- github.com/fluxcd/cli-utils to v0.36.0-flux.1
- github.com/fluxcd/pkg/apis/event to v0.6.0
- github.com/fluxcd/pkg/apis/kustomize to v1.2.0
- github.com/fluxcd/pkg/apis/meta to v1.2.0
- github.com/fluxcd/pkg/runtime to v0.43.0
- github.com/fluxcd/pkg/ssa to v0.34.0
- github.com/fluxcd/pkg/testserver to v0.5.0
- github.com/go-logr/logr to v1.3.0
- github.com/google/go-cmp to v0.6.0
- github.com/hashicorp/go-retryablehttp to v0.7.5
- github.com/onsi/gomega to v1.30.0
- github.com/opencontainers/go-digest to v1.0.1-0.20231025023718-d50d2fec9c98
- github.com/opencontainers/go-digest/blake3 to v0.0.0-20231025023718-d50d2fec9c98
- golang.org/x/text to v0.14.0
- helm.sh/helm/v3 to v3.13.2
- k8s.io/api to v0.28.4
- k8s.io/apiextensions-apiserver to v0.28.4
- k8s.io/apimachinery to v0.28.4
- k8s.io/cli-runtime to v0.28.4
- k8s.io/client-go to v0.28.4
- k8s.io/kubectl to v0.28.4
- k8s.io/utils to v0.0.0-20231121161247-cf03d44ff3cf
- sigs.k8s.io/controller-runtime to v0.16.3
- sigs.k8s.io/kustomize/api to v0.15.0
- sigs.k8s.io/kustomize/kyaml to v0.15.0
- sigs.k8s.io/yaml to v1.4.0

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 12:43:33 +01:00
Hidde Beydals a97a9ffa69
api: update dependencies
- github.com/fluxcd/pkg/apis/kustomize to v1.2.0
- github.com/fluxcd/pkg/apis/meta to v1.2.0
- k8s.io/apiextensions-apiserver to v0.28.4
- k8s.io/apimachinery to v0.28.4
- sigs.k8s.io/controller-runtime to v0.16.3
- sigs.k8s.io/yaml to v1.4.0

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 11:21:36 +01:00
Hidde Beydals 3f431e1cc8
Merge pull request #816 from fluxcd/test-suite-fixes
Address minor issues
2023-11-24 11:04:02 +01:00
Hidde Beydals e4d19b8e89
testdata: properly take tag value into account
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 10:47:02 +01:00
Hidde Beydals 4c439b721a
action/upgrade: use correct CRD policy
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 10:46:23 +01:00
Hidde Beydals 001e7da2f1
controller: repair fuzz test
We should actually add more of them now that the code base has grown (in
complexity). But this solves the issue for CI for now.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-24 10:11:33 +01:00
Hidde Beydals b8d65235f8
Merge pull request #738 from fluxcd/new-reconciler
Rework `HelmRelease` reconciliation logic
2023-11-24 09:39:01 +01:00
Hidde Beydals 4a8d2ff0f4
action: provide reason for failures count reset
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-23 00:17:17 +01:00
Hidde Beydals 3ce6e8d1b5
reconcile: improve wording `Stalled` condition
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-23 00:17:17 +01:00
Hidde Beydals 0535ae1114
predicates: notice source changing to `Ready=True`
This ensure that when a chart object has a temporary `Ready=False`
state, the predicate will notice the change to `Ready=True` and
cause an enqueue request.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-23 00:17:16 +01:00
Hidde Beydals 6ffdaddc06
action: omit logging on CRD apply no-op
As it does not offer real value, and creates noise when the logs are
included in an emitted event.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-23 00:17:15 +01:00
Hidde Beydals 7aad010664
controller: immediate requeue unfinished release
This improves continuity while the controller attempts to move the
release forward.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-23 00:17:14 +01:00
Hidde Beydals 5d1f34a029
controller: patch after setting `Reconciling=True`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-23 00:17:13 +01:00
Hidde Beydals 20c00fd47a
action: provide a reason on release target changes
This to allow better feedback to the user on why the controller decided
to uninstall the release.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-23 00:17:09 +01:00
Hidde Beydals 580c72cd09
controller: adopt release based on v2beta1 state
This allows the controller to be updated from `v2beta1` to `v2beta2`
without triggering a release to settle state.

It does this by looking at the previous successful release as recorded
for the `v2beta1` object, and if found, recording a snapshot for it in
the new `History` field of the status.

This feature can be disabled by setting the `AdoptLegacyReleases`
feature flag to `false`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-22 23:14:17 +01:00
Hidde Beydals eab8a50071
api: prepare `v2beta1` status for `v2beta2`
This allows users to delay updating their `apiVersion` declarations,
as the fields will be known in the previous version.

If we would not do this, the fields would get wiped when the `v2beta1`
resource is applied, potentially causing spurious upgrades.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-22 23:14:15 +01:00
Hidde Beydals 9bb8f02495
api: continue to record `LastAppliedRevision`
This ensures that certain UIs can continue to display information to
their users while they work on making better use of the new data
available in `v2beta2`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-21 15:31:30 +01:00
Hidde Beydals 6f05228e85
reconcile: remove logs from test failure event
During tests, Helm logs a mixture of debug and timeout errors which
(unlike during install or upgrade) do not provide much useful
information about the reason of failure.

Given this, remove the logs from the output to reduce noise.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:56 +01:00
Hidde Beydals 28a7800528
reconcile: mark `Ready=Unknown` when awaiting test
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:55 +01:00
Hidde Beydals 70485017d2
controller: requeue on fixed interval on chart 404
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:54 +01:00
Hidde Beydals eacd97532c
reconcile: remove reconciler type from messages
Not of much relevance to the user, while it can be confusing for
unlock.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:54 +01:00
Hidde Beydals 533589ce39
api: change `MaxHistory` default to `5`
As anything beyond ~3 releases has no real value to the controller
itself, while the time it takes to perform a release increases with
the number of releases kept in history.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:53 +01:00
Hidde Beydals c5a017cb76
api: record observed releases in `Status.History`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:53 +01:00
Hidde Beydals 517d42fe5d
build: incorporate condition changes in e2e
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:52 +01:00
Hidde Beydals 16da3ec66f
reconcile: allow unlock without current
As persisting to the API server before an unexpected termination is not
feasible, allow a release to be unlocked without it being observed.

This has the potential result of interfering with a user running `helm`
by hand, but the further process should be capable of dealing with any
unexpected failure resulting from this.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:51 +01:00
Hidde Beydals 2e0e22593f
reconcile: improve state determination
This decouples the state determination from deciding which action to
take, making it easier to reason about the different types of state
and what action should be taken to drive it forward.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:51 +01:00
Hidde Beydals 10277c7b26
api: add `LastAttemptedReleaseAction` to status
This can be used to reliable determine the active remediation strategy
which should be used. Including in edge cases where e.g. an uninstall
remediation is configured for upgrade failures.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:50 +01:00
Hidde Beydals 80d0878e96
controller: ignore `NotFound` API error on delete
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:50 +01:00
Hidde Beydals 2df90eb4cf
reconcile: improve observability between actions
- Change the log-level of "action determination" to "debug".
- Set `Ready=Unknown` while working on an install or upgrade.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:49 +01:00
Hidde Beydals 7c52fd255f
action: simplify chart diff logic
We actually only care about the chart name or version changing, as we
assume proper (immutable) versioning by the publisher of the chart
(either the user, or the source-controller).

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:49 +01:00
Hidde Beydals 096956fdfd
controller: properly record object metrics
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:48 +01:00
Hidde Beydals d0c4c14056
reconcile: improve uninstall w/o purging history
This improves the reconciliation of an uninstall when the release has
already been uninstalled while `KeepHistory` has been set, by detecting
the (sadly non-typed) error Helm produces as desired state.

Avoiding certain edge-cases where for example a deleted HelmRelease
would end up in an irrecoverable loop of uninstall attempts, after
being remediated (using an uninstall) before the deletion request.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:47 +01:00
Hidde Beydals 191bebfafd
reconcile: simplify `NextAction` logic
By looking at the type of the error, instead of doing a separate check
on `cur != nil`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:47 +01:00
Hidde Beydals f156c3550e
reconcile: allow cfg of manager in atomic action
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:46 +01:00
Hidde Beydals ac9c2c3142
reconcile: ensure object patch on context cancel
As we are working with secondary state which we need to keep track of,
persisting the last state even when the context is canceled (due to
e.g. a controller shutdown) is important to improve the chances of
successfully being able to recover from any abrupt terminations.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:46 +01:00
Hidde Beydals 19be1b24ac
api: change format of `Snapshot#FullReleaseName`
From `<namespace>/<name>.<version>` to `<namespace>/<name>.v<version>`,
to better resemble the internal name format of e.g. Helm storage
Secrets.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:45 +01:00
Hidde Beydals 272329d86a
action: add `:` separator between ts and msg logs
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:45 +01:00
Hidde Beydals a6ae4c3fb9
reconcile: improve log levels of actions
This ensures the logs of the Kubernetes client used by Helm are
persisted to the log buffer, as they can contain important information
when an action times out.

In addition, move the logs from the Helm actions themselves to the
"debug" log level (while still including them in Kubernetes Events in
case of a failure), in favor of the logs produced by the `reconcile`
package itself. While moving the logs from the Helm storage to the
"trace" log level, as they only contain information about e.g. writes
to a Secret.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:44 +01:00
Hidde Beydals bc036c027f
reconcile: improve insights of progress in logs
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:43 +01:00
Hidde Beydals 5510175ccb
reconcile: tweak event messages
This in an attempt to maintain compatability with earlier documented
inclusion and exclusion lists for Alerts, like the following:

```
  eventSources:
    - kind: HelmRelease
      name: demo
  inclusionList:
    - ".*.upgrade.*succeeded.*"
```

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:43 +01:00
Hidde Beydals 94064da340
controller: add reconcile release tests
Plus some minor improvements to the logic, based on writing tests.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:42 +01:00
Hidde Beydals 882da27a5d
api: move `Current` and `Previous` into `History`
The primary reason for this is the alphabetical ordering of `kubectl
describe`, which caused the fields to be listed in separate places
instead of a bundle.

From a programmatic perspective, it is also great because it is now much
easier to reset any previous state when e.g. uninstalling a release. As
we can simply write an empty struct to erase any memory of a previous
release, instead of having to deal with multiple fields.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:42 +01:00
Hidde Beydals 7dfce0c738
api: introduce `APIVersion` in `Snapshot`
This will allow the controller to pick the right method for digest
calculations when we for example add new data into the calculation.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:41 +01:00
Hidde Beydals 9df9b176d9
api: various naming improvements
- Rename `HelmReleaseInfo` to `Snapshot`.
- Rename `HelmReleaseTestHook` to `TestHookStatus`.
- Rename `ObservedRelease` to `Observation`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:41 +01:00
Hidde Beydals b2ba3d97ea
controller: improve deletion logic and add tests
This ensures certain edge-cases around the availability of the service
account and/or KubeConfig are handled.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:40 +01:00
Hidde Beydals fbd73ac399
controller: start w/ adding tests for HelmRelease
This adds base coverage for some of the simpler methods which do not
require extensive mocking.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:39 +01:00
Hidde Beydals 1dac82ad2c
reconcile: handle manually uninstalled release
This is a better way of dealing with this situation, as the previous
logic would result in an `ErrNoStorageUpdate`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:39 +01:00
Hidde Beydals 5e3ad5d21a
reconcile: add `HelmChartTemplate` sub-reconciler
"With hope comes the potential for both triumph and tribulation."

Due to difficulties beyond the time I have at hands at present[1], the
separate reconciler which took care of ensuring the HelmChart of the
HelmRelease was kept up-to-date has been transformed into a
sub-reconciler.

The behavior of the sub-reconciler remains largely unchanged, except the
required changes to deal with the lack of possibilities to requeue.
Effectively, this means that instead of e.g. deleting the HelmChart
object, requeue, and create it again. This is now handled in a single
operation, unless the deletion fails.

[1]: The core of the issue is that deregistration of finalizers becomes
difficult due to the behavior of the patch helper, and unavailability of
list merges for patch operations on Custom Resources within Kubernetes.

This means that when two reconcilers simultaneously work on the
deregistration of the finalizers, and one succeeds before the other. The
last finishing reconciler will attempt to add the finalizer of the other
reconciler back, as it did exist at the start of their reconciliation
run.

Attempts to work around this (for example, by using an optimistic lock
on the patch operation of the finalizers field) would cause new issues.
As Kubernetes will then delete the object as soon as the patch has
succeeded, and before the reconciliation process actually ends.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:38 +01:00
Hidde Beydals dab2578c07
acl: introduce package to enable global config
This introduces an `acl` package in `internal` which globally configures
the allowance to namespaced references, instead of having to pass on a
variable everywhere.

For the sake of security, the default behavior of the package itself is
to _not_ allow cross namespace references. However, the behavior of the
controller remains unchanged, and the configuration flag still enables
the allowance by default.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:38 +01:00
Hidde Beydals e32c1a0f4a
reconcile: trim space from Helm error messages
Sadly, Helm more than often ends error messages with `\n\n`. Trim this
space to ensure we produce pretty messages.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:37 +01:00
Hidde Beydals 68c273b701
controller: handle delete before adding finalizer
When an object is marked as under deletion, the API server will reject
any attempt to register new finalizers. Given this, handling the
deletion timestamp always has to come before an attempt to register
the finalizer.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:37 +01:00
Hidde Beydals 866f076d1f
reconcile: share PatchHelper with controller
This ensures they both have the same observation on the last
modifications made to the object. Preventing possible scenarios where
a condition would not be removed because it wasn't set at the start of
the reconcile run, then added, and then removed. Causing it to go
unnoticed during the diff calculation.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:36 +01:00
Hidde Beydals bbefbc4ded
reconcile: use failure count in Stalled condition
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:35 +01:00
Hidde Beydals d802ba6cc1
controllers: roughly rewire HelmRelease reconciler
This adds the base wiring to get the controller to work with the
v2beta2 API and the newly introduced packages in `internal/`.

In essence, this means that from now on the controller will utilize all
new code for the reconciliation of the HelmRelease resource.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:35 +01:00
Hidde Beydals eee91b06fa
Introduce new `yaml` package with `Encode` func
Comparison versus `sigs.k8s.io/yaml#Marshal`:

```
BenchmarkEncode/EncodeWithSort-12         	    475	  2419063 ns/op	2235305 B/op	   5398 allocs/op
BenchmarkEncode/EncodeWithSort-12         	    498	  2406794 ns/op	2235300 B/op	   5398 allocs/op
BenchmarkEncode/EncodeWithSort-12         	    492	  2376460 ns/op	2235312 B/op	   5398 allocs/op
BenchmarkEncode/EncodeWithSort-12         	    496	  2406756 ns/op	2235323 B/op	   5398 allocs/op
BenchmarkEncode/EncodeWithSort-12         	    488	  2402969 ns/op	2235336 B/op	   5398 allocs/op
BenchmarkEncode/SigYAMLMarshal-12         	    202	  5791549 ns/op	3124841 B/op	  19324 allocs/op
BenchmarkEncode/SigYAMLMarshal-12         	    205	  5780248 ns/op	3123193 B/op	  19320 allocs/op
BenchmarkEncode/SigYAMLMarshal-12         	    207	  5762621 ns/op	3124537 B/op	  19324 allocs/op
BenchmarkEncode/SigYAMLMarshal-12         	    214	  5748899 ns/op	3121183 B/op	  19324 allocs/op
BenchmarkEncode/SigYAMLMarshal-12         	    211	  5682105 ns/op	3120592 B/op	  19325 allocs/op
```

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:34 +01:00
Hidde Beydals bb4e9b7cee
Update YAMLs to `helm.toolkit.fluxcd.io/v2beta2`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:34 +01:00
Hidde Beydals deb0b14e43
api: make v2beta2 storage version
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:33 +01:00
Hidde Beydals 76f62ffc47
api: backport uninstall del propagation to v2beta2
Manual backport of the work done in #698, to keep things aligned.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:10 +01:00
Hidde Beydals 64b2d5455e
Address review comments
- Use `Unknown` status for the `TestSuccess` condition when tests
  have not been run yet.
- Update Ready summarization logic to incorportate conditions with an
  Unknown status. Within the context of readiness, this always caises
  Ready=False when the condition is included in the summarization.
- Variety of tiny fixes.
- Tiny nits in test mocks to prevent confusion.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:09 +01:00
Hidde Beydals 410ce3a00d
reconcile: include "token" in event metadata
This includes the "token" in the emitted events which is used to rate
limit events received by the notification-controller.

Either by using the already calculated config (values) digest, or by
calculating it for the current reconciliation request in scenarios
where it isn't available from made observations.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:09 +01:00
Hidde Beydals 64cc09ce5e
reconcile: test emitted events
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:08 +01:00
Hidde Beydals ea81c8e099
action: include TS in LogBuffer
This provides more context to individual log entries (and the duration
between individual log lines) while e.g. printing them in an event.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:08 +01:00
Hidde Beydals b975b3f999
reconcile: add atomic release reconciler
This commit adds an atomic release reconciler, capable of stepping
through a series of Helm actions. In addition, it adds the last bits
around eventing and summarizing the end state of the Condition types
into e.g. a Ready condition.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:07 +01:00
Hidde Beydals 479341461a
action: allow composed release name >=53 char
This solves the issue where a release name composed out of e.g.
the target namespace and name of the HelmRelease itself would exceed
the >=53 character length. By calculating the SHA256 checksum of the
release name, taking the first 12 characters of this checksum and
appending it to the release named trimmed to 40 characters separated
by a hyphen (`<long-release-name>-abcdef12345678`).

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:07 +01:00
Hidde Beydals 026fd45c2c
action: add name param to rollback and uninstall
This gives more fine-grain control over what release must be targeted,
as we do not always want to rely on the current spec but rather on e.g.
a release we have made ourselves with a previous configuration for
garbage collection purposes.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:06 +01:00
Hidde Beydals 9812286bb4
action: add `Len` method to `LogBuffer`
This allows for requesting the count of non-empty values in the ring
buffer, and thus the number of log lines.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:05 +01:00
Hidde Beydals 0b8692f61a
api: add service account name validation rule
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:05 +01:00
Hidde Beydals 9e1eedcfa4
api: various changes to support new logic
- Change the map with Helm release test hooks to a pointer map. This
  allows (in combination with the constrains around JSON serialization)
  to distinguish a release _without_ a test run from a release _with_
  test run but no tests (an empty map).
- Add `GetTestHooks` and `SetTestHooks` methods to help circumvent some
  of the common problems around working with a pointer map in Go (e.g.
  not being capable of iterating over it using range).
- Add `HasBeenTested` and `HasTestInPhase` methods to help make
  observations on captured release information.
- Add `StorageNamespace` to Status to allow for observations of
  configuration changes which are mutating compared to the spec.
- Add `GetActiveRemediation` helper method to get the active
  remediation strategy based on the presence of Current and/or Previous
  release observations in the Status of the object.
- Add `ReleaseTargetChanged` helper method to determine if an immutable
  release target changed has occurred, in which case e.g. garbage
  collection needs to happen before performing any other action.
- Add `GetCurrent`, `HasCurrent`, `GetPrevious` and `HasPrevious`
  helper methods to ease access to their values nested in the Status.
- Add `FullReleaseName` and `VersionedChartName` helper methods to e.g.
  allow printing full name references in Condition and Event messages
  which can be placed in a point in time based on metadata more
  familiar to a user than for example the observed generation.
- Change `GetFailureCount` and `RetriesExhausted` signatures of
  `Remediation` interface to take a pointer. This eases use of the API,
  as generally speaking a (Kubernetes) API object is a pointer.
- Move methods from `HelmReleaseSpec` to `HelmRelease`, this is easier
  to access and matches `GetConditions`, etc.
- Remove `DeploymentAction` interface and `GetDescription` from
  `Remediation` interface as this is no longer of value.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:04 +01:00
Jiri Tyr 8cefed19fd
Adding tests
Signed-off-by: Jiri Tyr <jiri.tyr@gmail.com>
2023-11-20 12:06:04 +01:00
Jiri Tyr e1393542a7
Fixing typo
Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com>
Signed-off-by: Jiri Tyr <jtyr@users.noreply.github.com>
2023-11-20 12:06:03 +01:00
Jiri Tyr 88a21fecbf
Moving stuff from runner; removing changes in v2beta1
Signed-off-by: Jiri Tyr <jiri.tyr@gmail.com>
2023-11-20 12:06:03 +01:00
Jiri Tyr 6db62ed507
Adding test filters
Signed-off-by: Jiri Tyr <jiri.tyr@gmail.com>
2023-11-20 12:06:02 +01:00
Hidde Beydals 5843cc2ef0
action: allow passing of config options
This to allow the Flux CLI to e.g. enable the dry-run flag on an action
outside of the HelmRelease spec, and inject other (user input based)
modifications.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:02 +01:00
Hidde Beydals 220e789481
Allow detection of next reconcile action
This provides a rough (but not flawless) outline for determining the
sub-reconciler which should run based on the state of the `HelmRelease`
API object, and the Helm storage.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:01 +01:00
Hidde Beydals d9055f81b8
Add reconcile logic for individual Helm actions
This adds a `reconcile` package with the reconciliation and (status)
observation logic for individual Helm actions, but no glue to loop
through them till desired state.

All actions have individual `ActionReconciler` implementations which
construct their `action.Configuration` out of a factory, so the Helm
client can be shared between sub-reconcilers. They all present a
`ReconcilerType`, allowing an iterator to e.g. stop after running
every type just once.

The observation model can be explained as follows, but may lack some
minor details:

- The observed release has to match the release target of the
  HelmRelease object
- ActionReconcilers of type "release" move Current to Previous
  when they see a higher release revision. They then write the
  new release to Current, and continue to observe writes to
  revisions that match either version
- Remediation only updates Current
- Test updates Current and Current.TestHooks
- Unlock updates Current

After running the action, the reconcilers observe both the action
result and the state of the object. This allows them to distinguish
certain types of errors which are otherwise hard to detect.
For example, errors which do not cause drift to the Helm storage, or a
change of release version compared to Current for actions which do not
provide a version target flag.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:01 +01:00
Hidde Beydals dfebba2783
Add `ObservedRelease` and other release utils
This adds a `release` package which allows to create (minified)
`ObservedRelease` copy of a Helm release object. This
`ObservedRelease` contains sufficient data to detect changes
to the storage object made by Helm actions run manually, and a variety
of malicious changes (but not all, at present).

The data in an `ObservedRelease` can be filtered using a `DataFilter`,
this allows for example to filter out test hooks to prevent the
controller from taking action on a manually run `helm test`.

The consumer can combine the `ObservedRelease` with a Helm storage
observer to take snapshots of the release object as written to the
storage by a Helm action. To record this on a `HelmRelease` v2beta2 API
object, the `ObservedRelease` can be transformed into a
`HelmReleaseInfo` API object which can be recorded as either the
Current or Previous release in the status.

During the transformation, the digests of both the `ObservedRelease`
object and release config are calculated using the canonical algorithm.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:00 +01:00
Hidde Beydals 89a6f497e5
Run individual Helm actions using HelmRelease
This commit introduces an `action` package which allows the consumer to
run Helm actions using the instructions from a `HelmRelease` v2beta2
API object.

The actions do not determine if there is a desire be run, nor do they
record state on the object. This can however be injected by the caller
using the simplified observing Helm storage driver, which now iterates
over a list of callback functions after persisting an object instead
of keeping state.

This separation of concerns would allow e.g. the Flux CLI later on
to run actions (but with a dry-run flag or different storage
configuration) using the object in the same manner as the controller.

Some minor changes have been made to the `postrender` and `runner`
package to allow the code to co-exist while we are inbetween API
versions.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:05:57 +01:00
Hidde Beydals 14e08f791f
api: introduce v2beta2 API
This is an initial introduction, and still subject to changes. The
storage version is still configured to v2beta1. This allows low
level packages to already work with the new object data, but keeps
it away from the reconciler for now.

The changes mainly focus around removing the helper methods from the
API, and to enrich the status object with more data about the current
and previous revision. With the goal to deprecate all `LastAttempted*`
and `LastApplied*` fields, as this data is now available in `Current`
and `Previous`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:02:42 +01:00
Hidde Beydals 730ccec91f
Move post renderers into separate package
Plus change the tests a tiny bit to work with Gomega, and break the
further API free from direct attachment to our Helm API objects.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:02:41 +01:00
Hidde Beydals c99b00d885
Move predicates into package and add tests
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:02:41 +01:00
Hidde Beydals 0140eeeea9
Factor various bits out of reconciler
This commit moves various generic bits out of the reconciler into
separate modules, while adding more test coverage.

Some of the logic around merging chart values from references has been
improved to work with `client.Object`, instead of two separate maps.

In addition, the option to override the hostname of an Artifact has
been removed. It was undocumented and for testing purposes only, which
these days can be better achieved by e.g. configuring the
`--storage-adv-addr`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:02:40 +01:00
Hidde Beydals fe661df9d7
Move HelmChart handling to separate reconciler
This moves the HelmChart template handling to a separate reconciler,
with predicates detecing relevant changes. The idea is that this would
both facilitate working _without_ chart templates but with references
in the future, and to reduce cognitive load while working with
reconciler logic.

The predicate uses `DeepEqual` from `k8s.io/apimachinery/pkg/api/equality`
to inspect the Chart template objects of the old and new HelmRelease
object in the update event.

The reconciler uses server-side apply to create or update the HelmChart
on the cluster, and emits an event based on the change set of the
action. It does not produce any diff yet, as the server-side apply
library at present does not provide a way to gain access to an "old"
versus "new" objects after performing an apply. The `diff` package
has however been prepared to allow diffing Unstructured objects.

As this reconciler has a separate life-cycle, a new
`chart.finalizers.fluxcd.io` finalizer has been introduced to ensure
a HelmChart is properly garbage collected before the HelmRelease is
allowed to be deleted.

The implementation on the release reconciler's end is a rough sketch,
but in working shape. The foresight is that much of the reconciler will
change when the release logic will be adjusted to work with the earlier
introduced storage observer.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:02:40 +01:00
Hidde Beydals e82d389107
helm/storage: add observator and implementation
This adds an observer which wraps around a Helm storage driver, to keep
track of the release metadata as written to the storage. This enables
you to work with, and compare release data as persisted by Helm.
Without having to rely on the result as returned by the Helm SDK. Which
at times of an error, may differ from last written state.

The observer does at present expect to be watching a single namespace,
and was designed without working with multiple releases simultianiously
into account, although this should theoretically still work.

The releases are at stored in a simple map by index storage key, which
are unique to the namespace. The `ObservedRelease` objects the keys hold are
overwritten on sequential writes to the same release object, and
returned by getter methods as deep copies.

This could theoretically be changed to observing e.g. all writes, I have
left this as a refinement TODO while actually implementing it in the
reconciler. The same goes for the included metadata, which might be not
all relevant.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:02:39 +01:00
Hidde Beydals d068542f80
Merge pull request #812 from fluxcd/update-docker
Update github.com/docker/docker to 24.0.7
2023-11-20 10:31:36 +01:00
Hidde Beydals 67b0500e8c
Update github.com/docker/docker to 24.0.7
This includes an update of `oras.land/oras-go` to `v1.2.4` due to
otherwise incompatible signature changes.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 10:07:45 +01:00
Stefan Prodan fc5562bd84
Merge pull request #811 from fluxcd/dependabot/github_actions/ci-4c0557044b
build(deps): bump the ci group with 2 updates
2023-11-20 08:57:38 +02:00
dependabot[bot] 64d70b1ded
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [docker/build-push-action](https://github.com/docker/build-push-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/build-push-action` from 5.0.0 to 5.1.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](0565240e2d...4a13e500e5)

Updates `github/codeql-action` from 2.22.5 to 2.22.7
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](74483a38d3...66b90a5db1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 03:25:15 +00:00
Stefan Prodan d7cb41bf92
Merge pull request #808 from fluxcd/dependabot/github_actions/ci-da8bbba46e
build(deps): bump the ci group with 2 updates
2023-11-16 10:39:12 +02:00
dependabot[bot] a96d1e0bb3
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [korthout/backport-action](https://github.com/korthout/backport-action) and [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer).


Updates `korthout/backport-action` from 2.1.0 to 2.1.1
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](cb79e4e5f4...08bafb375e)

Updates `sigstore/cosign-installer` from 3.1.2 to 3.2.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](11086d2504...1fc5bd396d)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 04:01:40 +00:00
Max Jonas Werner 472244bced
Merge pull request #802 from fluxcd/dependabot/github_actions/ci-18c09be9f8
build(deps): bump the ci group with 1 update
2023-11-06 07:37:46 +01:00
dependabot[bot] 3ad60071c1
build(deps): bump the ci group with 1 update
Bumps the ci group with 1 update: [korthout/backport-action](https://github.com/korthout/backport-action).

- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](408fae11ed...cb79e4e5f4)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 03:47:44 +00:00
Stefan Prodan 3c02fb7877
Merge pull request #800 from fluxcd/dependabot/github_actions/ci-266d728e8a
build(deps): bump the ci group with 2 updates
2023-10-30 08:30:45 +02:00
dependabot[bot] 61790bfed0
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [korthout/backport-action](https://github.com/korthout/backport-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `korthout/backport-action` from 1.4.0 to 2.0.0
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](bd68141f07...408fae11ed)

Updates `github/codeql-action` from 2.22.4 to 2.22.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](49abf0ba24...74483a38d3)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 03:38:09 +00:00
Hidde Beydals a6b0da79d4
Merge pull request #799 from fluxcd/dependabot/go_modules/google.golang.org/grpc-1.56.3
build(deps): bump google.golang.org/grpc from 1.53.0 to 1.56.3
2023-10-27 23:07:45 +02:00
dependabot[bot] 019b463628
build(deps): bump google.golang.org/grpc from 1.53.0 to 1.56.3
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-25 22:27:58 +00:00
Max Jonas Werner 3de410111d
Merge pull request #797 from fluxcd/dependabot/github_actions/ci-ff180a8d58
build(deps): bump the ci group with 2 updates
2023-10-23 08:51:52 +02:00
dependabot[bot] ef1662e822
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 4.1.0 to 4.1.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8ade135a41...b4ffde65f4)

Updates `github/codeql-action` from 2.22.3 to 2.22.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0116bc2df5...49abf0ba24)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 03:52:12 +00:00
Hidde Beydals 69ab175e0b
Merge pull request #795 from fluxcd/dependabot/github_actions/ci-24b5ea99f0
build(deps): bump the ci group with 1 update
2023-10-16 13:39:08 +02:00
dependabot[bot] 8fb5973b20
build(deps): bump the ci group with 1 update
Bumps the ci group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).

- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2cb752a87e...0116bc2df5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 03:09:36 +00:00
Hidde Beydals 93f8191252
Merge pull request #793 from fluxcd/update-source-controller-yamls
Update source-controller to v1.1.2
2023-10-13 11:04:46 +02:00
souleb 25654ca290
Update kustomization.yaml
Signed-off-by: souleb <bah.soule@gmail.com>
2023-10-13 09:50:54 +02:00
Hidde Beydals 87c3ccc6cf
Merge pull request #791 from fluxcd/dependabot/go_modules/api/golang.org/x/net-0.17.0
build(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 in /api
2023-10-12 09:12:34 +02:00
dependabot[bot] b74ca9758e
build(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 in /api
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 06:48:32 +00:00
Hidde Beydals 7258f967bb
Merge pull request #792 from fluxcd/dependabot/go_modules/golang.org/x/net-0.17.0
build(deps): bump golang.org/x/net from 0.13.0 to 0.17.0
2023-10-12 08:47:38 +02:00
dependabot[bot] 522afcb14a
build(deps): bump golang.org/x/net from 0.13.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.13.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.13.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 23:03:36 +00:00
Hidde Beydals 7f3d5141f9
Merge pull request #790 from fluxcd/release-v0.36.2
Release v0.36.2
2023-10-11 14:42:57 +02:00
Hidde Beydals a3f636ad38
Release v0.36.2
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-11 13:34:56 +02:00
Hidde Beydals d5777188e2
Merge pull request #788 from fluxcd/tidy-nits 2023-10-11 12:35:28 +02:00
Hidde Beydals 9739e60625
misc: handle unhandled errors
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 10:43:13 +02:00
Hidde Beydals f054ff5853
misc: fix hypothetical implicit memory aliasing
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 10:43:13 +02:00
Hidde Beydals 6575eff5cc
misc: `.../kustomize/api/filesys` deprecation
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 10:43:09 +02:00
Hidde Beydals 58afcba1b7
misc: remove unused code
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 10:05:40 +02:00
Hidde Beydals aa2f6dd3be
misc: remove redundant use of `fmt.Sprintf`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 10:03:28 +02:00
Hidde Beydals 08d3674e5a
misc: use `time.Since` instead of `time.Now().Sub`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 10:02:42 +02:00
Hidde Beydals 5854286c82
misc: properly use `fmt.Errorf` and wrap errs
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 10:01:39 +02:00
Hidde Beydals 58d3608c9a
misc: remove redundant returns
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 09:59:26 +02:00
Hidde Beydals 61bf78379d
misc: `fake.NewFakeClientWithScheme` deprecation
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 09:58:26 +02:00
Hidde Beydals ca17176cd3
Merge pull request #786 from fluxcd/dependabot/github_actions/ci-438070d785
build(deps): bump the ci group with 1 update
2023-10-09 08:52:28 +02:00
dependabot[bot] 26b6d504b2
build(deps): bump the ci group with 1 update
Bumps the ci group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).

- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ddccb87388...2cb752a87e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 03:53:56 +00:00
Stefan Prodan 0c31fd395c
Merge pull request #785 from fluxcd/speed-up-recovery
fix: Retry failed releases when charts are available in storage
2023-10-04 14:00:17 +03:00
Stefan Prodan bd3ec35697
Retry failed releases when charts are available in storage
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-04 11:03:07 +03:00
Hidde Beydals 0a0cfc1479
Merge pull request #783 from fluxcd/dependabot/github_actions/ci-6df34c0ca7
build(deps): bump the ci group with 2 updates
2023-10-02 10:30:07 +02:00
dependabot[bot] 8ae42b5a9c
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 4.0.0 to 4.1.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](3df4ab11eb...8ade135a41)

Updates `github/codeql-action` from 2.21.7 to 2.21.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](04daf014b5...ddccb87388)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 03:44:43 +00:00
Hidde Beydals ff03616814
Merge pull request #781 from fluxcd/fix-crd-trace-labels 2023-09-29 18:37:52 +02:00
Hidde Beydals 2fc506d47c
runner: ensure CRDs are properly labeled
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-29 16:03:39 +02:00
Hidde Beydals 39fd287f73
Merge pull request #777 from yiannistri/patch-1
fix: Typo
2023-09-20 10:54:49 +02:00
Yiannis Triantafyllopoulos c41062d888
fix: Typo
Signed-off-by: Yiannis Triantafyllopoulos <8741709+yiannistri@users.noreply.github.com>
2023-09-20 09:39:09 +01:00
Hidde Beydals 9059faff35
Merge pull request #776 from fluxcd/release-v0.36.1
Release v0.36.1
2023-09-18 16:59:09 +02:00
Hidde Beydals 79384d29b7
Release v0.36.1
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-18 16:35:30 +02:00
Hidde Beydals a5e912e573
Merge pull request #775 from fluxcd/update-sc
Update source-controller to v1.1.1
2023-09-18 16:21:44 +02:00
Hidde Beydals 6c7e1f1d61
Update source-controller to v1.1.1
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-18 16:06:17 +02:00
Hidde Beydals b1d3ad38f8
Merge pull request #774 from fluxcd/fix-differ-sa
controller: use `DefaultServiceAccount` in differ
2023-09-18 13:20:46 +02:00
Hidde Beydals 2465cb43bd
controller: use `DefaultServiceAccount` in differ
This addresses an issue in which the defunct `DefaultServiceAccount`
from the `HelmReleaseReconciler` was being used to construct the
impersonator used by the differ.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-18 12:54:08 +02:00
Stefan Prodan 6240012e89
Merge pull request #773 from fluxcd/dependabot/github_actions/ci-c0c365b2b0
build(deps): bump the ci group with 7 updates
2023-09-18 09:29:10 +03:00
dependabot[bot] a330425ce1
build(deps): bump the ci group with 7 updates
Bumps the ci group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `2.2.0` | `3.0.0` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `2.10.0` | `3.0.0` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `4.2.1` | `5.0.0` |
| [docker/login-action](https://github.com/docker/login-action) | `2.2.0` | `3.0.0` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `4.6.0` | `5.0.0` |
| [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `4.6.0` | `5.0.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `2.21.5` | `2.21.7` |


Updates `docker/setup-qemu-action` from 2.2.0 to 3.0.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](2b82ce82d5...68827325e0)

Updates `docker/setup-buildx-action` from 2.10.0 to 3.0.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](885d1462b8...f95db51fdd)

Updates `docker/build-push-action` from 4.2.1 to 5.0.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](0a97817b6a...0565240e2d)

Updates `docker/login-action` from 2.2.0 to 3.0.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](465a07811f...343f7c4344)

Updates `docker/metadata-action` from 4.6.0 to 5.0.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](818d4b7b91...96383f4557)

Updates `goreleaser/goreleaser-action` from 4.6.0 to 5.0.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](5fdedb94ab...7ec5c2b0c6)

Updates `github/codeql-action` from 2.21.5 to 2.21.7
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](00e563ead9...04daf014b5)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:23:46 +00:00
Hidde Beydals c94ee3b545
Merge pull request #767 from fluxcd/fix-captured-logs-regression
runner: address regression in captured Helm logs
2023-09-11 17:13:00 +02:00
Hidde Beydals 1aa739028d
controller: strip newlines from Helm error message
To prevent spurious newlines between the error message and the captured
logs, as at times Helm ends error with one or multiple newlines.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-11 16:57:54 +02:00
Hidde Beydals eb3a4b84cd
runner: address regression in captured Helm logs
This addresses a regression in the Helm log capturing introduced in
3b25041385, which prevented valuable
information from the Kube client logs (e.g. the specific reason for a
timeout) to be added to the event emitted in case of a failure.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-09-11 16:57:45 +02:00
Hidde Beydals 394ab5a1e2
Merge pull request #768 from somtochiama/nil-artifac
Check source for nil artifact before loading chart
2023-09-11 16:16:12 +02:00
Somtochi Onyekwere c1d77ad952 check for nil artifact before loading chart
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-09-11 14:59:24 +01:00
Hidde Beydals 9fa5cf7b31
Merge pull request #766 from fluxcd/dependabot/github_actions/ci-dbfd6c86b4
build(deps): bump the ci group with 4 updates
2023-09-11 12:48:26 +02:00
dependabot[bot] c62827e5f8
build(deps): bump the ci group with 4 updates
Bumps the ci group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [actions/cache](https://github.com/actions/cache), [docker/build-push-action](https://github.com/docker/build-push-action) and [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action).


Updates `actions/checkout` from 3.6.0 to 4.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](f43a0e5ff2...3df4ab11eb)

Updates `actions/cache` from 3.3.1 to 3.3.2
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](88522ab9f3...704facf57e)

Updates `docker/build-push-action` from 4.1.1 to 4.2.1
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](2eb1c1961a...0a97817b6a)

Updates `goreleaser/goreleaser-action` from 4.4.0 to 4.6.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](3fa32b8bb5...5fdedb94ab)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 03:24:14 +00:00
Stefan Prodan 4d6a191251
Merge pull request #764 from fluxcd/dependabot/go_modules/github.com/cyphar/filepath-securejoin-0.2.4
build(deps): bump github.com/cyphar/filepath-securejoin from 0.2.3 to 0.2.4
2023-09-08 20:15:26 +03:00
dependabot[bot] 5cd24b8616
build(deps): bump github.com/cyphar/filepath-securejoin
Bumps [github.com/cyphar/filepath-securejoin](https://github.com/cyphar/filepath-securejoin) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/cyphar/filepath-securejoin/releases)
- [Commits](https://github.com/cyphar/filepath-securejoin/compare/v0.2.3...v0.2.4)

---
updated-dependencies:
- dependency-name: github.com/cyphar/filepath-securejoin
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-07 13:01:05 +00:00
Max Jonas Werner dcec6902c8
Merge pull request #762 from fluxcd/dependabot/github_actions/ci-83603f3c9b
build(deps): bump the ci group with 3 updates
2023-09-04 09:23:07 +02:00
dependabot[bot] b454b2065a
build(deps): bump the ci group with 3 updates
Bumps the ci group with 3 updates: [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action), [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/setup-buildx-action` from 2.9.1 to 2.10.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](4c0219f9ac...885d1462b8)

Updates `sigstore/cosign-installer` from 3.1.1 to 3.1.2
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](6e04d228eb...11086d2504)

Updates `github/codeql-action` from 2.21.4 to 2.21.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](a09933a12a...00e563ead9)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 03:39:55 +00:00
Max Jonas Werner 61cd88bf96
Merge pull request #761 from fluxcd/dependabot/github_actions/ci-17ac1b16d8
build(deps): bump the ci group with 2 updates
2023-08-28 07:36:51 +02:00
dependabot[bot] eeaf441863
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator).


Updates `actions/checkout` from 3.5.3 to 3.6.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](c85c95e3d7...f43a0e5ff2)

Updates `slsa-framework/slsa-github-generator` from 1.8.0 to 1.9.0
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases)
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/slsa-framework/slsa-github-generator/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: slsa-framework/slsa-github-generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 03:28:23 +00:00
Hidde Beydals a3ad78491b
Merge pull request #759 from fluxcd/release-v0.36.0
Release v0.36.0
2023-08-23 14:22:53 +02:00
Hidde Beydals 855222689e
Release v0.36.0
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-23 13:56:51 +02:00
Stefan Prodan 5d7f20a28b
Merge pull request #758 from fluxcd/sc-1.1.0
Update Source API to v1.1.0
2023-08-23 14:38:13 +03:00
Stefan Prodan 4c60760b61
Update Source API to v1.1.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-23 14:21:46 +03:00
Max Jonas Werner cc354a375a
Merge pull request #757 from fluxcd/dependabot/github_actions/ci-71339bc865
build(deps): bump the ci group with 2 updates
2023-08-21 06:32:07 +02:00
dependabot[bot] 820c03f83f
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [korthout/backport-action](https://github.com/korthout/backport-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `korthout/backport-action` from 1.3.1 to 1.4.0
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](bf5fdd624b...bd68141f07)

Updates `github/codeql-action` from 2.21.3 to 2.21.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](5b6282e01c...a09933a12a)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 03:55:58 +00:00
Stefan Prodan a8c15d3700
Merge pull request #753 from fluxcd/stale-metrics
Delete stale metrics on object delete
2023-08-15 11:45:14 +03:00
Sunny 74e33a70c4 Delete stale metrics on object delete
Use the metrics helper to record all the metrics. Metrics helpers
ensures that the metrics for deleted objects are deleted as well.

Move all the metrics recording to be performed at the very end of the
reconciliation. Realtime metrics for readiness is no longer recorded as
it will be removed in a future version for CRD metrics collected using
kube-state-metrics. Updating the object status with realtime readiness
should provide the readiness to CRD metrics watchers.

`HelmReleaseReconciler.reconcileDelete()` is modified to receive a
pointer HelmRelease object so that any modifications on the object is
reflected on the object instance that's passed to the metrics recorder.
This is not needed for `HelmReleaseReconciler.reconcile()` as it returns
a new copy of the object that's saved in the same object variable,
overwriting the object instance with the updates.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-08-15 02:42:09 +05:30
Max Jonas Werner 0fac91289b
Merge pull request #755 from fluxcd/dependabot/github_actions/ci-d093c87be1
build(deps): bump the ci group with 3 updates
2023-08-14 08:59:00 +02:00
dependabot[bot] 089cf60b7a
build(deps): bump the ci group with 3 updates
Bumps the ci group with 3 updates: [actions/setup-go](https://github.com/actions/setup-go), [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/setup-go` from 4.0.1 to 4.1.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](fac708d667...93397bea11)

Updates `goreleaser/goreleaser-action` from 4.3.0 to 4.4.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](336e29918d...3fa32b8bb5)

Updates `github/codeql-action` from 2.21.2 to 2.21.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0ba4244466...5b6282e01c)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 04:04:45 +00:00
Hidde Beydals 98a5a518a1
Merge pull request #754 from fluxcd/update-helm
Update Helm to v3.12.3
2023-08-11 16:12:18 +02:00
Hidde Beydals e5755398d2
Update Helm to v3.12.3
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-11 15:50:16 +02:00
Hidde Beydals d2e8641a58
Merge pull request #751 from fluxcd/jitter 2023-08-09 21:31:36 +02:00
Hidde Beydals d76f3a355b
controller: jitter requeue interval
This adds a `--interval-jitter-percentage` flag to the controller to
add a +/- percentage jitter to the interval defined in a HelmRelease
(defaults to 5%).

Effectively, this results in a reconciliation every 9.5 - 10.5 minutes
for a resource with an interval of 10 minutes.

Main reason to add this change is to mitigate spikes in memory and
CPU usage caused by many resources being configured with the same
interval.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-09 17:50:43 +02:00
Hidde Beydals 3a98126200
Merge pull request #750 from fluxcd/dependabot/go_modules/github.com/docker/docker-23.0.3incompatible
build(deps): bump github.com/docker/docker from 23.0.1+incompatible to 23.0.3+incompatible
2023-08-09 14:28:58 +02:00
dependabot[bot] 7919b79eb8
build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.1+incompatible to 23.0.3+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v23.0.1...v23.0.3)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-09 11:53:42 +00:00
Hidde Beydals b494e01256
Merge pull request #748 from fluxcd/update-deps
Update dependencies
2023-08-09 13:52:42 +02:00
Hidde Beydals 376ae96ede
Update dependencies
- github.com/fluxcd/pkg/apis/event to v0.5.2
- github.com/fluxcd/pkg/apis/meta to v1.1.2
- github.com/fluxcd/pkg/runtime to v0.41.0
- github.com/fluxcd/pkg/ssa to v0.30.0
- github.com/fluxcd/source-controller/api to v1.0.1
- github.com/onsi/gomega to v1.27.10
- github.com/opencontainers/go-digest/blake3 to v0.0.0-20230801144141-122dc6384261
- helm.sh/helm/v3 to v3.12.2
- k8s.io/api to v0.27.4
- k8s.io/apiextensions-apiserver to v0.27.4
- k8s.io/apimachinery to v0.27.4
- k8s.io/cli-runtime to v0.27.4
- k8s.io/client-go to v0.27.4
- sigs.k8s.io/cli-utils to v0.35.0
- sigs.k8s.io/controller-runtime to v0.15.1

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-09 13:30:52 +02:00
Hidde Beydals c339f55ec3
api: update dependencies
- github.com/fluxcd/pkg/apis/meta to v1.1.2
- k8s.io/apiextensions-apiserver to v0.27.4
- k8s.io/apimachinery to v0.27.4
- sigs.k8s.io/controller-runtime to v0.15.1

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-09 13:30:52 +02:00
Hidde Beydals adc9963dbd
Merge pull request #749 from fluxcd/enable-codeql-quality
ci: enable security-and-quality CodeQL query
2023-08-09 13:30:34 +02:00
Hidde Beydals f3af7cf9b5
ci: enable security-and-quality CodeQL query
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-09 13:06:12 +02:00
Max Jonas Werner 6cb0d99ec3
Merge pull request #747 from fluxcd/dependabot/github_actions/ci-94766044f6
build(deps): bump the ci group with 2 updates
2023-08-07 12:18:02 +02:00
dependabot[bot] 9990de19b1
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `slsa-framework/slsa-github-generator` from 1.7.0 to 1.8.0
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases)
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/slsa-framework/slsa-github-generator/compare/v1.7.0...v1.8.0)

Updates `github/codeql-action` from 2.20.4 to 2.21.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](489225d82a...0ba4244466)

---
updated-dependencies:
- dependency-name: slsa-framework/slsa-github-generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 03:16:10 +00:00
Max Jonas Werner 70eba092a5
Merge pull request #741 from fluxcd/align-docs-layout
Align docs structure with other controllers
2023-07-29 16:39:23 +02:00
Max Jonas Werner 726edec9a6
Align docs structure with other controllers
In some controller we already support multiple API versions at the
same time. In order to streamline the docs structure, the necessary
changes to do the same in this repo are applied here as well.

refs fluxcd/website#1577

Signed-off-by: Max Jonas Werner <mail@makk.es>
2023-07-21 17:04:33 +02:00
Stefan Prodan dbc98e9509
Merge pull request #737 from fluxcd/dependabot/github_actions/ci-ebccb0496f
build(deps): bump the ci group with 3 updates
2023-07-17 16:36:24 +03:00
dependabot[bot] 0e0e1d9a5c
build(deps): bump the ci group with 3 updates
Bumps the ci group with 3 updates: [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action), [helm/kind-action](https://github.com/helm/kind-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/setup-buildx-action` from 2.9.0 to 2.9.1
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](2a1a44ac4a...4c0219f9ac)

Updates `helm/kind-action` from 1.7.0 to 1.8.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](fa81e57adf...dda0770415)

Updates `github/codeql-action` from 2.20.3 to 2.20.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](46ed16ded9...489225d82a)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 13:20:16 +00:00
Stefan Prodan f9a20634be
Merge pull request #736 from carlossg/patch-1
chore: fix typo reconcilation
2023-07-17 16:15:48 +03:00
Carlos Sanchez ee3f232fd8
chore: fix typo reconcilation
Signed-off-by: Carlos Sanchez <carlos@apache.org>
2023-07-14 19:22:25 +02:00
Max Jonas Werner 04c6980e89
Merge pull request #735 from fluxcd/dependabot/github_actions/ci-00c9c485c6
build(deps): bump the ci group with 2 updates
2023-07-10 08:46:21 +02:00
dependabot[bot] d15ac509ed
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/setup-buildx-action` from 2.8.0 to 2.9.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](16c0bc4a6e...2a1a44ac4a)

Updates `github/codeql-action` from 2.20.1 to 2.20.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f6e388ebf0...46ed16ded9)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 03:20:34 +00:00
Stefan Prodan a63ff82a9d
Merge pull request #734 from fluxcd/gha-backport-workflow-perms
Fix GHA backport.yaml workflow job perms
2023-07-06 11:52:53 +03:00
Aurel Canciu 7362278013
Explicitly echo -E in GHA release.yml
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2023-07-06 09:48:20 +02:00
Aurel Canciu cdc8e290e8
Fix GHA backport.yaml workflow job perms
Fixing backport workflow permissions.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2023-07-06 09:26:05 +02:00
Hidde Beydals 630ae514c3
Merge pull request #732 from fluxcd/group-dependabot-updates
ci: group Dependabot GitHub Action updates
2023-07-04 12:54:42 +02:00
Hidde Beydals 85adb5b672
ci: group Dependabot GitHub Action updates
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-04 12:39:54 +02:00
Hidde Beydals fde7958ad1
Merge pull request #731 from fluxcd/ci-backport-bot-token
ci: use bot token for backport
2023-07-04 12:39:47 +02:00
Hidde Beydals 2c6fb56117
ci: use bot token for backport
This allows GitHub Action workflows to be triggered for the PR created
by the bot.

As things are now triggered by the bot, elevated permissions of the
workflow itself are no longer required.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-04 12:29:48 +02:00
Hidde Beydals 56e36da8c1
Merge pull request #728 from fluxcd/release-v0.35.0
Release v0.35.0
2023-07-04 10:54:14 +02:00
Hidde Beydals 818c7a0b28
Release v0.35.0
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-04 10:36:07 +02:00
Hidde Beydals 558de2adfe
Merge pull request #730 from fluxcd/ci-update-k8s
ci: update Kubernetes to v1.27.3
2023-07-04 10:35:58 +02:00
Hidde Beydals 4a46bc5306
ci: update Kubernetes to v1.27.3
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-04 10:21:36 +02:00
Hidde Beydals 46d9fccdca
Merge pull request #729 from fluxcd/update-sc
Update source-controller to v1.0.0
2023-07-04 10:21:27 +02:00
Hidde Beydals 21f2ff7b28
Update source-controller to v1.0.0
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-04 10:03:36 +02:00
Hidde Beydals f7c7023fb4
Merge pull request #727 from fluxcd/ci-release-workflows
ci: various workflow changes
2023-07-04 09:41:58 +02:00
Hidde Beydals eae26eedcc
ci: enable workflows for `release/**` branches
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-04 09:31:11 +02:00
Hidde Beydals fad5a0a143
ci: change release workflow dispatch tag
From "rc" (reserved for tag releases) to "preview".

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-04 09:31:10 +02:00
Hidde Beydals e8387dfe63
Merge pull request #726 from fluxcd/update-go-deps
Update Go dependencies
2023-07-03 15:21:17 +02:00
Hidde Beydals 46839c347c
Update Go dependencies
- github.com/fluxcd/pkg/apis/event v0.5.0 -> v0.5.1
- github.com/fluxcd/pkg/runtime v0.38.1 -> v0.40.0
- github.com/fluxcd/pkg/ssa v0.28.1 -> v0.28.2
- github.com/hashicorp/go-retryablehttp v0.7.2 -> v0.7.4
- github.com/onsi/gomega v1.27.7 -> v1.27.8
- github.com/opencontainers/go-digest/blake3 v0.0.0-20230329235805-65fac7b55eb7 -> v0.0.0-20230529151907-63939eb433f7
- helm.sh/helm/v3 v3.12.0 -> v3.12.1
- k8s.io/api v0.27.2 -> v0.27.3
- k8s.io/apiextensions-apiserver v0.27.2 -> v0.27.3
- k8s.io/apimachinery v0.27.2 -> v0.27.3
- k8s.io/cli-runtime v0.27.2 -> v0.27.3
- k8s.io/client-go v0.27.2 -> v0.27.3

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-03 14:43:42 +02:00
Hidde Beydals 6073640d9d
api: update Go dependencies
- github.com/fluxcd/pkg/apis/kustomize v1.1.0 -> v1.1.1
- github.com/fluxcd/pkg/apis/meta v1.1.0 -> v1.1.1
- k8s.io/apiextensions-apiserver v0.27.2 -> v0.27.3
- k8s.io/apimachinery v0.27.2 -> v0.27.3

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-03 14:41:57 +02:00
Hidde Beydals cf6245a1e9
Merge pull request #725 from fluxcd/ci-bump-kind
ci: update kind to v0.19.0
2023-07-03 14:41:53 +02:00
Hidde Beydals f58c94bc64
ci: update kind to v0.19.0
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-03 14:30:43 +02:00
Hidde Beydals 9c2090dd2a
Merge pull request #698 from hoffimar/deletionPropagation
Set deletion propagation for helm uninstall
2023-06-30 22:34:36 +02:00
Martin Hoffmann d656cb3994 Update helmreleases.md
Signed-off-by: Martin Hoffmann <hoffimar@gmail.com>
2023-06-30 19:30:57 +02:00
Martin Hoffmann 79e4b9a099 Set deletion propagation for helm uninstall
Signed-off-by: Martin Hoffmann <martin.hoffmann01@sap.com>
Signed-off-by: Martin Hoffmann <hoffimar@gmail.com>
2023-06-30 19:30:57 +02:00
Hidde Beydals be3868edcb
Merge pull request #723 from fluxcd/dependabot/github_actions/docker/setup-qemu-action-2.2.0 2023-06-30 18:55:30 +02:00
dependabot[bot] ca70ea0c19
build(deps): bump docker/setup-qemu-action from 2.1.0 to 2.2.0
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2.1.0...2b82ce82d56a2a04d2637cd93a637ae1b359c0a7)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 15:59:07 +00:00
Hidde Beydals ad06794b57
Merge pull request #722 from fluxcd/dependabot/github_actions/sigstore/cosign-installer-3.1.1 2023-06-30 17:58:29 +02:00
dependabot[bot] af0c00f52d
build(deps): bump sigstore/cosign-installer from 3.0.5 to 3.1.1
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.5 to 3.1.1.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](dd6b2e2b61...6e04d228eb)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 15:31:10 +00:00
Stefan Prodan ada601390a
Merge pull request #721 from fluxcd/dependabot/github_actions/anchore/sbom-action-0.14.3
build(deps): bump anchore/sbom-action from 0.14.2 to 0.14.3
2023-06-30 18:30:32 +03:00
dependabot[bot] 4bcc6617c6
build(deps): bump anchore/sbom-action from 0.14.2 to 0.14.3
Bumps [anchore/sbom-action](https://github.com/anchore/sbom-action) from 0.14.2 to 0.14.3.
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](4d571ad103...78fc58e266)

---
updated-dependencies:
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 14:36:21 +00:00
Hidde Beydals eb604a6f0f
Merge pull request #724 from fluxcd/fix-label-descriptions
Change label descriptions to be uniform
2023-06-30 16:10:38 +02:00
Hidde Beydals de15997d19
Change label descriptions to be inform
Signed-off-by: Hidde Beydals <hiddeco@users.noreply.github.com>
2023-06-30 16:01:59 +02:00
Hidde Beydals c0d550646e
Merge pull request #720 from fluxcd/dependabot/github_actions/docker/setup-buildx-action-2.8.0
build(deps): bump docker/setup-buildx-action from 2.7.0 to 2.8.0
2023-06-30 15:57:05 +02:00
dependabot[bot] 1fffbb87fc
build(deps): bump docker/setup-buildx-action from 2.7.0 to 2.8.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](ecf95283f0...16c0bc4a6e)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 13:42:12 +00:00
Hidde Beydals 2578f10bee
Merge pull request #719 from fluxcd/dependabot/github_actions/helm/kind-action-1.7.0
build(deps): bump helm/kind-action from 1.5.0 to 1.7.0
2023-06-30 15:41:29 +02:00
dependabot[bot] 2302c05469
build(deps): bump helm/kind-action from 1.5.0 to 1.7.0
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.5.0 to 1.7.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](d8ccf8fb62...fa81e57adf)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 13:17:29 +00:00
Hidde Beydals 356eb05575
Merge pull request #718 from fluxcd/backport-automation
Add backport GitHub Action workflow
2023-06-30 15:16:52 +02:00
Hidde Beydals 915db7a4a2
Declaratively define (and sync) labels
This adds a GitHub Action workflow to sync the labels from a YAML file
in `.github/labels.yaml`, in combination with fetching the standard
labels from `fluxcd/community`.

In terms of colors, I am still trying to figure out what looks best.
But this should be a good start to at least kick things off.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-06-30 15:05:56 +02:00
Hidde Beydals 2dba8cf617
Add backport GitHub Action workflow
This workflow automatically backports pull requests labeled with
`backport:<release series branch>`.

For example, `backport:release/v1.0.x` to backport the pull request
to a `release/v1.0.x` branch.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-06-30 15:05:56 +02:00
Stefan Prodan c23b145114
Merge pull request #715 from fluxcd/go.mod-1.20
Align `go.mod` version with Kubernetes (Go 1.20)
2023-06-27 10:51:11 +03:00
Stefan Prodan baf3150a6c
Align go.mod version with Kubernetes (Go 1.20)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-27 10:18:25 +03:00
Hidde Beydals 60090cc288
Merge pull request #712 from fluxcd/dependabot/github_actions/actions/setup-go-4.0.1
build(deps): bump actions/setup-go from 4.0.0 to 4.0.1
2023-06-26 13:04:58 +02:00
dependabot[bot] c1671e5703
build(deps): bump actions/setup-go from 4.0.0 to 4.0.1
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](4d34df0c23...fac708d667)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 10:40:01 +00:00
Hidde Beydals 02caed94bd
Merge pull request #711 from fluxcd/dependabot/github_actions/github/codeql-action-2.20.1
build(deps): bump github/codeql-action from 2.2.7 to 2.20.1
2023-06-26 12:39:25 +02:00
dependabot[bot] 7c60e07955
build(deps): bump github/codeql-action from 2.2.7 to 2.20.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.7 to 2.20.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](168b99b3c2...f6e388ebf0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 10:20:53 +00:00
Max Jonas Werner 23c774fc1d
Merge pull request #709 from fluxcd/dependabot/github_actions/actions/checkout-3.5.3
build(deps): bump actions/checkout from 3.4.0 to 3.5.3
2023-06-26 12:20:16 +02:00
dependabot[bot] 24847670f6
build(deps): bump actions/checkout from 3.4.0 to 3.5.3
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.3.
- [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/v3.4.0...c85c95e3d7251135ab7dc9ce3241c5835cc595a9)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 10:06:14 +00:00
Max Jonas Werner 4a479bda9b
Merge pull request #710 from fluxcd/dependabot/github_actions/docker/build-push-action-4.1.1
build(deps): bump docker/build-push-action from 4.0.0 to 4.1.1
2023-06-26 12:02:27 +02:00
dependabot[bot] 91ccc172fb
build(deps): bump docker/build-push-action from 4.0.0 to 4.1.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.0.0 to 4.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...2eb1c1961a95fc15694676618e422e8ba1d63825)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 09:53:03 +00:00
Hidde Beydals 889eb2089b
Merge pull request #708 from fluxcd/dependabot/github_actions/docker/setup-buildx-action-2.7.0
build(deps): bump docker/setup-buildx-action from 2.5.0 to 2.7.0
2023-06-26 11:52:22 +02:00
dependabot[bot] 4cee62a405
build(deps): bump docker/setup-buildx-action from 2.5.0 to 2.7.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.5.0 to 2.7.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.5.0...ecf95283f03858871ff00b787d79c419715afc34)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 09:38:52 +00:00
Hidde Beydals 153b92bf8e
Merge pull request #714 from fluxcd/scan-disable-snyk
scan: disable Snyk
2023-06-26 11:38:18 +02:00
Hidde Beydals d32864ceba
scan: disable Snyk
To align with other controller projects.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-06-26 11:21:20 +02:00
Stefan Prodan 5866b8a239
Merge pull request #707 from fluxcd/dependabot
Enable Dependabot for GH Actions
2023-06-22 15:13:02 +03:00
Stefan Prodan c182695280
Disable goreleaser changelog
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-22 14:59:51 +03:00
Stefan Prodan e752ea5a2e
Enable Dependabot for GH Actions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-22 14:58:48 +03:00
Stefan Prodan 06979867d5
Merge pull request #706 from fluxcd/release-v0.34.2
Release v0.34.2
2023-06-22 14:05:44 +03:00
Stefan Prodan 75d1f8e7c0
Release v0.34.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-22 13:50:31 +03:00
Stefan Prodan c09a1cf234
Merge pull request #705 from fluxcd/slsa3
Add SLSA3 generators to release workflow
2023-06-22 13:40:52 +03:00
Stefan Prodan eb4e63e815
Add SLSA3 generators to release workflow
Generate SLSA level 3 provenance attestations for the controller release assets and for the multi-arch container images.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-22 13:14:01 +03:00
Aurel Canciu 053a20f32c
Merge pull request #703 from fluxcd/fix-hr-reconcile-loop
Fix HelmRelease reconciliation loop
2023-06-20 14:14:11 +02:00
Aurel Canciu 7c75fc4d3d
Fix HelmRelease reconciliation loop
Likely after the upgrade to controller-runtime v0.15.0 a regression
surfaced for long-running reconciliations of HelmRelease resources (e.g.
for charts having pre-upgrade hooks taking a few minutes to complete).
This regression would cause the controller to immediately re-run the
upgrade after a successful upgrade, thus entering an almost-endless
loop.

Apparently, the only fix to this issue is to ensure
`.Status.LastReleaseRevision` is updated as soon as possible in the
reconiliation cycle rather than wait for the update at the end of the
cycle.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2023-06-20 14:52:50 +03:00
Hidde Beydals d267907aab
Merge pull request #697 from fluxcd/release-0.34.1
Release v0.34.1
2023-06-01 11:41:44 +02:00
Hidde Beydals 8d6af3e809
Release v0.34.1
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-06-01 11:24:57 +02:00
218 changed files with 46212 additions and 5405 deletions

39
.github/dependabot.yaml vendored Normal file
View File

@ -0,0 +1,39 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
labels: ["dependencies"]
schedule:
interval: "daily"
groups:
go-deps:
patterns:
- "*"
allow:
- dependency-type: "direct"
ignore:
# Kubernetes deps are updated by fluxcd/pkg/runtime
- dependency-name: "k8s.io/*"
- dependency-name: "sigs.k8s.io/*"
- dependency-name: "github.com/go-logr/*"
# jsondiff is updated by fluxcd/pkg/ssa
- dependency-name: "github.com/wI2L/jsondiff"
# OCI deps are updated by fluxcd/pkg/oci
- dependency-name: "github.com/google/go-containerregistry*"
- dependency-name: "github.com/opencontainers/*"
# Helm deps are updated by fluxcd/pkg/helmtestserver
- dependency-name: "helm.sh/helm/*"
- dependency-name: "github.com/Masterminds/semver/*"
# Flux APIs are updated at release time
- dependency-name: "github.com/fluxcd/helm-controller/api"
- dependency-name: "github.com/fluxcd/source-controller/api"
- package-ecosystem: "github-actions"
directory: "/"
labels: ["area/ci", "dependencies"]
groups:
ci:
patterns:
- "*"
schedule:
interval: "monthly"

27
.github/labels.yaml vendored Normal file
View File

@ -0,0 +1,27 @@
# Configuration file to declaratively configure labels
# Ref: https://github.com/EndBug/label-sync#Config-files
- name: area/drift
description: Drift detection/correction related issues and pull requests
color: '#ff5c00'
- name: area/helm
description: Helm related issues and pull requests
color: '#1673b6'
- name: area/kustomize
description: Kustomize (post-rendering) related issues and pull requests
color: '#00e54d'
- name: area/oci
description: OCI related issues and pull requests
color: '#c739ff'
- name: backport:release/v1.0.x
description: To be backported to release/v1.0.x
color: '#ffd700'
- name: backport:release/v1.1.x
description: To be backported to release/v1.1.x
color: '#ffd700'
- name: backport:release/v1.2.x
description: To be backported to release/v1.2.x
color: '#ffd700'
- name: backport:release/v1.3.x
description: To be backported to release/v1.3.x
color: '#ffd700'

34
.github/workflows/backport.yaml vendored Normal file
View File

@ -0,0 +1,34 @@
name: backport
on:
pull_request_target:
types: [closed, labeled]
permissions:
contents: read
jobs:
pull-request:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
if: github.event.pull_request.state == 'closed' && github.event.pull_request.merged && (github.event_name != 'labeled' || startsWith('backport:', github.event.label.name))
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
uses: korthout/backport-action@0193454f0c5947491d348f33a275c119f30eb736 # v3.2.1
# xref: https://github.com/korthout/backport-action#inputs
with:
# Use token to allow workflows to be triggered for the created PR
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
# Match labels with a pattern `backport:<target-branch>`
label_pattern: '^backport:([^ ]+)$'
# A bit shorter pull-request title than the default
pull_title: '[${target_branch}] ${pull_title}'
# Simpler PR description than default
pull_description: |-
Automated backport to `${target_branch}`, triggered by a label in #${pull_number}.

View File

@ -2,7 +2,8 @@ name: fuzz
on:
pull_request:
branches:
- main
- "main"
- "release/**"
permissions:
contents: read # for actions/checkout to fetch code
@ -12,11 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: 1.20.x
go-version: 1.24.x
cache-dependency-path: |
**/go.sum
**/go.mod

View File

@ -4,8 +4,8 @@ on:
pull_request:
push:
branches:
- main
- "feature/**"
- "main"
- "release/**"
permissions:
contents: read # for actions/checkout to fetch code
@ -15,16 +15,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup QEMU
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
with:
buildkitd-flags: "--debug"
- name: Cache Docker layers
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: cache
with:
path: /tmp/.buildx-cache
@ -32,17 +32,18 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-ghcache-
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: 1.20.x
go-version: 1.24.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup Kubernetes
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00 # v1.5.0
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
version: v0.17.0
version: v0.20.0
cluster_name: kind
node_image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
- name: Setup Helm
uses: fluxcd/pkg/actions/helm@main
- name: Setup Kustomize
@ -90,6 +91,14 @@ jobs:
kubectl -n helm-system rollout status deploy/helm-controller --timeout=1m
env:
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
- name: Test samples
run: |
kubectl create ns samples
kubectl -n samples apply -f config/samples
kubectl -n samples wait hr/podinfo-ocirepository --for=condition=ready --timeout=4m
kubectl -n samples wait hr/podinfo-gitrepository --for=condition=ready --timeout=4m
kubectl -n samples wait hr/podinfo-helmrepository --for=condition=ready --timeout=4m
kubectl delete ns samples
- name: Install sources
run: |
kubectl -n helm-system apply -f config/testdata/sources
@ -137,6 +146,16 @@ jobs:
kubectl -n install-create-target-ns get deployment install-create-target-ns-install-create-target-ns-podinfo
kubectl -n helm-system delete -f config/testdata/install-create-target-ns
- name: Run install from helmChart test
run: |
kubectl -n helm-system apply -f config/testdata/install-from-hc-source
kubectl -n helm-system wait helmreleases/podinfo-from-hc --for=condition=ready --timeout=4m
kubectl -n helm-system delete -f config/testdata/install-from-hc-source
- name: Run install from ocirepo test
run: |
kubectl -n helm-system apply -f config/testdata/install-from-ocirepo-source
kubectl -n helm-system wait helmreleases/podinfo-from-ocirepo --for=condition=ready --timeout=4m
kubectl -n helm-system delete -f config/testdata/install-from-ocirepo-source
- name: Run install fail test
run: |
test_name=install-fail
@ -168,7 +187,7 @@ jobs:
kubectl -n helm-system apply -f config/testdata/$test_name
echo -n ">>> Waiting for expected conditions"
count=0
until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="False" and .TestSuccess=="False" and .Ready=="False"' )" ]; do
until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="True" and .TestSuccess=="False" and .Ready=="False"' )" ]; do
echo -n '.'
sleep 5
count=$((count + 1))
@ -212,7 +231,7 @@ jobs:
fi
kubectl -n helm-system delete -f config/testdata/$test_name
- name: Run install fail with remedition test
- name: Run install fail with remediation test
run: |
test_name=install-fail-remediate
kubectl -n helm-system apply -f config/testdata/$test_name
@ -229,21 +248,22 @@ jobs:
done
echo ' done'
# Ensure release does not exist (was uninstalled).
HISTORY=$(helm -n helm-system history $test_name 2>&1; exit 0)
if [ "$HISTORY" != 'Error: release: not found' ]; then
echo -e "Unexpected release history: $HISTORY"
# Ensure release was uninstalled.
RELEASE_STATUS=$(helm -n helm-system history $test_name -o json | jq -r 'if length == 1 then .[0].status else empty end')
if [ "$RELEASE_STATUS" != "uninstalled" ]; then
echo -e "Unexpected release status: $RELEASE_STATUS"
exit 1
fi
kubectl -n helm-system delete -f config/testdata/$test_name
helm -n helm-system delete $test_name
- name: Run install fail with retry test
run: |
test_name=install-fail-retry
kubectl -n helm-system apply -f config/testdata/$test_name
echo -n ">>> Waiting for expected conditions"
count=0
until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.installFailures == 2 and ( .status.conditions | map( { (.type): .status } ) | add | .Released=="False" and .Ready=="False" )' )" ]; do
until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.installFailures == 2 and ( .status.conditions | map( { (.type): .status } ) | add | .Released=="False" and .Ready=="False" and .Stalled=="True" )' )" ]; do
echo -n '.'
sleep 5
count=$((count + 1))
@ -289,7 +309,7 @@ jobs:
kubectl -n helm-system apply -f config/testdata/$test_name/upgrade.yaml
echo -n ">>> Waiting for expected conditions"
count=0
until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="False" and .Ready=="False"' )" ]; do
until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="False" and .Ready=="False" and .Stalled=="True"' )" ]; do
echo -n '.'
sleep 5
count=$((count + 1))
@ -335,7 +355,7 @@ jobs:
kubectl -n helm-system apply -f config/testdata/$test_name/upgrade.yaml
echo -n ">>> Waiting for expected conditions"
count=0
until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="False" and .TestSuccess=="False" and .Ready=="False"' )" ]; do
until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="True" and .TestSuccess=="False" and .Ready=="False" and .Stalled=="True"' )" ]; do
echo -n '.'
sleep 5
count=$((count + 1))
@ -455,6 +475,45 @@ jobs:
exit 1
fi
kubectl delete -n helm-system -f config/testdata/$test_name/install.yaml
- name: Run upgrade from ocirepo source
run: |
test_name=upgrade-from-ocirepo-source
kubectl -n helm-system apply -f config/testdata/$test_name/install.yaml
echo -n ">>> Waiting for expected conditions"
count=0
until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="True" and .Ready=="True"' )" ]; do
echo -n '.'
sleep 5
count=$((count + 1))
if [[ ${count} -eq 24 ]]; then
echo ' No more retries left!'
exit 1
fi
done
echo ' done'
# Validate release was installed.
REVISION_COUNT=$(helm -n helm-system history -o json $test_name | jq 'length')
if [ "$REVISION_COUNT" != 1 ]; then
echo -e "Unexpected revision count: $REVISION_COUNT"
exit 1
fi
kubectl -n helm-system apply -f config/testdata/$test_name/upgrade.yaml
echo -n ">>> Waiting for expected conditions"
count=0
until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="True" and .Ready=="True"' )" ]; do
echo -n '.'
sleep 5
count=$((count + 1))
if [[ ${count} -eq 24 ]]; then
echo ' No more retries left!'
exit 1
fi
done
echo ' done'
kubectl delete -n helm-system -f config/testdata/$test_name/install.yaml
- name: Run upgrade fail with uninstall remediation strategy test
run: |
@ -536,10 +595,11 @@ jobs:
kubectl -n delete-ns wait helmreleases/podinfo --for=condition=ready --timeout=2m
kubectl delete ns delete-ns 1>/dev/null 2>&1 &
echo -n ">>> Waiting for namespace to be deleted"
if kubectl wait --for=delete namespace delete-ns --timeout=3m; then
if kubectl wait --for=delete namespace delete-ns --timeout=5m; then
echo ' Namespace deleted successfully'
else
echo ' Timed out waiting for namespace to be deleted'
kubectl get all -n delete-ns
exit 1
fi
- name: Run post-renderer-kustomize test
@ -557,7 +617,7 @@ jobs:
exit 1
fi
kubectl -n helm-system delete -f config/testdata/post-renderer-kustomize
- name: Boostrap CRDs Upgrade Tests
- name: Bootstrap CRDs Upgrade Tests
if: ${{ startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/') }}
run: |
REF=${{ github.ref }}

View File

@ -15,16 +15,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup QEMU
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
with:
buildkitd-flags: "--debug"
- name: Build multi-arch container image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
push: false
builder: ${{ steps.buildx.outputs.name }}

View File

@ -7,23 +7,29 @@ on:
inputs:
tag:
description: 'image tag prefix'
default: 'rc'
default: 'preview'
required: true
permissions:
contents: write # needed to write releases
id-token: write # needed for keyless signing
packages: write # needed for ghcr access
contents: read
env:
CONTROLLER: ${{ github.event.repository.name }}
jobs:
build-push:
release:
outputs:
hashes: ${{ steps.slsa.outputs.hashes }}
image_url: ${{ steps.slsa.outputs.image_url }}
image_digest: ${{ steps.slsa.outputs.image_digest }}
runs-on: ubuntu-latest
permissions:
contents: write # for creating the GitHub release.
id-token: write # for creating OIDC tokens for signing.
packages: write # for pushing and signing container images.
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Kustomize
uses: fluxcd/pkg/actions/kustomize@main
- name: Prepare
@ -36,24 +42,24 @@ jobs:
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Setup QEMU
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Login to GitHub Container Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: fluxcdbot
password: ${{ secrets.GHCR_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
username: fluxcdbot
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
- name: Generate images meta
id: meta
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4.3.0
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with:
images: |
fluxcd/${{ env.CONTROLLER }}
@ -61,7 +67,8 @@ jobs:
tags: |
type=raw,value=${{ steps.prep.outputs.VERSION }}
- name: Publish images
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
id: build-push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
sbom: true
provenance: true
@ -72,32 +79,82 @@ jobs:
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Check images
run: |
docker buildx imagetools inspect docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
docker buildx imagetools inspect ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
docker pull docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
docker pull ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
- uses: sigstore/cosign-installer@c3667d99424e7e6047999fb6246c0da843953c65 # v3.0.1
- uses: sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac # v3.9.1
- name: Sign images
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign sign --yes fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
cosign sign --yes ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
cosign sign --yes fluxcd/${{ env.CONTROLLER }}@${{ steps.build-push.outputs.digest }}
cosign sign --yes ghcr.io/fluxcd/${{ env.CONTROLLER }}@${{ steps.build-push.outputs.digest }}
- name: Generate release artifacts
if: startsWith(github.ref, 'refs/tags/v')
run: |
mkdir -p config/release
kustomize build ./config/crd > ./config/release/${{ env.CONTROLLER }}.crds.yaml
kustomize build ./config/manager > ./config/release/${{ env.CONTROLLER }}.deployment.yaml
echo '[CHANGELOG](https://github.com/fluxcd/${{ env.CONTROLLER }}/blob/main/CHANGELOG.md)' > ./config/release/notes.md
- uses: anchore/sbom-action/download-syft@07978da4bdb4faa726e52dfc6b1bed63d4b56479 # v0.13.3
- uses: anchore/sbom-action/download-syft@cee1b8e05ae5b2593a75e197229729eabaa9f8ec # v0.20.2
- name: Create release and SBOM
id: run-goreleaser
if: startsWith(github.ref, 'refs/tags/v')
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
with:
version: latest
args: release --release-notes=config/release/notes.md --rm-dist --skip-validate
args: release --clean --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate SLSA metadata
id: slsa
env:
ARTIFACTS: "${{ steps.run-goreleaser.outputs.artifacts }}"
run: |
hashes=$(echo -E $ARTIFACTS | jq --raw-output '.[] | {name, "digest": (.extra.Digest // .extra.Checksum)} | select(.digest) | {digest} + {name} | join(" ") | sub("^sha256:";"")' | base64 -w0)
echo "hashes=$hashes" >> $GITHUB_OUTPUT
image_url=fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.version }}
echo "image_url=$image_url" >> $GITHUB_OUTPUT
image_digest=${{ steps.build-push.outputs.digest }}
echo "image_digest=$image_digest" >> $GITHUB_OUTPUT
release-provenance:
needs: [release]
permissions:
actions: read # for detecting the Github Actions environment.
id-token: write # for creating OIDC tokens for signing.
contents: write # for uploading attestations to GitHub releases.
if: startsWith(github.ref, 'refs/tags/v')
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
with:
provenance-name: "provenance.intoto.jsonl"
base64-subjects: "${{ needs.release.outputs.hashes }}"
upload-assets: true
dockerhub-provenance:
needs: [release]
permissions:
actions: read # for detecting the Github Actions environment.
id-token: write # for creating OIDC tokens for signing.
packages: write # for uploading attestations.
if: startsWith(github.ref, 'refs/tags/v')
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.1.0
with:
image: ${{ needs.release.outputs.image_url }}
digest: ${{ needs.release.outputs.image_digest }}
registry-username: fluxcdbot
secrets:
registry-password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
ghcr-provenance:
needs: [release]
permissions:
actions: read # for detecting the Github Actions environment.
id-token: write # for creating OIDC tokens for signing.
packages: write # for uploading attestations.
if: startsWith(github.ref, 'refs/tags/v')
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.1.0
with:
image: ghcr.io/${{ needs.release.outputs.image_url }}
digest: ${{ needs.release.outputs.image_digest }}
registry-username: fluxcdbot
secrets:
registry-password: ${{ secrets.GHCR_TOKEN }}

View File

@ -1,9 +1,9 @@
name: scan
on:
push:
branches: [ main ]
branches: [ "main", "release/**" ]
pull_request:
branches: [ main ]
branches: [ "main", "release/**" ]
schedule:
- cron: '18 10 * * 3'
@ -17,61 +17,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run FOSSA scan and upload build data
uses: fossa-contrib/fossa-action@6728dc6fe9a068c648d080c33829ffbe56565023 # v2.0.0
uses: fossa-contrib/fossa-action@3d2ef181b1820d6dcd1972f86a767d18167fa19b # v3.0.1
with:
# FOSSA Push-Only API Token
fossa-api-key: 5ee8bf422db1471e0bcf2bcb289185de
github-token: ${{ github.token }}
snyk:
name: Snyk
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: 1.20.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Download modules
run: |
make tidy
- uses: snyk/actions/setup@master
- name: Run Snyk to check for vulnerabilities
continue-on-error: true
run: |
snyk test --all-projects --sarif-file-output=snyk.sarif
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7
with:
sarif_file: snyk.sarif
codeql:
name: CodeQL
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: 1.20.x
go-version: 1.24.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Initialize CodeQL
uses: github/codeql-action/init@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
with:
languages: go
# xref: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# xref: https://codeql.github.com/codeql-query-help/go/
queries: security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7
uses: github/codeql-action/autobuild@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2

28
.github/workflows/sync-labels.yaml vendored Normal file
View File

@ -0,0 +1,28 @@
name: sync-labels
on:
workflow_dispatch:
push:
branches:
- main
paths:
- .github/labels.yaml
permissions:
contents: read
jobs:
labels:
name: Run sync
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3
with:
# Configuration file
config-file: |
https://raw.githubusercontent.com/fluxcd/community/main/.github/standard-labels.yaml
.github/labels.yaml
# Strictly declarative
delete-other-labels: true

View File

@ -4,9 +4,26 @@ builds:
- skip: true
release:
prerelease: "true"
extra_files:
- glob: config/release/*.yaml
prerelease: "auto"
header: |
## Changelog
[{{.Tag}} changelog](https://github.com/fluxcd/{{.ProjectName}}/blob/{{.Tag}}/CHANGELOG.md)
footer: |
## Container images
- `docker.io/fluxcd/{{.ProjectName}}:{{.Tag}}`
- `ghcr.io/fluxcd/{{.ProjectName}}:{{.Tag}}`
Supported architectures: `linux/amd64`, `linux/arm64` and `linux/arm/v7`.
The container images are built on GitHub hosted runners and are signed with cosign and GitHub OIDC.
To verify the images and their provenance (SLSA level 3), please see the [security documentation](https://fluxcd.io/flux/security/).
changelog:
disable: true
checksum:
extra_files:

View File

@ -1,5 +1,682 @@
# Changelog
## 1.3.0
**Release date:** 2025-05-28
This minor release comes with various bug fixes and improvements.
The controller now supports the `DisableChartDigestTracking` feature gate,
which allows disabling appending the digest of OCI Helm charts to the
chart version. This is useful for charts that do not follow Helm's
recommendation of using the app version instead of the chart version
as a label in the manifests.
In addition, the Kubernetes dependencies have been updated to v1.33, Helm has
been updated to v3.17.3 and various other controller dependencies have been
updated to their latest version. The controller is now built with Go 1.24.
Fixes:
- Fix returning wrong error value in Kubernetes HTTP client
[#1188](https://github.com/fluxcd/helm-controller/pull/1188)
Improvements:
- Add `DisableChartDigestTracking` feature gate
[#1212](https://github.com/fluxcd/helm-controller/pull/1212)
- Various dependency updates
[#1227](https://github.com/fluxcd/helm-controller/pull/1227)
[#1221](https://github.com/fluxcd/helm-controller/pull/1221)
[#1220](https://github.com/fluxcd/helm-controller/pull/1220)
[#1218](https://github.com/fluxcd/helm-controller/pull/1218)
[#1206](https://github.com/fluxcd/helm-controller/pull/1206)
[#1209](https://github.com/fluxcd/helm-controller/pull/1209)
[#1204](https://github.com/fluxcd/helm-controller/pull/1204)
## 1.2.0
**Release date:** 2025-02-19
This minor release comes with various bug fixes and improvements.
In addition, the Kubernetes dependencies have been updated to v1.32.1, Helm has
been updated to v3.17.1 and various other controller dependencies have been
updated to their latest version.
Fixes:
- Replace _ with + when verifying the chart version matches the OCI artifact tag
[#1102](https://github.com/fluxcd/helm-controller/pull/1102)
- fix: handle "leader changed" errors
[#1084](https://github.com/fluxcd/helm-controller/pull/1084)
- Make `ValuesReference` an alias for backwards compat
[#1126](https://github.com/fluxcd/helm-controller/pull/1126)
- Fix install and upgrade applying subchart CRDs when condition is false
[#1123](https://github.com/fluxcd/helm-controller/pull/1123)
- fix: use HelmRelease max history for rollback remediation
[#1169](https://github.com/fluxcd/helm-controller/pull/1169)
Improvements:
- Refactor values composition to use pkg/chartutil
[#1122](https://github.com/fluxcd/helm-controller/pull/1122)
- docs: Rendering the final Values locally
[#1127](https://github.com/fluxcd/helm-controller/pull/1127)
- Add disableTakeOwnership to Helm install/upgrade actions
[#1140](https://github.com/fluxcd/helm-controller/pull/1140)
- Various dependency updates
[#1103](https://github.com/fluxcd/helm-controller/pull/1103)
[#1121](https://github.com/fluxcd/helm-controller/pull/1121)
[#1129](https://github.com/fluxcd/helm-controller/pull/1129)
[#1142](https://github.com/fluxcd/helm-controller/pull/1142)
[#1160](https://github.com/fluxcd/helm-controller/pull/1160)
[#1158](https://github.com/fluxcd/helm-controller/pull/1158)
[#1165](https://github.com/fluxcd/helm-controller/pull/1165)
[#1168](https://github.com/fluxcd/helm-controller/pull/1168)
[#1171](https://github.com/fluxcd/helm-controller/pull/1171)
[#1167](https://github.com/fluxcd/helm-controller/pull/1167)
[#1173](https://github.com/fluxcd/helm-controller/pull/1173)
[#1170](https://github.com/fluxcd/helm-controller/pull/1170)
## 1.1.0
**Release date:** 2024-09-26
This minor release comes with various bug fixes and improvements.
The chart [values schema](https://helm.sh/docs/topics/charts/#schema-files)
validation can now be disabled for install and upgrade actions by setting
`disableSchemaValidation` under `.spec.install` and `.spec.upgrade` of a
`HelmRelease` object.
HelmReleases that result in failure during uninstall will now be retried until
the uninstall succeeds without any error. See [handling failed
uninstall](https://fluxcd.io/flux/components/helm/helmreleases/#handling-failed-uninstall)
docs for various remediations based on the cause of the failure.
helm-controller in [sharded
deployment](https://fluxcd.io/flux/installation/configuration/sharding/)
configuration now supports cross-shard dependency check. This allows a
HelmRelease to depend on other HelmReleases managed by different controller
shards.
In addition, the Kubernetes dependencies have been updated to v1.31.1, Helm has
been updated to v3.16.1 and various other controller dependencies have been
updated to their latest version. The controller is now built with Go 1.23.
Fixes:
- fix: remove digest check to never ignore helm uninstall errors
[#1024](https://github.com/fluxcd/helm-controller/pull/1024)
- Allow overwriting inline values with targetPath
[#1060](https://github.com/fluxcd/helm-controller/pull/1060)
- Fix incorrect use of format strings with the conditions package
[#1025](https://github.com/fluxcd/helm-controller/pull/1025)
- Re-enable logging json patch on StatusDrifted
[#1010](https://github.com/fluxcd/helm-controller/pull/1010)
- Ignore 'v' version prefix in OCI artifact and Helm chart
[#990](https://github.com/fluxcd/helm-controller/pull/990)
- doc: fix HelmRelease default value for .spec.upgrade.crds
[#986](https://github.com/fluxcd/helm-controller/pull/986)
Improvements:
- Allow cross-shard dependency check
[#1070](https://github.com/fluxcd/helm-controller/pull/1070)
- Add disableSchemaValidation to Helm install/upgrade actions
[#1068](https://github.com/fluxcd/helm-controller/pull/1068)
- Update Helm to v3.16.1 and enable the adoption of existing resources
[#1062](https://github.com/fluxcd/helm-controller/pull/1062)
- Build with Go 1.23
[#1049](https://github.com/fluxcd/helm-controller/pull/1049)
- Various dependency updates
[#987](https://github.com/fluxcd/helm-controller/pull/987)
[#991](https://github.com/fluxcd/helm-controller/pull/991)
[#994](https://github.com/fluxcd/helm-controller/pull/994)
[#1004](https://github.com/fluxcd/helm-controller/pull/1004)
[#1046](https://github.com/fluxcd/helm-controller/pull/1046)
[#1048](https://github.com/fluxcd/helm-controller/pull/1048)
[#1052](https://github.com/fluxcd/helm-controller/pull/1052)
[#1064](https://github.com/fluxcd/helm-controller/pull/1064)
[#1072](https://github.com/fluxcd/helm-controller/pull/1072)
[#1073](https://github.com/fluxcd/helm-controller/pull/1073)
## 1.0.1
**Release date:** 2024-05-10
This patch release fixes a backwards compatibility issue that could occur when trying
to move from the `v2beta1` to `v2` API while specifing `.spec.chartRef`.
Fixes:
- Fix: Allow upgrading from v2beta1 to v2 (GA)
[#982](https://github.com/fluxcd/helm-controller/pull/982)
- Fix: Make HelmChartTemplate a pointer in .spec.chart
[#980](https://github.com/fluxcd/helm-controller/pull/980)
## 1.0.0
**Release date:** 2024-05-08
This is the general availability release of helm-controller. From now on, this controller
follows the [Flux release cadence and support pledge](https://fluxcd.io/flux/releases/).
This release promotes the `HelmRelease` API from `v2beta2` to `v2` (GA), and
comes with new features, improvements and bug fixes.
In addition, the controller has been updated to Kubernetes v1.30.0,
Helm v3.14.4, and various other dependencies to their latest version
to patch upstream CVEs.
### Highlights
The `helm.toolkit.fluxcd.io/v2` API comes with a new field
[`.spec.chartRef`](https://github.com/fluxcd/helm-controller/blob/release-v1.0.0-rc.1/docs/spec/v2/helmreleases.md#chart-reference)
that adds support for referencing `OCIRepository` and `HelmChart` objects in a `HelmRelease`.
When using `.spec.chartRef` instead of `.spec.chart`, the controller allows the reuse
of a Helm chart version across multiple `HelmRelease` resources.
The notification mechanism has been improved to provide more detailed metadata
in the notification payload. The controller now annotates the Kubernetes events with
the `appVersion` and `version` of the Helm chart, and the `oci digest` of the
chart artifact when available.
### Helm OCI support
Starting with this version, the recommended way of referencing Helm charts stored
in container registries is through [OCIRepository](https://fluxcd.io/flux/components/source/ocirepositories/).
The `OCIRepository` provides more flexibility in managing Helm charts,
as it allows targeting a Helm chart version by `tag`, `semver` or OCI `digest`.
It also provides a way to
[filter semver tags](https://github.com/fluxcd/source-controller/blob/release/v1.3.x/docs/spec/v1beta2/ocirepositories.md#semverfilter-example),
allowing targeting a specific version range e.g. pre-releases only, patch versions, etc.
Using `OCIRepository` objects instead of `HelmRepository` and `HelmChart` objects
improves the controller's performance and simplifies the debugging process.
If a chart version gets overwritten in the container registry, the controller
will detect the change in the upstream OCI digest and reconcile the `HelmRelease`
resources accordingly.
[Promoting](https://fluxcd.io/flux/use-cases/gh-actions-helm-promotion/)
a Helm chart version to production can be done by pinning the `OCIRepository`
to an immutable digest, ensuring that the chart version is not changed unintentionally.
Helm OCI example:
```yaml
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
name: podinfo
namespace: default
spec:
interval: 10m
layerSelector:
mediaType: "application/vnd.cncf.helm.chart.content.v1.tar+gzip"
operation: copy
url: oci://ghcr.io/stefanprodan/charts/podinfo
ref:
semver: "*"
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: podinfo
namespace: default
spec:
interval: 10m
chartRef:
kind: OCIRepository
name: podinfo
```
#### API changes
The `helm.toolkit.fluxcd.io` CRD contains the following versions:
- v2 (storage version)
- v2beta2 (deprecated)
- v2beta1 (deprecated)
New optional fields have been added to the `HelmRelease` API:
- `.spec.chartRef` allows referencing chart artifacts from `OCIRepository` and `HelmChart` objects.
- `.spec.chart.spec.ignoreMissingValuesFiles` allows ignoring missing values files instead of failing to reconcile.
Deprecated fields have been removed from the `HelmRelease` API:
- `.spec.chart.spec.valuesFile` replaced by `.spec.chart.spec.valuesFiles`
- `.spec.postRenderers.kustomize.patchesJson6902` replaced by `.spec.postRenderers.kustomize.patches`
- `.spec.postRenderers.kustomize.patchesStrategicMerge` replaced by `.spec.postRenderers.kustomize.patches`
- `.status.lastAppliedRevision` replaced by `.status.history.chartVersion`
#### Upgrade procedure
1. Before upgrading the controller, ensure that the `HelmRelease` v2beta2 manifests stored in Git
are not using the deprecated fields. Search for `valuesFile` and replace it with `valuesFiles`,
replace `patchesJson6902` and `patchesStrategicMerge` with `patches`.
Commit and push the changes to the Git repository, then wait for Flux to reconcile the changes.
2. Upgrade the controller and CRDs to v1.0.0 on the cluster using Flux v2.3 release.
Note that helm-controller v1.0.0 requires source-controller v1.3.0.
3. Update the `apiVersion` field of the `HelmRelease` resources to `helm.toolkit.fluxcd.io/v2`,
commit and push the changes to the Git repository.
Bumping the API version in manifests can be done gradually.
It is advised to not delay this procedure as the beta versions will be removed after 6 months.
### Full changelog
Improvements:
- Add the chart app version to status and events metadata
[#968](https://github.com/fluxcd/helm-controller/pull/968)
- Promote HelmRelease API to v2 (GA)
[#963](https://github.com/fluxcd/helm-controller/pull/963)
- Add `.spec.ignoreMissingValuesFiles` to HelmChartTemplate API
[#942](https://github.com/fluxcd/helm-controller/pull/942)
- Update HelmChart API to v1 (GA)
[#962](https://github.com/fluxcd/helm-controller/pull/962)
- Update dependencies to Kubernetes 1.30.0
[#944](https://github.com/fluxcd/helm-controller/pull/944)
- Add support for HelmChart to `.spec.chartRef`
[#945](https://github.com/fluxcd/helm-controller/pull/945)
- Add support for OCIRepository to `.spec.chartRef`
[#905](https://github.com/fluxcd/helm-controller/pull/905)
- Update dependencies to Kustomize v5.4.0
[#932](https://github.com/fluxcd/helm-controller/pull/932)
- Add notation verification provider to API
[#930](https://github.com/fluxcd/helm-controller/pull/930)
- Update controller to Helm v3.14.3 and Kubernetes v1.29.0
[#879](https://github.com/fluxcd/helm-controller/pull/879)
- Update controller-gen to v0.14.0
[#910](https://github.com/fluxcd/helm-controller/pull/910)
Fixes:
- Track changes in `.spec.postRenderers`
[#965](https://github.com/fluxcd/helm-controller/pull/965)
- Update Ready condition during drift correction
[#885](https://github.com/fluxcd/helm-controller/pull/885)
- Fix patching on drift detection
[#935](https://github.com/fluxcd/helm-controller/pull/935)
- Use corev1 event type for sending events
[#908](https://github.com/fluxcd/helm-controller/pull/908)
- Reintroduce missing events for helmChart reconciliation failures
[#907](https://github.com/fluxcd/helm-controller/pull/907)
- Remove `genclient:Namespaced` tag
[#901](https://github.com/fluxcd/helm-controller/pull/901)
## 0.37.4
**Release date:** 2024-02-05
This prerelease comes with improvements in the HelmRelease status reporting.
After recovering from a reconciliation failure, sometimes the status may show
stale conditions which could be misleading. This has been fixed by ensuring that
the stale failure conditions get updated after failure recovery.
Improvements:
- Remove stale Ready=False conditions value to show more accurate status
[#884](https://github.com/fluxcd/helm-controller/pull/884)
- Dependency update
[#886](https://github.com/fluxcd/helm-controller/pull/886)
## 0.37.3
**Release date:** 2024-02-01
This prerelease comes with an update to the Kubernetes dependencies to
v1.28.6 and various other dependencies have been updated to their latest version
to patch upstream CVEs.
In addition, the controller is now built with Go 1.21.
Improvements:
- ci: Enable dependabot gomod updates
[#874](https://github.com/fluxcd/helm-controller/pull/874)
- Update Go to 1.21
[#872](https://github.com/fluxcd/helm-controller/pull/872)
- Various dependency updates
[#882](https://github.com/fluxcd/helm-controller/pull/882)
[#877](https://github.com/fluxcd/helm-controller/pull/877)
[#876](https://github.com/fluxcd/helm-controller/pull/876)
[#871](https://github.com/fluxcd/helm-controller/pull/871)
[#867](https://github.com/fluxcd/helm-controller/pull/867)
[#865](https://github.com/fluxcd/helm-controller/pull/865)
[#862](https://github.com/fluxcd/helm-controller/pull/862)
[#860](https://github.com/fluxcd/helm-controller/pull/860)
## 0.37.2
This prerelease fixes a bug that resulted in the controller not being able to
properly watch HelmRelease resources with specific labels.
Fixes:
- Properly configure namespace selector
[#858](https://github.com/fluxcd/helm-controller/pull/858)
Improvements:
- build(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0
[#856](https://github.com/fluxcd/helm-controller/pull/856)
## 0.37.1
This prerelease fixes a backwards compatibility issue that could occur when
trying to move from the `v2beta1` to `v2beta2` API while enabling drift
detection.
In addition, logging has been improved to provide faster feedback on any
HTTP errors encountered while fetching HelmChart artifacts, and the controller
will now set the `Stalled` condition as soon as it detects to be out of retries
without having to wait for the next reconciliation.
Lastly, Helm has been updated to v3.13.3.
Fixes:
- loader: allow overwrite of URL hostname again
[#844](https://github.com/fluxcd/helm-controller/pull/844)
- api: ensure backwards compatibility v2beta1
[#851](https://github.com/fluxcd/helm-controller/pull/851)
Improvements:
- loader: log HTTP errors to provide faster feedback
[#845](https://github.com/fluxcd/helm-controller/pull/845)
- Update runtime to v0.43.3
[#846](https://github.com/fluxcd/helm-controller/pull/846)
- Early stall condition detection after remediation
[#848](https://github.com/fluxcd/helm-controller/pull/848)
- Update Helm to v3.13.3
[#849](https://github.com/fluxcd/helm-controller/pull/849)
## 0.37.0
**Release date:** 2023-12-12
This prerelease promotes the `HelmRelease` API from `v2beta1` to `v2beta2`.
The promotion of the API is accompanied by a number of new features and bug
fixes. Refer to the highlights section below for more information.
In addition to the API promotion, this prerelease updates the controller
dependencies to their latest versions. Making the controller compatible with
Kubernetes v1.28.x, while updating the Helm library to v3.13.2, and the builtin
version of Kustomize used for post-rendering to v5.3.0.
Lastly, the base controller image has been updated to Alpine v3.19.
### Highlights
#### API changes
The upgrade is backwards compatible, and the controller will continue to
reconcile `HelmRelease` resources of the `v2beta1` API without requiring any
changes. However, making use of the new features requires upgrading the API
version.
- Drift detection and correction is now enabled on a per-release basis using
the `.spec.driftDetection.mode` field. Refer to the [drift detection section](https://github.com/fluxcd/helm-controller/blob/v0.37.0/docs/spec/v2beta2/helmreleases.md#drift-detection)
in the `v2beta2` specification for more information.
- Ignoring specific fields during drift detection and correction is now
supported using the `.spec.driftDetection.ignore` field. Refer to the
[ignore rules section](https://github.com/fluxcd/helm-controller/blob/v0.37.0/docs/spec/v2beta2/helmreleases.md#ignore-rules)
in the `v2beta2` specification to learn more.
- Helm tests can now be selectively run using the `.spec.test.filters` field.
Refer to the [test filters section](https://github.com/fluxcd/helm-controller/blob/v0.37.0/docs/spec/v2beta2/helmreleases.md#filtering-tests)
in the `v2beta2` specification for more details.
- The controller now offers proper integration with [`kstatus`](https://github.com/kubernetes-sigs/cli-utils/blob/master/pkg/kstatus/README.md)
and sets `Reconciling` and `Stalled` conditions. See the [Conditions section](https://github.com/fluxcd/helm-controller/blob/v0.37.0/docs/spec/v2beta2/helmreleases.md#conditions)
in the `v2beta2` specification to read more about the conditions.
- The `.spec.maxHistory` default value has been lowered from `10` to `5` to
increase the controller's performance.
- A history of metadata from Helm releases up to the previous successful release
is now available in the `.status.history` field. This includes any Helm test
results when enabled.
- The `.patchesStrategicMerge` and `.patchesJson6902` Kustomize post-rendering
fields have been deprecated in favor of `.patches`.
- A `status.lastAttemptedConfigDigest` field has been introduced to track the
last attempted configuration digest using a hash of the composed values.
- A `.status.lastAttemptedReleaseAction` field has been introduced to accurately
determine the active remediation strategy.
- The `.status.lastHandledForceAt` and `.status.lastHandledResetAt` fields have
been introduced to track the last time a force upgrade or reset was handled.
This to accomadate newly introduced annotations to force upgrades and resets.
- The `.status.lastAppliedRevision` and `.status.lastReleaseRevision` fields
have been deprecated in favor of `.status.history`.
- The `.status.lastAttemptedValuesChecksum` has been deprecated in favor of
`.status.lastAttemptedConfigDigest`.
Although the `v2beta1` API is still supported, it is recommended to upgrade to
the `v2beta2` API as soon as possible. The `v2beta1` API will be removed after
6 months.
To upgrade to the `v2beta2` API, update the `apiVersion` field of your
`HelmRelease` resources to `helm.toolkit.fluxcd.io/v2beta2` after updating the
controller and Custom Resource Definitions.
#### Other notable improvements
- The reconciliation model of the controller has been improved to be able to
better determine the state a Helm release is in. An example of this is that
enabling Helm tests will not require a Helm upgrade to be run, but instead
will run immediately if the release is in a `deployed` state already.
- The controller will detect Helm releases in a `pending-install`, `pending-upgrade`
or `pending-rollback` state, and wil forcefully unlock the release (to a
`failed` state) to allow the controller to reattempt the release.
- When drift correction is enabled, the controller will now attempt to correct
drift it detects by creating and patching Kubernetes resources instead of
running a Helm upgrade.
- The controller emits more detailed Kubernetes Events after running a Helm
action. In addition, the controller will now emit a Kubernetes Event when
a Helm release is uninstalled.
- The controller provides richer Condition messages before and after running a
Helm action.
- Changes to a HelmRelease `.spec` which require a Helm uninstall for the
changes to be successfully applied are now detected. For example, a change in
`.spec.targetNamespace` or `.spec.releaseName`.
- When the release name exceeds the maximum length of 53 characters, the
controller will now truncate the release name to 40 characters and append a
short SHA256 hash of the release name prefixed with a `-` to ensure the
release name is unique.
- New annotations have been introduced to force a Helm upgrade or to reset the
number of retries for a release. Refer to the [forcing a release](https://github.com/fluxcd/helm-controller/blob/v0.37.0/docs/spec/v2beta2/helmreleases.md#forcing-a-release)
and [resetting remediation retries](https://github.com/fluxcd/helm-controller/blob/v0.37.0/docs/spec/v2beta2/helmreleases.md#resetting-remediation-retries)
sections in the `v2beta2` specification for more information.
- The digest algorithm used to calculate the digest of the composed values and
hash of the release object can now be configured using the `--snapshot-digest-algo`
controller flag. The default value is `sha256`.
- When the `HelmChart` resource for a `HelmRelease` is not `Ready`, the
Conditions of the `HelmRelease` will now contain more detailed information
about the reason.
To get a full overview of all changes, and see examples of the new features.
Please refer to the [v2beta2 specification](https://github.com/fluxcd/helm-controller/blob/v0.37.0/docs/spec/v2beta2/helmreleases.md).
### Full changelog
Improvements:
- Update dependencies
[#791](https://github.com/fluxcd/helm-controller/pull/791)
[#792](https://github.com/fluxcd/helm-controller/pull/792)
[#799](https://github.com/fluxcd/helm-controller/pull/799)
[#812](https://github.com/fluxcd/helm-controller/pull/812)
- Update source-controller dependency to v1.2.1
[#793](https://github.com/fluxcd/helm-controller/pull/793)
[#835](https://github.com/fluxcd/helm-controller/pull/835)
- Rework `HelmRelease` reconciliation logic
[#738](https://github.com/fluxcd/helm-controller/pull/738)
[#816](https://github.com/fluxcd/helm-controller/pull/816)
[#825](https://github.com/fluxcd/helm-controller/pull/825)
[#829](https://github.com/fluxcd/helm-controller/pull/829)
[#830](https://github.com/fluxcd/helm-controller/pull/830)
[#833](https://github.com/fluxcd/helm-controller/pull/833)
[#836](https://github.com/fluxcd/helm-controller/pull/836)
- Update Kubernetes 1.28.x, Helm v3.13.2 and Kustomize v5.3.0
[#817](https://github.com/fluxcd/helm-controller/pull/817)
[#839](https://github.com/fluxcd/helm-controller/pull/839)
- Allow configuration of drift detection on `HelmRelease`
[#815](https://github.com/fluxcd/helm-controller/pull/815)
- Allow configuration of snapshot digest algorithm
[#818](https://github.com/fluxcd/helm-controller/pull/818)
- Remove obsolete code and tidy things
[#819](https://github.com/fluxcd/helm-controller/pull/819)
- Add deprecation warning to v2beta1 API
[#821](https://github.com/fluxcd/helm-controller/pull/821)
- Correct cluster drift using patches
[#822](https://github.com/fluxcd/helm-controller/pull/822)
- Introduce `forceAt` and `resetAt` annotations
[#823](https://github.com/fluxcd/helm-controller/pull/823)
- doc/spec: document `v2beta2` API
[#828](https://github.com/fluxcd/helm-controller/pull/828)
- api: deprecate stategic merge and JSON 6902 patches
[#832](https://github.com/fluxcd/helm-controller/pull/832)
- controller: enrich "HelmChart not ready" messages
[#834](https://github.com/fluxcd/helm-controller/pull/834)
- build: update Alpine to 3.19
[#838](https://github.com/fluxcd/helm-controller/pull/838)
## 0.36.2
**Release date:** 2023-10-11
This prerelease contains an improvement to retry the reconciliation of a
`HelmRelease` as soon as the chart is available in storage, instead of waiting
for the next reconciliation interval. Which is particularly useful when the
source-controller has just been upgraded.
In addition, it fixes a bug in which the controller would not properly label
Custom Resource Definitions.
Fixes:
- runner: ensure CRDs are properly labeled
[#781](https://github.com/fluxcd/helm-controller/pull/781)
- fix: retry failed releases when charts are available in storage
[#785](https://github.com/fluxcd/helm-controller/pull/785)
Improvements:
- Address typo in documentation
[#777](https://github.com/fluxcd/helm-controller/pull/777)
- Update CI dependencies
[#783](https://github.com/fluxcd/helm-controller/pull/783)
[#786](https://github.com/fluxcd/helm-controller/pull/786)
- Address miscellaneous issues throughout code base
[#788](https://github.com/fluxcd/helm-controller/pull/788)
## 0.36.1
**Release date:** 2023-09-18
This prerelease addresses a regression in which the captured Helm logs used in
a failure event would not include Helm's Kubernetes client logs, making it more
difficult to reason about e.g. timeout errors.
In addition, it contains a fix for the default service account used for the
(experimental) differ, and dependency updates of several dependencies.
Fixes:
- runner: address regression in captured Helm logs
[#767](https://github.com/fluxcd/helm-controller/pull/767)
- Check source for nil artifact before loading chart
[#768](https://github.com/fluxcd/helm-controller/pull/768)
- controller: use `DefaultServiceAccount` in differ
[#774](https://github.com/fluxcd/helm-controller/pull/774)
Improvements:
- build(deps): bump the ci group dependencies
[#761](https://github.com/fluxcd/helm-controller/pull/761)
[#762](https://github.com/fluxcd/helm-controller/pull/762)
[#766](https://github.com/fluxcd/helm-controller/pull/766)
[#773](https://github.com/fluxcd/helm-controller/pull/773)
- build(deps): bump github.com/cyphar/filepath-securejoin from 0.2.3 to 0.2.4
[#764](https://github.com/fluxcd/helm-controller/pull/764)
- Update source-controller to v1.1.1
[#775](https://github.com/fluxcd/helm-controller/pull/775)
## 0.36.0
**Release date:** 2023-08-23
This prerelease introduces a `--interval-jitter-percentage` flag to the
controller to distribute the load more evenly when multiple objects are set up
with the same interval. The default of this flag is set to `5`, which means
that the interval will be jittered by a +/- 5% random value (e.g. if the
interval is 10 minutes, the actual reconciliation interval will be between 9.5
and 10.5 minutes).
In addition, the controller now stops exporting an object's metrics as soon as
it has been deleted.
Lastly, dependencies have been updated, such as an update of Helm to `v3.12.3`
and Kubernetes related dependencies to `v0.27.4`.
Improvements:
- Update dependencies
[#748](https://github.com/fluxcd/helm-controller/pull/748)
- controller: jitter requeue interval
[#751](https://github.com/fluxcd/helm-controller/pull/751)
- Delete stale metrics on delete
[#753](https://github.com/fluxcd/helm-controller/pull/753)
- Update Helm to v3.12.3
[#754](https://github.com/fluxcd/helm-controller/pull/754)
- Update Source API to v1.1.0
[#758](https://github.com/fluxcd/helm-controller/pull/758)
Fixes:
- chore: fix typo reconciliation
[#736](https://github.com/fluxcd/helm-controller/pull/736)
## 0.35.0
**Release date:** 2023-07-04
This prerelease adds support for configuring the deletion propagation policy to
use when a Helm uninstall is performed using `.spec.uninstall.deletionPropagation`,
which was [added as a feature to Helm in `v3.12.0`](https://github.com/helm/helm/releases/tag/v3.12.0).
Supported values are `background`, `foreground` and `orphan` (defaults to
`background`). See the [Helm documentation](https://helm.sh/docs/chart_best_practices/deleting/#deletion-propagation)
In addition, it offers support for Kubernetes `v1.27.3` and includes updates to
the controller's dependencies, such as an upgrade of Helm to `v3.12.1`.
Starting with this version, the build, release and provenance portions of the
Flux project supply chain [provisionally meet SLSA Build Level 3](https://fluxcd.io/flux/security/slsa-assessment/).
Improvements:
- Set deletion propagation for helm uninstall
[#698](https://github.com/fluxcd/helm-controller/pull/698)
- Align `go.mod` version with Kubernetes (Go 1.20)
[#715](https://github.com/fluxcd/helm-controller/pull/715)
- Update Go dependencies
[#726](https://github.com/fluxcd/helm-controller/pull/726)
- Update source-controller to v1.0.0
[#729](https://github.com/fluxcd/helm-controller/pull/729)
## 0.34.2
**Release date:** 2023-06-22
This prerelease fixes a regression bug for long-running reconciliations introduced
in v0.34.0.
In addition, the controller release workflow was enhanced with SLSA level 3 generators.
Starting with this version, provenance attestations are generated for
the controller release assets and for the multi-arch container images.
Fixes:
- Fix HelmRelease reconciliation loop
[#703](https://github.com/fluxcd/helm-controller/pull/703)
Improvements:
- Add SLSA3 generators to release workflow
[#705](https://github.com/fluxcd/helm-controller/pull/705)
## 0.34.1
**Release date:** 2023-06-01
This prerelease comes with a bug fix for the event metadata revision, which
was not included when a token was already present.
In addition, the source-controller dependency has been updated to v1.0.0-rc.5.
Fixes:
- Include revision and token in event metadata
[#695](https://github.com/fluxcd/helm-controller/pull/695)
Improvements:
- Update source-controller to v1.0.0-rc.5
[#696](https://github.com/fluxcd/helm-controller/pull/696)
## 0.34.0
**Release date:** 2023-05-29

View File

@ -24,7 +24,7 @@ If any of the above dependencies are not present on your system, the first invoc
## How to run the test suite
Prerequisites:
* Go >= 1.18
* Go >= 1.24
You can run the test suite by simply doing

View File

@ -1,10 +1,10 @@
ARG GO_VERSION=1.20
ARG XX_VERSION=1.2.1
ARG GO_VERSION=1.24
ARG XX_VERSION=1.6.1
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
# Docker buildkit multi-arch build requires golang alpine
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine as builder
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder
# Copy the build utilities.
COPY --from=xx / /
@ -31,7 +31,7 @@ COPY internal/ internal/
ENV CGO_ENABLED=0
RUN xx-go build -trimpath -a -o helm-controller main.go
FROM alpine:3.18
FROM alpine:3.21
RUN apk add --no-cache ca-certificates \
&& update-ca-certificates

View File

@ -27,15 +27,26 @@ BUILD_PLATFORMS ?= linux/amd64
# Architecture to use envtest with
ENVTEST_ARCH ?= amd64
# Paths to download the CRD dependency to.
CRD_DEP_ROOT ?= $(BUILD_DIR)/config/crd/bases
# Keep a record of the version of the downloaded source CRDs. It is used to
# detect and download new CRDs when the SOURCE_VER changes.
SOURCE_VER ?= $(shell go list -m all | grep github.com/fluxcd/source-controller/api | awk '{print $$2}')
SOURCE_CRD_VER = $(CRD_DEP_ROOT)/.src-crd-$(SOURCE_VER)
# HelmChart source CRD.
HELMCHART_SOURCE_CRD ?= $(CRD_DEP_ROOT)/source.toolkit.fluxcd.io_helmcharts.yaml
# API (doc) generation utilities
CONTROLLER_GEN_VERSION ?= v0.12.0
CONTROLLER_GEN_VERSION ?= v0.16.1
GEN_API_REF_DOCS_VERSION ?= e327d0730470cbd61b06300f81c5fcf91c23c113
all: manager
# Run tests
KUBEBUILDER_ASSETS?="$(shell $(ENVTEST) --arch=$(ENVTEST_ARCH) use -i $(ENVTEST_KUBERNETES_VERSION) --bin-dir=$(ENVTEST_ASSETS_DIR) -p path)"
test: tidy generate fmt vet manifests api-docs install-envtest
test: tidy generate fmt vet manifests api-docs install-envtest download-crd-deps
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./... -coverprofile cover.out
cd api; go test ./... -coverprofile cover.out
@ -81,12 +92,12 @@ manifests: controller-gen
# Generate API reference documentation
api-docs: gen-crd-api-reference-docs
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir=./api/v2beta1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/helmrelease.md
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir=./api/v2 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/v2/helm.md
# Run go mod tidy
tidy:
cd api; rm -f go.sum; go mod tidy -compat=1.20
rm -f go.sum; go mod tidy -compat=1.20
cd api; rm -f go.sum; go mod tidy -compat=1.23
rm -f go.sum; go mod tidy -compat=1.23
# Run go fmt against code
fmt:
@ -113,6 +124,24 @@ docker-build:
docker-push:
docker push ${IMG}
# Delete previously downloaded CRDs and record the new version of the source
# CRDs.
$(SOURCE_CRD_VER):
rm -f $(CRD_DEP_ROOT)/.src-crd*
mkdir -p $(CRD_DEP_ROOT)
$(MAKE) cleanup-crd-deps
touch $(SOURCE_CRD_VER)
$(HELMCHART_SOURCE_CRD):
curl -s https://raw.githubusercontent.com/fluxcd/source-controller/${SOURCE_VER}/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml > $(HELMCHART_SOURCE_CRD)
# Download the CRDs the controller depends on
download-crd-deps: $(SOURCE_CRD_VER) $(HELMCHART_SOURCE_CRD)
# Delete the downloaded CRD dependencies.
cleanup-crd-deps:
rm -f $(HELMCHART_SOURCE_CRD)
# Find or download controller-gen
CONTROLLER_GEN = $(GOBIN)/controller-gen
.PHONY: controller-gen

View File

@ -4,4 +4,11 @@ resources:
- group: helm
kind: HelmRelease
version: v2beta1
- group: helm
kind: HelmRelease
version: v2beta2
- group: helm
kind: HelmRelease
version: v2
storageVersion: v2
version: "2"

View File

@ -24,7 +24,7 @@ operator.
* Supports `HelmChart` artifacts produced from `HelmRepository`,
`GitRepository` and `Bucket` sources
* Fetches artifacts produced by [source-controller][] from `HelmChart`
objects
and `OCIRepository` objects
* Watches `HelmChart` objects for revision changes (including semver
ranges for charts from `HelmRepository` sources)
* Performs automated Helm actions, including Helm tests, rollbacks and
@ -38,16 +38,18 @@ operator.
[notification-controller][])
* Built-in Kustomize compatible Helm post renderer, providing support
for strategic merge, JSON 6902 and images patches
* Supports detecting and correcting in-cluster changes compared to the desired
state of the Helm release
## Guides
* [Get started with GitOps Toolkit](https://fluxcd.io/flux/get-started/)
* [Get started with Flux](https://fluxcd.io/flux/get-started/)
* [Manage Helm Releases](https://fluxcd.io/flux/guides/helmreleases/)
* [Setup Notifications](https://fluxcd.io/flux/guides/notifications/)
## Specifications
* [API](docs/spec/v2beta1/README.md)
* [API](docs/spec/v2/README.md)
* [Controller](docs/spec/README.md)
[source-controller]: https://github.com/fluxcd/source-controller

View File

@ -1,31 +1,33 @@
module github.com/fluxcd/helm-controller/api
go 1.18
go 1.24.0
require (
github.com/fluxcd/pkg/apis/kustomize v1.1.0
github.com/fluxcd/pkg/apis/meta v1.1.0
k8s.io/apiextensions-apiserver v0.27.2
k8s.io/apimachinery v0.27.2
sigs.k8s.io/controller-runtime v0.15.0
github.com/fluxcd/pkg/apis/kustomize v1.11.0
github.com/fluxcd/pkg/apis/meta v1.18.0
k8s.io/apiextensions-apiserver v0.33.2
k8s.io/apimachinery v0.33.2
sigs.k8s.io/controller-runtime v0.21.0
sigs.k8s.io/yaml v1.5.0
)
require (
github.com/go-logr/logr v1.2.4 // indirect
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/text v0.9.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
golang.org/x/net v0.41.0 // indirect
golang.org/x/text v0.27.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
)

View File

@ -2,30 +2,30 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fluxcd/pkg/apis/kustomize v1.1.0 h1:Fbv4dCB57r2+fiusozN7at8r7upTz58Z4wWw1njHPyU=
github.com/fluxcd/pkg/apis/kustomize v1.1.0/go.mod h1:CAe9Mjf9KVoTm1V4wpvq/FGXFDSnpBwfww/IG7mw3gM=
github.com/fluxcd/pkg/apis/meta v1.1.0 h1:vYU1mvUzztnQyTzZOLHQ3wm/tXd7E1QZ2V91zuVJPsQ=
github.com/fluxcd/pkg/apis/meta v1.1.0/go.mod h1:/QwCotRKL/BT6RSa4O75FlYW14fU8eRfKnoagzbkmL4=
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/fluxcd/pkg/apis/kustomize v1.11.0 h1:0IzDgxZkc4v+5SDNCvgZhfwfkdkQLPXCner7TNaJFWE=
github.com/fluxcd/pkg/apis/kustomize v1.11.0/go.mod h1:j302mJGDww8cn9qvMsRQ0LJ1HPAPs/IlX7CSsoJV7BI=
github.com/fluxcd/pkg/apis/meta v1.18.0 h1:ACHrMIjlcioE9GKS7NGk62KX4NshqNewr8sBwMcXABs=
github.com/fluxcd/pkg/apis/meta v1.18.0/go.mod h1:97l3hTwBpJbXBY+wetNbqrUsvES8B1jGioKcBUxmqd8=
github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU=
github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo=
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@ -33,20 +33,30 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q=
github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU=
github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg=
github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
github.com/onsi/gomega v1.36.1 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw=
github.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE=
go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@ -56,24 +66,26 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@ -83,23 +95,27 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
k8s.io/api v0.27.2 h1:+H17AJpUMvl+clT+BPnKf0E3ksMAzoBBg7CntpSuADo=
k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo=
k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ=
k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg=
k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E=
k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw=
k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY=
k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU=
sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk=
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/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=
sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.33.2 h1:YgwIS5jKfA+BZg//OQhkJNIfie/kmRsO0BmNaVSimvY=
k8s.io/api v0.33.2/go.mod h1:fhrbphQJSM2cXzCWgqU29xLDuks4mu7ti9vveEnpSXs=
k8s.io/apiextensions-apiserver v0.33.2 h1:6gnkIbngnaUflR3XwE1mCefN3YS8yTD631JXQhsU6M8=
k8s.io/apiextensions-apiserver v0.33.2/go.mod h1:IvVanieYsEHJImTKXGP6XCOjTwv2LUMos0YWc9O+QP8=
k8s.io/apimachinery v0.33.2 h1:IHFVhqg59mb8PJWTLi8m1mAoepkUNYmptHsV+Z1m5jY=
k8s.io/apimachinery v0.33.2/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e h1:KqK5c/ghOm8xkHYhlodbp6i6+r+ChV2vuAuVRdFbLro=
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 h1:qPeWmscJcXP0snki5IYF79Z8xrl8ETFxgMd7wez1XkI=
sigs.k8s.io/structured-merge-diff/v4 v4.7.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ=
sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4=

57
api/v2/annotations.go Normal file
View File

@ -0,0 +1,57 @@
/*
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2
import "github.com/fluxcd/pkg/apis/meta"
const (
// ForceRequestAnnotation is the annotation used for triggering a one-off forced
// Helm release, even when there are no new changes in the HelmRelease.
// The value is interpreted as a token, and must equal the value of
// meta.ReconcileRequestAnnotation in order to trigger a release.
ForceRequestAnnotation string = meta.ForceRequestAnnotation
// ResetRequestAnnotation is the annotation used for resetting the failure counts
// of a HelmRelease, so that it can be retried again.
// The value is interpreted as a token, and must equal the value of
// meta.ReconcileRequestAnnotation in order to reset the failure counts.
ResetRequestAnnotation string = "reconcile.fluxcd.io/resetAt"
)
// ShouldHandleResetRequest returns true if the HelmRelease has a reset request
// annotation, and the value of the annotation matches the value of the
// meta.ReconcileRequestAnnotation annotation.
//
// To ensure that the reset request is handled only once, the value of
// HelmReleaseStatus.LastHandledResetAt is updated to match the value of the
// reset request annotation (even if the reset request is not handled because
// the value of the meta.ReconcileRequestAnnotation annotation does not match).
func ShouldHandleResetRequest(obj *HelmRelease) bool {
return meta.HandleAnnotationRequest(obj, ResetRequestAnnotation, &obj.Status.LastHandledResetAt)
}
// ShouldHandleForceRequest returns true if the HelmRelease has a force request
// annotation, and the value of the annotation matches the value of the
// meta.ReconcileRequestAnnotation annotation.
//
// To ensure that the force request is handled only once, the value of
// HelmReleaseStatus.LastHandledForceAt is updated to match the value of the
// force request annotation (even if the force request is not handled because
// the value of the meta.ReconcileRequestAnnotation annotation does not match).
func ShouldHandleForceRequest(obj *HelmRelease) bool {
return meta.ShouldHandleForceRequest(obj)
}

View File

@ -0,0 +1,50 @@
/*
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2
import (
"testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/fluxcd/pkg/apis/meta"
)
func TestShouldHandleResetRequest(t *testing.T) {
obj := &HelmRelease{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
meta.ReconcileRequestAnnotation: "b",
ResetRequestAnnotation: "b",
},
},
Status: HelmReleaseStatus{
LastHandledResetAt: "a",
ReconcileRequestStatus: meta.ReconcileRequestStatus{
LastHandledReconcileAt: "a",
},
},
}
if !ShouldHandleResetRequest(obj) {
t.Error("ShouldHandleResetRequest() = false")
}
if obj.Status.LastHandledResetAt != "b" {
t.Error("ShouldHandleResetRequest did not update LastHandledResetAt")
}
}

82
api/v2/condition_types.go Normal file
View File

@ -0,0 +1,82 @@
/*
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2
const (
// ReleasedCondition represents the status of the last release attempt
// (install/upgrade/test) against the latest desired state.
ReleasedCondition string = "Released"
// TestSuccessCondition represents the status of the last test attempt against
// the latest desired state.
TestSuccessCondition string = "TestSuccess"
// RemediatedCondition represents the status of the last remediation attempt
// (uninstall/rollback) due to a failure of the last release attempt against the
// latest desired state.
RemediatedCondition string = "Remediated"
)
const (
// InstallSucceededReason represents the fact that the Helm install for the
// HelmRelease succeeded.
InstallSucceededReason string = "InstallSucceeded"
// InstallFailedReason represents the fact that the Helm install for the
// HelmRelease failed.
InstallFailedReason string = "InstallFailed"
// UpgradeSucceededReason represents the fact that the Helm upgrade for the
// HelmRelease succeeded.
UpgradeSucceededReason string = "UpgradeSucceeded"
// UpgradeFailedReason represents the fact that the Helm upgrade for the
// HelmRelease failed.
UpgradeFailedReason string = "UpgradeFailed"
// TestSucceededReason represents the fact that the Helm tests for the
// HelmRelease succeeded.
TestSucceededReason string = "TestSucceeded"
// TestFailedReason represents the fact that the Helm tests for the HelmRelease
// failed.
TestFailedReason string = "TestFailed"
// RollbackSucceededReason represents the fact that the Helm rollback for the
// HelmRelease succeeded.
RollbackSucceededReason string = "RollbackSucceeded"
// RollbackFailedReason represents the fact that the Helm test for the
// HelmRelease failed.
RollbackFailedReason string = "RollbackFailed"
// UninstallSucceededReason represents the fact that the Helm uninstall for the
// HelmRelease succeeded.
UninstallSucceededReason string = "UninstallSucceeded"
// UninstallFailedReason represents the fact that the Helm uninstall for the
// HelmRelease failed.
UninstallFailedReason string = "UninstallFailed"
// ArtifactFailedReason represents the fact that the artifact download for the
// HelmRelease failed.
ArtifactFailedReason string = "ArtifactFailed"
// DependencyNotReadyReason represents the fact that
// one of the dependencies is not ready.
DependencyNotReadyReason string = "DependencyNotReady"
)

20
api/v2/doc.go Normal file
View File

@ -0,0 +1,20 @@
/*
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v2 contains API Schema definitions for the helm v2 API group
// +kubebuilder:object:generate=true
// +groupName=helm.toolkit.fluxcd.io
package v2

View File

@ -0,0 +1,33 @@
/*
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2
import (
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)
var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "helm.toolkit.fluxcd.io", Version: "v2"}
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)

1330
api/v2/helmrelease_types.go Normal file

File diff suppressed because it is too large Load Diff

90
api/v2/reference_types.go Normal file
View File

@ -0,0 +1,90 @@
/*
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2
// CrossNamespaceObjectReference contains enough information to let you locate
// the typed referenced object at cluster level.
type CrossNamespaceObjectReference struct {
// APIVersion of the referent.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Kind of the referent.
// +kubebuilder:validation:Enum=HelmRepository;GitRepository;Bucket
// +required
Kind string `json:"kind,omitempty"`
// Name of the referent.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +required
Name string `json:"name"`
// Namespace of the referent.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Optional
// +optional
Namespace string `json:"namespace,omitempty"`
}
// CrossNamespaceSourceReference contains enough information to let you locate
// the typed referenced object at cluster level.
type CrossNamespaceSourceReference struct {
// APIVersion of the referent.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Kind of the referent.
// +kubebuilder:validation:Enum=OCIRepository;HelmChart
// +required
Kind string `json:"kind"`
// Name of the referent.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +required
Name string `json:"name"`
// Namespace of the referent, defaults to the namespace of the Kubernetes
// resource object that contains the reference.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Optional
// +optional
Namespace string `json:"namespace,omitempty"`
}
// DependencyReference defines a HelmRelease dependency on another HelmRelease resource.
type DependencyReference struct {
// Name of the referent.
// +required
Name string `json:"name"`
// Namespace of the referent, defaults to the namespace of the HelmRelease
// resource object that contains the reference.
// +optional
Namespace string `json:"namespace,omitempty"`
// ReadyExpr is a CEL expression that can be used to assess the readiness
// of a dependency. When specified, the built-in readiness check
// is replaced by the logic defined in the CEL expression.
// To make the CEL expression additive to the built-in readiness check,
// the feature gate `AdditiveCELDependencyCheck` must be set to `true`.
// +optional
ReadyExpr string `json:"readyExpr,omitempty"`
}

239
api/v2/snapshot_types.go Normal file
View File

@ -0,0 +1,239 @@
/*
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2
import (
"fmt"
"sort"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
// snapshotStatusDeployed indicates that the release the snapshot was taken
// from is currently deployed.
snapshotStatusDeployed = "deployed"
// snapshotStatusSuperseded indicates that the release the snapshot was taken
// from has been superseded by a newer release.
snapshotStatusSuperseded = "superseded"
// snapshotTestPhaseFailed indicates that the test of the release the snapshot
// was taken from has failed.
snapshotTestPhaseFailed = "Failed"
)
// Snapshots is a list of Snapshot objects.
type Snapshots []*Snapshot
// Len returns the number of Snapshots.
func (in Snapshots) Len() int {
return len(in)
}
// SortByVersion sorts the Snapshots by version, in descending order.
func (in Snapshots) SortByVersion() {
sort.Slice(in, func(i, j int) bool {
return in[i].Version > in[j].Version
})
}
// Latest returns the most recent Snapshot.
func (in Snapshots) Latest() *Snapshot {
if len(in) == 0 {
return nil
}
in.SortByVersion()
return in[0]
}
// Previous returns the most recent Snapshot before the Latest that has a
// status of "deployed" or "superseded", or nil if there is no such Snapshot.
// Unless ignoreTests is true, Snapshots with a test in the "Failed" phase are
// ignored.
func (in Snapshots) Previous(ignoreTests bool) *Snapshot {
if len(in) < 2 {
return nil
}
in.SortByVersion()
for i := range in[1:] {
s := in[i+1]
if s.Status == snapshotStatusDeployed || s.Status == snapshotStatusSuperseded {
if ignoreTests || !s.HasTestInPhase(snapshotTestPhaseFailed) {
return s
}
}
}
return nil
}
// Truncate removes all Snapshots up to the Previous deployed Snapshot.
// If there is no previous-deployed Snapshot, the most recent 5 Snapshots are
// retained.
func (in *Snapshots) Truncate(ignoreTests bool) {
if in.Len() < 2 {
return
}
in.SortByVersion()
for i := range (*in)[1:] {
s := (*in)[i+1]
if s.Status == snapshotStatusDeployed || s.Status == snapshotStatusSuperseded {
if ignoreTests || !s.HasTestInPhase(snapshotTestPhaseFailed) {
*in = (*in)[:i+2]
return
}
}
}
if in.Len() > defaultMaxHistory {
// If none of the Snapshots are deployed or superseded, and there
// are more than the defaultMaxHistory, truncate to the most recent
// Snapshots.
*in = (*in)[:defaultMaxHistory]
}
}
// Snapshot captures a point-in-time copy of the status information for a Helm release,
// as managed by the controller.
type Snapshot struct {
// APIVersion is the API version of the Snapshot.
// Provisional: when the calculation method of the Digest field is changed,
// this field will be used to distinguish between the old and new methods.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Digest is the checksum of the release object in storage.
// It has the format of `<algo>:<checksum>`.
// +required
Digest string `json:"digest"`
// Name is the name of the release.
// +required
Name string `json:"name"`
// Namespace is the namespace the release is deployed to.
// +required
Namespace string `json:"namespace"`
// Version is the version of the release object in storage.
// +required
Version int `json:"version"`
// Status is the current state of the release.
// +required
Status string `json:"status"`
// ChartName is the chart name of the release object in storage.
// +required
ChartName string `json:"chartName"`
// ChartVersion is the chart version of the release object in
// storage.
// +required
ChartVersion string `json:"chartVersion"`
// AppVersion is the chart app version of the release object in storage.
// +optional
AppVersion string `json:"appVersion,omitempty"`
// ConfigDigest is the checksum of the config (better known as
// "values") of the release object in storage.
// It has the format of `<algo>:<checksum>`.
// +required
ConfigDigest string `json:"configDigest"`
// FirstDeployed is when the release was first deployed.
// +required
FirstDeployed metav1.Time `json:"firstDeployed"`
// LastDeployed is when the release was last deployed.
// +required
LastDeployed metav1.Time `json:"lastDeployed"`
// Deleted is when the release was deleted.
// +optional
Deleted metav1.Time `json:"deleted,omitempty"`
// TestHooks is the list of test hooks for the release as observed to be
// run by the controller.
// +optional
TestHooks *map[string]*TestHookStatus `json:"testHooks,omitempty"`
// OCIDigest is the digest of the OCI artifact associated with the release.
// +optional
OCIDigest string `json:"ociDigest,omitempty"`
}
// FullReleaseName returns the full name of the release in the format
// of '<namespace>/<name>.<version>
func (in *Snapshot) FullReleaseName() string {
if in == nil {
return ""
}
return fmt.Sprintf("%s/%s.v%d", in.Namespace, in.Name, in.Version)
}
// VersionedChartName returns the full name of the chart in the format of
// '<name>@<version>'.
func (in *Snapshot) VersionedChartName() string {
if in == nil {
return ""
}
return fmt.Sprintf("%s@%s", in.ChartName, in.ChartVersion)
}
// HasBeenTested returns true if TestHooks is not nil. This includes an empty
// map, which indicates the chart has no tests.
func (in *Snapshot) HasBeenTested() bool {
return in != nil && in.TestHooks != nil
}
// GetTestHooks returns the TestHooks for the release if not nil.
func (in *Snapshot) GetTestHooks() map[string]*TestHookStatus {
if in == nil || in.TestHooks == nil {
return nil
}
return *in.TestHooks
}
// HasTestInPhase returns true if any of the TestHooks is in the given phase.
func (in *Snapshot) HasTestInPhase(phase string) bool {
if in != nil {
for _, h := range in.GetTestHooks() {
if h.Phase == phase {
return true
}
}
}
return false
}
// SetTestHooks sets the TestHooks for the release.
func (in *Snapshot) SetTestHooks(hooks map[string]*TestHookStatus) {
if in == nil || hooks == nil {
return
}
in.TestHooks = &hooks
}
// Targets returns true if the Snapshot targets the given release data.
func (in *Snapshot) Targets(name, namespace string, version int) bool {
if in != nil {
return in.Name == name && in.Namespace == namespace && in.Version == version
}
return false
}
// TestHookStatus holds the status information for a test hook as observed
// to be run by the controller.
type TestHookStatus struct {
// LastStarted is the time the test hook was last started.
// +optional
LastStarted metav1.Time `json:"lastStarted,omitempty"`
// LastCompleted is the time the test hook last completed.
// +optional
LastCompleted metav1.Time `json:"lastCompleted,omitempty"`
// Phase the test hook was observed to be in.
// +optional
Phase string `json:"phase,omitempty"`
}

View File

@ -0,0 +1,298 @@
/*
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2
import (
"reflect"
"testing"
)
func TestSnapshots_Sort(t *testing.T) {
tests := []struct {
name string
in Snapshots
want Snapshots
}{
{
name: "sorts by descending version",
in: Snapshots{
{Version: 1},
{Version: 3},
{Version: 2},
},
want: Snapshots{
{Version: 3},
{Version: 2},
{Version: 1},
},
},
{
name: "already sorted",
in: Snapshots{
{Version: 3},
{Version: 2},
{Version: 1},
},
want: Snapshots{
{Version: 3},
{Version: 2},
{Version: 1},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.in.SortByVersion()
if !reflect.DeepEqual(tt.in, tt.want) {
t.Errorf("SortByVersion() got %v, want %v", tt.in, tt.want)
}
})
}
}
func TestSnapshots_Latest(t *testing.T) {
tests := []struct {
name string
in Snapshots
want *Snapshot
}{
{
name: "returns most recent snapshot",
in: Snapshots{
{Version: 1},
{Version: 3},
{Version: 2},
},
want: &Snapshot{Version: 3},
},
{
name: "returns nil if empty",
in: Snapshots{},
want: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.in.Latest(); !reflect.DeepEqual(got, tt.want) {
t.Errorf("Latest() = %v, want %v", got, tt.want)
}
})
}
}
func TestSnapshots_Previous(t *testing.T) {
tests := []struct {
name string
in Snapshots
ignoreTests bool
want *Snapshot
}{
{
name: "returns previous snapshot",
in: Snapshots{
{Version: 2, Status: "deployed"},
{Version: 3, Status: "failed"},
{Version: 1, Status: "superseded"},
},
want: &Snapshot{Version: 2, Status: "deployed"},
},
{
name: "includes snapshots with failed tests",
in: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 1, Status: "superseded"},
{Version: 2, Status: "superseded"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"test": {Phase: "Failed"},
}},
},
ignoreTests: true,
want: &Snapshot{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"test": {Phase: "Failed"},
}},
},
{
name: "ignores snapshots with failed tests",
in: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 1, Status: "superseded"},
{Version: 2, Status: "superseded"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"test": {Phase: "Failed"},
}},
},
ignoreTests: false,
want: &Snapshot{Version: 2, Status: "superseded"},
},
{
name: "returns nil without previous snapshot",
in: Snapshots{
{Version: 1, Status: "deployed"},
},
want: nil,
},
{
name: "returns nil without snapshot matching criteria",
in: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"test": {Phase: "Failed"},
}},
},
ignoreTests: false,
want: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.in.Previous(tt.ignoreTests); !reflect.DeepEqual(got, tt.want) {
t.Errorf("Previous() = %v, want %v", got, tt.want)
}
})
}
}
func TestSnapshots_Truncate(t *testing.T) {
tests := []struct {
name string
in Snapshots
ignoreTests bool
want Snapshots
}{
{
name: "keeps previous snapshot",
in: Snapshots{
{Version: 1, Status: "superseded"},
{Version: 3, Status: "failed"},
{Version: 2, Status: "superseded"},
{Version: 4, Status: "deployed"},
},
want: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "failed"},
{Version: 2, Status: "superseded"},
},
},
{
name: "ignores snapshots with failed tests",
in: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-fault-test-tiz9x": {Phase: "Failed"},
"upgrade-test-fail-podinfo-grpc-test-gddcw": {},
}},
{Version: 2, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-grpc-test-h0tc2": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-jwt-test-vzusa": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-service-test-b647e": {
Phase: "Succeeded",
},
}},
},
ignoreTests: false,
want: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-fault-test-tiz9x": {Phase: "Failed"},
"upgrade-test-fail-podinfo-grpc-test-gddcw": {},
}},
{Version: 2, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-grpc-test-h0tc2": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-jwt-test-vzusa": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-service-test-b647e": {
Phase: "Succeeded",
},
}},
},
},
{
name: "keeps previous snapshot with failed tests",
in: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-fault-test-tiz9x": {Phase: "Failed"},
"upgrade-test-fail-podinfo-grpc-test-gddcw": {},
}},
{Version: 2, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-grpc-test-h0tc2": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-jwt-test-vzusa": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-service-test-b647e": {
Phase: "Succeeded",
},
}},
{Version: 1, Status: "superseded"},
},
ignoreTests: true,
want: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-fault-test-tiz9x": {Phase: "Failed"},
"upgrade-test-fail-podinfo-grpc-test-gddcw": {},
}},
},
},
{
name: "retains most recent snapshots when all have failed",
in: Snapshots{
{Version: 6, Status: "deployed"},
{Version: 5, Status: "failed"},
{Version: 4, Status: "failed"},
{Version: 3, Status: "failed"},
{Version: 2, Status: "failed"},
{Version: 1, Status: "failed"},
},
want: Snapshots{
{Version: 6, Status: "deployed"},
{Version: 5, Status: "failed"},
{Version: 4, Status: "failed"},
{Version: 3, Status: "failed"},
{Version: 2, Status: "failed"},
},
},
{
name: "without previous snapshot",
in: Snapshots{
{Version: 1, Status: "deployed"},
},
want: Snapshots{
{Version: 1, Status: "deployed"},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.in.Truncate(tt.ignoreTests)
if !reflect.DeepEqual(tt.in, tt.want) {
t.Errorf("Truncate() got %v, want %v", tt.in, tt.want)
}
})
}
}

View File

@ -0,0 +1,774 @@
//go:build !ignore_autogenerated
/*
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by controller-gen. DO NOT EDIT.
package v2
import (
"github.com/fluxcd/pkg/apis/kustomize"
"github.com/fluxcd/pkg/apis/meta"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CommonMetadata) DeepCopyInto(out *CommonMetadata) {
*out = *in
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonMetadata.
func (in *CommonMetadata) DeepCopy() *CommonMetadata {
if in == nil {
return nil
}
out := new(CommonMetadata)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CrossNamespaceObjectReference) DeepCopyInto(out *CrossNamespaceObjectReference) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceObjectReference.
func (in *CrossNamespaceObjectReference) DeepCopy() *CrossNamespaceObjectReference {
if in == nil {
return nil
}
out := new(CrossNamespaceObjectReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CrossNamespaceSourceReference) DeepCopyInto(out *CrossNamespaceSourceReference) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceSourceReference.
func (in *CrossNamespaceSourceReference) DeepCopy() *CrossNamespaceSourceReference {
if in == nil {
return nil
}
out := new(CrossNamespaceSourceReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DependencyReference) DeepCopyInto(out *DependencyReference) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DependencyReference.
func (in *DependencyReference) DeepCopy() *DependencyReference {
if in == nil {
return nil
}
out := new(DependencyReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DriftDetection) DeepCopyInto(out *DriftDetection) {
*out = *in
if in.Ignore != nil {
in, out := &in.Ignore, &out.Ignore
*out = make([]IgnoreRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriftDetection.
func (in *DriftDetection) DeepCopy() *DriftDetection {
if in == nil {
return nil
}
out := new(DriftDetection)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Filter) DeepCopyInto(out *Filter) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.
func (in *Filter) DeepCopy() *Filter {
if in == nil {
return nil
}
out := new(Filter)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmChartTemplate) DeepCopyInto(out *HelmChartTemplate) {
*out = *in
if in.ObjectMeta != nil {
in, out := &in.ObjectMeta, &out.ObjectMeta
*out = new(HelmChartTemplateObjectMeta)
(*in).DeepCopyInto(*out)
}
in.Spec.DeepCopyInto(&out.Spec)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplate.
func (in *HelmChartTemplate) DeepCopy() *HelmChartTemplate {
if in == nil {
return nil
}
out := new(HelmChartTemplate)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmChartTemplateObjectMeta) DeepCopyInto(out *HelmChartTemplateObjectMeta) {
*out = *in
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplateObjectMeta.
func (in *HelmChartTemplateObjectMeta) DeepCopy() *HelmChartTemplateObjectMeta {
if in == nil {
return nil
}
out := new(HelmChartTemplateObjectMeta)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmChartTemplateSpec) DeepCopyInto(out *HelmChartTemplateSpec) {
*out = *in
out.SourceRef = in.SourceRef
if in.Interval != nil {
in, out := &in.Interval, &out.Interval
*out = new(v1.Duration)
**out = **in
}
if in.ValuesFiles != nil {
in, out := &in.ValuesFiles, &out.ValuesFiles
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Verify != nil {
in, out := &in.Verify, &out.Verify
*out = new(HelmChartTemplateVerification)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplateSpec.
func (in *HelmChartTemplateSpec) DeepCopy() *HelmChartTemplateSpec {
if in == nil {
return nil
}
out := new(HelmChartTemplateSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmChartTemplateVerification) DeepCopyInto(out *HelmChartTemplateVerification) {
*out = *in
if in.SecretRef != nil {
in, out := &in.SecretRef, &out.SecretRef
*out = new(meta.LocalObjectReference)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplateVerification.
func (in *HelmChartTemplateVerification) DeepCopy() *HelmChartTemplateVerification {
if in == nil {
return nil
}
out := new(HelmChartTemplateVerification)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmRelease) DeepCopyInto(out *HelmRelease) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease.
func (in *HelmRelease) DeepCopy() *HelmRelease {
if in == nil {
return nil
}
out := new(HelmRelease)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HelmRelease) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmReleaseList) DeepCopyInto(out *HelmReleaseList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]HelmRelease, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseList.
func (in *HelmReleaseList) DeepCopy() *HelmReleaseList {
if in == nil {
return nil
}
out := new(HelmReleaseList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HelmReleaseList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) {
*out = *in
if in.Chart != nil {
in, out := &in.Chart, &out.Chart
*out = new(HelmChartTemplate)
(*in).DeepCopyInto(*out)
}
if in.ChartRef != nil {
in, out := &in.ChartRef, &out.ChartRef
*out = new(CrossNamespaceSourceReference)
**out = **in
}
out.Interval = in.Interval
if in.KubeConfig != nil {
in, out := &in.KubeConfig, &out.KubeConfig
*out = new(meta.KubeConfigReference)
(*in).DeepCopyInto(*out)
}
if in.DependsOn != nil {
in, out := &in.DependsOn, &out.DependsOn
*out = make([]DependencyReference, len(*in))
copy(*out, *in)
}
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(v1.Duration)
**out = **in
}
if in.MaxHistory != nil {
in, out := &in.MaxHistory, &out.MaxHistory
*out = new(int)
**out = **in
}
if in.PersistentClient != nil {
in, out := &in.PersistentClient, &out.PersistentClient
*out = new(bool)
**out = **in
}
if in.DriftDetection != nil {
in, out := &in.DriftDetection, &out.DriftDetection
*out = new(DriftDetection)
(*in).DeepCopyInto(*out)
}
if in.Install != nil {
in, out := &in.Install, &out.Install
*out = new(Install)
(*in).DeepCopyInto(*out)
}
if in.Upgrade != nil {
in, out := &in.Upgrade, &out.Upgrade
*out = new(Upgrade)
(*in).DeepCopyInto(*out)
}
if in.Test != nil {
in, out := &in.Test, &out.Test
*out = new(Test)
(*in).DeepCopyInto(*out)
}
if in.Rollback != nil {
in, out := &in.Rollback, &out.Rollback
*out = new(Rollback)
(*in).DeepCopyInto(*out)
}
if in.Uninstall != nil {
in, out := &in.Uninstall, &out.Uninstall
*out = new(Uninstall)
(*in).DeepCopyInto(*out)
}
if in.ValuesFrom != nil {
in, out := &in.ValuesFrom, &out.ValuesFrom
*out = make([]meta.ValuesReference, len(*in))
copy(*out, *in)
}
if in.Values != nil {
in, out := &in.Values, &out.Values
*out = new(apiextensionsv1.JSON)
(*in).DeepCopyInto(*out)
}
if in.CommonMetadata != nil {
in, out := &in.CommonMetadata, &out.CommonMetadata
*out = new(CommonMetadata)
(*in).DeepCopyInto(*out)
}
if in.PostRenderers != nil {
in, out := &in.PostRenderers, &out.PostRenderers
*out = make([]PostRenderer, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseSpec.
func (in *HelmReleaseSpec) DeepCopy() *HelmReleaseSpec {
if in == nil {
return nil
}
out := new(HelmReleaseSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]v1.Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.History != nil {
in, out := &in.History, &out.History
*out = make(Snapshots, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(Snapshot)
(*in).DeepCopyInto(*out)
}
}
}
if in.LastAttemptedReleaseActionDuration != nil {
in, out := &in.LastAttemptedReleaseActionDuration, &out.LastAttemptedReleaseActionDuration
*out = new(v1.Duration)
**out = **in
}
out.ReconcileRequestStatus = in.ReconcileRequestStatus
out.ForceRequestStatus = in.ForceRequestStatus
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseStatus.
func (in *HelmReleaseStatus) DeepCopy() *HelmReleaseStatus {
if in == nil {
return nil
}
out := new(HelmReleaseStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IgnoreRule) DeepCopyInto(out *IgnoreRule) {
*out = *in
if in.Paths != nil {
in, out := &in.Paths, &out.Paths
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Target != nil {
in, out := &in.Target, &out.Target
*out = new(kustomize.Selector)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IgnoreRule.
func (in *IgnoreRule) DeepCopy() *IgnoreRule {
if in == nil {
return nil
}
out := new(IgnoreRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Install) DeepCopyInto(out *Install) {
*out = *in
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(v1.Duration)
**out = **in
}
if in.Remediation != nil {
in, out := &in.Remediation, &out.Remediation
*out = new(InstallRemediation)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Install.
func (in *Install) DeepCopy() *Install {
if in == nil {
return nil
}
out := new(Install)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *InstallRemediation) DeepCopyInto(out *InstallRemediation) {
*out = *in
if in.IgnoreTestFailures != nil {
in, out := &in.IgnoreTestFailures, &out.IgnoreTestFailures
*out = new(bool)
**out = **in
}
if in.RemediateLastFailure != nil {
in, out := &in.RemediateLastFailure, &out.RemediateLastFailure
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstallRemediation.
func (in *InstallRemediation) DeepCopy() *InstallRemediation {
if in == nil {
return nil
}
out := new(InstallRemediation)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Kustomize) DeepCopyInto(out *Kustomize) {
*out = *in
if in.Patches != nil {
in, out := &in.Patches, &out.Patches
*out = make([]kustomize.Patch, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Images != nil {
in, out := &in.Images, &out.Images
*out = make([]kustomize.Image, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kustomize.
func (in *Kustomize) DeepCopy() *Kustomize {
if in == nil {
return nil
}
out := new(Kustomize)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PostRenderer) DeepCopyInto(out *PostRenderer) {
*out = *in
if in.Kustomize != nil {
in, out := &in.Kustomize, &out.Kustomize
*out = new(Kustomize)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostRenderer.
func (in *PostRenderer) DeepCopy() *PostRenderer {
if in == nil {
return nil
}
out := new(PostRenderer)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Rollback) DeepCopyInto(out *Rollback) {
*out = *in
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(v1.Duration)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rollback.
func (in *Rollback) DeepCopy() *Rollback {
if in == nil {
return nil
}
out := new(Rollback)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Snapshot) DeepCopyInto(out *Snapshot) {
*out = *in
in.FirstDeployed.DeepCopyInto(&out.FirstDeployed)
in.LastDeployed.DeepCopyInto(&out.LastDeployed)
in.Deleted.DeepCopyInto(&out.Deleted)
if in.TestHooks != nil {
in, out := &in.TestHooks, &out.TestHooks
*out = new(map[string]*TestHookStatus)
if **in != nil {
in, out := *in, *out
*out = make(map[string]*TestHookStatus, len(*in))
for key, val := range *in {
var outVal *TestHookStatus
if val == nil {
(*out)[key] = nil
} else {
inVal := (*in)[key]
in, out := &inVal, &outVal
*out = new(TestHookStatus)
(*in).DeepCopyInto(*out)
}
(*out)[key] = outVal
}
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot.
func (in *Snapshot) DeepCopy() *Snapshot {
if in == nil {
return nil
}
out := new(Snapshot)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in Snapshots) DeepCopyInto(out *Snapshots) {
{
in := &in
*out = make(Snapshots, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(Snapshot)
(*in).DeepCopyInto(*out)
}
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshots.
func (in Snapshots) DeepCopy() Snapshots {
if in == nil {
return nil
}
out := new(Snapshots)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Test) DeepCopyInto(out *Test) {
*out = *in
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(v1.Duration)
**out = **in
}
if in.Filters != nil {
in, out := &in.Filters, &out.Filters
*out = new([]Filter)
if **in != nil {
in, out := *in, *out
*out = make([]Filter, len(*in))
copy(*out, *in)
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Test.
func (in *Test) DeepCopy() *Test {
if in == nil {
return nil
}
out := new(Test)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestHookStatus) DeepCopyInto(out *TestHookStatus) {
*out = *in
in.LastStarted.DeepCopyInto(&out.LastStarted)
in.LastCompleted.DeepCopyInto(&out.LastCompleted)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestHookStatus.
func (in *TestHookStatus) DeepCopy() *TestHookStatus {
if in == nil {
return nil
}
out := new(TestHookStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Uninstall) DeepCopyInto(out *Uninstall) {
*out = *in
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(v1.Duration)
**out = **in
}
if in.DeletionPropagation != nil {
in, out := &in.DeletionPropagation, &out.DeletionPropagation
*out = new(string)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Uninstall.
func (in *Uninstall) DeepCopy() *Uninstall {
if in == nil {
return nil
}
out := new(Uninstall)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Upgrade) DeepCopyInto(out *Upgrade) {
*out = *in
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(v1.Duration)
**out = **in
}
if in.Remediation != nil {
in, out := &in.Remediation, &out.Remediation
*out = new(UpgradeRemediation)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upgrade.
func (in *Upgrade) DeepCopy() *Upgrade {
if in == nil {
return nil
}
out := new(Upgrade)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpgradeRemediation) DeepCopyInto(out *UpgradeRemediation) {
*out = *in
if in.IgnoreTestFailures != nil {
in, out := &in.IgnoreTestFailures, &out.IgnoreTestFailures
*out = new(bool)
**out = **in
}
if in.RemediateLastFailure != nil {
in, out := &in.RemediateLastFailure, &out.RemediateLastFailure
*out = new(bool)
**out = **in
}
if in.Strategy != nil {
in, out := &in.Strategy, &out.Strategy
*out = new(RemediationStrategy)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeRemediation.
func (in *UpgradeRemediation) DeepCopy() *UpgradeRemediation {
if in == nil {
return nil
}
out := new(UpgradeRemediation)
in.DeepCopyInto(out)
return out
}

View File

@ -15,6 +15,9 @@ limitations under the License.
*/
// Package v2beta1 contains API Schema definitions for the helm v2beta1 API group
//
// Deprecated: v2beta1 is no longer supported, use v2 instead.
//
// +kubebuilder:object:generate=true
// +groupName=helm.toolkit.fluxcd.io
package v2beta1

View File

@ -28,6 +28,9 @@ import (
"github.com/fluxcd/pkg/apis/kustomize"
"github.com/fluxcd/pkg/apis/meta"
v2 "github.com/fluxcd/helm-controller/api/v2"
"github.com/fluxcd/helm-controller/api/v2beta2"
)
const HelmReleaseKind = "HelmRelease"
@ -67,9 +70,19 @@ type HelmReleaseSpec struct {
// Chart defines the template of the v1beta2.HelmChart that should be created
// for this HelmRelease.
// +required
Chart HelmChartTemplate `json:"chart"`
Chart *HelmChartTemplate `json:"chart,omitempty"`
// ChartRef holds a reference to a source controller resource containing the
// Helm chart artifact.
//
// Note: this field is provisional to the v2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
ChartRef *v2.CrossNamespaceSourceReference `json:"chartRef,omitempty"`
// Interval at which to reconcile the Helm release.
// This interval is approximate and may be subject to jitter to ensure
// efficient use of resources.
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
// +required
@ -152,6 +165,15 @@ type HelmReleaseSpec struct {
// +optional
PersistentClient *bool `json:"persistentClient,omitempty"`
// DriftDetection holds the configuration for detecting and handling
// differences between the manifest in the Helm storage and the resources
// currently existing in the cluster.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
DriftDetection *v2beta2.DriftDetection `json:"driftDetection,omitempty"`
// Install holds the configuration for Helm install actions for this HelmRelease.
// +optional
Install *Install `json:"install,omitempty"`
@ -828,6 +850,13 @@ type Uninstall struct {
// a Helm uninstall is performed.
// +optional
DisableWait bool `json:"disableWait,omitempty"`
// DeletionPropagation specifies the deletion propagation policy when
// a Helm uninstall is performed.
// +kubebuilder:default=background
// +kubebuilder:validation:Enum=background;foreground;orphan
// +optional
DeletionPropagation *string `json:"deletionPropagation,omitempty"`
}
// GetTimeout returns the configured timeout for the Helm uninstall action, or
@ -839,12 +868,26 @@ func (in Uninstall) GetTimeout(defaultTimeout metav1.Duration) metav1.Duration {
return *in.Timeout
}
// GetDeletionPropagation returns the configured deletion propagation policy
// for the Helm uninstall action, or 'background'.
func (in Uninstall) GetDeletionPropagation() string {
if in.DeletionPropagation == nil {
return "background"
}
return *in.DeletionPropagation
}
// HelmReleaseStatus defines the observed state of a HelmRelease.
type HelmReleaseStatus struct {
// ObservedGeneration is the last observed generation.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// ObservedPostRenderersDigest is the digest for the post-renderers of
// the last successful reconciliation attempt.
// +optional
ObservedPostRenderersDigest string `json:"observedPostRenderersDigest,omitempty"`
meta.ReconcileRequestStatus `json:",inline"`
// Conditions holds the conditions for the HelmRelease.
@ -887,6 +930,62 @@ type HelmReleaseStatus struct {
// state. It is reset after a successful reconciliation.
// +optional
UpgradeFailures int64 `json:"upgradeFailures,omitempty"`
// StorageNamespace is the namespace of the Helm release storage for the
// current release.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
StorageNamespace string `json:"storageNamespace,omitempty"`
// History holds the history of Helm releases performed for this HelmRelease
// up to the last successfully completed release.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
History v2.Snapshots `json:"history,omitempty"`
// LastAttemptedGeneration is the last generation the controller attempted
// to reconcile.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
LastAttemptedGeneration int64 `json:"lastAttemptedGeneration,omitempty"`
// LastAttemptedConfigDigest is the digest for the config (better known as
// "values") of the last reconciliation attempt.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
LastAttemptedConfigDigest string `json:"lastAttemptedConfigDigest,omitempty"`
// LastAttemptedReleaseAction is the last release action performed for this
// HelmRelease. It is used to determine the active remediation strategy.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
LastAttemptedReleaseAction string `json:"lastAttemptedReleaseAction,omitempty"`
// LastHandledForceAt holds the value of the most recent force request
// value, so a change of the annotation value can be detected.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
LastHandledForceAt string `json:"lastHandledForceAt,omitempty"`
// LastHandledResetAt holds the value of the most recent reset request
// value, so a change of the annotation value can be detected.
//
// Note: this field is provisional to the v2beta2 API, and not actively used
// by v2beta1 HelmReleases.
// +optional
LastHandledResetAt string `json:"lastHandledResetAt,omitempty"`
}
// GetHelmChart returns the namespace and name of the HelmChart.
@ -996,13 +1095,9 @@ const (
)
// +genclient
// +genclient:Namespaced
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=hr
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description=""
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description=""
// +kubebuilder:skipversion
// HelmRelease is the Schema for the helmreleases API
type HelmRelease struct {
@ -1106,6 +1201,7 @@ func (in *HelmRelease) SetConditions(conditions []metav1.Condition) {
}
// GetStatusConditions returns a pointer to the Status.Conditions slice.
//
// Deprecated: use GetConditions instead.
func (in *HelmRelease) GetStatusConditions() *[]metav1.Condition {
return &in.Status.Conditions

View File

@ -1,8 +1,7 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright 2021 The Flux authors
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -22,6 +21,8 @@ limitations under the License.
package v2beta1
import (
"github.com/fluxcd/helm-controller/api/v2"
"github.com/fluxcd/helm-controller/api/v2beta2"
"github.com/fluxcd/pkg/apis/kustomize"
"github.com/fluxcd/pkg/apis/meta"
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
@ -207,12 +208,21 @@ func (in *HelmReleaseList) DeepCopyObject() runtime.Object {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) {
*out = *in
in.Chart.DeepCopyInto(&out.Chart)
if in.Chart != nil {
in, out := &in.Chart, &out.Chart
*out = new(HelmChartTemplate)
(*in).DeepCopyInto(*out)
}
if in.ChartRef != nil {
in, out := &in.ChartRef, &out.ChartRef
*out = new(v2.CrossNamespaceSourceReference)
**out = **in
}
out.Interval = in.Interval
if in.KubeConfig != nil {
in, out := &in.KubeConfig, &out.KubeConfig
*out = new(meta.KubeConfigReference)
**out = **in
(*in).DeepCopyInto(*out)
}
if in.DependsOn != nil {
in, out := &in.DependsOn, &out.DependsOn
@ -234,6 +244,11 @@ func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) {
*out = new(bool)
**out = **in
}
if in.DriftDetection != nil {
in, out := &in.DriftDetection, &out.DriftDetection
*out = new(v2beta2.DriftDetection)
(*in).DeepCopyInto(*out)
}
if in.Install != nil {
in, out := &in.Install, &out.Install
*out = new(Install)
@ -299,6 +314,17 @@ func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.History != nil {
in, out := &in.History, &out.History
*out = make(v2.Snapshots, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(v2.Snapshot)
(*in).DeepCopyInto(*out)
}
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseStatus.
@ -470,6 +496,11 @@ func (in *Uninstall) DeepCopyInto(out *Uninstall) {
*out = new(metav1.Duration)
**out = **in
}
if in.DeletionPropagation != nil {
in, out := &in.DeletionPropagation, &out.DeletionPropagation
*out = new(string)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Uninstall.

View File

@ -0,0 +1,84 @@
/*
Copyright 2023 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2beta2
import "github.com/fluxcd/pkg/apis/meta"
const (
// ForceRequestAnnotation is the annotation used for triggering a one-off forced
// Helm release, even when there are no new changes in the HelmRelease.
// The value is interpreted as a token, and must equal the value of
// meta.ReconcileRequestAnnotation in order to trigger a release.
ForceRequestAnnotation string = "reconcile.fluxcd.io/forceAt"
// ResetRequestAnnotation is the annotation used for resetting the failure counts
// of a HelmRelease, so that it can be retried again.
// The value is interpreted as a token, and must equal the value of
// meta.ReconcileRequestAnnotation in order to reset the failure counts.
ResetRequestAnnotation string = "reconcile.fluxcd.io/resetAt"
)
// ShouldHandleResetRequest returns true if the HelmRelease has a reset request
// annotation, and the value of the annotation matches the value of the
// meta.ReconcileRequestAnnotation annotation.
//
// To ensure that the reset request is handled only once, the value of
// HelmReleaseStatus.LastHandledResetAt is updated to match the value of the
// reset request annotation (even if the reset request is not handled because
// the value of the meta.ReconcileRequestAnnotation annotation does not match).
func ShouldHandleResetRequest(obj *HelmRelease) bool {
return handleRequest(obj, ResetRequestAnnotation, &obj.Status.LastHandledResetAt)
}
// ShouldHandleForceRequest returns true if the HelmRelease has a force request
// annotation, and the value of the annotation matches the value of the
// meta.ReconcileRequestAnnotation annotation.
//
// To ensure that the force request is handled only once, the value of
// HelmReleaseStatus.LastHandledForceAt is updated to match the value of the
// force request annotation (even if the force request is not handled because
// the value of the meta.ReconcileRequestAnnotation annotation does not match).
func ShouldHandleForceRequest(obj *HelmRelease) bool {
return handleRequest(obj, ForceRequestAnnotation, &obj.Status.LastHandledForceAt)
}
// handleRequest returns true if the HelmRelease has a request annotation, and
// the value of the annotation matches the value of the meta.ReconcileRequestAnnotation
// annotation.
//
// The lastHandled argument is used to ensure that the request is handled only
// once, and is updated to match the value of the request annotation (even if
// the request is not handled because the value of the meta.ReconcileRequestAnnotation
// annotation does not match).
func handleRequest(obj *HelmRelease, annotation string, lastHandled *string) bool {
requestAt, requestOk := obj.GetAnnotations()[annotation]
reconcileAt, reconcileOk := meta.ReconcileAnnotationValue(obj.GetAnnotations())
var lastHandledRequest string
if requestOk {
lastHandledRequest = *lastHandled
*lastHandled = requestAt
}
if requestOk && reconcileOk && requestAt == reconcileAt {
lastHandledReconcile := obj.Status.GetLastHandledReconcileRequest()
if lastHandledReconcile != reconcileAt && lastHandledRequest != requestAt {
return true
}
}
return false
}

View File

@ -0,0 +1,165 @@
/*
Copyright 2023 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2beta2
import (
"testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/fluxcd/pkg/apis/meta"
)
func TestShouldHandleResetRequest(t *testing.T) {
t.Run("should handle reset request", func(t *testing.T) {
obj := &HelmRelease{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
meta.ReconcileRequestAnnotation: "b",
ResetRequestAnnotation: "b",
},
},
Status: HelmReleaseStatus{
LastHandledResetAt: "a",
ReconcileRequestStatus: meta.ReconcileRequestStatus{
LastHandledReconcileAt: "a",
},
},
}
if !ShouldHandleResetRequest(obj) {
t.Error("ShouldHandleResetRequest() = false")
}
if obj.Status.LastHandledResetAt != "b" {
t.Error("ShouldHandleResetRequest did not update LastHandledResetAt")
}
})
}
func TestShouldHandleForceRequest(t *testing.T) {
t.Run("should handle force request", func(t *testing.T) {
obj := &HelmRelease{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
meta.ReconcileRequestAnnotation: "b",
ForceRequestAnnotation: "b",
},
},
Status: HelmReleaseStatus{
LastHandledForceAt: "a",
ReconcileRequestStatus: meta.ReconcileRequestStatus{
LastHandledReconcileAt: "a",
},
},
}
if !ShouldHandleForceRequest(obj) {
t.Error("ShouldHandleForceRequest() = false")
}
if obj.Status.LastHandledForceAt != "b" {
t.Error("ShouldHandleForceRequest did not update LastHandledForceAt")
}
})
}
func Test_handleRequest(t *testing.T) {
const requestAnnotation = "requestAnnotation"
tests := []struct {
name string
annotations map[string]string
lastHandledReconcile string
lastHandledRequest string
want bool
expectLastHandledRequest string
}{
{
name: "valid request and reconcile annotations",
annotations: map[string]string{
meta.ReconcileRequestAnnotation: "b",
requestAnnotation: "b",
},
want: true,
expectLastHandledRequest: "b",
},
{
name: "mismatched annotations",
annotations: map[string]string{
meta.ReconcileRequestAnnotation: "b",
requestAnnotation: "c",
},
want: false,
expectLastHandledRequest: "c",
},
{
name: "reconcile matches previous request",
annotations: map[string]string{
meta.ReconcileRequestAnnotation: "b",
requestAnnotation: "b",
},
lastHandledReconcile: "a",
lastHandledRequest: "b",
want: false,
expectLastHandledRequest: "b",
},
{
name: "request matches previous reconcile",
annotations: map[string]string{
meta.ReconcileRequestAnnotation: "b",
requestAnnotation: "b",
},
lastHandledReconcile: "b",
lastHandledRequest: "a",
want: false,
expectLastHandledRequest: "b",
},
{
name: "missing annotations",
annotations: map[string]string{},
lastHandledRequest: "a",
want: false,
expectLastHandledRequest: "a",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
obj := &HelmRelease{
ObjectMeta: metav1.ObjectMeta{
Annotations: tt.annotations,
},
Status: HelmReleaseStatus{
ReconcileRequestStatus: meta.ReconcileRequestStatus{
LastHandledReconcileAt: tt.lastHandledReconcile,
},
},
}
lastHandled := tt.lastHandledRequest
result := handleRequest(obj, requestAnnotation, &lastHandled)
if result != tt.want {
t.Errorf("handleRequest() = %v, want %v", result, tt.want)
}
if lastHandled != tt.expectLastHandledRequest {
t.Errorf("lastHandledRequest = %v, want %v", lastHandled, tt.expectLastHandledRequest)
}
})
}
}

View File

@ -0,0 +1,98 @@
/*
Copyright 2022 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2beta2
const (
// ReleasedCondition represents the status of the last release attempt
// (install/upgrade/test) against the latest desired state.
ReleasedCondition string = "Released"
// TestSuccessCondition represents the status of the last test attempt against
// the latest desired state.
TestSuccessCondition string = "TestSuccess"
// RemediatedCondition represents the status of the last remediation attempt
// (uninstall/rollback) due to a failure of the last release attempt against the
// latest desired state.
RemediatedCondition string = "Remediated"
)
const (
// InstallSucceededReason represents the fact that the Helm install for the
// HelmRelease succeeded.
InstallSucceededReason string = "InstallSucceeded"
// InstallFailedReason represents the fact that the Helm install for the
// HelmRelease failed.
InstallFailedReason string = "InstallFailed"
// UpgradeSucceededReason represents the fact that the Helm upgrade for the
// HelmRelease succeeded.
UpgradeSucceededReason string = "UpgradeSucceeded"
// UpgradeFailedReason represents the fact that the Helm upgrade for the
// HelmRelease failed.
UpgradeFailedReason string = "UpgradeFailed"
// TestSucceededReason represents the fact that the Helm tests for the
// HelmRelease succeeded.
TestSucceededReason string = "TestSucceeded"
// TestFailedReason represents the fact that the Helm tests for the HelmRelease
// failed.
TestFailedReason string = "TestFailed"
// RollbackSucceededReason represents the fact that the Helm rollback for the
// HelmRelease succeeded.
RollbackSucceededReason string = "RollbackSucceeded"
// RollbackFailedReason represents the fact that the Helm test for the
// HelmRelease failed.
RollbackFailedReason string = "RollbackFailed"
// UninstallSucceededReason represents the fact that the Helm uninstall for the
// HelmRelease succeeded.
UninstallSucceededReason string = "UninstallSucceeded"
// UninstallFailedReason represents the fact that the Helm uninstall for the
// HelmRelease failed.
UninstallFailedReason string = "UninstallFailed"
// ArtifactFailedReason represents the fact that the artifact download for the
// HelmRelease failed.
ArtifactFailedReason string = "ArtifactFailed"
// InitFailedReason represents the fact that the initialization of the Helm
// configuration failed.
InitFailedReason string = "InitFailed"
// GetLastReleaseFailedReason represents the fact that observing the last
// release failed.
GetLastReleaseFailedReason string = "GetLastReleaseFailed"
// DependencyNotReadyReason represents the fact that
// one of the dependencies is not ready.
DependencyNotReadyReason string = "DependencyNotReady"
// ReconciliationSucceededReason represents the fact that
// the reconciliation succeeded.
ReconciliationSucceededReason string = "ReconciliationSucceeded"
// ReconciliationFailedReason represents the fact that
// the reconciliation failed.
ReconciliationFailedReason string = "ReconciliationFailed"
)

20
api/v2beta2/doc.go Normal file
View File

@ -0,0 +1,20 @@
/*
Copyright 2022 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v2beta2 contains API Schema definitions for the helm v2beta2 API group
// +kubebuilder:object:generate=true
// +groupName=helm.toolkit.fluxcd.io
package v2beta2

View File

@ -0,0 +1,33 @@
/*
Copyright 2022 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2beta2
import (
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)
var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "helm.toolkit.fluxcd.io", Version: "v2beta2"}
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,115 @@
/*
Copyright 2022 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2beta2
// CrossNamespaceObjectReference contains enough information to let you locate
// the typed referenced object at cluster level.
type CrossNamespaceObjectReference struct {
// APIVersion of the referent.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Kind of the referent.
// +kubebuilder:validation:Enum=HelmRepository;GitRepository;Bucket
// +required
Kind string `json:"kind,omitempty"`
// Name of the referent.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +required
Name string `json:"name"`
// Namespace of the referent.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Optional
// +optional
Namespace string `json:"namespace,omitempty"`
}
// CrossNamespaceSourceReference contains enough information to let you locate
// the typed referenced object at cluster level.
type CrossNamespaceSourceReference struct {
// APIVersion of the referent.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Kind of the referent.
// +kubebuilder:validation:Enum=OCIRepository;HelmChart
// +required
Kind string `json:"kind"`
// Name of the referent.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +required
Name string `json:"name"`
// Namespace of the referent, defaults to the namespace of the Kubernetes
// resource object that contains the reference.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Optional
// +optional
Namespace string `json:"namespace,omitempty"`
}
// ValuesReference contains a reference to a resource containing Helm values,
// and optionally the key they can be found at.
type ValuesReference struct {
// Kind of the values referent, valid values are ('Secret', 'ConfigMap').
// +kubebuilder:validation:Enum=Secret;ConfigMap
// +required
Kind string `json:"kind"`
// Name of the values referent. Should reside in the same namespace as the
// referring resource.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +required
Name string `json:"name"`
// ValuesKey is the data key where the values.yaml or a specific value can be
// found at. Defaults to 'values.yaml'.
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^[\-._a-zA-Z0-9]+$`
// +optional
ValuesKey string `json:"valuesKey,omitempty"`
// TargetPath is the YAML dot notation path the value should be merged at. When
// set, the ValuesKey is expected to be a single flat value. Defaults to 'None',
// which results in the values getting merged at the root.
// +kubebuilder:validation:MaxLength=250
// +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$`
// +optional
TargetPath string `json:"targetPath,omitempty"`
// Optional marks this ValuesReference as optional. When set, a not found error
// for the values reference is ignored, but any ValuesKey, TargetPath or
// transient error will still result in a reconciliation failure.
// +optional
Optional bool `json:"optional,omitempty"`
}
// GetValuesKey returns the defined ValuesKey, or the default ('values.yaml').
func (in ValuesReference) GetValuesKey() string {
if in.ValuesKey == "" {
return "values.yaml"
}
return in.ValuesKey
}

View File

@ -0,0 +1,236 @@
/*
Copyright 2023 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2beta2
import (
"fmt"
"sort"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
// snapshotStatusDeployed indicates that the release the snapshot was taken
// from is currently deployed.
snapshotStatusDeployed = "deployed"
// snapshotStatusSuperseded indicates that the release the snapshot was taken
// from has been superseded by a newer release.
snapshotStatusSuperseded = "superseded"
// snapshotTestPhaseFailed indicates that the test of the release the snapshot
// was taken from has failed.
snapshotTestPhaseFailed = "Failed"
)
// Snapshots is a list of Snapshot objects.
type Snapshots []*Snapshot
// Len returns the number of Snapshots.
func (in Snapshots) Len() int {
return len(in)
}
// SortByVersion sorts the Snapshots by version, in descending order.
func (in Snapshots) SortByVersion() {
sort.Slice(in, func(i, j int) bool {
return in[i].Version > in[j].Version
})
}
// Latest returns the most recent Snapshot.
func (in Snapshots) Latest() *Snapshot {
if len(in) == 0 {
return nil
}
in.SortByVersion()
return in[0]
}
// Previous returns the most recent Snapshot before the Latest that has a
// status of "deployed" or "superseded", or nil if there is no such Snapshot.
// Unless ignoreTests is true, Snapshots with a test in the "Failed" phase are
// ignored.
func (in Snapshots) Previous(ignoreTests bool) *Snapshot {
if len(in) < 2 {
return nil
}
in.SortByVersion()
for i := range in[1:] {
s := in[i+1]
if s.Status == snapshotStatusDeployed || s.Status == snapshotStatusSuperseded {
if ignoreTests || !s.HasTestInPhase(snapshotTestPhaseFailed) {
return s
}
}
}
return nil
}
// Truncate removes all Snapshots up to the Previous deployed Snapshot.
// If there is no previous-deployed Snapshot, the most recent 5 Snapshots are
// retained.
func (in *Snapshots) Truncate(ignoreTests bool) {
if in.Len() < 2 {
return
}
in.SortByVersion()
for i := range (*in)[1:] {
s := (*in)[i+1]
if s.Status == snapshotStatusDeployed || s.Status == snapshotStatusSuperseded {
if ignoreTests || !s.HasTestInPhase(snapshotTestPhaseFailed) {
*in = (*in)[:i+2]
return
}
}
}
if in.Len() > defaultMaxHistory {
// If none of the Snapshots are deployed or superseded, and there
// are more than the defaultMaxHistory, truncate to the most recent
// Snapshots.
*in = (*in)[:defaultMaxHistory]
}
}
// Snapshot captures a point-in-time copy of the status information for a Helm release,
// as managed by the controller.
type Snapshot struct {
// APIVersion is the API version of the Snapshot.
// Provisional: when the calculation method of the Digest field is changed,
// this field will be used to distinguish between the old and new methods.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Digest is the checksum of the release object in storage.
// It has the format of `<algo>:<checksum>`.
// +required
Digest string `json:"digest"`
// Name is the name of the release.
// +required
Name string `json:"name"`
// Namespace is the namespace the release is deployed to.
// +required
Namespace string `json:"namespace"`
// Version is the version of the release object in storage.
// +required
Version int `json:"version"`
// Status is the current state of the release.
// +required
Status string `json:"status"`
// ChartName is the chart name of the release object in storage.
// +required
ChartName string `json:"chartName"`
// ChartVersion is the chart version of the release object in
// storage.
// +required
ChartVersion string `json:"chartVersion"`
// ConfigDigest is the checksum of the config (better known as
// "values") of the release object in storage.
// It has the format of `<algo>:<checksum>`.
// +required
ConfigDigest string `json:"configDigest"`
// FirstDeployed is when the release was first deployed.
// +required
FirstDeployed metav1.Time `json:"firstDeployed"`
// LastDeployed is when the release was last deployed.
// +required
LastDeployed metav1.Time `json:"lastDeployed"`
// Deleted is when the release was deleted.
// +optional
Deleted metav1.Time `json:"deleted,omitempty"`
// TestHooks is the list of test hooks for the release as observed to be
// run by the controller.
// +optional
TestHooks *map[string]*TestHookStatus `json:"testHooks,omitempty"`
// OCIDigest is the digest of the OCI artifact associated with the release.
// +optional
OCIDigest string `json:"ociDigest,omitempty"`
}
// FullReleaseName returns the full name of the release in the format
// of '<namespace>/<name>.<version>
func (in *Snapshot) FullReleaseName() string {
if in == nil {
return ""
}
return fmt.Sprintf("%s/%s.v%d", in.Namespace, in.Name, in.Version)
}
// VersionedChartName returns the full name of the chart in the format of
// '<name>@<version>'.
func (in *Snapshot) VersionedChartName() string {
if in == nil {
return ""
}
return fmt.Sprintf("%s@%s", in.ChartName, in.ChartVersion)
}
// HasBeenTested returns true if TestHooks is not nil. This includes an empty
// map, which indicates the chart has no tests.
func (in *Snapshot) HasBeenTested() bool {
return in != nil && in.TestHooks != nil
}
// GetTestHooks returns the TestHooks for the release if not nil.
func (in *Snapshot) GetTestHooks() map[string]*TestHookStatus {
if in == nil || in.TestHooks == nil {
return nil
}
return *in.TestHooks
}
// HasTestInPhase returns true if any of the TestHooks is in the given phase.
func (in *Snapshot) HasTestInPhase(phase string) bool {
if in != nil {
for _, h := range in.GetTestHooks() {
if h.Phase == phase {
return true
}
}
}
return false
}
// SetTestHooks sets the TestHooks for the release.
func (in *Snapshot) SetTestHooks(hooks map[string]*TestHookStatus) {
if in == nil || hooks == nil {
return
}
in.TestHooks = &hooks
}
// Targets returns true if the Snapshot targets the given release data.
func (in *Snapshot) Targets(name, namespace string, version int) bool {
if in != nil {
return in.Name == name && in.Namespace == namespace && in.Version == version
}
return false
}
// TestHookStatus holds the status information for a test hook as observed
// to be run by the controller.
type TestHookStatus struct {
// LastStarted is the time the test hook was last started.
// +optional
LastStarted metav1.Time `json:"lastStarted,omitempty"`
// LastCompleted is the time the test hook last completed.
// +optional
LastCompleted metav1.Time `json:"lastCompleted,omitempty"`
// Phase the test hook was observed to be in.
// +optional
Phase string `json:"phase,omitempty"`
}

View File

@ -0,0 +1,298 @@
/*
Copyright 2023 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v2beta2
import (
"reflect"
"testing"
)
func TestSnapshots_Sort(t *testing.T) {
tests := []struct {
name string
in Snapshots
want Snapshots
}{
{
name: "sorts by descending version",
in: Snapshots{
{Version: 1},
{Version: 3},
{Version: 2},
},
want: Snapshots{
{Version: 3},
{Version: 2},
{Version: 1},
},
},
{
name: "already sorted",
in: Snapshots{
{Version: 3},
{Version: 2},
{Version: 1},
},
want: Snapshots{
{Version: 3},
{Version: 2},
{Version: 1},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.in.SortByVersion()
if !reflect.DeepEqual(tt.in, tt.want) {
t.Errorf("SortByVersion() got %v, want %v", tt.in, tt.want)
}
})
}
}
func TestSnapshots_Latest(t *testing.T) {
tests := []struct {
name string
in Snapshots
want *Snapshot
}{
{
name: "returns most recent snapshot",
in: Snapshots{
{Version: 1},
{Version: 3},
{Version: 2},
},
want: &Snapshot{Version: 3},
},
{
name: "returns nil if empty",
in: Snapshots{},
want: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.in.Latest(); !reflect.DeepEqual(got, tt.want) {
t.Errorf("Latest() = %v, want %v", got, tt.want)
}
})
}
}
func TestSnapshots_Previous(t *testing.T) {
tests := []struct {
name string
in Snapshots
ignoreTests bool
want *Snapshot
}{
{
name: "returns previous snapshot",
in: Snapshots{
{Version: 2, Status: "deployed"},
{Version: 3, Status: "failed"},
{Version: 1, Status: "superseded"},
},
want: &Snapshot{Version: 2, Status: "deployed"},
},
{
name: "includes snapshots with failed tests",
in: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 1, Status: "superseded"},
{Version: 2, Status: "superseded"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"test": {Phase: "Failed"},
}},
},
ignoreTests: true,
want: &Snapshot{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"test": {Phase: "Failed"},
}},
},
{
name: "ignores snapshots with failed tests",
in: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 1, Status: "superseded"},
{Version: 2, Status: "superseded"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"test": {Phase: "Failed"},
}},
},
ignoreTests: false,
want: &Snapshot{Version: 2, Status: "superseded"},
},
{
name: "returns nil without previous snapshot",
in: Snapshots{
{Version: 1, Status: "deployed"},
},
want: nil,
},
{
name: "returns nil without snapshot matching criteria",
in: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"test": {Phase: "Failed"},
}},
},
ignoreTests: false,
want: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.in.Previous(tt.ignoreTests); !reflect.DeepEqual(got, tt.want) {
t.Errorf("Previous() = %v, want %v", got, tt.want)
}
})
}
}
func TestSnapshots_Truncate(t *testing.T) {
tests := []struct {
name string
in Snapshots
ignoreTests bool
want Snapshots
}{
{
name: "keeps previous snapshot",
in: Snapshots{
{Version: 1, Status: "superseded"},
{Version: 3, Status: "failed"},
{Version: 2, Status: "superseded"},
{Version: 4, Status: "deployed"},
},
want: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "failed"},
{Version: 2, Status: "superseded"},
},
},
{
name: "ignores snapshots with failed tests",
in: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-fault-test-tiz9x": {Phase: "Failed"},
"upgrade-test-fail-podinfo-grpc-test-gddcw": {},
}},
{Version: 2, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-grpc-test-h0tc2": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-jwt-test-vzusa": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-service-test-b647e": {
Phase: "Succeeded",
},
}},
},
ignoreTests: false,
want: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-fault-test-tiz9x": {Phase: "Failed"},
"upgrade-test-fail-podinfo-grpc-test-gddcw": {},
}},
{Version: 2, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-grpc-test-h0tc2": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-jwt-test-vzusa": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-service-test-b647e": {
Phase: "Succeeded",
},
}},
},
},
{
name: "keeps previous snapshot with failed tests",
in: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-fault-test-tiz9x": {Phase: "Failed"},
"upgrade-test-fail-podinfo-grpc-test-gddcw": {},
}},
{Version: 2, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-grpc-test-h0tc2": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-jwt-test-vzusa": {
Phase: "Succeeded",
},
"upgrade-test-fail-podinfo-service-test-b647e": {
Phase: "Succeeded",
},
}},
{Version: 1, Status: "superseded"},
},
ignoreTests: true,
want: Snapshots{
{Version: 4, Status: "deployed"},
{Version: 3, Status: "superseded", TestHooks: &map[string]*TestHookStatus{
"upgrade-test-fail-podinfo-fault-test-tiz9x": {Phase: "Failed"},
"upgrade-test-fail-podinfo-grpc-test-gddcw": {},
}},
},
},
{
name: "retains most recent snapshots when all have failed",
in: Snapshots{
{Version: 6, Status: "deployed"},
{Version: 5, Status: "failed"},
{Version: 4, Status: "failed"},
{Version: 3, Status: "failed"},
{Version: 2, Status: "failed"},
{Version: 1, Status: "failed"},
},
want: Snapshots{
{Version: 6, Status: "deployed"},
{Version: 5, Status: "failed"},
{Version: 4, Status: "failed"},
{Version: 3, Status: "failed"},
{Version: 2, Status: "failed"},
},
},
{
name: "without previous snapshot",
in: Snapshots{
{Version: 1, Status: "deployed"},
},
want: Snapshots{
{Version: 1, Status: "deployed"},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.in.Truncate(tt.ignoreTests)
if !reflect.DeepEqual(tt.in, tt.want) {
t.Errorf("Truncate() got %v, want %v", tt.in, tt.want)
}
})
}
}

View File

@ -0,0 +1,749 @@
//go:build !ignore_autogenerated
/*
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by controller-gen. DO NOT EDIT.
package v2beta2
import (
"github.com/fluxcd/helm-controller/api/v2"
"github.com/fluxcd/pkg/apis/kustomize"
"github.com/fluxcd/pkg/apis/meta"
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CrossNamespaceObjectReference) DeepCopyInto(out *CrossNamespaceObjectReference) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceObjectReference.
func (in *CrossNamespaceObjectReference) DeepCopy() *CrossNamespaceObjectReference {
if in == nil {
return nil
}
out := new(CrossNamespaceObjectReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CrossNamespaceSourceReference) DeepCopyInto(out *CrossNamespaceSourceReference) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceSourceReference.
func (in *CrossNamespaceSourceReference) DeepCopy() *CrossNamespaceSourceReference {
if in == nil {
return nil
}
out := new(CrossNamespaceSourceReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DriftDetection) DeepCopyInto(out *DriftDetection) {
*out = *in
if in.Ignore != nil {
in, out := &in.Ignore, &out.Ignore
*out = make([]IgnoreRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriftDetection.
func (in *DriftDetection) DeepCopy() *DriftDetection {
if in == nil {
return nil
}
out := new(DriftDetection)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Filter) DeepCopyInto(out *Filter) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.
func (in *Filter) DeepCopy() *Filter {
if in == nil {
return nil
}
out := new(Filter)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmChartTemplate) DeepCopyInto(out *HelmChartTemplate) {
*out = *in
if in.ObjectMeta != nil {
in, out := &in.ObjectMeta, &out.ObjectMeta
*out = new(HelmChartTemplateObjectMeta)
(*in).DeepCopyInto(*out)
}
in.Spec.DeepCopyInto(&out.Spec)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplate.
func (in *HelmChartTemplate) DeepCopy() *HelmChartTemplate {
if in == nil {
return nil
}
out := new(HelmChartTemplate)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmChartTemplateObjectMeta) DeepCopyInto(out *HelmChartTemplateObjectMeta) {
*out = *in
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplateObjectMeta.
func (in *HelmChartTemplateObjectMeta) DeepCopy() *HelmChartTemplateObjectMeta {
if in == nil {
return nil
}
out := new(HelmChartTemplateObjectMeta)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmChartTemplateSpec) DeepCopyInto(out *HelmChartTemplateSpec) {
*out = *in
out.SourceRef = in.SourceRef
if in.Interval != nil {
in, out := &in.Interval, &out.Interval
*out = new(metav1.Duration)
**out = **in
}
if in.ValuesFiles != nil {
in, out := &in.ValuesFiles, &out.ValuesFiles
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Verify != nil {
in, out := &in.Verify, &out.Verify
*out = new(HelmChartTemplateVerification)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplateSpec.
func (in *HelmChartTemplateSpec) DeepCopy() *HelmChartTemplateSpec {
if in == nil {
return nil
}
out := new(HelmChartTemplateSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmChartTemplateVerification) DeepCopyInto(out *HelmChartTemplateVerification) {
*out = *in
if in.SecretRef != nil {
in, out := &in.SecretRef, &out.SecretRef
*out = new(meta.LocalObjectReference)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartTemplateVerification.
func (in *HelmChartTemplateVerification) DeepCopy() *HelmChartTemplateVerification {
if in == nil {
return nil
}
out := new(HelmChartTemplateVerification)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmRelease) DeepCopyInto(out *HelmRelease) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease.
func (in *HelmRelease) DeepCopy() *HelmRelease {
if in == nil {
return nil
}
out := new(HelmRelease)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HelmRelease) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmReleaseList) DeepCopyInto(out *HelmReleaseList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]HelmRelease, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseList.
func (in *HelmReleaseList) DeepCopy() *HelmReleaseList {
if in == nil {
return nil
}
out := new(HelmReleaseList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HelmReleaseList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) {
*out = *in
if in.Chart != nil {
in, out := &in.Chart, &out.Chart
*out = new(HelmChartTemplate)
(*in).DeepCopyInto(*out)
}
if in.ChartRef != nil {
in, out := &in.ChartRef, &out.ChartRef
*out = new(CrossNamespaceSourceReference)
**out = **in
}
out.Interval = in.Interval
if in.KubeConfig != nil {
in, out := &in.KubeConfig, &out.KubeConfig
*out = new(meta.KubeConfigReference)
(*in).DeepCopyInto(*out)
}
if in.DependsOn != nil {
in, out := &in.DependsOn, &out.DependsOn
*out = make([]meta.NamespacedObjectReference, len(*in))
copy(*out, *in)
}
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(metav1.Duration)
**out = **in
}
if in.MaxHistory != nil {
in, out := &in.MaxHistory, &out.MaxHistory
*out = new(int)
**out = **in
}
if in.PersistentClient != nil {
in, out := &in.PersistentClient, &out.PersistentClient
*out = new(bool)
**out = **in
}
if in.DriftDetection != nil {
in, out := &in.DriftDetection, &out.DriftDetection
*out = new(DriftDetection)
(*in).DeepCopyInto(*out)
}
if in.Install != nil {
in, out := &in.Install, &out.Install
*out = new(Install)
(*in).DeepCopyInto(*out)
}
if in.Upgrade != nil {
in, out := &in.Upgrade, &out.Upgrade
*out = new(Upgrade)
(*in).DeepCopyInto(*out)
}
if in.Test != nil {
in, out := &in.Test, &out.Test
*out = new(Test)
(*in).DeepCopyInto(*out)
}
if in.Rollback != nil {
in, out := &in.Rollback, &out.Rollback
*out = new(Rollback)
(*in).DeepCopyInto(*out)
}
if in.Uninstall != nil {
in, out := &in.Uninstall, &out.Uninstall
*out = new(Uninstall)
(*in).DeepCopyInto(*out)
}
if in.ValuesFrom != nil {
in, out := &in.ValuesFrom, &out.ValuesFrom
*out = make([]ValuesReference, len(*in))
copy(*out, *in)
}
if in.Values != nil {
in, out := &in.Values, &out.Values
*out = new(v1.JSON)
(*in).DeepCopyInto(*out)
}
if in.PostRenderers != nil {
in, out := &in.PostRenderers, &out.PostRenderers
*out = make([]PostRenderer, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseSpec.
func (in *HelmReleaseSpec) DeepCopy() *HelmReleaseSpec {
if in == nil {
return nil
}
out := new(HelmReleaseSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]metav1.Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.History != nil {
in, out := &in.History, &out.History
*out = make(v2.Snapshots, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(v2.Snapshot)
(*in).DeepCopyInto(*out)
}
}
}
out.ReconcileRequestStatus = in.ReconcileRequestStatus
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseStatus.
func (in *HelmReleaseStatus) DeepCopy() *HelmReleaseStatus {
if in == nil {
return nil
}
out := new(HelmReleaseStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IgnoreRule) DeepCopyInto(out *IgnoreRule) {
*out = *in
if in.Paths != nil {
in, out := &in.Paths, &out.Paths
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Target != nil {
in, out := &in.Target, &out.Target
*out = new(kustomize.Selector)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IgnoreRule.
func (in *IgnoreRule) DeepCopy() *IgnoreRule {
if in == nil {
return nil
}
out := new(IgnoreRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Install) DeepCopyInto(out *Install) {
*out = *in
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(metav1.Duration)
**out = **in
}
if in.Remediation != nil {
in, out := &in.Remediation, &out.Remediation
*out = new(InstallRemediation)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Install.
func (in *Install) DeepCopy() *Install {
if in == nil {
return nil
}
out := new(Install)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *InstallRemediation) DeepCopyInto(out *InstallRemediation) {
*out = *in
if in.IgnoreTestFailures != nil {
in, out := &in.IgnoreTestFailures, &out.IgnoreTestFailures
*out = new(bool)
**out = **in
}
if in.RemediateLastFailure != nil {
in, out := &in.RemediateLastFailure, &out.RemediateLastFailure
*out = new(bool)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstallRemediation.
func (in *InstallRemediation) DeepCopy() *InstallRemediation {
if in == nil {
return nil
}
out := new(InstallRemediation)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Kustomize) DeepCopyInto(out *Kustomize) {
*out = *in
if in.Patches != nil {
in, out := &in.Patches, &out.Patches
*out = make([]kustomize.Patch, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.PatchesStrategicMerge != nil {
in, out := &in.PatchesStrategicMerge, &out.PatchesStrategicMerge
*out = make([]v1.JSON, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.PatchesJSON6902 != nil {
in, out := &in.PatchesJSON6902, &out.PatchesJSON6902
*out = make([]kustomize.JSON6902Patch, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Images != nil {
in, out := &in.Images, &out.Images
*out = make([]kustomize.Image, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kustomize.
func (in *Kustomize) DeepCopy() *Kustomize {
if in == nil {
return nil
}
out := new(Kustomize)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PostRenderer) DeepCopyInto(out *PostRenderer) {
*out = *in
if in.Kustomize != nil {
in, out := &in.Kustomize, &out.Kustomize
*out = new(Kustomize)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostRenderer.
func (in *PostRenderer) DeepCopy() *PostRenderer {
if in == nil {
return nil
}
out := new(PostRenderer)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Rollback) DeepCopyInto(out *Rollback) {
*out = *in
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(metav1.Duration)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rollback.
func (in *Rollback) DeepCopy() *Rollback {
if in == nil {
return nil
}
out := new(Rollback)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Snapshot) DeepCopyInto(out *Snapshot) {
*out = *in
in.FirstDeployed.DeepCopyInto(&out.FirstDeployed)
in.LastDeployed.DeepCopyInto(&out.LastDeployed)
in.Deleted.DeepCopyInto(&out.Deleted)
if in.TestHooks != nil {
in, out := &in.TestHooks, &out.TestHooks
*out = new(map[string]*TestHookStatus)
if **in != nil {
in, out := *in, *out
*out = make(map[string]*TestHookStatus, len(*in))
for key, val := range *in {
var outVal *TestHookStatus
if val == nil {
(*out)[key] = nil
} else {
inVal := (*in)[key]
in, out := &inVal, &outVal
*out = new(TestHookStatus)
(*in).DeepCopyInto(*out)
}
(*out)[key] = outVal
}
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot.
func (in *Snapshot) DeepCopy() *Snapshot {
if in == nil {
return nil
}
out := new(Snapshot)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in Snapshots) DeepCopyInto(out *Snapshots) {
{
in := &in
*out = make(Snapshots, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(Snapshot)
(*in).DeepCopyInto(*out)
}
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshots.
func (in Snapshots) DeepCopy() Snapshots {
if in == nil {
return nil
}
out := new(Snapshots)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Test) DeepCopyInto(out *Test) {
*out = *in
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(metav1.Duration)
**out = **in
}
if in.Filters != nil {
in, out := &in.Filters, &out.Filters
*out = new([]Filter)
if **in != nil {
in, out := *in, *out
*out = make([]Filter, len(*in))
copy(*out, *in)
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Test.
func (in *Test) DeepCopy() *Test {
if in == nil {
return nil
}
out := new(Test)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestHookStatus) DeepCopyInto(out *TestHookStatus) {
*out = *in
in.LastStarted.DeepCopyInto(&out.LastStarted)
in.LastCompleted.DeepCopyInto(&out.LastCompleted)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestHookStatus.
func (in *TestHookStatus) DeepCopy() *TestHookStatus {
if in == nil {
return nil
}
out := new(TestHookStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Uninstall) DeepCopyInto(out *Uninstall) {
*out = *in
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(metav1.Duration)
**out = **in
}
if in.DeletionPropagation != nil {
in, out := &in.DeletionPropagation, &out.DeletionPropagation
*out = new(string)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Uninstall.
func (in *Uninstall) DeepCopy() *Uninstall {
if in == nil {
return nil
}
out := new(Uninstall)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Upgrade) DeepCopyInto(out *Upgrade) {
*out = *in
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(metav1.Duration)
**out = **in
}
if in.Remediation != nil {
in, out := &in.Remediation, &out.Remediation
*out = new(UpgradeRemediation)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upgrade.
func (in *Upgrade) DeepCopy() *Upgrade {
if in == nil {
return nil
}
out := new(Upgrade)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UpgradeRemediation) DeepCopyInto(out *UpgradeRemediation) {
*out = *in
if in.IgnoreTestFailures != nil {
in, out := &in.IgnoreTestFailures, &out.IgnoreTestFailures
*out = new(bool)
**out = **in
}
if in.RemediateLastFailure != nil {
in, out := &in.RemediateLastFailure, &out.RemediateLastFailure
*out = new(bool)
**out = **in
}
if in.Strategy != nil {
in, out := &in.Strategy, &out.Strategy
*out = new(RemediationStrategy)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeRemediation.
func (in *UpgradeRemediation) DeepCopy() *UpgradeRemediation {
if in == nil {
return nil
}
out := new(UpgradeRemediation)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ValuesReference) DeepCopyInto(out *ValuesReference) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValuesReference.
func (in *ValuesReference) DeepCopy() *ValuesReference {
if in == nil {
return nil
}
out := new(ValuesReference)
in.DeepCopyInto(out)
return out
}

File diff suppressed because it is too large Load Diff

View File

@ -2,8 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: helm-system
resources:
- https://github.com/fluxcd/source-controller/releases/download/v1.0.0-rc.5/source-controller.crds.yaml
- https://github.com/fluxcd/source-controller/releases/download/v1.0.0-rc.5/source-controller.deployment.yaml
- https://github.com/fluxcd/source-controller/releases/download/v1.6.0/source-controller.crds.yaml
- https://github.com/fluxcd/source-controller/releases/download/v1.6.0/source-controller.deployment.yaml
- ../crd
- ../rbac
- ../manager

View File

@ -5,4 +5,4 @@ resources:
images:
- name: fluxcd/helm-controller
newName: fluxcd/helm-controller
newTag: v0.34.0
newTag: v1.3.0

View File

@ -45,6 +45,7 @@ rules:
- source.toolkit.fluxcd.io
resources:
- helmcharts
- ocirepositories
verbs:
- get
- list
@ -53,5 +54,6 @@ rules:
- source.toolkit.fluxcd.io
resources:
- helmcharts/status
- ocirepositories/status
verbs:
- get

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: podinfo-gitrepository
@ -10,9 +10,3 @@ spec:
sourceRef:
kind: GitRepository
name: podinfo
interval: 1m
upgrade:
remediation:
remediateLastFailure: true
test:
enable: true

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: podinfo-helmrepository
@ -11,9 +11,4 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
upgrade:
remediation:
remediateLastFailure: true
test:
enable: true
interval: 10m

View File

@ -0,0 +1,13 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: podinfo-ocirepository
spec:
interval: 5m
chartRef:
kind: OCIRepository
name: podinfo
test:
enable: true
values:
replicaCount: 2

View File

@ -1,4 +1,4 @@
apiVersion: source.toolkit.fluxcd.io/v1beta2
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: podinfo

View File

@ -0,0 +1,9 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: OCIRepository
metadata:
name: podinfo
spec:
interval: 1m
url: oci://ghcr.io/stefanprodan/charts/podinfo
ref:
semver: 6.x

View File

@ -11,6 +11,6 @@ spec:
{{- if .Values.branch }}
branch: "{{ .Values.branch }}"
{{- end}}
{{- if .Values.branch }}
{{- if .Values.tag }}
tag: "{{ .Values.tag }}"
{{- end}}

View File

@ -1,5 +1,5 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: crds-upgrade-test

View File

@ -1,5 +1,5 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: crds-upgrade-test

View File

@ -1,5 +1,5 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: crds-upgrade-test

View File

@ -51,7 +51,7 @@ spec:
interval: 1m
url: https://stefanprodan.github.io/podinfo
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: backend

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: frontend

View File

@ -51,7 +51,7 @@ spec:
interval: 1m
url: https://stefanprodan.github.io/podinfo
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
@ -67,7 +67,7 @@ spec:
kind: HelmRepository
name: podinfo
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo-fail

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: install-create-target-ns

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: install-fail-remediate
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,10 +11,12 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
install:
remediation:
remediateLastFailure: true
uninstall:
keepHistory: true
values:
resources:
requests:

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: install-fail-retry
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
install:
remediation:
retries: 1

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: install-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:

View File

@ -0,0 +1,29 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmChart
metadata:
name: podinfo-hc
spec:
chart: podinfo
version: '6.2.1'
sourceRef:
kind: HelmRepository
name: podinfo-oci
interval: 30s
verify:
provider: cosign
---
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo-from-hc
spec:
chartRef:
kind: HelmChart
name: podinfo-hc
interval: 30s
values:
resources:
requests:
cpu: 100m
memory: 64Mi

View File

@ -0,0 +1,25 @@
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: OCIRepository
metadata:
name: podinfo-ocirepo
spec:
interval: 30s
url: oci://ghcr.io/stefanprodan/charts/podinfo
ref:
tag: 6.6.0
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: podinfo-from-ocirepo
spec:
chartRef:
kind: OCIRepository
name: podinfo-ocirepo
interval: 30s
values:
resources:
requests:
cpu: 100m
memory: 64Mi

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: install-test-fail-ignore
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
test:
enable: true
ignoreFailures: true

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: install-test-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
test:
enable: true
values:

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo-git

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo-oci

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: post-renderer-kustomize
@ -7,7 +7,7 @@ spec:
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
version: '>=6.0.0 <6.9.0'
sourceRef:
kind: HelmRepository
name: podinfo
@ -16,20 +16,20 @@ spec:
fullnameOverride: mypodinfo
postRenderers:
- kustomize:
patchesStrategicMerge:
- kind: Deployment
patches:
- patch: |
kind: Deployment
apiVersion: apps/v1
metadata:
name: mypodinfo
labels:
xxxx: yyyy
patchesJson6902:
- target:
group: apps
version: v1
kind: Deployment
name: mypodinfo
patch:
patch: |
- op: add
path: /metadata/labels/yyyy
value: xxxx

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: status-defaults

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: targetnamespace

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: upgrade-fail-remediate-uninstall
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: upgrade-fail-remediate-uninstall
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
upgrade:
remediation:
remediateLastFailure: true

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: upgrade-fail-remediate
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: upgrade-fail-remediate
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
upgrade:
remediation:
remediateLastFailure: true

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: upgrade-fail-retry
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: upgrade-fail-retry
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
upgrade:
remediation:
retries: 1

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: upgrade-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: upgrade-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:

View File

@ -0,0 +1,25 @@
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: OCIRepository
metadata:
name: upgrade-from-ocirepo-source
spec:
interval: 30s
url: oci://ghcr.io/stefanprodan/charts/podinfo
ref:
digest: "sha256:cdd538a0167e4b51152b71a477e51eb6737553510ce8797dbcc537e1342311bb"
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: upgrade-from-ocirepo-source
spec:
chartRef:
kind: OCIRepository
name: upgrade-from-ocirepo-source
interval: 30s
values:
resources:
requests:
cpu: 100m
memory: 64Mi

View File

@ -0,0 +1,10 @@
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: OCIRepository
metadata:
name: upgrade-from-ocirepo-source
spec:
interval: 30s
url: oci://ghcr.io/stefanprodan/charts/podinfo
ref:
digest: "sha256:0cc9a8446c95009ef382f5eade883a67c257f77d50f84e78ecef2aac9428d1e5"

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: upgrade-test-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:

View File

@ -1,9 +1,9 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: upgrade-test-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
test:
enable: true
values:

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: valuesfrom
@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
valuesFrom:
- kind: ConfigMap
name: valuesfrom-config

3086
docs/api/v2/helm.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
<h1>HelmRelease API reference</h1>
<h1>Helm API reference v2beta1</h1>
<p>Packages:</p>
<ul class="simple">
<li>
@ -92,7 +92,9 @@ Kubernetes meta/v1.Duration
</em>
</td>
<td>
<p>Interval at which to reconcile the Helm release.</p>
<p>Interval at which to reconcile the Helm release.
This interval is approximate and may be subject to jitter to ensure
efficient use of resources.</p>
</td>
</tr>
<tr>
@ -901,7 +903,9 @@ Kubernetes meta/v1.Duration
</em>
</td>
<td>
<p>Interval at which to reconcile the Helm release.</p>
<p>Interval at which to reconcile the Helm release.
This interval is approximate and may be subject to jitter to ensure
efficient use of resources.</p>
</td>
</tr>
<tr>
@ -1940,6 +1944,19 @@ bool
a Helm uninstall is performed.</p>
</td>
</tr>
<tr>
<td>
<code>deletionPropagation</code><br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>DeletionPropagation specifies the deletion propagation policy when
a Helm uninstall is performed.</p>
</td>
</tr>
</tbody>
</table>
</div>

3001
docs/api/v2beta2/helm.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,7 @@ actions that should be (conditionally) executed. Based on this the reconciler:
- performs a Helm install or upgrade action if needed
- performs a Helm test action if enabled
- performs a reconciliation strategy (rollback, uninstall) and retries as configured if any Helm action failed
- performs in cluster drift detection and correction if enabled
The controller that runs these Helm actions relies on [source-controller](https://github.com/fluxcd/source-controller)
for providing the Helm charts from Helm repositories or any other source that source-controller
@ -50,7 +51,7 @@ trigger a Helm uninstall.
Alerting can be configured with a Kubernetes custom resource that specifies a webhook address, and a
group of `HelmRelease` resources to be monitored using the [notification-controller](https://github.com/fluxcd/notification-controller).
The API design of the controller can be found at [helm.toolkit.fluxcd.io/v2beta1](./v2beta1/helmreleases.md).
The API design of the controller can be found at [helm.toolkit.fluxcd.io/v2](./v2/helmreleases.md).
## Backward compatibility

16
docs/spec/v2/README.md Normal file
View File

@ -0,0 +1,16 @@
# helm.toolkit.fluxcd.io/v2
This is the v2 API specification for declaratively managing Helm chart
releases with Kubernetes manifests.
## Specification
- [HelmRelease CRD](helmreleases.md)
+ [Example](helmreleases.md#example)
+ [Writing a HelmRelease spec](helmreleases.md#writing-a-helmrelease-spec)
+ [Working with HelmReleases](helmreleases.md#working-with-helmreleases)
+ [HelmRelease Status](helmreleases.md#helmrelease-status)
## Implementation
* [helm-controller](https://github.com/fluxcd/helm-controller/)

2016
docs/spec/v2/helmreleases.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,7 @@
# Helm Releases
<!-- menuweight:20 -->
The `HelmRelease` API defines a resource for automated controller driven Helm releases.
## Specification
@ -18,6 +20,8 @@ type HelmReleaseSpec struct {
Chart HelmChartTemplate `json:"chart"`
// Interval at which to reconcile the Helm release.
// This interval is approximate and may be subject to jitter to ensure
// efficient use of resources.
// +required
Interval metav1.Duration `json:"interval"`
@ -480,6 +484,13 @@ type Uninstall struct {
// a Helm uninstall is performed.
// +optional
DisableWait bool `json:"disableWait,omitempty"`
// DeletionPropagation specifies the deletion propagation policy when
// a Helm uninstall is performed.
// +kubebuilder:default=background
// +kubebuilder:validation:Enum=background;foreground;orphan
// +optional
DeletionPropagation *string `json:"deletionPropagation,omitempty"`
}
// Kustomize Helm PostRenderer specification.
@ -813,6 +824,11 @@ desired state, so an upgrade is made in this case as well.
The `spec.interval` tells the reconciler at which interval to reconcile the release. The
interval time units are `s`, `m` and `h` e.g. `interval: 5m`, the minimum value should be 60 seconds.
**Note:** The controller can be configured to apply a jitter to the interval in
order to distribute the load more evenly when multiple HelmRelease objects are
set up with the same interval. For more information, please refer to the
[helm-controller configuration options](https://fluxcd.io/flux/components/helm/options/).
The reconciler can be told to reconcile the `HelmRelease` outside of the specified interval
by annotating the object with a `reconcile.fluxcd.io/requestedAt` annotation. For example:
@ -1011,7 +1027,7 @@ spec:
## Role-based access control
By default, a `HelmRelease` runs under the cluster admin account and can create, modify, delete cluster level objects
(cluster roles, cluster role binding, CRDs, etc) and namespeced objects (deployments, ingresses, etc).
(cluster roles, cluster role binding, CRDs, etc) and namespaced objects (deployments, ingresses, etc).
For certain `HelmReleases` a cluster admin may wish to control what types of Kubernetes objects can
be reconciled and under which namespace.
To restrict a `HelmRelease`, one can assign a service account under which the reconciliation is performed.

View File

@ -0,0 +1,16 @@
# helm.toolkit.fluxcd.io/v2beta2
This is the v2beta2 API specification for declaratively managing Helm chart
releases with Kubernetes manifests.
## Specification
- [HelmRelease CRD](helmreleases.md)
+ [Example](helmreleases.md#example)
+ [Writing a HelmRelease spec](helmreleases.md#writing-a-helmrelease-spec)
+ [Working with HelmReleases](helmreleases.md#working-with-helmreleases)
+ [HelmRelease Status](helmreleases.md#helmrelease-status)
## Implementation
* [helm-controller](https://github.com/fluxcd/helm-controller/)

File diff suppressed because it is too large Load Diff

304
go.mod
View File

@ -1,173 +1,225 @@
module github.com/fluxcd/helm-controller
go 1.18
go 1.24.0
replace github.com/fluxcd/helm-controller/api => ./api
require (
github.com/fluxcd/helm-controller/api v0.34.0
github.com/fluxcd/pkg/apis/acl v0.1.0
github.com/fluxcd/pkg/apis/event v0.5.0
github.com/fluxcd/pkg/apis/kustomize v1.1.0
github.com/fluxcd/pkg/apis/meta v1.1.0
github.com/fluxcd/pkg/runtime v0.38.1
github.com/fluxcd/pkg/ssa v0.28.1
github.com/fluxcd/source-controller/api v1.0.0-rc.5
github.com/go-logr/logr v1.2.4
github.com/google/go-cmp v0.5.9
github.com/hashicorp/go-retryablehttp v0.7.2
github.com/onsi/gomega v1.27.7
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/go-digest/blake3 v0.0.0-20230329235805-65fac7b55eb7
github.com/spf13/pflag v1.0.5
gopkg.in/yaml.v2 v2.4.0
helm.sh/helm/v3 v3.12.0
k8s.io/api v0.27.2
k8s.io/apiextensions-apiserver v0.27.2
k8s.io/apimachinery v0.27.2
k8s.io/cli-runtime v0.27.2
k8s.io/client-go v0.27.2
k8s.io/utils v0.0.0-20230505201702-9f6742963106
sigs.k8s.io/cli-utils v0.34.0
sigs.k8s.io/controller-runtime v0.15.0
sigs.k8s.io/kustomize/api v0.13.4
sigs.k8s.io/yaml v1.3.0
)
// Replace digest lib to master to gather access to BLAKE3.
// xref: https://github.com/opencontainers/go-digest/pull/66
replace github.com/opencontainers/go-digest => github.com/opencontainers/go-digest v1.0.1-0.20220411205349-bde1400a84be
replace github.com/opencontainers/go-digest => github.com/opencontainers/go-digest v1.0.1-0.20231025023718-d50d2fec9c98
// Pin kustomize to v5.0.3
// Pin kustomize to v5.7.0
replace (
sigs.k8s.io/kustomize/api => sigs.k8s.io/kustomize/api v0.13.4
sigs.k8s.io/kustomize/kyaml => sigs.k8s.io/kustomize/kyaml v0.14.2
sigs.k8s.io/kustomize/api => sigs.k8s.io/kustomize/api v0.20.0
sigs.k8s.io/kustomize/kyaml => sigs.k8s.io/kustomize/kyaml v0.20.0
)
require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Masterminds/semver/v3 v3.3.0
github.com/fluxcd/cli-utils v0.36.0-flux.14
github.com/fluxcd/helm-controller/api v1.3.0
github.com/fluxcd/pkg/apis/acl v0.8.0
github.com/fluxcd/pkg/apis/event v0.18.0
github.com/fluxcd/pkg/apis/kustomize v1.11.0
github.com/fluxcd/pkg/apis/meta v1.18.0
github.com/fluxcd/pkg/auth v0.27.0
github.com/fluxcd/pkg/cache v0.10.0
github.com/fluxcd/pkg/chartutil v1.9.0
github.com/fluxcd/pkg/runtime v0.80.0
github.com/fluxcd/pkg/ssa v0.51.0
github.com/fluxcd/pkg/testserver v0.11.0
github.com/fluxcd/source-controller/api v1.6.0
github.com/go-logr/logr v1.4.3
github.com/google/cel-go v0.23.2
github.com/google/go-cmp v0.7.0
github.com/hashicorp/go-retryablehttp v0.7.8
github.com/mitchellh/copystructure v1.2.0
github.com/onsi/gomega v1.37.0
github.com/opencontainers/go-digest v1.0.1-0.20231025023718-d50d2fec9c98
github.com/opencontainers/go-digest/blake3 v0.0.0-20250116041648-1e56c6daea3b
github.com/spf13/pflag v1.0.6
github.com/wI2L/jsondiff v0.7.0
golang.org/x/text v0.27.0
helm.sh/helm/v3 v3.18.4
k8s.io/api v0.33.2
k8s.io/apiextensions-apiserver v0.33.2
k8s.io/apimachinery v0.33.2
k8s.io/cli-runtime v0.33.2
k8s.io/client-go v0.33.2
k8s.io/kubectl v0.33.2
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
sigs.k8s.io/controller-runtime v0.21.0
sigs.k8s.io/kustomize/api v0.20.0
sigs.k8s.io/kustomize/kyaml v0.20.0
sigs.k8s.io/yaml v1.5.0
)
require (
cel.dev/expr v0.23.0 // indirect
cloud.google.com/go/auth v0.16.2 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
cloud.google.com/go/compute/metadata v0.7.0 // indirect
dario.cat/mergo v1.0.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/containers/azcontainerregistry v0.2.3 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice v1.0.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 // indirect
github.com/BurntSushi/toml v1.5.0 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Masterminds/squirrel v1.5.3 // indirect
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/Masterminds/squirrel v1.5.4 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go-v2 v1.36.5 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.17 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.70 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ecr v1.45.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.33.2 // indirect
github.com/aws/aws-sdk-go-v2/service/eks v1.66.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.25.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 // indirect
github.com/aws/smithy-go v1.22.4 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/carapace-sh/carapace-shlex v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/containerd/containerd v1.7.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v20.10.21+incompatible // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v20.10.24+incompatible // indirect
github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/containerd/containerd v1.7.27 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/cli v28.2.2+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-gorp/gorp/v3 v3.0.5 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zapr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.21.1 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.1 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-containerregistry v0.20.6 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
github.com/googleapis/gax-go/v2 v2.14.2 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/gosuri/uitable v0.0.4 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jmoiron/sqlx v1.3.5 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmoiron/sqlx v1.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/lib/pq v1.10.7 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mailru/easyjson v0.9.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.15.1 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rubenv/sql-migrate v1.3.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.22.0 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.65.0 // indirect
github.com/prometheus/procfs v0.17.0 // indirect
github.com/rubenv/sql-migrate v1.8.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/cobra v1.9.1 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/stretchr/testify v1.10.0 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xlab/treeprint v1.1.0 // indirect
github.com/zeebo/blake3 v0.1.1 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
go.starlark.net v0.0.0-20221028183056-acb66ad56dd2 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/zeebo/blake3 v0.2.3 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/otel/trace v1.37.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.39.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.41.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/term v0.33.0 // indirect
golang.org/x/time v0.12.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
google.golang.org/api v0.241.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/grpc v1.73.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiserver v0.27.2 // indirect
k8s.io/component-base v0.27.2 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/kubectl v0.27.1 // indirect
oras.land/oras-go v1.2.2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/kyaml v0.14.2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
gotest.tools/v3 v3.4.0 // indirect
k8s.io/apiserver v0.33.2 // indirect
k8s.io/component-base v0.33.2 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20250701173324-9bd5c66d9911 // indirect
oras.land/oras-go/v2 v2.6.0 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
)

1452
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,10 @@
{{ define "packages" }}
<h1>HelmRelease API reference</h1>
<h1>Helm API reference
{{- with (index .packages 0) -}}
{{ with (index .GoPackages 0 ) -}}
{{ printf " %s" .Name -}}
{{ end -}}
{{ end }}</h1>
{{ with .packages}}
<p>Packages:</p>

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 The Flux authors
Copyright 2024 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

43
internal/acl/acl.go Normal file
View File

@ -0,0 +1,43 @@
/*
Copyright 2023 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package acl
import (
"fmt"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/fluxcd/pkg/runtime/acl"
)
var (
// AllowCrossNamespaceRef is a global flag that can be used to allow
// cross-namespace references.
AllowCrossNamespaceRef = false
)
// AllowsAccessTo returns an error if the object does not allow access to the
// given reference.
func AllowsAccessTo(obj client.Object, kind string, ref types.NamespacedName) error {
if !AllowCrossNamespaceRef && obj.GetNamespace() != ref.Namespace {
return acl.AccessDeniedError(fmt.Sprintf("cross-namespace references are not allowed: cannot access %s %s",
kind, ref.String(),
))
}
return nil
}

95
internal/acl/acl_test.go Normal file
View File

@ -0,0 +1,95 @@
/*
Copyright 2023 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package acl
import (
"testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
v2 "github.com/fluxcd/helm-controller/api/v2"
)
func TestAllowsAccessTo(t *testing.T) {
tests := []struct {
name string
allow bool
obj client.Object
ref types.NamespacedName
wantErr bool
}{
{
name: "allow cross-namespace reference",
allow: true,
obj: &v2.HelmRelease{
ObjectMeta: metav1.ObjectMeta{
Name: "some-name",
Namespace: "some-namespace",
},
},
ref: types.NamespacedName{
Name: "some-name",
Namespace: "some-other-namespace",
},
wantErr: false,
},
{
name: "disallow cross-namespace reference",
allow: false,
obj: &v2.HelmRelease{
ObjectMeta: metav1.ObjectMeta{
Name: "some-name",
Namespace: "some-namespace",
},
},
ref: types.NamespacedName{
Name: "some-name",
Namespace: "some-other-namespace",
},
wantErr: true,
},
{
name: "allow same-namespace reference",
allow: false,
obj: &v2.HelmRelease{
ObjectMeta: metav1.ObjectMeta{
Name: "some-name",
Namespace: "some-namespace",
},
},
ref: types.NamespacedName{
Name: "some-name",
Namespace: "some-namespace",
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
curAllow := AllowCrossNamespaceRef
AllowCrossNamespaceRef = tt.allow
t.Cleanup(func() { AllowCrossNamespaceRef = curAllow })
if err := AllowsAccessTo(tt.obj, "mock", tt.ref); (err != nil) != tt.wantErr {
t.Errorf("AllowsAccessTo() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}

Some files were not shown because too many files have changed in this diff Show More