Compare commits

...

1811 Commits

Author SHA1 Message Date
Stefan Prodan 60b8f86f49
Merge pull request #1491 from fluxcd/feat-dependon-cel
Extend the readiness evaluation of dependencies with CEL expressions
2025-07-29 08:28:26 +03:00
Stefan Prodan fd63b520d5
controller: Move manager to a dedicated file
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-22 20:43:14 +03:00
Stefan Prodan d17e5d2514
docs: Add dependency ready expression to API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-22 20:24:03 +03:00
Stefan Prodan e0e6e22272
controller: Implement CEL evaluation for dependency checks
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-22 20:23:58 +03:00
Stefan Prodan c2754dd5de
controller: Add `AdditiveCELDependencyCheck` feature gate
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-22 12:57:52 +03:00
Stefan Prodan 5edcf5b394
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 12:57:08 +03:00
Matheus Pimenta 8ec3ec388d
Merge pull request #1488 from fluxcd/restconfig-azure-cloud
[RFC-0010] Support all Azure clouds for remote clusters at the controller level
2025-07-18 08:25:47 +01:00
Matheus Pimenta 0c48a16ede
[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:10:19 +01:00
Matheus Pimenta c48ffbef1c
Merge pull request #1486 from fluxcd/watch-label
Introduce label selector for watching ConfigMaps and Secrets
2025-07-17 10:40:05 +01:00
Matheus Pimenta 2dcec193bb
Introduce label selector for watching ConfigMaps and Secrets
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-17 10:29:26 +01:00
Stefan Prodan b4d23e756f
Merge pull request #1487 from fluxcd/fix-substitute-doc
docs: Clarify `substituteFrom` overwrite order
2025-07-17 09:34:20 +03:00
Stefan Prodan 2fb1fa3890
docs: Clarify `substituteFrom` overwrite order
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-17 09:00:56 +03:00
Matheus Pimenta ba3c16aa45
Merge pull request #1476 from fluxcd/restconfig
[RFC-0010] Introduce workload identity auth for remote clusters
2025-07-14 18:45:25 +01:00
Matheus Pimenta 2fb1482f71
[RFC-0010] Introduce workload identity auth for remote clusters
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-14 16:47:26 +01:00
Stefan Prodan 52170876d5
Merge pull request #1484 from fluxcd/ssa-staged
Refactor reconciler to use `ssa.ApplyAllStaged`
2025-07-08 20:25:06 +03:00
Stefan Prodan 1476042b1e
Refactor reconciler to use `ssa.ApplyAllStaged`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-08 19:42:12 +03:00
Matheus Pimenta f479c3e1f6
Merge pull request #1483 from fluxcd/pick-changelog-v1.6.1
Add changelog entry for v1.6.1
2025-07-08 10:14:48 +01:00
Matheus Pimenta bc4756a38f
Add changelog entry for v1.6.1
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
(cherry picked from commit 2333a7413c)
2025-07-08 10:02:19 +01:00
Matheus Pimenta 5703d47395
Merge pull request #1481 from fluxcd/global-secret-based-decryption
Introduce global decryption for SOPS age keys
2025-07-07 11:25:31 +01:00
Matheus Pimenta 30275f2615
Introduce global decryption for SOPS age keys
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-06 19:24:22 +01:00
Matheus Pimenta a342d00602
Merge pull request #1478 from fluxcd/fix-1477
Fix regression in STS endpoint for SOPS decryption with AWS KMS in US Gov partition
2025-07-03 17:53:50 +01:00
Matheus Pimenta 4623a38989
Fix regression in STS endpoint for SOPS decryption with AWS KMS in US Gov partition
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-03 17:39:11 +01:00
Matheus Pimenta 124402b53a
Merge pull request #1472 from dgunzy/bump-ssa-v0.49.0
Bump pkg/ssa to v0.49.0 for CABundle validation fix
2025-06-29 16:56:18 +01:00
Daniel Guns 8e90ab8008
Bump pkg/ssa to v0.49.0 for CABundle validation fix
Includes fix for #800: Remove CABundle from CRDs if cert is invalid

Signed-off-by: Daniel Guns <danbguns@gmail.com>
2025-06-29 12:39:09 -03:00
Matheus Pimenta 8c1d87ba6a
Merge pull request #1470 from cappyzawa/update-kustomize-v5.7.0
Update kustomize to v5.7.0 and add regression test for multiple patch delete
2025-06-29 16:01:53 +01:00
cappyzawa 8479377cd7
Add regression test for multiple patch delete in strategic merge patches
This test ensures that the controller properly handles multiple
$patch: delete directives in strategic merge patches, which was
causing panic errors in kustomize v5.6.0 but is now fixed in v5.7.0.

The test includes two scenarios:
- Multiple delete directives in a single patch (the main fix)
- Multiple delete directives in separate patches (previously a workaround)

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-06-29 15:38:51 +09:00
cappyzawa ebee7880e7
Update kustomize dependency from v5.6.0 to v5.7.0
The v5.7.0 release fixes panic issues that occur when using multiple
$patch: delete directives in a single strategic merge patch. This was
causing kustomize build to fail with nil pointer dereference errors.

This change updates:
- sigs.k8s.io/kustomize/api from v0.19.0 to v0.20.0
- sigs.k8s.io/kustomize/kyaml from v0.19.0 to v0.20.0
- sigs.k8s.io/yaml from v1.4.0 to v1.5.0 (dependency update)

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-06-29 15:14:05 +09:00
Stefan Prodan 9f784c5e9f
Merge pull request #1463 from fluxcd/dependabot-up
Update dependabot config
2025-05-28 16:46:19 +03:00
Stefan Prodan 07837f603c
Update dependabot config
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-28 16:35:40 +03:00
Matheus Pimenta ee8981f35d
Merge pull request #1462 from fluxcd/update-labels
Add 1.6.x release label
2025-05-28 14:32:06 +01:00
Matheus Pimenta 40a75725dd
Add 1.6.x release label
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-28 14:22:47 +01:00
Matheus Pimenta f1cfd9f0c8
Merge pull request #1461 from fluxcd/release/v1.6.x
Release/v1.6.x
2025-05-28 14:20:21 +01:00
Matheus Pimenta f54038e15d
Merge pull request #1460 from fluxcd/release-v1.6.0
Release v1.6.0
2025-05-28 13:39:03 +01:00
Matheus Pimenta 6efc3ebe0a
Release v1.6.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-28 13:20:38 +01:00
Matheus Pimenta 9eb8ca73ca
Add changelog entry for v1.6.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-28 13:19:53 +01:00
Stefan Prodan 24e54da3cf
Merge pull request #1458 from fluxcd/oci-ga
Update controller to OCIRepository v1 (GA)
2025-05-28 13:53:54 +03:00
Stefan Prodan ff76a91987
Update controller to OCIRepository v1 (GA)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-28 13:24:44 +03:00
Matheus Pimenta f2db6a2db6
Update dependencies
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-28 10:49:38 +01:00
Stefan Prodan ada569f859
Merge pull request #1448 from fluxcd/dependabot/github_actions/ci-b758b462f2
Bump the ci group across 1 directory with 4 updates
2025-05-27 10:42:17 +03:00
dependabot[bot] 1d32962c17
Bump the ci group across 1 directory with 4 updates
Bumps the ci group with 4 updates in the / directory: [actions/setup-go](https://github.com/actions/setup-go), [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 `actions/setup-go` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](0aaccfd150...d35c59abb0)

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.16 to 3.28.17
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](28deaeda66...60168efe1c)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 5.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- 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.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-27 07:31:55 +00:00
Stefan Prodan e537b99a17
Merge pull request #1456 from fluxcd/rfc-0010-docs
[RFC-0010] Link workload identity docs to complete guide
2025-05-27 09:01:57 +03:00
Matheus Pimenta 8303b0854d
[RFC-0010] Link workload identity docs to complete guide
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-26 23:46:29 +01:00
Stefan Prodan 55be958932
Merge pull request #1444 from fluxcd/gc-wait-for-termination
Implement `WaitForTermination` deletion policy
2025-05-23 12:29:21 +02:00
Matheus Pimenta c25690c4c1
Merge pull request #1449 from fluxcd/rfc-0010-feature-gate
[RFC-0010] Introduce feature gate
2025-05-23 07:59:07 +01:00
Matheus Pimenta 0d6ab9f762
[RFC-0010] Introduce feature gate
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-19 14:18:35 +01:00
Stefan Prodan 413118e9a7
Document The `WaitForTermination` policy
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-13 16:31:33 +03:00
Stefan Prodan 98adddbf2e
Implement waiting for termination at finalization
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-13 13:36:54 +03:00
Stefan Prodan 92070be338
Update `fluxcd/pkg/ssa` to v0.47.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-13 12:52:40 +03:00
Stefan Prodan c54d9f6bec
Add `WaitForTermination` option to DeletionPolicy
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-13 12:51:57 +03:00
Matheus Pimenta d775ed3a19
Merge pull request #1426 from fluxcd/rfc-0010
[RFC-0010] Introduce object-level workload identity for KMS decryption
2025-05-07 17:58:58 +01:00
Matheus Pimenta ac963f92f4
[RFC-0010] Introduce KMS provider decryption with service account
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-07 17:43:35 +01:00
Matheus Pimenta d157045895
Merge pull request #1436 from fluxcd/fix-1428
Fix performance regression due to using client without cache
2025-04-29 14:00:56 +01:00
Matheus Pimenta 361a28eed9
Fix performance regression due to using client without cache
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-04-29 13:48:31 +01:00
Stefan Prodan 690c8c8a74
Merge pull request #1433 from fluxcd/dependabot/github_actions/ci-4c7c75f92f
Bump the ci group across 1 directory with 14 updates
2025-04-28 14:56:55 +03:00
dependabot[bot] 88ccb5a3d5
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-04-28 11:35:19 +00:00
Stefan Prodan 8079722607
Merge pull request #1435 from fluxcd/ks-1.33
Update to Kubernetes 1.33.0 and Go 1.24.0
2025-04-28 14:32:58 +03:00
Stefan Prodan 3ac784dbc8
Update to Kubernetes 1.33.0 and Go 1.24.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-04-28 14:12:22 +03:00
Stefan Prodan a5e315e923
Merge pull request #1429 from fluxcd/controller-runtime-v0.20.4
Update controller-runtime to v0.20.4
2025-04-24 12:29:28 +03:00
Stefan Prodan 59bbc527b6
Update controller-runtime to v0.20.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-04-23 09:59:46 +03:00
Stefan Prodan e2794590cd
Merge pull request #1427 from florensie/patch-1
docs: Update link to envsubst lib
2025-04-23 09:53:03 +03:00
Florens Pauwels a8edbb96d1
Update link to envsubst lib
Signed-off-by: Florens Pauwels <github@florens.be>
2025-04-18 12:57:38 +02:00
Stefan Prodan 60afb73327
Merge pull request #1396 from norman-zon/suspension-event-log
Skip emitting events for suspended Kustomizations
2025-04-15 10:26:35 +03:00
Norman Stetter 2d89eb6010
feat: prevent no-op reconciles
There are edge cases where a reonciliation can be triggered on a
suspended Kustomization, mainly through changes in a source.
In these cases a "no-op" reconciliation occurs, which can be confusing
for the user. This returns early if the Kustomization ist suspended.

Signed-off-by: Norman Stetter <85173861+norman-zon@users.noreply.github.com>
2025-04-15 08:47:28 +02:00
Stefan Prodan 35fd6c158b
Merge pull request #1413 from zevisert/docs/add-mention-CEL-macros
docs: mention CEL macros when discussing health check expressions
2025-04-10 10:32:42 +03:00
Matheus Pimenta 2437aaf32e
Merge pull request #1414 from fluxcd/dependabot/go_modules/go-deps-2507ff55c6
Bump github.com/getsops/sops/v3 from 3.10.0 to 3.10.1 in the go-deps group
2025-04-01 09:20:51 +01:00
dependabot[bot] b715ca0e60
Bump github.com/getsops/sops/v3 in the go-deps group
Bumps the go-deps group with 1 update: [github.com/getsops/sops/v3](https://github.com/getsops/sops).


Updates `github.com/getsops/sops/v3` from 3.10.0 to 3.10.1
- [Release notes](https://github.com/getsops/sops/releases)
- [Changelog](https://github.com/getsops/sops/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsops/sops/compare/v3.10.0...v3.10.1)

---
updated-dependencies:
- dependency-name: github.com/getsops/sops/v3
  dependency-version: 3.10.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 02:49:32 +00:00
Zev Isert 6c7da05677
docs: mention CEL macros when discussing health check expressions
Signed-off-by: Zev Isert <dev@zevisert.ca>
2025-03-31 16:58:00 -07:00
Matheus Pimenta 12628b8187
Merge pull request #1410 from fluxcd/dependabot/go_modules/go-deps-0ef529e661
Bump the go-deps group across 1 directory with 3 updates
2025-03-31 05:29:54 +01:00
Matheus Pimenta cb67f6f015
Fix decryption test due to SOPS breaking change
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-03-31 05:16:08 +01:00
dependabot[bot] 6b139adfaa
Bump the go-deps group across 1 directory with 3 updates
Bumps the go-deps group with 2 updates in the / directory: [github.com/getsops/sops/v3](https://github.com/getsops/sops) and [github.com/onsi/gomega](https://github.com/onsi/gomega).


Updates `github.com/getsops/sops/v3` from 3.9.4 to 3.10.0
- [Release notes](https://github.com/getsops/sops/releases)
- [Changelog](https://github.com/getsops/sops/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsops/sops/compare/v3.9.4...v3.10.0)

Updates `github.com/onsi/gomega` from 1.36.2 to 1.36.3
- [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.36.2...v1.36.3)

Updates `golang.org/x/net` from 0.35.0 to 0.38.0
- [Commits](https://github.com/golang/net/compare/v0.35.0...v0.38.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 02:39:46 +00:00
Matheus Pimenta 860d5f8339
Merge pull request #1401 from fluxcd/upgrade-deps
Update `fluxcd/pkg/runtime` to v0.58.0
2025-03-27 11:53:57 +00:00
Matheus Pimenta 42b9036bf3
Update `fluxcd/pkg/runtime` to v0.58.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-03-27 11:35:53 +00:00
Matheus Pimenta dc0e5853c0
Merge pull request #1381 from fluxcd/pick-changelog-v1.5.1
Add changelog entry for v1.5.1
2025-02-25 15:20:46 +00:00
Matheus Pimenta 6c001f2862
Add changelog entry for v1.5.1
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
(cherry picked from commit c6cdd95e84)
2025-02-25 14:45:45 +00:00
Stefan Prodan c353f1e532
Merge pull request #1377 from fluxcd/lazy-restmapper
Use the dynamic RESTMapper from controller-runtime v0.19
2025-02-25 15:50:09 +02:00
Stefan Prodan 4ad6f256f6
Update `fluxcd/pkg/runtime` to v0.54.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-02-25 14:31:49 +02:00
Stefan Prodan 12b3acbaaa
Add test for RESTMapper with CRD/CR
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-02-25 13:34:57 +02:00
Stefan Prodan 8b6f4bc6e9
Use lazy restmapper vendored from controller-runtime v0.19
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-02-25 09:30:03 +02:00
Matheus Pimenta 0837a4217a
Merge pull request #1372 from fluxcd/redact-values
Fix secret value showing up in logs
2025-02-24 16:32:42 +00:00
Matheus Pimenta a7e4927fed
Fix secret value showing up in logs
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-24 15:22:35 +00:00
Matheus Pimenta 444b8d265e
Merge pull request #1367 from fluxcd/update-labels
Add 1.5.x release label
2025-02-18 18:30:00 +00:00
Matheus Pimenta adfde39e9a
Add 1.5.x release label
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-18 18:13:38 +00:00
Matheus Pimenta 66e0c439c0
Merge pull request #1366 from fluxcd/release/v1.5.x
Release/v1.5.x
2025-02-18 18:11:26 +00:00
Matheus Pimenta 9ce7db7d96
Merge pull request #1365 from fluxcd/release-v1.5.0
Release v1.5.0
2025-02-18 17:04:52 +00:00
Matheus Pimenta 676fc6107f
Release v1.5.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-18 16:45:14 +00:00
Matheus Pimenta 5d2bcf93ff
Add changelog entry for v1.5.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-18 16:45:13 +00:00
Stefan Prodan fc2a95e2d5
Merge pull request #1358 from fluxcd/dependabot/github_actions/ci-4ac27b1555
Bump the ci group across 1 directory with 2 updates
2025-02-18 15:22:53 +02:00
Stefan Prodan 3b0de408cf
Merge pull request #1364 from fluxcd/dependabot/go_modules/go-deps-4d974c417d
Bump golang.org/x/net from 0.34.0 to 0.35.0 in the go-deps group across 1 directory
2025-02-18 15:22:34 +02:00
Matheus Pimenta f82ae38844
Merge pull request #1362 from fluxcd/upgrade-deps
Update source-controller API to v1.5.0
2025-02-18 13:20:07 +00:00
dependabot[bot] cc89da1d28
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-18 02:29:35 +00:00
dependabot[bot] 6790333116
Bump golang.org/x/net in the go-deps group across 1 directory
Bumps the go-deps group with 1 update in the / directory: [golang.org/x/net](https://github.com/golang/net).


Updates `golang.org/x/net` from 0.34.0 to 0.35.0
- [Commits](https://github.com/golang/net/compare/v0.34.0...v0.35.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 13:07:02 +00:00
Stefan Prodan 947be82e71
Merge pull request #1361 from 94DanielBrown/main
chore: add `GroupChangeLog` feature gate to fix es indexing cardinality
2025-02-17 15:05:15 +02:00
Daniel Brown 230b55fde5 chore: add GroupChangeLog feature gate to fix es indexing cardinality
Signed-off-by: Daniel Brown <daniel.brown2@sainsburys.co.uk>
2025-02-14 09:48:55 +00:00
Matheus Pimenta ac22c113a1
Update source-controller API to v1.5.0
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-13 16:20:08 +00:00
Matheus Pimenta 281d998261
Merge pull request #1359 from fluxcd/upgrade-deps
Upgrade pkg/runtime
2025-02-11 12:06:09 +00:00
Matheus Pimenta c371376808
Upgrade pkg/runtime
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-11 11:51:06 +00:00
Stefan Prodan 07a74c8576
Merge pull request #1354 from fluxcd/dependabot/github_actions/ci-05f176d660
Bump the ci group across 1 directory with 3 updates
2025-02-09 11:42:06 +02:00
dependabot[bot] f329ea1693
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 03:03:48 +00:00
Stefan Prodan e4546048c8
Merge pull request #1352 from fluxcd/up-deps-api
Update API dependencies
2025-02-01 11:27:38 +02:00
Stefan Prodan bb09c69eb1
Update API dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-02-01 11:02:53 +02:00
Stefan Prodan 4a9a093a21
Merge pull request #1348 from fluxcd/dependabot/github_actions/ci-fbaebe1433
Bump the ci group across 1 directory with 12 updates
2025-02-01 10:17:16 +02:00
dependabot[bot] ea10ba4495
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-02-01 07:50:29 +00:00
Matheus Pimenta 5e620a5b25
Merge pull request #1344 from fluxcd/custom-healthchecks
[RFC-0009] Add CEL custom healthchecks
2025-01-31 15:40:07 +00:00
Matheus Pimenta 6455cfec59
[RFC-0009] Add CEL custom healthchecks
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-01-31 14:27:31 +00:00
Matheus Pimenta 59676860b8
Merge pull request #1338 from fluxcd/origin-revision
Add OCI origin revision to events
2025-01-22 09:29:08 +00:00
Matheus Pimenta eccdbad35a
Add OCI revision to events
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-01-22 08:03:14 +00:00
Matheus Pimenta 550576e48b
Merge pull request #1330 from fluxcd/upgrade-runtime
Upgrade runtime
2025-01-10 14:00:11 +00:00
Matheus Pimenta 6022571c75
Upgrade runtime
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-01-10 13:42:45 +00:00
Stefan Prodan a284bfb889
Merge pull request #1320 from fluxcd/dependabot/go_modules/go-deps-dab0b8af1b
Bump the go-deps group across 1 directory with 2 updates
2024-12-19 13:05:26 +02:00
dependabot[bot] 10a5e869f6
Bump the go-deps group across 1 directory with 2 updates
Bumps the go-deps group with 2 updates in the / directory: [github.com/cyphar/filepath-securejoin](https://github.com/cyphar/filepath-securejoin) and [golang.org/x/net](https://github.com/golang/net).


Updates `github.com/cyphar/filepath-securejoin` from 0.3.5 to 0.3.6
- [Release notes](https://github.com/cyphar/filepath-securejoin/releases)
- [Changelog](https://github.com/cyphar/filepath-securejoin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cyphar/filepath-securejoin/compare/v0.3.5...v0.3.6)

Updates `golang.org/x/net` from 0.32.0 to 0.33.0
- [Commits](https://github.com/golang/net/compare/v0.32.0...v0.33.0)

---
updated-dependencies:
- dependency-name: github.com/cyphar/filepath-securejoin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-19 08:07:35 +00:00
Matheus Pimenta c2e4ed653f
Merge pull request #1318 from fluxcd/dependabot/go_modules/filippo.io/age-1.2.1
Bump filippo.io/age from 1.2.0 to 1.2.1
2024-12-19 08:06:02 +00:00
Stefan Prodan c41cb827c5
Merge pull request #1314 from erikgb/finalizer-tuning
Allow control of finalization garbage collection with `.spec.deletionPolicy`
2024-12-19 09:57:44 +02:00
dependabot[bot] aa1a99b3af
Bump filippo.io/age from 1.2.0 to 1.2.1
Bumps [filippo.io/age](https://github.com/FiloSottile/age) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/FiloSottile/age/releases)
- [Commits](https://github.com/FiloSottile/age/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: filippo.io/age
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-18 18:24:42 +00:00
Erik Godding Boye c38ebabf1b
Allow control of finalization garbage collection
Signed-off-by: Erik Godding Boye <egboye@gmail.com>
Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Co-authored-by: Amund Tenstad <github@amund.io>
2024-12-18 13:30:59 +01:00
Matheus Pimenta a87337c3c5
Merge pull request #1313 from luis-giraldo/upgrade-helm-api
Upgrading Helm API version to v2
2024-12-13 06:31:20 +00:00
Luis Giraldo 5ab5f14341 upgrading helm api
Signed-off-by: Luis Giraldo <giraldo.luisdavid@gmail.com.com>
2024-12-13 00:48:52 -05:00
Stefan Prodan 64ee754432
Merge pull request #1310 from fluxcd/k8s-1.32
Update dependencies to Kubernetes 1.32.0 and Go 1.23.0
2024-12-12 19:28:22 +02:00
Stefan Prodan ccfbf44613
Update dependencies to Kubernetes 1.32.0 and Go 1.23.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-12 16:29:31 +02:00
Stefan Prodan ca407130a3
Merge pull request #1305 from hasithsen/main
Remove deprecated object metrics
2024-12-11 21:11:24 +02:00
hasithsen d36aa14d77 feat: Remove deprecated object metrics from controllers fluxcd/flux2#5083
Signed-off-by: hasithsen <sen.hasith@gmail.com>
2024-12-11 23:41:43 +05:30
Stefan Prodan 9d65ff8c76
Merge pull request #1304 from fluxcd/kustomize-v5.5.0
Update Kustomize packages to v5.5.0
2024-12-06 16:41:05 +02:00
Stefan Prodan 9974a49b8a
Update Kustomize packages to v5.5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-06 16:09:56 +02:00
Stefan Prodan 61fa7da3b8
Merge pull request #1302 from fluxcd/sops-v3.9.3
Update SOPS to v3.9.2
2024-12-06 16:04:19 +02:00
Stefan Prodan 4d03cf05c1
Update SOPS to v3.9.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-06 15:53:40 +02:00
Stefan Prodan 3791888141
Merge pull request #1301 from srgvg/patch-1
Clarify precedence in Kustomization substituteFrom
2024-12-06 15:53:23 +02:00
Serge van Ginderachter 53cca793b9 Clarify precedence in Kustomization substituteFrom
Signed-off-by: Serge van Ginderachter <serge@autops.eu>
2024-12-06 14:38:47 +01:00
Stefan Prodan 933ef1f1d7
Merge pull request #1286 from vlasov-y/main
Added decryption of Kustomize patches and refactor SOPS tests
2024-12-04 10:51:48 +02:00
Yuriy 49770ea4cc Added decryption of patches and components.
Cleaned SOPS tests.

Signed-off-by: Yuriy <yuriy@vlasov.pro>
2024-12-04 10:06:19 +02:00
Stefan Prodan 29080cbd8c
Merge pull request #1283 from vlasov-y/main
Enable decryption of secrets generated by Kustomize components
2024-11-12 11:01:41 +02:00
Yuriy 681573b3e6 Added sops encryped .env in component test data
Signed-off-by: Yuriy <yuriy@vlasov.pro>
2024-11-10 20:51:54 +02:00
Yuriy Vlasov 443c96a788 Fixed decryption in components.
Signed-off-by: Yuriy <yuriy@vlasov.pro>
2024-11-08 14:30:42 +02:00
Sunny d7bad03364
Merge pull request #1256 from fluxcd/labels-sync
Label sync for release/v1.4.x
2024-09-27 22:26:11 +05:30
Stefan Prodan a77f044558
Merge pull request #1255 from fluxcd/release/v1.4.x
Merge `release/v1.4.x` back to `main`
2024-09-27 19:19:09 +03:00
Sunny d4f22ebe54 Label sync for release/v1.4.x
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-27 14:31:55 +00:00
Sunny 527ec3ed66
Merge pull request #1254 from fluxcd/release-v1.4.0
Release v1.4.0
2024-09-27 19:56:44 +05:30
Sunny cecc4452fa Release v1.4.0
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-27 19:39:33 +05:30
Sunny 02ab2ebecd Add changelog entry for v1.4.0
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-27 19:39:30 +05:30
Sunny 72ae7db334
Merge pull request #1253 from fluxcd/update-bucketv1
Update Bucket API to v1
2024-09-27 19:30:48 +05:30
Sunny 3d87349536 Update Bucket API to v1
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-27 13:29:44 +00:00
Stefan Prodan 1d1a06b24a
Merge pull request #1251 from fluxcd/update-sc
Update source-controller to v1.4.1
2024-09-26 21:04:46 +03:00
Sunny 8e39f7bf0f Update source-controller to v1.4.1
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-26 17:27:17 +00:00
Stefan Prodan 0d28f0f240
Merge pull request #1248 from fluxcd/deps-api-reader
Allow cross-shard dependency check
2024-09-26 17:49:19 +03:00
Stefan Prodan 1899e6c6e1
Merge pull request #1250 from fluxcd/dependabot/github_actions/ci-74c3fc3a14
Bump the ci group across 1 directory with 2 updates
2024-09-26 11:02:39 +03:00
Stefan Prodan 0add02b9cb
Merge pull request #1249 from fluxcd/deps-update
Update flux deps and k8s deps to 1.31.1
2024-09-26 10:19:17 +03:00
dependabot[bot] 67c86a01c0
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 02:26:33 +00:00
Sunny 9ad0b15dff Update SC in config/default
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-25 21:44:09 +00:00
Sunny 8d40190498 Update flux deps and k8s deps to 1.31.1
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-25 21:28:57 +00:00
Stefan Prodan 2b44187c23
Allow cross-shard dependency check
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-25 11:45:10 +03:00
Stefan Prodan aabb41fc5d
Merge pull request #1243 from fluxcd/controller-gen-v0.16.1
Update controller-gen to v0.16.1
2024-09-13 16:23:05 +03:00
Stefan Prodan eedc8a7516
Update controller-gen to v0.16.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-13 12:55:00 +03:00
Stefan Prodan c00854e7d7
Merge pull request #1242 from fluxcd/docs-sops-secretRef
docs: Clarify `.spec.decryption.secretRef` usage
2024-09-13 12:49:39 +03:00
Stefan Prodan 46f6cf80f4
docs: Clarify `.spec.decryption.secretRef` usage
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-13 09:17:52 +03:00
Stefan Prodan 1e9d28b251
Merge pull request #1240 from fluxcd/dependabot/go_modules/go-deps-39f083dd79
Bump the go-deps group across 1 directory with 2 updates
2024-09-06 11:28:02 +03:00
dependabot[bot] c2ae692fc0
Bump the go-deps group across 1 directory with 2 updates
Bumps the go-deps group with 2 updates in the / directory: [github.com/onsi/gomega](https://github.com/onsi/gomega) and [golang.org/x/net](https://github.com/golang/net).


Updates `github.com/onsi/gomega` from 1.34.1 to 1.34.2
- [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.1...v1.34.2)

Updates `golang.org/x/net` from 0.28.0 to 0.29.0
- [Commits](https://github.com/golang/net/compare/v0.28.0...v0.29.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-06 02:11:51 +00:00
Stefan Prodan 7895c43d04
Merge pull request #1239 from fluxcd/dependabot/go_modules/github.com/opencontainers/runc-1.1.14
Bump github.com/opencontainers/runc from 1.1.13 to 1.1.14
2024-09-04 09:15:23 +03:00
dependabot[bot] 519dac1be2
Bump github.com/opencontainers/runc from 1.1.13 to 1.1.14
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.13 to 1.1.14.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.13...v1.1.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-03 19:53:38 +00:00
Stefan Prodan 6c91a199fd
Merge pull request #1233 from fluxcd/dependabot/github_actions/ci-4516fd8e81
Bump the ci group across 1 directory with 3 updates
2024-08-22 10:06:08 +03:00
dependabot[bot] 55474461ba
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:02:55 +00:00
Stefan Prodan ce4432de3a
Merge pull request #1230 from fluxcd/go-1.23
Build with Go 1.23
2024-08-15 12:31:57 +03:00
Stefan Prodan 5cc9e27484
Build with Go 1.23
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-15 11:32:07 +03:00
Stefan Prodan 2b870e872e
Update controller-runtime to v0.19.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-15 11:24:32 +03:00
Stefan Prodan 99c2f20697
Merge pull request #1229 from fluxcd/k8s-1.31
Update dependencies to Kubernetes v1.31.0
2024-08-15 10:24:41 +03:00
Stefan Prodan 5d30ea57d1
Update dependencies to Kubernetes v1.31.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-15 09:47:16 +03:00
Stefan Prodan e34bc86000
Merge pull request #1228 from fluxcd/dependabot/github_actions/ci-99774d93c7
Bump the ci group across 1 directory with 9 updates
2024-08-15 09:05:19 +03:00
dependabot[bot] 0be2bcea4a
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 02:46:57 +00:00
Stefan Prodan 720639dd7e
Merge pull request #1212 from fluxcd/sops-v3.9.0
Update SOPS to v3.9.0
2024-08-01 20:05:55 +03:00
Stefan Prodan 937837b36e
Use SOPS DefaultDecryptionOrder
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-01 19:51:54 +03:00
Stefan Prodan a21e977cad
Update SOPS to v3.9.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-07-28 11:51:11 +03:00
Stefan Prodan a1a33f2add
Merge pull request #1198 from octo/fix-conditions-usage
Fix incorrect use of format strings with the `conditions` package.
2024-07-08 10:53:43 +03:00
Florian Forster ad38b1cb84
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
https://github.com/fluxcd/source-controller/pull/1529.

Signed-off-by: Florian Forster <fforster@gitlab.com>
2024-07-08 08:27:13 +02:00
Stefan Prodan e70e5b36a3
Merge pull request #1181 from fluxcd/dependabot/github_actions/ci-6e6887dbc2
Bump the ci group across 1 directory with 5 updates
2024-06-11 09:48:44 +03:00
Stefan Prodan d1cec06972
Adapt config to GoRelease v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-06-11 09:38:35 +03:00
dependabot[bot] 909fae7be3
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 02:44:53 +00:00
souleb 0007a71e6c
Merge pull request #1165 from fluxcd/dependabot/github_actions/ci-e5e846fb1a
build(deps): bump the ci group across 1 directory with 4 updates
2024-05-21 09:48:51 +02:00
dependabot[bot] 4ff4145b42
---
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-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-major
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 02:57:35 +00:00
Stefan Prodan a490f79296
Merge pull request #1161 from matheuscscp/new-release-label
Add 1.3.x release label
2024-05-08 17:07:19 +03:00
Matheus Pimenta 5e0b7f8329 Add 1.3.x release label
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-05-08 14:23:06 +01:00
Stefan Prodan 55e08776a3
Merge pull request #1158 from fluxcd/release/v1.3.x
Housekeeping: merge `release/v1.3.x` back into `main`
2024-05-06 12:28:53 +03:00
Stefan Prodan 83fbfeee89
Merge pull request #1157 from fluxcd/release-v1.3.0
Release v1.3.0
2024-05-06 12:02:14 +03:00
Stefan Prodan 458d7e23d8
Release v1.3.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-06 11:39:03 +03:00
Stefan Prodan 4a02b3faf3
Add changelog entry for v1.3.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-06 11:39:03 +03:00
Stefan Prodan 882f6a7963
Merge pull request #1154 from fluxcd/dependabot/github_actions/ci-b23e0286c6
build(deps): bump actions/setup-go from 5.0.0 to 5.0.1 in the ci group
2024-05-06 10:31:11 +03:00
Stefan Prodan dfcd4ed30a
Merge pull request #1155 from fluxcd/source-controller-1.3.0
Update source-controller API to v1.3.0
2024-05-06 10:29:26 +03:00
dependabot[bot] e81120ae25
build(deps): bump actions/setup-go from 5.0.0 to 5.0.1 in the ci group
Bumps the ci group with 1 update: [actions/setup-go](https://github.com/actions/setup-go).


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/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-06 02:18:33 +00:00
Stefan Prodan 780954fa6a
Update source-controller API to v1.3.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-04 09:27:13 +03:00
Stefan Prodan 99792deb25
Merge pull request #1152 from dipti-pai/remove-deprecated-aad-podidentity-ref
Remove deprecated aad pod identity from API docs
2024-05-04 08:14:34 +03:00
Dipti Pai fc663de87f Remove references aad pod identity
Signed-off-by: Dipti Pai <diptipai@microsoft.com>
2024-05-03 11:32:23 -07:00
Stefan Prodan f0f9b032b0
Merge pull request #1149 from fluxcd/dependabot/github_actions/ci-cfa2b75493
build(deps): bump the ci group across 1 directory with 3 updates
2024-04-29 09:07:33 +03:00
dependabot[bot] 639f074d91
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), [helm/kind-action](https://github.com/helm/kind-action) and [anchore/sbom-action](https://github.com/anchore/sbom-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 `helm/kind-action` from 1.9.0 to 1.10.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](99576bfa6d...0025e74a8c)

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

---
updated-dependencies:
- dependency-name: actions/checkout
  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: 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-04-29 02:19:53 +00:00
Stefan Prodan 501c03733f
Merge pull request #1139 from fluxcd/kubernetes-1.30
Update dependencies to Kubernetes 1.30
2024-04-26 12:53:39 +03:00
Stefan Prodan 31aab514fa
Update dependencies to Kubernetes 1.30
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-26 12:21:03 +03:00
Stefan Prodan 3e512c54b6
Merge pull request #1144 from gdasson/main
api: Refer condition type constants from `fluxcd/pkg/apis`
2024-04-23 18:29:05 +03:00
gdasson 3fded0b0e4 Refer condition type constants from pkg
Signed-off-by: gdasson <gaurav.dasson@gmail.com>
2024-04-23 09:56:16 -05:00
Stefan Prodan 5de415791f
Merge pull request #1143 from fluxcd/dependabot/github_actions/ci-48ee831c92
build(deps): bump the ci group across 1 directory with 2 updates
2024-04-23 10:11:45 +03:00
dependabot[bot] 49c0498c4d
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 [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator).


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 `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)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-major
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-23 02:52:08 +00:00
Stefan Prodan e9f5628ecc
Merge pull request #1135 from fluxcd/dependabot/github_actions/ci-fd594e3a59
build(deps): bump the ci group with 2 updates
2024-04-16 09:27:31 +03:00
dependabot[bot] 065268ef6e
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 [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer).


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 `sigstore/cosign-installer` from 3.4.0 to 3.5.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](e1523de757...59acb6260d)

---
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-minor
  dependency-group: ci
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-11 02:50:33 +00:00
Stefan Prodan 440b9da8d8
Merge pull request #1134 from fluxcd/kustomize-name-prefix-suffix
Implement name prefix/suffix transformers
2024-04-09 16:28:23 +03:00
Stefan Prodan f21f65eca7
Add name prefix/suffix fields to API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-09 15:15:16 +03:00
Stefan Prodan 73b1b4b032
Implement name prefix/suffix transformers
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-09 15:01:35 +03:00
Stefan Prodan c1e6bc5025
Add `.spec.namePrefix` and `.spec.nameSuffix` to API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-09 14:48:36 +03:00
Stefan Prodan fa5cebbcd2
Merge pull request #1130 from fluxcd/StrictPostBuildSubstitutions
Add `StrictPostBuildSubstitutions` feature flag
2024-04-09 14:39:31 +03:00
Stefan Prodan b810013ab5
Add envsubst test for `$${var}`
Ref: https://github.com/fluxcd/kustomize-controller/issues/1082

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-09 10:11:54 +03:00
Stefan Prodan 76cc820d31
Add envsubst test for unknown escape character fix
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-09 10:02:46 +03:00
Stefan Prodan f8ace6f930
Add `flux envsubst` example to docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-08 22:11:36 +03:00
Stefan Prodan 1837d1c2e4
Add `StrictPostBuildSubstitutions` flag to docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-08 20:12:40 +03:00
Stefan Prodan 4f471c7dab
Add `StrictPostBuildSubstitutions` feature flag
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-08 19:08:33 +03:00
Stefan Prodan b2daff1783
Merge pull request #1129 from fluxcd/substitute-int-bool
Document how to use numbers and booleans in post build substitutions
2024-04-08 17:49:29 +03:00
Stefan Prodan eaaa5113ef
Document how to quote numbers and booleans for varsub
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-06 14:14:55 +03:00
Stefan Prodan 45c50c7894
Add test for int and bool post build substitution
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-06 13:49:08 +03:00
Stefan Prodan f445fd2454
Merge pull request #1128 from fluxcd/kustomize-v5.4.0
Update dependencies to Kustomize v5.4.0
2024-04-05 16:30:03 +03:00
Stefan Prodan 224d3deab4
Update dependencies to Kustomize v5.4.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-05 10:20:11 +03:00
Stefan Prodan 26dcfd1aa1
Merge pull request #1121 from fluxcd/dependabot/github_actions/ci-39c307716c
build(deps): bump the ci group with 12 updates
2024-04-03 09:29:02 +03:00
dependabot[bot] 8f462db168
build(deps): bump the ci group with 12 updates
Bumps the ci group with 12 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` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `5.5.0` | `5.5.1` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.3.0` | `3.4.0` |
| [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.15.6` | `0.15.10` |
| [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) | `1.9.0` | `1.10.0` |
| [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 `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.10
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](c6aed38a43...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 `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: 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: slsa-framework/slsa-github-generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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-03 02:38:57 +00:00
Stefan Prodan d1797fdb47
Merge pull request #1122 from fluxcd/go1.22
Update dependencies to Go 1.22 and Kubernetes 1.29.3
2024-04-02 17:48:31 +03:00
Stefan Prodan 8c46760606
Update dependencies to Go 1.22 and Kubernetes 1.29.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-02 17:18:07 +03:00
Stefan Prodan d74d31b363
Merge pull request #1110 from fluxcd/revert-sops-license
Revert SOPS module license to Apache 2.0
2024-03-16 11:21:48 +02:00
Stefan Prodan e70c61c2f7
Revert SOPS module to Apache 2.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-03-14 20:46:30 +02:00
Stefan Prodan 11f5cafe96
Merge pull request #1104 from fluxcd/update-controllergen-0.14
Update controller-gen to v0.14.0
2024-03-12 19:53:29 +02:00
Soule BA 256064606d
Update controller-gen to v0.14.0
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-03-12 15:20:37 +01:00
Stefan Prodan 5e0be4019b
Merge pull request #1090 from matheuscscp/fix-warning
Fix requeue warning introduced by controller-runtime
2024-03-08 09:21:22 +02:00
Stefan Prodan 7aa669055c
Merge pull request #1091 from matheuscscp/fix-unused-code
Remove effectless statement
2024-03-08 09:21:01 +02:00
Stefan Prodan 877febcd40
Merge pull request #1092 from gmolau/main
Remove `genclient:Namespaced` tag
2024-02-29 13:51:17 +00:00
Georg Molau 1506e23075 Remove `genclient:Namespaced` tag
This tag isn't used by controller-tools, only `nonNamespaced` is.

Context: https://cloud-native.slack.com/archives/CLAJ40HV3/p1708794732147909

Tested by running `make generate` and verifying that there is no diff.

Signed-off-by: Georg Molau <gmolau@confluent.io>
Signed-off-by: Georg Molau <georg.molau@gmail.com>
2024-02-27 22:22:52 +01:00
Matheus Pimenta ee0c3bcec2 Remove effectless statement
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-02-21 16:02:59 +00:00
Matheus Pimenta 4c209ef126 Fix requeue warning introduced by controller-runtime
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-02-21 15:57:37 +00:00
Stefan Prodan 4de0503b63
Merge pull request #1078 from fluxcd/pick-changelog-v1.2.2
Add changelog entry for v1.2.2
2024-02-02 14:51:59 +02:00
Sunny 68cae5daa8 Add changelog entry for v1.2.2
Signed-off-by: Sunny <github@darkowlzz.space>
(cherry picked from commit e5072d57c6)
2024-02-02 17:29:20 +05:30
Sunny b51dd326ca
Merge pull request #1075 from fluxcd/deps-update
Update source-controller dependency
2024-02-01 21:09:12 +05:30
Sunny 94b64517f0
Update source-controller dependency
Signed-off-by: Sunny <github@darkowlzz.space>
2024-02-01 14:56:09 +00:00
Stefan Prodan e5e210e807
Merge pull request #1072 from fluxcd/dependabot/go_modules/go-deps-19bf5ec497
build(deps): Fix CVE-2024-21626
2024-02-01 09:30:32 +02:00
dependabot[bot] d48a9e0f28
build(deps): bump the go-deps group with 1 update
Bumps the go-deps group with 1 update: [github.com/opencontainers/runc](https://github.com/opencontainers/runc).


Updates `github.com/opencontainers/runc` from 1.1.5 to 1.1.12
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.12/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.5...v1.1.12)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: indirect
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 22:54:06 +00:00
Stefan Prodan 61f37d05b6
Merge pull request #1069 from fluxcd/dependabot/github_actions/ci-3aa223a9de
build(deps): bump the ci group with 1 update
2024-01-30 13:53:05 +02:00
dependabot[bot] 97a9b88d45
build(deps): bump the ci group with 1 update
Bumps the ci group with 1 update: [anchore/sbom-action](https://github.com/anchore/sbom-action).


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

---
updated-dependencies:
- 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-30 02:42:20 +00:00
Stefan Prodan 02de663f5d
Merge pull request #1066 from fluxcd/dependabot/go_modules/go-deps-d303c50ae1
Update controller to Kubernetes 1.28.6
2024-01-29 13:34:52 +02:00
Stefan Prodan 9ac8b7fe80
Update `api` package to Kubernetes 1.28.6
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-01-29 13:23:23 +02:00
dependabot[bot] 1afa6a89bf
build(deps): bump the go-deps group with 8 updates
Bumps the go-deps group with 8 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/http/fetch](https://github.com/fluxcd/pkg) | `0.8.0` | `0.9.0` |
| [github.com/fluxcd/pkg/kustomize](https://github.com/fluxcd/pkg) | `1.5.0` | `1.6.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/http/fetch` from 0.8.0 to 0.9.0
- [Commits](https://github.com/fluxcd/pkg/compare/git/v0.8.0...git/v0.9.0)

Updates `github.com/fluxcd/pkg/kustomize` from 1.5.0 to 1.6.0
- [Commits](https://github.com/fluxcd/pkg/compare/kustomize/v1.5.0...kustomize/v1.6.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/http/fetch
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/fluxcd/pkg/kustomize
  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 09:45:03 +00:00
Stefan Prodan 19d8d55dca
Merge pull request #1061 from fluxcd/dependabot/github_actions/ci-006c96f503
build(deps): bump the ci group with 1 update
2024-01-24 13:33:47 +02:00
dependabot[bot] d7ad5ca7cd
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).


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

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-24 11:25:16 +00:00
Stefan Prodan a2258023fc
Merge pull request #1063 from fluxcd/dependabot-godeps
ci: Enable dependabot `gomod` updates
2024-01-24 13:23:29 +02:00
Stefan Prodan 42307e2ffc
ci: Enable dependabot `gomod` updates
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-01-24 13:11:15 +02:00
Stefan Prodan 40c7bc6c5a
Merge pull request #1056 from fluxcd/dependabot/go_modules/go-deps-414e0b9be3
build(deps): bump the go-deps group with 2 updates
2024-01-23 23:16:47 +02:00
Stefan Prodan 30679fe6ff
Merge pull request #1054 from fluxcd/dependabot/github_actions/ci-b2129042a4
build(deps): bump the ci group with 2 updates
2024-01-23 17:47:58 +02:00
dependabot[bot] 936a5b8552
build(deps): bump the go-deps group with 2 updates
Bumps the go-deps group with 2 updates: [github.com/onsi/gomega](https://github.com/onsi/gomega) and [golang.org/x/net](https://github.com/golang/net).


Updates `github.com/onsi/gomega` from 1.30.0 to 1.31.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.30.0...v1.31.1)

Updates `golang.org/x/net` from 0.19.0 to 0.20.0
- [Commits](https://github.com/golang/net/compare/v0.19.0...v0.20.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/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 14:38:48 +00:00
Stefan Prodan ce413533dd
Merge pull request #1053 from fluxcd/go-1.21
Update Go to 1.21
2024-01-23 16:35:46 +02:00
dependabot[bot] f3262b15a4
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 [anchore/sbom-action](https://github.com/anchore/sbom-action).


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

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

---
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
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 14:31:29 +00:00
Stefan Prodan d40e4002e0
Merge pull request #1057 from fluxcd/dependabot-ignore-apis
dependabot: Ignore Flux APIs
2024-01-23 16:28:34 +02:00
Stefan Prodan 8e8acd2c8b
dependabot: Ignore Flux APIs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-01-23 16:25:37 +02:00
Stefan Prodan 5939682eff
Merge pull request #1052 from fluxcd/dependabot-gomod
ci: Enable gomod updates
2024-01-23 16:16:56 +02:00
Stefan Prodan 5f4b1424d4
Update Go to 1.21
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-01-22 17:50:45 +02:00
Stefan Prodan e4f5aaef85
ci: Enable gomod updates
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-01-22 16:45:50 +02:00
Stefan Prodan a5539050ed
Merge pull request #1050 from fluxcd/dependabot/github_actions/ci-1ce66589eb
build(deps): bump the ci group with 2 updates
2024-01-22 16:34:00 +02:00
dependabot[bot] d7edcd4e4c
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [actions/cache](https://github.com/actions/cache) and [anchore/sbom-action](https://github.com/anchore/sbom-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)

---
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
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 02:20:54 +00:00
Stefan Prodan 402cc53f38
Merge pull request #1048 from fluxcd/dependabot/github_actions/ci-425d4b0f20
build(deps): bump the ci group with 2 updates
2024-01-15 09:40:28 +02:00
dependabot[bot] 003dbd944b
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [actions/cache](https://github.com/actions/cache) and [anchore/sbom-action](https://github.com/anchore/sbom-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)

---
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
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 02:13:09 +00:00
Stefan Prodan 92a078585e
Merge pull request #1045 from fluxcd/dependabot/go_modules/github.com/cloudflare/circl-1.3.7
build(deps): bump github.com/cloudflare/circl from 1.3.6 to 1.3.7
2024-01-08 19:07:01 +02:00
dependabot[bot] a3f081f9c4
build(deps): bump github.com/cloudflare/circl from 1.3.6 to 1.3.7
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.6 to 1.3.7.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.3.6...v1.3.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 16:55:09 +00:00
Max Jonas Werner c668ed3ea5
Merge pull request #1043 from fluxcd/dependabot/github_actions/ci-9edfa6747d
build(deps): bump the ci group with 2 updates
2024-01-08 08:44:02 +01:00
dependabot[bot] eb9c6c7347
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 02:49:29 +00:00
Hidde Beydals d1793df442
Merge pull request #1039 from fluxcd/dependabot/github_actions/ci-c99cc58ab6
build(deps): bump the ci group with 3 updates
2023-12-19 09:57:56 +01:00
dependabot[bot] 76813d8a0d
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), [docker/metadata-action](https://github.com/docker/metadata-action) and [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer).


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 `docker/metadata-action` from 5.3.0 to 5.4.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](31cebacef4...9dc751fe24)

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

---
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
- 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-12-19 08:51:54 +00:00
Hidde Beydals ec91d8ad2c
Merge pull request #1037 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:25 +01:00
dependabot[bot] 22af020dc4
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:07:09 +00:00
Stefan Prodan e487f84d30
Merge pull request #1034 from fluxcd/pick-changelog-v1.2.1
Add changelog entry for v1.2.1
2023-12-14 16:41:46 +02:00
Sunny da6318c22e Add changelog entry for v1.2.1
Signed-off-by: Sunny <darkowlzz@protonmail.com>
(cherry picked from commit 240fb6d213)
2023-12-14 19:53:20 +05:30
Stefan Prodan b3345ff518
Merge pull request #1031 from fluxcd/runtime-v0.43.3
Update runtime to v0.43.3
2023-12-13 15:24:09 +02:00
Stefan Prodan 9b508ba44e
Update runtime to v0.43.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-13 15:09:16 +02:00
Hidde Beydals ddadd97262
Merge pull request #1028 from fluxcd/log-fetch-errors
Log HTTP errors to provide faster feedback
2023-12-13 11:59:18 +01:00
Hidde Beydals 8deb2343e0
Log HTTP errors to provide faster feedback
This configures a logger on the archive fetcher, to make HTTP errors
surface faster when it fails to retrieve the artifact of a source.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-13 11:47:30 +01:00
Stefan Prodan 738101481e
Merge pull request #1027 from fluxcd/add-backport-1.2
Add `backport:release/v1.2.x` label
2023-12-11 17:47:25 +01:00
Stefan Prodan efdfc0cf19
Add `backport:release/v1.2.x` label
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-11 18:32:57 +02:00
Stefan Prodan 95dca6d384
Merge pull request #1026 from fluxcd/release/v1.2.x
Housekeeping: merge `release/v1.2.x` back into main
2023-12-11 17:31:31 +01:00
Stefan Prodan 234fa658ec
Merge pull request #1025 from fluxcd/release-v1.2.0
Release v1.2.0
2023-12-11 17:16:00 +01:00
Stefan Prodan fc1d20e6e1
Release v1.2.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-11 18:03:37 +02:00
Stefan Prodan 717ce6ee22
Add changelog entry for v1.2.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-11 18:02:46 +02:00
Stefan Prodan 04cd9398fd
Merge pull request #1024 from fluxcd/sc-v1.2.2
Update source-controller to v1.2.2
2023-12-11 16:05:39 +01:00
Stefan Prodan dfb2dcc22f
Update source-controller to v1.2.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-11 16:50:05 +02:00
Stefan Prodan 30a0d86d06
Merge pull request #1021 from fluxcd/sc-1.2.0
Update Kustomize to v5.3.0
2023-12-11 10:01:03 +01:00
Stefan Prodan e3d2d7b99f
Update Kustomize to v5.3.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-11 10:48:28 +02:00
Stefan Prodan edd1f875cf
Update source-controller APIs to v1.2.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-12-11 10:48:21 +02:00
Hidde Beydals 6e72247aaf
Merge pull request #1023 from fluxcd/alpine-319
build: update Alpine to 3.19
2023-12-11 09:23:44 +01:00
Hidde Beydals 4d474e96ed
build: update `tonistiigi/xx` to 1.3.0
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 09:08:00 +01:00
Hidde Beydals e8ad8de868
build: update Alpine to 3.19
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 09:07:31 +01:00
Stefan Prodan 86ab9adaa9
Merge pull request #1022 from fluxcd/dependabot/github_actions/ci-ba6e0d356d
build(deps): bump the ci group with 4 updates
2023-12-11 08:41:36 +01:00
dependabot[bot] 788d6e0c1a
build(deps): bump the ci group with 4 updates
Bumps the ci group with 4 updates: [korthout/backport-action](https://github.com/korthout/backport-action), [actions/setup-go](https://github.com/actions/setup-go), [docker/metadata-action](https://github.com/docker/metadata-action) and [anchore/sbom-action](https://github.com/anchore/sbom-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 `actions/setup-go` from 4.1.0 to 5.0.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](93397bea11...0c52d547c9)

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

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

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci
- dependency-name: actions/setup-go
  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-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>
2023-12-11 02:57:56 +00:00
Stefan Prodan ba308c5a39
Merge pull request #977 from asloan7/main
Fix broken links in API docs
2023-12-05 09:54:43 +02:00
Max Jonas Werner bc33fc9573
Merge pull request #1019 from fluxcd/dependabot/github_actions/ci-6a3fdc2cae
build(deps): bump the ci group with 1 update
2023-12-04 13:35:47 +01:00
dependabot[bot] 9917b953a9
build(deps): bump the ci group with 1 update
Bumps the ci group with 1 update: [docker/metadata-action](https://github.com/docker/metadata-action).

- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](96383f4557...e6428a5c4e)

---
updated-dependencies:
- 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 02:49:58 +00:00
Stefan Prodan 0ced44094a
Merge pull request #1016 from fluxcd/test-ns-crd
Add test for Namespace custom resource
2023-11-30 10:55:07 +02:00
Stefan Prodan 819eeb900b
Add test for Namespace custom resource
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-11-30 10:41:51 +02:00
Stefan Prodan 84c446aa87
Merge pull request #1017 from Nalum/issue-982-support-additional-field-managers-in-banlist
Support additional Field Managers in the disallow list
2023-11-30 10:41:04 +02:00
Luke Mallon (Nalum) 96a772293a
Setup field for manager overrides on KustomizationReconciler struct and build up the disallow list to include these
Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Setup new flag to allow overriding additional managers and pass this data to the KustomizationReconciler instance

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Update field name to be more specific

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Luke Mallon <luke@mallon.ie>

Update the remaining fieldManagers vars to match the new definition

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Change AdditionalFieldManagers to DisallowedFieldManagers

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Add unit test to cover the new disallowed field manager change

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Use correct variable in the final Run

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Undo the timeout multiplication

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Update internal/controller/kustomization_disallowed_managers_test.go

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Luke Mallon <luke@mallon.ie>

Check for we're not getting errors on the Patch calls and remove the eventually as not needed here

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>

Update main.go

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Luke Mallon <luke@mallon.ie>
2023-11-28 08:22:26 +00:00
Max Jonas Werner f2014ab988
Merge pull request #1018 from fluxcd/dependabot/github_actions/ci-5ef00e396d
build(deps): bump the ci group with 2 updates
2023-11-27 08:41:42 +01:00
dependabot[bot] bd536e1850
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [anchore/sbom-action](https://github.com/anchore/sbom-action) and [fossa-contrib/fossa-action](https://github.com/fossa-contrib/fossa-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)

---
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
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 02:36:29 +00:00
Hidde Beydals 250f620fbe
Merge pull request #1015 from fluxcd/dependabot/go_modules/github.com/go-jose/go-jose/v3-3.0.1
build(deps): bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1
2023-11-22 09:41:05 +01:00
dependabot[bot] 68a09b1835
build(deps): bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/v3/CHANGELOG.md)
- [Commits](https://github.com/go-jose/go-jose/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 22:20:06 +00:00
Stefan Prodan 6c54f6839c
Merge pull request #1014 from fluxcd/kustomize-v5.2.1
Update controller to Kustomize v5.2.1
2023-11-20 15:47:34 +02:00
Stefan Prodan 23ee5a66ec
Update controller to Kustomize v5.2.1
- Update ``sigs.k8s.io/kustomize` to v5.2.1
- Update `k8s.io` packages to v0.28.4
- Update `sigs.k8s.io/controller-runtime` to v0.16.3 and adapt to breaking changes
- Switch from `sigs.k8s.io/cli-utils` to `github.com/fluxcd/cli-utils`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-11-20 14:35:20 +02:00
Max Jonas Werner 05614b1a96
Merge pull request #1013 from fluxcd/dependabot/github_actions/ci-98b70e8bec
build(deps): bump the ci group with 1 update
2023-11-20 08:09:06 +01:00
dependabot[bot] 7d672d3da5
build(deps): bump the ci group with 1 update
Bumps the ci group with 1 update: [docker/build-push-action](https://github.com/docker/build-push-action).

- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](0565240e2d...4a13e500e5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 02:09:26 +00:00
Stefan Prodan ec4554d897
Merge pull request #997 from fluxcd/ssa-0.33.0
Cleanup pods when recreating Kubernetes Jobs
2023-11-18 10:51:56 +02:00
Stefan Prodan 5d296bce24
Cleanup pods when recreating Kubernetes Jobs
Set the delete propagation to background to remove completed pods when force applying Kubernetes Jobs with immutable fields changes.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-11-18 10:37:02 +02:00
Stefan Prodan 9f97c19a7a
Merge pull request #1012 from fluxcd/disable-status-cache
Disable status poller cache by default
2023-11-18 10:27:42 +02:00
Stefan Prodan 863eb20947
Disable status poller cache by default
The status poller cache fills the all the available memory
when reconciliation hundreds of resources in a single namespace.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-11-17 12:53:05 +02:00
Max Jonas Werner abdfab3dde
Merge pull request #1009 from fluxcd/dependabot/github_actions/ci-da8bbba46e
build(deps): bump the ci group with 2 updates
2023-11-13 08:52:17 +01:00
dependabot[bot] 3f2fa66f6f
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 02:13:28 +00:00
Hidde Beydals ebd8699210
Merge pull request #1005 from fluxcd/tweak-file-perms
Tweak permissions on various created files
2023-11-06 12:44:24 +01:00
Hidde Beydals 5ba36c34e8
Update `fluxcd/pkg` dependencies
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-06 12:31:18 +01:00
Max Jonas Werner e3a3b00fb0
Merge pull request #1006 from fluxcd/dependabot/github_actions/ci-18c09be9f8
build(deps): bump the ci group with 1 update
2023-11-06 07:38:24 +01:00
dependabot[bot] 17ea2419dc
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 02:47:52 +00:00
Hidde Beydals 1f8978085e
Tweak permissions on various created files
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-03 11:19:12 +01:00
Stefan Prodan 4f8c0cc509
Merge pull request #1003 from fluxcd/dependabot/go_modules/github.com/docker/docker-24.0.7incompatible
build(deps): bump github.com/docker/docker from 20.10.24+incompatible to 24.0.7+incompatible
2023-10-30 18:00:33 +02:00
dependabot[bot] 564580049a
build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.24+incompatible to 24.0.7+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.24...v24.0.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 15:37:34 +00:00
Max Jonas Werner 2caf1dd4dd
Merge pull request #1001 from fluxcd/dependabot/github_actions/ci-2e2e3c3b83
build(deps): bump the ci group with 1 update
2023-10-30 08:59:28 +01:00
dependabot[bot] 97d20097e5
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](bd68141f07...408fae11ed)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 02:27:40 +00:00
Max Jonas Werner 644261e5f8
Merge pull request #998 from fluxcd/dependabot/github_actions/ci-16ff15100a
build(deps): bump the ci group with 1 update
2023-10-23 09:05:48 +02:00
dependabot[bot] 04cec3fc7a
build(deps): bump the ci group with 1 update
Bumps the ci group with 1 update: [actions/checkout](https://github.com/actions/checkout).

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

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 02:26:17 +00:00
souleb 1edb95d764
Merge pull request #996 from fluxcd/update-source-controller-yamls
Update source-controller to v1.1.2
2023-10-13 16:08:16 +02:00
Soule BA 6b11f7766b
update-source-controller-yamls
Signed-off-by: Soule BA <bah.soule@gmail.com>
2023-10-13 14:42:57 +02:00
Hidde Beydals 4a00021b89
Merge pull request #986 from fluxcd/tidy-nits
Address miscellaneous issues throughout code base
2023-10-12 12:55:52 +02:00
Hidde Beydals af9368295e
misc: fix hypothetical implicit memory aliasing
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-12 12:34:25 +02:00
Hidde Beydals 205a0b4fea
misc: check err value in test
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-12 12:34:24 +02:00
Hidde Beydals 364ce9f98a
misc: fix formatting various errors
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-12 12:34:24 +02:00
Hidde Beydals 87fd394ce4
misc: address `k8s.io/utils/pointer` deprecation
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-12 12:34:23 +02:00
Hidde Beydals 77cf93394c
misc: address theoretical nil pointer dereference
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-12 12:34:23 +02:00
Hidde Beydals 2009190603
Merge pull request #995 from fluxcd/update-sops
sops: update to v3.8.1
2023-10-12 12:34:18 +02:00
Hidde Beydals bab4411abe
sops: always disable OpenPGP
The forked implementation did not have OpenPGP anymore, as it never
really worked. However, the upstream version still does but now allows
it to be disabled.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-12 12:18:33 +02:00
Hidde Beydals 6b055f52b1
sops: update to v3.8.1
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-12 12:18:27 +02:00
Hidde Beydals 0c2376e88f
Merge pull request #992 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:16:20 +02:00
dependabot[bot] 53be775d48
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:52:53 +00:00
Hidde Beydals 9812910b41
Merge pull request #993 from fluxcd/dependabot/go_modules/golang.org/x/net-0.17.0
build(deps): bump golang.org/x/net from 0.14.0 to 0.17.0
2023-10-12 08:52:08 +02:00
dependabot[bot] 1f697348af
build(deps): bump golang.org/x/net from 0.14.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.14.0...v0.17.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 23:05:53 +00:00
Stefan Prodan a23791da6c
Merge pull request #991 from fluxcd/pick-changelog-release-v1.1.1
Add changelog entry for v1.1.1
2023-10-11 17:35:11 +03:00
Stefan Prodan 182c51b564
Add changelog entry for v1.1.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
(cherry picked from commit 28e1dc85c1)
2023-10-11 17:03:16 +03:00
Stefan Prodan 21e75ffb13
Merge pull request #983 from fluxcd/update-flux-ssa
Update `fluxcd/pkg` dependencies
2023-10-09 09:51:48 +03:00
Stefan Prodan 8f86fc425f
Update `fluxcd/pkg` dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-09 09:25:54 +03:00
Stefan Prodan 1fb27b810c
Merge pull request #980 from fluxcd/fast-recovery
fix: Retry when artifacts are available in storage
2023-10-05 11:10:09 +03:00
Stefan Prodan ef135a141f
fix: Retry when artifacts are available in storage
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-05 10:34:05 +03:00
Stefan Prodan 768968d061
Merge pull request #978 from fluxcd/speed-up-recovery
fix: Consistent artifact fetching retry timing
2023-10-04 14:00:24 +03:00
Stefan Prodan dff4c265b2
fix: Consistent artifact fetching retry timing
Artifact not found errors (HTTP 404) are requeue using the dependency interval, while for a nil Artifact, the interval used for retry was set to the apply retry one.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-04 11:52:19 +03:00
mutron3k 3f04beaf4f
Update README.md
fixing 6 broken links

Signed-off-by: mutron3k <asloan7@gmail.com>
2023-09-28 15:05:45 -04:00
mutron3k 5962420fa8
Update README.md
fixing 10 broken links

Signed-off-by: mutron3k <asloan7@gmail.com>
2023-09-28 15:03:43 -04:00
mutron3k f33becf504
Update README.md
Correcting the title and fixing 13 links

Signed-off-by: mutron3k <asloan7@gmail.com>
2023-09-28 14:54:59 -04:00
mutron3k 96e02159c6
Update README.md
fixing 15 broken links

Signed-off-by: mutron3k <asloan7@gmail.com>
2023-09-28 14:44:56 -04:00
Max Jonas Werner 5e11b653da
Merge pull request #973 from fluxcd/dependabot/github_actions/ci-663ed1f0b6
build(deps): bump the ci group with 1 update
2023-09-25 17:20:34 +02:00
dependabot[bot] bc61228dcf
build(deps): bump the ci group with 1 update
Bumps the ci group with 1 update: [actions/checkout](https://github.com/actions/checkout).

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

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 02:27:26 +00:00
Stefan Prodan 968df5e84d
Merge pull request #969 from fluxcd/dependabot/github_actions/ci-8ad0e81912
build(deps): bump the ci group with 6 updates
2023-09-18 09:32:49 +03:00
dependabot[bot] 08729e83b9
build(deps): bump the ci group with 6 updates
Bumps the ci group with 6 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` |


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)

---
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
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:04:00 +00:00
Stefan Prodan ec296d96fc
Merge pull request #963 from fluxcd/dependabot/github_actions/ci-dbfd6c86b4
build(deps): bump the ci group with 4 updates
2023-09-11 08:21:35 +03:00
dependabot[bot] b760a4167c
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 02:45:18 +00:00
Stefan Prodan f6aa02481e
Merge pull request #962 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 10:28:16 +03:00
dependabot[bot] d0e3d4cd08
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: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-07 13:02:02 +00:00
Stefan Prodan 108fa84a51
Merge pull request #958 from fluxcd/dependabot/github_actions/ci-c9c7491769
build(deps): bump the ci group with 2 updates
2023-09-04 10:42:39 +03:00
dependabot[bot] 636e0d3e7c
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 [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer).


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)

---
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
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 02:17:54 +00:00
Max Jonas Werner 364fa96145
Merge pull request #957 from fluxcd/1.1.x-label
Add 1.1.x backport labels
2023-08-28 12:30:59 +02:00
Max Jonas Werner 593db54f29
Add 1.1.x backport labels
Signed-off-by: Max Jonas Werner <mail@makk.es>
2023-08-28 11:51:38 +02:00
Max Jonas Werner 55a8c9df6d
Merge pull request #955 from fluxcd/dependabot/github_actions/ci-17ac1b16d8
build(deps): bump the ci group with 2 updates
2023-08-28 08:07:53 +02:00
dependabot[bot] cbb475697b
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 02:37:27 +00:00
Hidde Beydals 6dcf08b21e
Merge pull request #947 from fluxcd/drop-forked-keyservices
sops: drop forked keyservices
2023-08-25 15:44:27 +02:00
Hidde Beydals d02c5ff505
sops: disable logs key services
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-25 15:04:16 +02:00
Hidde Beydals 1eaa29c618
sops: drop MPL-2.0 license file
As all remaining code is now no longer derived from MPL-2.0 licensed
code.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-25 15:04:15 +02:00
Hidde Beydals b808e9e0c4
sops/pgp: drop fork of keysource implementation
As the forked code has been contributed upstream in a modified format.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-25 15:04:15 +02:00
Hidde Beydals bc3859dfb4
sops/hcvault: drop fork of keysource implementation
As the forked code has been contributed upstream in a modified format.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-25 15:04:14 +02:00
Hidde Beydals 548de2f51a
sops/gcpkms: drop fork of keysource implementation
As the forked code has been contributed upstream in a modified format.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-25 15:04:14 +02:00
Hidde Beydals 1854a9f9dd
sops/azkv: drop fork of keysource implementation
As the forked code has been contributed upstream in a modified format.

We continue to inject our own default credentials in the key server if
none are provided by the Kustomization, to ensure we do not shell out
to `az`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-25 15:04:14 +02:00
Hidde Beydals 2e50f41755
sops/awskms: drop fork of keysource implementation
As the forked code has been contributed upstream in a modified format.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-25 15:04:13 +02:00
Hidde Beydals 6c67d3811c
sops/age: drop fork of keysource implementation
As the forked code has been contributed upstream in a modified format.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-25 15:04:13 +02:00
Hidde Beydals 815f3f0530
sops: move to `github.com/getsops/sops/v3`
This updates `go.mozilla.org/sops/v3` to the `v3.8.0-rc.1` release of
`github.com/getsops/sops/v3`.

This (finally) allows us to drop our forked key sources, as they have
now been contributed upstream in a slightly modified form which still
allows us to maintain control over the used credentials in isolation.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-25 15:04:12 +02:00
Stefan Prodan ef8de4ddf4
Merge pull request #954 from fluxcd/release/v1.1.x
Housekeeping: merge `release/v1.1.x` back into `main`
2023-08-23 16:36:26 +03:00
Stefan Prodan f2d4f07e01
Merge pull request #953 from fluxcd/release-v1.1.0
Release v1.1.0
2023-08-23 15:44:24 +03:00
Stefan Prodan 383b402b3c
Release v1.1.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-23 15:21:29 +03:00
Stefan Prodan 506d03d3e9
Add changelog entry for v1.1.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-23 15:20:34 +03:00
Stefan Prodan a6a19d175a
Merge pull request #952 from fluxcd/sc-1.1.0
Update Source API to v1.1.0
2023-08-23 14:47:48 +03:00
Stefan Prodan 998879c715
Adapt force apply test
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-23 14:31:26 +03:00
Stefan Prodan c59cd67669
Update Source API to v1.1.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-23 14:16:51 +03:00
Max Jonas Werner 60e5470674
Merge pull request #949 from fluxcd/dependabot/github_actions/ci-edb1404386
build(deps): bump the ci group with 1 update
2023-08-21 11:09:00 +02:00
dependabot[bot] ca15d4a4d4
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](bf5fdd624b...bd68141f07)

---
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-08-21 02:19:33 +00:00
Stefan Prodan 57e7bbe59e
Merge pull request #948 from fluxcd/concurrent-ssa
Add `--concurrent-ssa` flag
2023-08-17 16:44:20 +03:00
Stefan Prodan 34717699af
Add `--concurrent-ssa` flag
This flag can be used to set the number of concurrent server-side apply operations.
Defaults to 4 concurrent operations per reconciliation.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-17 16:11:24 +03:00
Sunny 385df6785d
Merge pull request #944 from fluxcd/stale-metrics
Delete stale metrics on object delete
2023-08-15 02:37:39 +05:30
Max Jonas Werner 060f153268
Merge pull request #945 from fluxcd/dependabot/github_actions/ci-ee363e2e56
build(deps): bump the ci group with 2 updates
2023-08-14 09:45:20 +02:00
dependabot[bot] c4f9b5cc03
build(deps): bump the ci group with 2 updates
Bumps the ci group with 2 updates: [actions/setup-go](https://github.com/actions/setup-go) and [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-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)

---
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
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 02:31:22 +00:00
Sunny 6b6f1d4a18
Delete stale metrics on object delete
The metrics helper now accepts owned finalizers to determine if an
object is no longer managed by the controller and is being deleted, and
deletes the metrics associated with the object.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-08-11 19:55:15 +05:30
Stefan Prodan 4c1ea27a01
Merge pull request #943 from fluxcd/ssa-policies
Add `IfNotPresent` and `Ignore` SSA policies
2023-08-11 16:40:57 +03:00
Stefan Prodan 743cb798b1
Document the apply behavior of resources
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-09 15:02:47 +03:00
Stefan Prodan 6d32b082f7
Add IfNotPresent and Ignore SSA policies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-09 14:17:17 +03:00
Stefan Prodan 6b85c71fdd
Update github.com/fluxcd/pkg/ssa to v0.30.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-09 14:16:37 +03:00
Stefan Prodan 6c9c239d65
Merge pull request #942 from fluxcd/enable-codeql-quality
ci: enable security-and-quality CodeQL query
2023-08-07 21:24:21 +03:00
Stefan Prodan f6411a1fc3
ci: enable security-and-quality CodeQL query
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-07 19:58:18 +03:00
Stefan Prodan 3eac0ed40b
Merge pull request #941 from fluxcd/fix-az-test
Fix Azure Key Vault integration tests
2023-08-07 19:52:45 +03:00
Stefan Prodan b74c152953
Fix Azure Key Vault integration tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-07 19:35:40 +03:00
Stefan Prodan 3cf612aa84
Merge pull request #940 from fluxcd/jitter
controller: jitter requeue interval
2023-08-07 19:24:33 +03:00
Stefan Prodan 3131986141
controller: jitter requeue interval
Add a `--interval-jitter-percentage` flag to the controller to
add a +/- percentage jitter to the `Kustomization.spec.interval`.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-07 19:11:19 +03:00
Stefan Prodan 0657083383
Merge pull request #939 from fluxcd/up-deps
Update dependencies
2023-08-07 18:49:54 +03:00
Stefan Prodan 0bc265c71c
Update dependencies
- k8s.io/* v0.27.4
- cloud.google.com/go/kms v1.15.0
- github.com/aws/aws-sdk-go-v2 v1.20.0
- github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0
- github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.0
- github.com/fluxcd/pkg/runtime v0.41.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-08-07 18:19:31 +03:00
Max Jonas Werner 6b494a2863
Merge pull request #937 from fluxcd/dependabot/github_actions/ci-be10f830b0
build(deps): bump the ci group with 1 update
2023-08-07 12:19:10 +02:00
dependabot[bot] 0a2efbd824
build(deps): bump the ci group with 1 update
Bumps the ci group with 1 update: [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator).

- [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)

---
updated-dependencies:
- 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-07 02:22:19 +00:00
Stefan Prodan 460a165fda
Merge pull request #933 from fluxcd/fail-fast
Enable fail-fast behavior for health checks
2023-08-02 13:10:47 +03:00
Stefan Prodan 7765f0c509
Enable fail-fast behavior for health checks
Fail the health check as soon as a resource becomes stalled
without waiting for the timeout to expire.
This behavior can be disabled using the `DisableFailFastBehavior` feature flag.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-31 19:24:49 +03:00
Stefan Prodan 610ec69ca4
Merge pull request #932 from fluxcd/ssa-0.29
Bump `fluxcd/pkg/ssa` to improve immutable error detection
2023-07-31 18:20:37 +03:00
Stefan Prodan 77e13eb579
Bump `fluxcd/pkg/ssa` to improve immutable error detection
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-31 17:57:36 +03:00
Stefan Prodan f8dec0226e
Merge pull request #930 from fluxcd/delete-before-finalizer
Handle delete before adding finalizer
2023-07-31 12:04:02 +03:00
Max Jonas Werner 3dd132cb9e
Merge pull request #929 from fluxcd/align-docs-layout
Align docs structure with other controllers
2023-07-29 16:39:17 +02:00
Sunny 4c3495ca02
Handle delete before adding finalizer
In Reconcile() method, move the object deletion above add finalizer.
Finalizers can't be set when an object is being deleted.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-07-26 23:32:04 +05:30
Max Jonas Werner 91a26c1675
Align docs structure with other controllers
In order to streamline the docs across all controllers, the CRD spec
file name is pluralized. This lets us better automate docs generation
from CRD specs.

refs fluxcd/website#1577

Signed-off-by: Max Jonas Werner <mail@makk.es>
2023-07-21 17:06:04 +02:00
Stefan Prodan 8d9a181165
Merge pull request #927 from fluxcd/dependabot/github_actions/ci-f6f7181596
build(deps): bump the ci group with 2 updates
2023-07-17 16:15:02 +03:00
dependabot[bot] b5a286ffc8
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 [helm/kind-action](https://github.com/helm/kind-action).


Updates `docker/setup-buildx-action` from 2.8.0 to 2.9.1
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](16c0bc4a6e...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)

---
updated-dependencies:
- 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
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 02:59:28 +00:00
Stefan Prodan bca3b717aa
Merge pull request #926 from fluxcd/pick-changelog-v1.0.1
Housekeeping: Add changelog entry for v1.0.1
2023-07-10 15:02:24 +03:00
Stefan Prodan 4f3023f4a3
Add changelog entry for v1.0.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
(cherry picked from commit 0eabc8ae96)
2023-07-10 14:45:19 +03:00
Stefan Prodan eb77efd798
Merge pull request #920 from fluxcd/fix-change-event
Exclude skipped resources from apply events
2023-07-06 11:44:32 +03:00
Stefan Prodan b1d2b72b11
Exclude skipped resources from apply events
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-06 10:38:12 +03:00
Stefan Prodan 0fe37838c8
Merge pull request #917 from fluxcd/group-dependabot
ci: Group all GH action updates under the same PR
2023-07-04 13:56:04 +03:00
Stefan Prodan 39b44e61f5
ci: Group all GH action updates under the same PR
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-04 13:43:43 +03:00
Hidde Beydals e5113ae61d
Merge pull request #915 from fluxcd/ci-backport-bot-token
ci: backport: `token` -> `github_token`
2023-07-04 12:18:35 +02:00
Hidde Beydals 40678c22d9
ci: backport: `token` -> `github_token`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-04 12:10:33 +02:00
Stefan Prodan eb6c79f7f2
Merge pull request #913 from fluxcd/backport-token
Run backport workflow as fluxcdbot
2023-07-04 12:59:30 +03:00
Stefan Prodan c122f60fe6
Run backport workflow as fluxcdbot
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-04 12:44:25 +03:00
Stefan Prodan 498030535c
Merge pull request #911 from fluxcd/rename-controller-pkg
Rename `controllers` to `controller`
2023-07-04 11:51:16 +03:00
Stefan Prodan ede27ccf61
Rename `controllers` to `controller`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-04 11:35:55 +03:00
Stefan Prodan ffdd1c2304
Merge pull request #910 from fluxcd/release/v1.0.x
Housekeeping: merge `release/v1.0.x` back into `main`
2023-07-04 11:03:16 +03:00
Stefan Prodan 7c4ce08d1a
Merge pull request #909 from fluxcd/release-v1.0.0
Release v1.0.0
2023-07-04 10:21:37 +03:00
Stefan Prodan 35b3facb1f
Release v1.0.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-04 09:39:21 +03:00
Stefan Prodan bce720002d
Add changelog entry for v1.0.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-04 09:39:18 +03:00
Stefan Prodan e77ddbc0d6
Merge pull request #908 from fluxcd/update-deps-k8s-1.27.3
Update dependencies
2023-07-04 07:35:58 +03:00
Stefan Prodan 704776d50d
Run e2e with source-controller v1.0.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-03 23:52:44 +03:00
Stefan Prodan 584ebdbb01
Run e2e on Kubernetes 1.27.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-03 23:46:35 +03:00
Stefan Prodan 547046cdf5
Update Go dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-03 23:33:40 +03:00
Stefan Prodan e6494cf345
Merge pull request #907 from fluxcd/normalise-labels
Normalise label descriptions
2023-06-30 17:46:57 +03:00
Stefan Prodan b5eae537c5
Normalise label descriptions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-30 17:29:04 +03:00
Stefan Prodan 869732cfb5
Merge pull request #905 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 16:54:55 +03:00
Stefan Prodan 1f583045d0
Merge pull request #906 from fluxcd/dependabot/github_actions/sigstore/cosign-installer-3.1.1
build(deps): bump sigstore/cosign-installer from 3.1.0 to 3.1.1
2023-06-30 16:54:33 +03:00
dependabot[bot] 592cd7834e
build(deps): bump sigstore/cosign-installer from 3.1.0 to 3.1.1
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](d13028333d...6e04d228eb)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 13:30:39 +00:00
dependabot[bot] 4c91b6eed6
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:30:34 +00:00
Stefan Prodan dd18c720ae
Merge pull request #904 from fluxcd/backport-automation
Add backport GitHub Action workflow
2023-06-30 16:30:09 +03:00
Stefan Prodan 91cbf35339
Add backport GitHub Action workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-30 16:15:17 +03:00
Stefan Prodan b4d283862d
Merge pull request #900 from fluxcd/go.mod-1.20
Align `go.mod` version with Kubernetes (Go 1.20)
2023-06-27 08:34:13 +03:00
Stefan Prodan fb44cf52df
Align go.mod version with Kubernetes (Go 1.20)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-26 19:20:13 +03:00
Hidde Beydals 129c898253
Merge pull request #899 from fluxcd/dependabot/github_actions/sigstore/cosign-installer-3.1.0
build(deps): bump sigstore/cosign-installer from 3.0.5 to 3.1.0
2023-06-26 09:58:32 +02:00
Hidde Beydals 6039510c80
Merge pull request #898 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-26 09:32:42 +02:00
dependabot[bot] a89390e0c6
build(deps): bump sigstore/cosign-installer from 3.0.5 to 3.1.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.5 to 3.1.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](dd6b2e2b61...d13028333d)

---
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-26 03:01:54 +00:00
dependabot[bot] 74e068c7d2
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-26 03:01:50 +00:00
Stefan Prodan 87bd1b8ed4
Merge pull request #894 from fluxcd/slsa3
Add SLSA3 generators to release workflow
2023-06-23 18:19:25 +03:00
Stefan Prodan ae6963124d
Merge pull request #896 from carlbordum/targetnamespace-doc-fixup
targetNamespace namespace can be part of kustomization
2023-06-23 11:50:58 +03:00
Stefan Prodan 5216920d58
Merge pull request #897 from devholic/fix-implicit-src-namespace
Use kustomization namespace for empty dependency source namespace
2023-06-23 11:37:42 +03:00
Carl Bordum Hansen b1240f333c targetNamespace namespace can be part of kustomization
Signed-off-by: Carl Bordum Hansen <carl@bordum.dk>
2023-06-23 09:59:31 +02:00
Sunghoon Kang bce316e887
Use kustomization namespace for empty dependency source namespace
Kustomize controller uses the namespace of the kustomization resource
if the sourceRef is empty. However, this policy doesn't applied to
dependencies. This can be problematic if the same named `Sources`
without explicit namespace is in different namespace.

This commit fixes this issue by using kustomization's namespace when
checking dependencies if the namespace in sourceRef is empty.

Signed-off-by: Sunghoon Kang <me@hoon.dev>
2023-06-23 12:56:33 +09:00
Stefan Prodan 2df8210809
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 15:16:34 +03:00
Max Jonas Werner 58327a33bb
Merge pull request #888 from fluxcd/dependabot/github_actions/docker/metadata-action-4.6.0
build(deps): bump docker/metadata-action from 4.4.0 to 4.6.0
2023-06-19 13:19:20 +02:00
Max Jonas Werner 298946578c
Merge pull request #890 from fluxcd/dependabot/github_actions/docker/setup-buildx-action-2.7.0
build(deps): bump docker/setup-buildx-action from 2.6.0 to 2.7.0
2023-06-19 13:18:48 +02:00
Max Jonas Werner 2c9b5cea14
Merge pull request #891 from fluxcd/dependabot/github_actions/actions/checkout-3.5.3
build(deps): bump actions/checkout from 3.5.2 to 3.5.3
2023-06-19 13:18:12 +02:00
Max Jonas Werner 037017c8f2
Merge pull request #892 from fluxcd/dependabot/github_actions/docker/build-push-action-4.1.1
build(deps): bump docker/build-push-action from 4.1.0 to 4.1.1
2023-06-19 13:17:45 +02:00
Stefan Prodan 426987a690
Merge pull request #889 from fluxcd/dependabot/github_actions/goreleaser/goreleaser-action-4.3.0
build(deps): bump goreleaser/goreleaser-action from 4.2.0 to 4.3.0
2023-06-19 13:35:40 +03:00
dependabot[bot] a4f79dece9
build(deps): bump docker/build-push-action from 4.1.0 to 4.1.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](44ea916f6c...2eb1c1961a)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 03:07:28 +00:00
dependabot[bot] ffd3a47105
build(deps): bump actions/checkout from 3.5.2 to 3.5.3
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8e5e7e5ab8...c85c95e3d7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 03:07:23 +00:00
dependabot[bot] 54191b6eae
build(deps): bump docker/setup-buildx-action from 2.6.0 to 2.7.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](6a58db7e0d...ecf95283f0)

---
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-19 03:07:18 +00:00
dependabot[bot] 62bf8fc4b1
build(deps): bump goreleaser/goreleaser-action from 4.2.0 to 4.3.0
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](f82d6c1c34...336e29918d)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 03:07:14 +00:00
dependabot[bot] 1b7ddef160
build(deps): bump docker/metadata-action from 4.4.0 to 4.6.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.4.0 to 4.6.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](c4ee3adeed...818d4b7b91)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 03:07:09 +00:00
Max Jonas Werner 65f91e37ae
Merge pull request #882 from fluxcd/dependabot/github_actions/docker/setup-buildx-action-2.6.0
build(deps): bump docker/setup-buildx-action from 2.5.0 to 2.6.0
2023-06-12 11:35:55 +02:00
Max Jonas Werner 3d0bd5c893
Merge pull request #883 from fluxcd/dependabot/github_actions/docker/build-push-action-4.1.0
build(deps): bump docker/build-push-action from 4.0.0 to 4.1.0
2023-06-12 11:28:29 +02:00
Max Jonas Werner ad67cc6b32
Merge pull request #884 from fluxcd/dependabot/github_actions/github/codeql-action-2.13.4
build(deps): bump github/codeql-action from 2.3.6 to 2.13.4
2023-06-12 11:23:29 +02:00
dependabot[bot] d32e845d60
build(deps): bump docker/setup-buildx-action from 2.5.0 to 2.6.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](4b4e9c3e2d...6a58db7e0d)

---
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-12 09:21:53 +00:00
Max Jonas Werner dcaa0f2500
Merge pull request #885 from fluxcd/dependabot/github_actions/docker/setup-qemu-action-2.2.0
build(deps): bump docker/setup-qemu-action from 2.1.0 to 2.2.0
2023-06-12 11:21:15 +02:00
Max Jonas Werner c8a4562c44
Merge pull request #886 from fluxcd/dependabot/github_actions/docker/login-action-2.2.0
build(deps): bump docker/login-action from 2.1.0 to 2.2.0
2023-06-12 11:08:01 +02:00
dependabot[bot] 3f27e1f496
build(deps): bump docker/login-action from 2.1.0 to 2.2.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](f4ef78c080...465a07811f)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 03:05:49 +00:00
dependabot[bot] 5a89f797a7
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](e81a89b173...2b82ce82d5)

---
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-12 03:05:45 +00:00
dependabot[bot] 4dd8efc82d
build(deps): bump github/codeql-action from 2.3.6 to 2.13.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.6 to 2.13.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](83f0fe6c49...cdcdbb5797)

---
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-12 03:05:41 +00:00
dependabot[bot] 733ed83609
build(deps): bump docker/build-push-action from 4.0.0 to 4.1.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](3b5e8027fc...44ea916f6c)

---
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-12 03:05:35 +00:00
Max Jonas Werner 8ba6b2028f
Merge pull request #879 from fluxcd/dependabot/github_actions/github/codeql-action-2.3.6
build(deps): bump github/codeql-action from 2.3.5 to 2.3.6
2023-06-05 08:29:06 +02:00
dependabot[bot] 1802d46ef2
build(deps): bump github/codeql-action from 2.3.5 to 2.3.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.5 to 2.3.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0225834cc5...83f0fe6c49)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 03:03:58 +00:00
Stefan Prodan 8de49ddc50
Merge pull request #876 from fluxcd/release-1.0.0-rc.4
Release v1.0.0-rc.4
2023-05-29 11:28:37 +03:00
Stefan Prodan 0efcbfa831
Release v1.0.0-rc.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-29 11:11:23 +03:00
Stefan Prodan 64f0254342
Merge pull request #875 from fluxcd/dependabot/github_actions/github/codeql-action-2.3.5
build(deps): bump github/codeql-action from 2.3.3 to 2.3.5
2023-05-29 10:24:47 +03:00
dependabot[bot] 27701df190
build(deps): bump github/codeql-action from 2.3.3 to 2.3.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.3 to 2.3.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](29b1f65c5e...0225834cc5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 03:04:40 +00:00
Hidde Beydals 04c42f1c03
Merge pull request #873 from fluxcd/update-source-controller
Update source-controller to v1.0.0-rc.4
2023-05-26 16:05:22 +02:00
Hidde Beydals 724a9145e4
Update dependencies
- github.com/aws/aws-sdk-go to v1.44.270
- github.com/fluxcd/pkg/kustomize to v1.3.3
- github.com/hashicorp/vault/api to v1.9.2
- google.golang.org/api to v0.124.0
- google.golang.org/genproto to v0.0.0-20230526015343-6ee61e4f9d5f

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-05-26 15:45:40 +02:00
Hidde Beydals dbce23b981
Update source-controller to v1.0.0-rc.4
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-05-26 15:08:22 +02:00
Stefan Prodan 9b20b7fb70
Merge pull request #872 from fluxcd/update-ca-certificates
Update CA certificates
2023-05-24 12:51:05 +03:00
Stefan Prodan ff28dcda4e
Run update-ca-certificates
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-24 12:28:19 +03:00
Stefan Prodan e8f4808ea2
Rename controllers to controller
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-24 12:27:27 +03:00
Stefan Prodan 66c1e7cd28
Merge pull request #869 from fluxcd/update-test-setup
Update controller-runtime to v0.15.0
2023-05-24 08:46:50 +03:00
Stefan Prodan c61358d5a6
Update azidentity from beta to v1.3.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-23 18:31:34 +03:00
Stefan Prodan 806f93eb82
Update controller-runtime to v0.15.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-23 18:05:18 +03:00
Stefan Prodan c8a9ec6998
Merge pull request #850 from fluxcd/k8s-1.27
Update Kubernetes to v1.27 and Kustomize to v5
2023-05-23 15:34:43 +03:00
Sanskar Jaiswal 74f0da8d06
update k8s to v1.27 and kustomize to v5
Changes made due to breaking changes in controller-runtime:
* `Watches` accepts a plain `client.Object` instead of a `source.Kind`
  object.
* Some fields in `controller.Options` are now in `config.Controller` which
  is embedded in `controller.Options`.
* `handler.MapFunc` now accepts a context.
* `ctrlcache.Options` uses `ByObject` instead of `SelectorByObject`.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-05-23 14:22:59 +03:00
Hidde Beydals 9204d8185c
Merge pull request #867 from fluxcd/dependabot/github_actions/sigstore/cosign-installer-3.0.5 2023-05-22 09:15:30 +02:00
Stefan Prodan 6639bccfe6
Merge pull request #866 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-05-22 10:00:25 +03:00
dependabot[bot] 04ef2ddc45
build(deps): bump sigstore/cosign-installer from 3.0.3 to 3.0.5
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.3 to 3.0.5.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](204a51a57a...dd6b2e2b61)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 06:48:48 +00:00
Hidde Beydals 9b469c36af
Merge pull request #868 from fluxcd/dependabot/github_actions/actions/setup-go-4.0.1 2023-05-22 08:47:55 +02:00
dependabot[bot] d1779da0e6
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-05-22 03:15:15 +00:00
dependabot[bot] 2621336695
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-05-22 03:15:08 +00:00
Stefan Prodan e1c188f86a
Merge pull request #863 from fluxcd/release-1.0.0-rc.3
Release v1.0.0-rc.3
2023-05-12 14:21:12 +03:00
Stefan Prodan cb39f8de53
Release v1.0.0-rc.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-12 14:02:29 +03:00
Stefan Prodan b22c289248
Merge pull request #862 from fluxcd/update-flux-deps
Update dependencies
2023-05-12 13:51:02 +03:00
Stefan Prodan 65727920be
Update dependencies
- github.com/fluxcd/pkg/http/fetch v0.5.0
- github.com/fluxcd/source-controller/api v1.0.0-rc.3
- google.golang.org/api v0.122.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-12 13:27:10 +03:00
Stefan Prodan a058ccf186
Merge pull request #861 from danielloader/main
docs: Clarify the Kustomize components relative paths requirement
2023-05-12 13:10:46 +03:00
Daniel Loader 54b5c06451 Update kustomization.md
Add clarification on how to handle component(s) paths.

Signed-off-by: Daniel Loader <hello@danielloader.uk>
2023-05-12 10:46:51 +01:00
Stefan Prodan 02cf18c5f0
Merge pull request #860 from fluxcd/dependabot/go_modules/github.com/cloudflare/circl-1.3.3
build(deps): bump github.com/cloudflare/circl from 1.1.0 to 1.3.3
2023-05-12 08:36:17 +03:00
dependabot[bot] eb5a60a90d
build(deps): bump github.com/cloudflare/circl from 1.1.0 to 1.3.3
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.1.0 to 1.3.3.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.1.0...v1.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-11 20:46:10 +00:00
Hidde Beydals b49b6e1a41
Merge pull request #855 from onedr0p/patch-1
Update Alpine to 3.18
2023-05-10 17:32:48 +02:00
Devin Buhl 599853920b
Update Alpine to 3.18
This change would be nice to get in because MUSL finally implemented TCP fallback in their DNS resolver.

https://alpinelinux.org/posts/Alpine-3.18.0-released.html

Signed-off-by: Devin Buhl <onedr0p@users.noreply.github.com>
2023-05-10 09:28:03 -04:00
Stefan Prodan 0abd3b5a18
Merge pull request #854 from fluxcd/release-1.0.0-rc.2
Release v1.0.0-rc.2
2023-05-09 17:14:39 +03:00
Stefan Prodan 1e70f2da3a
Release v1.0.0-rc.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-09 16:47:56 +03:00
Stefan Prodan 240d2e92bc
Merge pull request #853 from fluxcd/update-deps
Update dependencies
2023-05-09 16:14:00 +03:00
Stefan Prodan c8fd5ab82c
Update dependencies
- cloud.google.com/go/kms v1.10.2
- github.com/aws/aws-sdk-go-v2 v1.18.0
- github.com/fluxcd/pkg/kustomize v1.1.1
- github.com/fluxcd/source-controller/api v1.0.0-rc.2
- github.com/hashicorp/vault/api v1.9.1
- golang.org/x/net v0.10.0
- google.golang.org/api v0.121.0
- google.golang.org/grpc v1.55.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-09 14:23:13 +03:00
Max Jonas Werner e350e77d24
Merge pull request #851 from fluxcd/dependabot/github_actions/github/codeql-action-2.3.3
build(deps): bump github/codeql-action from 2.3.2 to 2.3.3
2023-05-08 08:23:19 +02:00
Max Jonas Werner 8d669b426e
Merge pull request #852 from fluxcd/dependabot/github_actions/anchore/sbom-action-0.14.2
build(deps): bump anchore/sbom-action from 0.14.1 to 0.14.2
2023-05-08 08:22:22 +02:00
dependabot[bot] 833fd4f918
build(deps): bump anchore/sbom-action from 0.14.1 to 0.14.2
Bumps [anchore/sbom-action](https://github.com/anchore/sbom-action) from 0.14.1 to 0.14.2.
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](422cb34a0f...4d571ad103)

---
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-05-08 03:08:57 +00:00
dependabot[bot] b396fc4c5a
build(deps): bump github/codeql-action from 2.3.2 to 2.3.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f3feb00acb...29b1f65c5e)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 03:08:53 +00:00
Stefan Prodan 8d909da00f
Merge pull request #838 from apeschel/topic/apeschel/fix_azkv_envCred
Fix SOPS azkv envCred
2023-05-02 14:21:29 +03:00
Hidde Beydals 6c6525c74f
Merge pull request #847 from fluxcd/dependabot/github_actions/sigstore/cosign-installer-3.0.3
build(deps): bump sigstore/cosign-installer from 3.0.2 to 3.0.3
2023-05-01 10:05:06 +02:00
dependabot[bot] 7399539900
build(deps): bump sigstore/cosign-installer from 3.0.2 to 3.0.3
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](9e9de2292d...204a51a57a)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 07:50:01 +00:00
Hidde Beydals f599c2d029
Merge pull request #848 from fluxcd/dependabot/github_actions/github/codeql-action-2.3.2
build(deps): bump github/codeql-action from 2.3.0 to 2.3.2
2023-05-01 09:49:21 +02:00
dependabot[bot] 5bc8993710
build(deps): bump github/codeql-action from 2.3.0 to 2.3.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.0 to 2.3.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b2c19fb9a2...f3feb00acb)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 03:07:41 +00:00
Max Jonas Werner 09f4158ae9
Merge pull request #844 from fluxcd/dependabot/github_actions/docker/metadata-action-4.4.0
build(deps): bump docker/metadata-action from 4.3.0 to 4.4.0
2023-04-24 10:08:25 +02:00
Max Jonas Werner f397881957
Merge pull request #845 from fluxcd/dependabot/github_actions/github/codeql-action-2.3.0
build(deps): bump github/codeql-action from 2.2.12 to 2.3.0
2023-04-24 10:07:33 +02:00
dependabot[bot] 24cb1527c3
build(deps): bump github/codeql-action from 2.2.12 to 2.3.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.12 to 2.3.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](7df0ce3489...b2c19fb9a2)

---
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-04-24 03:11:01 +00:00
dependabot[bot] 557a77cd46
build(deps): bump docker/metadata-action from 4.3.0 to 4.4.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](507c2f2dc5...c4ee3adeed)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 03:10:54 +00:00
Aaron Peschel 2b98fbf3b7 Fix SOPS azkv envCred
At the moment, the envCred logic can't actually set the Azure credentials.

This commit fixes the logic so that the environment variables can
actually be used to set the Azure credentials.

There are other issues that come up from this block of code, but those
can be dealt with separately.

Signed-off-by: Aaron Peschel <aaron.peschel@gmail.com>
2023-04-21 12:58:22 -07:00
Hidde Beydals 6ecf4254cf
Merge pull request #836 from fluxcd/dependabot/github_actions/actions/checkout-3.5.2
build(deps): bump actions/checkout from 3.5.0 to 3.5.2
2023-04-17 12:05:36 +02:00
Stefan Prodan 77afb0503e
Merge pull request #835 from fluxcd/dependabot/github_actions/github/codeql-action-2.2.12
build(deps): bump github/codeql-action from 2.2.11 to 2.2.12
2023-04-17 11:15:01 +03:00
dependabot[bot] 6fa513837c
build(deps): bump actions/checkout from 3.5.0 to 3.5.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8f4b7f8486...8e5e7e5ab8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 03:04:12 +00:00
dependabot[bot] 07170b3dfc
build(deps): bump github/codeql-action from 2.2.11 to 2.2.12
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.11 to 2.2.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](d186a2a36c...7df0ce3489)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 03:04:07 +00:00
Stefan Prodan f966dde54d
Merge pull request #832 from fluxcd/dependabot/github_actions/sigstore/cosign-installer-3.0.2
build(deps): bump sigstore/cosign-installer from 3.0.1 to 3.0.2
2023-04-10 11:18:28 +03:00
Stefan Prodan 836bfda6d6
Merge pull request #833 from fluxcd/dependabot/github_actions/github/codeql-action-2.2.11
build(deps): bump github/codeql-action from 2.2.9 to 2.2.11
2023-04-10 10:49:01 +03:00
dependabot[bot] a43f214a97
build(deps): bump github/codeql-action from 2.2.9 to 2.2.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.9 to 2.2.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](04df1262e6...d186a2a36c)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 03:08:35 +00:00
dependabot[bot] 098998f57c
build(deps): bump sigstore/cosign-installer from 3.0.1 to 3.0.2
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](c3667d9942...9e9de2292d)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 03:08:25 +00:00
Max Jonas Werner 434e1b52de
Merge pull request #830 from fluxcd/dependabot/go_modules/github.com/docker/docker-20.10.24incompatible
build(deps): bump github.com/docker/docker from 20.10.7+incompatible to 20.10.24+incompatible
2023-04-05 08:49:45 +02:00
dependabot[bot] 6cf97d59ac
build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.7+incompatible to 20.10.24+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.7...v20.10.24)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-04 21:24:22 +00:00
Stefan Prodan 5abbeb1373
Merge pull request #829 from fluxcd/release-v1.0.0-rc.1
Release v1.0.0-rc.1
2023-04-03 14:35:25 +03:00
Stefan Prodan 69edf6e1a7
Release v1.0.0-rc.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-04-03 14:05:44 +03:00
Stefan Prodan 0ee92a5366
Merge pull request #813 from somtochiama/azidentity
Support Workload Identity for Azure Vault
2023-04-03 13:43:57 +03:00
Somtochi Onyekwere 45ad400f2a Add Workload Identity support for Azure Vault
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
Co-authored-by: Hidde Beydals <hidde@hhh.computer>
2023-04-03 11:23:44 +01:00
Stefan Prodan 9edf6185c9
Merge pull request #828 from fluxcd/dependabot/github_actions/anchore/sbom-action-0.14.1
build(deps): bump anchore/sbom-action from 0.13.4 to 0.14.1
2023-04-03 10:01:06 +03:00
Stefan Prodan 6f8514b181
Merge pull request #822 from fluxcd/api-v1
GA: Promote Kustomization API to `kustomize.toolkit.fluxcd.io/v1`
2023-04-03 09:56:22 +03:00
dependabot[bot] 74755d316f
build(deps): bump anchore/sbom-action from 0.13.4 to 0.14.1
Bumps [anchore/sbom-action](https://github.com/anchore/sbom-action) from 0.13.4 to 0.14.1.
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Commits](448520c4f1...422cb34a0f)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-03 03:06:16 +00:00
Hidde Beydals ae00400d12
api/docs: various nits and typos
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-31 17:23:46 +02:00
Sanskar Jaiswal f8711dcf4e
change path to root for e2e oci test
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-03-31 14:27:03 +05:30
Sanskar Jaiswal 794558e3ec
remove deprecated field validation from test data
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-03-31 13:31:55 +05:30
Sanskar Jaiswal acead1667a
register source v1beta2 scheme
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-03-31 13:15:07 +05:30
Sanskar Jaiswal 7df47e6dc8
update config/testdata to use source v1 and kustomize v1
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-03-31 13:14:44 +05:30
Stefan Prodan d456f3156d
Update e2e tests to v1 APIs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-30 18:48:05 +03:00
Stefan Prodan d6c69d4253
Use conditions from fluxcd/pkg/apis/meta@v1.0.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-30 18:45:23 +03:00
Stefan Prodan 4ed5082946
Update Source APIs to v1.0.0-rc.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-30 18:25:44 +03:00
Stefan Prodan 172adf6ee0 Version API generated docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-30 19:42:21 +05:30
Sanskar Jaiswal 793450fe5d docs: add Kustomization v1 docs
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-03-30 19:42:19 +05:30
Hidde Beydals a73d9f2b4f
Merge pull request #824 from fluxcd/dependabot/go_modules/github.com/opencontainers/runc-1.1.5
build(deps): bump github.com/opencontainers/runc from 1.1.2 to 1.1.5
2023-03-30 10:15:07 +02:00
Hidde Beydals 477e9548df
Merge pull request #823 from fluxcd/update-workflows 2023-03-29 17:34:36 +02:00
Hidde Beydals 074884f595
build: enable Dependabot for GitHub Actions
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 17:27:54 +02:00
dependabot[bot] 1512a93d43
build(deps): bump github.com/opencontainers/runc from 1.1.2 to 1.1.5
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.2 to 1.1.5.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.5/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.2...v1.1.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-29 14:49:38 +00:00
Hidde Beydals 29e16369c5
build: update scan workflow
- Update actions to their latest versions.
- Use SHA to (potentially) allow enabling Dependabot.
- Add Go Modules caching using  `actions/setup-go` (supported since
  >=v3).

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 16:44:44 +02:00
Hidde Beydals 12ee606e0b
build: update release workflow
- Update actions to their latest versions.
- Use SHA to (potentially) allow enabling Dependabot.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 16:38:21 +02:00
Hidde Beydals c8376d8fff
build: update nightly workflow
- Update actions to their latest versions.
- Use SHA to (potentially) allow enabling Dependabot.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 16:38:21 +02:00
Hidde Beydals 389d495b26
build: update e2e workflow
- Update actions to their latest versions.
- Use SHA to (potentially) allow enabling Dependabot.
- Move Go Modules caching responsibility to `actions/setup-go`
  (supported since >=v3).

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 16:22:26 +02:00
Hidde Beydals b724569cad
build: update cifuzz workflow
- Update actions to their latest versions.
- Use SHA to (potentially) allow enabling Dependabot.
- Move caching responsibility to `actions/setup-go` (supported since
  >=v3).

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 16:18:59 +02:00
Stefan Prodan 29d25a4dbe
Promote Kustomization API to v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-29 16:29:05 +03:00
Stefan Prodan 7f6ddf75a3
Merge pull request #821 from fluxcd/watch-label-selector
Add reconciler sharding capability based on label selector
2023-03-29 15:11:56 +03:00
Stefan Prodan 74cadb4d43
Add reconciler sharding capability based on label selector
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-29 14:53:42 +03:00
Stefan Prodan 0ba76c01c3
Update APIs and runtime packages
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-29 13:43:08 +03:00
Stefan Prodan 64cd8c138a
Merge pull request #820 from fluxcd/internal-controllers
Move `controllers` to `internal/controllers`
2023-03-29 12:51:15 +03:00
Stefan Prodan 31a62adfa9
Move `controllers` to `internal/controllers`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-29 12:27:05 +03:00
Stefan Prodan 2f5d875878
Merge pull request #817 from fluxcd/common-metadata
Add common labels and annotations patching capabilities
2023-03-29 11:42:40 +03:00
Stefan Prodan 0e222c9c83
docs: Document the CommonMetadata field
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-29 11:25:19 +03:00
Stefan Prodan f01e6b0a93
Implement common metadata patching
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-29 11:25:16 +03:00
Stefan Prodan f53750ddc2
API: Add CommonMetadata optional field
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-29 11:25:15 +03:00
Hidde Beydals af859b0478
Merge pull request #818 from fluxcd/artifact-verify-digest 2023-03-27 13:21:27 +02:00
Hidde Beydals de3406bd6d
controllers: Verify Digest of Artifact
This commit changes the verification to the `Digest` field of the
Artifact, which was introduced in source-controller v0.35.0. As the
`Checksum` is expected to be removed in the next release of the
source-controller.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-27 12:49:41 +02:00
Stefan Prodan 31534d9df0
Merge pull request #815 from fluxcd/releaase-0.35.1
Release v0.35.1
2023-03-20 17:15:36 +01:00
Stefan Prodan 08a2456e84
Release v0.35.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-20 17:52:35 +02:00
Stefan Prodan 36ac0d34b0
Merge pull request #814 from fluxcd/update-deps
Update dependencies
2023-03-20 16:22:41 +01:00
Stefan Prodan a0e078e0e9
Update dependencies
- github.com/fluxcd/pkg/ssa v0.25.0
- github.com/fluxcd/pkg/runtime v0.32.0
- github.com/aws/aws-sdk-go-v2 v1.17.6
- cloud.google.com/go/kms v1.10.0
- github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-20 17:02:52 +02:00
Hidde Beydals e3f65fb7bc
Merge pull request #812 from fluxcd/release-0.35.0
Release v0.35.0
2023-03-08 17:47:56 +01:00
Hidde Beydals 3bd45b5d57
Release v0.35.0
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-08 17:29:57 +01:00
Hidde Beydals 367741b622
Merge pull request #811 from fluxcd/fix-release-update-sc-deps
Update source-controller to v0.36.0
2023-03-08 15:17:47 +01:00
Hidde Beydals 8d4d65aeb8
Update source-controller to v0.36.0
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-08 13:46:45 +01:00
Hidde Beydals 7a84ad04b0
release: pass `--yes` to cosign in signs
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-08 13:46:45 +01:00
Hidde Beydals 48fa70a132
Merge pull request #808 from fluxcd/update-release-workflow
build: update release workflow
2023-03-08 09:32:38 +01:00
Hidde Beydals 26868118a2
build: update scan workflow
- fossa-contrib/fossa-action to v2

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-08 09:15:56 +01:00
Hidde Beydals 1b935683c7
build: update nightly workflow
- docker/setup-qemu-action to v2
- docker/build-push-action to v4

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-08 09:15:56 +01:00
Hidde Beydals 3b4b7e5b1e
build: update release workflow
- docker/build-push-action to v4
- sigstore/cosign-installer to v3
- goreleaser/goreleaser-action to v4

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-08 09:15:47 +01:00
Hidde Beydals f54846878f
Merge pull request #809 from fluxcd/runtime-logger-klog 2023-03-08 01:21:12 +01:00
Hidde Beydals 0c94d4ed7b
Use `logger.SetLogger` to also configure `klog`
This uses the newly introduced helper from runtime, which also
configures the logger for `klog`.

Resulting in all logs now being properly formatted, even when logged by
internal Kubernetes elements like the leader election or a dynamic
client.

The update from `fluxcd/pkg/runtime` from `v0.29.0` to `v0.31.0` in
addition includes a change which configures the event recoder to only
log on level `trace` (as opposed to `debug`).

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-08 00:25:11 +01:00
Hidde Beydals 4a39dd848f
Merge pull request #807 from fluxcd/update-deps
Update dependencies
2023-03-08 00:22:57 +01:00
Hidde Beydals f9878cfd1b
Drop string cast from SSA action comparisons
As this is no longer required given the action is now typed.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-07 17:55:10 +01:00
Hidde Beydals ec34ae36ce
Update dependencies
- cloud.google.com/go/kms to v1.9.0
- github.com/Azure/azure-sdk-for-go/sdk/azcore to v1.4.0
- github.com/aws/aws-sdk-go to v1.44.215
- github.com/aws/aws-sdk-go-v2 to v1.17.5
- github.com/aws/aws-sdk-go-v2/config to v1.18.15
- github.com/aws/aws-sdk-go-v2/credentials to v1.13.15
- github.com/aws/aws-sdk-go-v2/service/kms to v1.20.6
- github.com/aws/aws-sdk-go-v2/service/sts to v1.18.5
- github.com/fluxcd/pkg/apis/event to v0.4.1
- github.com/fluxcd/pkg/apis/kustomize to v0.8.1
- github.com/fluxcd/pkg/apis/meta to v0.19.1
- github.com/fluxcd/pkg/http/fetch to v0.3.1
- github.com/fluxcd/pkg/kustomize to v0.13.2
- github.com/fluxcd/pkg/ssa to v0.24.1
- github.com/fluxcd/source-controller/api to v0.35.2
- github.com/onsi/gomega to v1.27.2
- golang.org/x/net to v0.8.0
- google.golang.org/api to v0.111.0
- google.golang.org/genproto to v0.0.0-20230306155012-7f2fa6fef1f4
- k8s.io/api to v0.26.2
- k8s.io/apiextensions-apiserver to v0.26.2
- k8s.io/apimachinery to v0.26.2
- k8s.io/client-go to v0.26.2
- sigs.k8s.io/controller-runtime to v0.14.5
- Unpin github.com/emicklei/go-restful as it is no longer an (indirect)
  dependency.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-07 17:43:09 +01:00
Hidde Beydals e4aea8ca54
api: update dependencies
- github.com/fluxcd/pkg/apis/kustomize to v0.8.1
- github.com/fluxcd/pkg/apis/meta to v0.19.1
- k8s.io/apiextensions-apiserver to v0.26.2
- k8s.io/apimachinery to v0.26.2
- sigs.k8s.io/controller-runtime to v0.14.5

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-07 17:37:45 +01:00
Hidde Beydals 3f8b74cf7d
Merge pull request #806 from fluxcd/update-go-1.20
Update Go to 1.20
2023-03-07 17:11:20 +01:00
Hidde Beydals d5a29c4ddc
Update tonistiigi/xx to 1.2.1
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-07 16:36:18 +01:00
Hidde Beydals 09d2d0ccce
Update Go to 1.20
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-07 16:36:18 +01:00
Hidde Beydals 1f733b5add
Merge pull request #803 from fluxcd/disable-kstatus-cache
kstatus: allow disabling of caching cluster reader
2023-03-07 15:34:04 +01:00
Hidde Beydals cb4622be40
kstatus: allow disabling of caching cluster reader
This commit allows the disabling of the caching cluster reader used by
the status poller while waiting and/or checking the health of resources.
Potentially reducing the memory usage of the controller on large scale
clusters, at the cost of an increase in direct API calls.

The feature can be enabled using
`--feature-gates=DisableStatusPollerCache=true`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-07 12:56:17 +01:00
Hidde Beydals 11f5fbb664
Merge pull request #799 from fluxcd/set-output-deprecation
build: convert ::set-output to $GITHUB_OUTPUT
2023-02-17 14:27:21 +01:00
Hidde Beydals eb3ba0e883 build: convert ::set-output to $GITHUB_OUTPUT
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-17 14:04:01 +01:00
Hidde Beydals 5056fbf6ac
Merge pull request #798 from fluxcd/update-lastappliedrevision
api: update description LastAppliedRevision
2023-02-17 13:24:58 +01:00
Hidde Beydals 0659a825c6 api: remove unused `trimString` func
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-17 13:08:41 +01:00
Hidde Beydals 6bfc4e459d spec: change revisions in examples to RFC-0005 fmt
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-17 13:08:10 +01:00
Hidde Beydals dff4fd2835 api: update description LastAppliedRevision
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-17 13:07:39 +01:00
Hidde Beydals ef22027666
Merge pull request #797 from fluxcd/release-v0.34.0
Release v0.34.0
2023-02-17 10:52:10 +01:00
Stefan Prodan f33d898dde
Release v0.34.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-17 11:34:20 +02:00
Hidde Beydals 9b35fc5d0c
Merge pull request #793 from fluxcd/digest-revision-fmt
Support RFC-0005 revision format
2023-02-17 09:52:44 +01:00
Hidde Beydals 73363eee8a Support RFC-0005 revision format
This updates all the comparisons to make use of `HasRevision` which
supports the RFC-0005 and legacy revision formats.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-17 09:31:42 +01:00
Hidde Beydals 2217a49c8b
Merge pull request #796 from fluxcd/update-deps
Update dependencies
2023-02-16 20:29:50 +01:00
Hidde Beydals 0edf9a0005 Update controller API build tooling
- Update both to their latest versions
- Introduce version variables

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-16 18:13:17 +01:00
Hidde Beydals 2b8634ac1e Update dependencies
- github.com/Azure/azure-sdk-for-go/sdk/azcore to v1.3.1
- github.com/aws/aws-sdk-go to v1.44.202
- github.com/aws/aws-sdk-go-v2 to v1.17.4
- github.com/aws/aws-sdk-go-v2/config to v1.18.13
- github.com/aws/aws-sdk-go-v2/credentials to v1.13.13
- github.com/aws/aws-sdk-go-v2/service/kms to v1.20.3
- github.com/aws/aws-sdk-go-v2/service/sts to v1.18.3
- github.com/fluxcd/pkg/apis/event to v0.4.0
- github.com/fluxcd/pkg/kustomize to v0.13.1
- github.com/fluxcd/pkg/runtime to v0.29.0
- github.com/fluxcd/pkg/ssa to v0.23.1
- github.com/hashicorp/vault/api to v1.9.0
- golang.org/x/net to v0.7.0
- google.golang.org/api to to v0.110.0
- google.golang.org/genproto to v0.0.0-20230209215440-0dfe4f8abfcc
- google.golang.org/grpc to v1.53.0
- sigs.k8s.io/controller-runtime to v0.14.4

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-16 18:13:17 +01:00
Hidde Beydals bf514f1079 api: update dependencies
- sigs.k8s.io/controller-runtime to v0.14.4
- Unpin golang.org/x/text from v0.4.0 to allow update to v0.5.0

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-16 17:59:54 +01:00
Stefan Prodan df9dd9b2cb
Merge pull request #791 from fluxcd/release-0.33.0
Release v0.33.0
2023-02-01 17:37:21 +02:00
Stefan Prodan 4d73e0f36b
Release v0.33.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-01 17:11:16 +02:00
Stefan Prodan f1135e0ef6
Merge pull request #790 from fluxcd/sc-0.34.0
Update source-controller/api to v0.34.0
2023-02-01 16:24:29 +02:00
Stefan Prodan 0c8a51b41b
Update source-controller/api to v0.34.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-01 13:07:14 +02:00
Hidde Beydals 4062d6ab53
Merge pull request #789 from fluxcd/no-cache-secrets
Disable caching of Secrets and ConfigMaps
2023-01-30 16:17:30 +00:00
Hidde Beydals c877c07db9 Disable caching of Secrets and ConfigMaps
You can re-enable caching by starting the controller with the argument
`--feature-gates=CacheSecretsAndConfigMaps=true`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-01-30 15:37:49 +00:00
Stefan Prodan 60ea92d438
Merge pull request #788 from fluxcd/docker-sbom
build: Enable SBOM and SLSA Provenance
2023-01-30 15:33:15 +02:00
Stefan Prodan 989008185a
build: Enable SBOM and SLSA Provenance
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-30 15:16:26 +02:00
Stefan Prodan 99d70c8217
Merge pull request #787 from fluxcd/force-label
Allow force apply to be configured in metadata
2023-01-27 13:33:13 +02:00
Stefan Prodan 27328fbd9a
Allow force apply to be configured in metadata
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-27 13:14:51 +02:00
Stefan Prodan e6fd06681f
Merge pull request #784 from fluxcd/kstatus-check
Enable kstatus checks
2023-01-27 12:15:01 +02:00
Stefan Prodan 14b3d4ae48
Merge pull request #783 from fluxcd/crd-deps-downloads
build: Download CRD deps only when necessary
2023-01-27 12:13:52 +02:00
Sunny 06fcd1b276 test: Add enable kstatus checks
Update fluxcd/pkg/runtime to v0.26.0 which has the new kstatus checker.
Enable previous kstatus checks and introduce kstatus in-progress checker
for testing in-progress status of objects.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-27 15:24:03 +05:30
Sunny fbb5ce5f92 build: Download CRD deps only when necessary
Create individual make targets for the CRD dependencies so that make can
identify that the CRD dependencies have already been downloaded and
skip. When the SOURCE_VER changes, old CRDs are deleted and new ones are
downloaded, keeping a record of the source CRD versions in
build/.src-crd-<version> by file name.
Also, introduce `cleanup-crd-deps` make target to delete the previously
downloaded CRDs.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-27 15:18:26 +05:30
Stefan Prodan 86ea08c2d5
Merge pull request #786 from fluxcd/alpine-3.17
Update Alpine to 3.17
2023-01-26 19:27:13 +02:00
Stefan Prodan 630af3e3e5
Use autoscaling/v2 in tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-26 19:07:51 +02:00
Stefan Prodan 949873ae65
Update Alpine to 3.17
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-26 17:47:04 +02:00
Stefan Prodan 803349d1c2
Merge pull request #781 from fluxcd/release-v0.32.0
Release v0.32.0
2022-12-20 17:28:57 +02:00
Stefan Prodan b7c4691314
Release v0.32.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-20 17:05:01 +02:00
Stefan Prodan 862cf51390
Merge pull request #780 from fluxcd/update-sc-pkg
Update dependencies
2022-12-20 16:39:55 +02:00
Stefan Prodan 0442bfbd40
Update dependencies
- github.com/fluxcd/pkg/kustomize v0.12.0
- github.com/fluxcd/source-controller/api v0.33.0
- github.com/aws/aws-sdk-go-v2/service/kms v1.19.4
- cloud.google.com/go/kms v1.7.0
- golang.org/x/net v0.4.0
- google.golang.org/api v0.105.0
- google.golang.org/grpc v1.51.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-20 16:19:50 +02:00
Stefan Prodan 2a4ed19443
Merge pull request #777 from pjbgf/improv-fuzz
fuzz: Use build script from upstream and fix fuzzers
2022-12-15 11:30:29 +02:00
Paulo Gomes f73957b7e7
fuzz: bump github.com/sirupsen/logrus
A dependency added at fuzzing time upgrades logrus to 1.9.0
which cases the building process to break. By bumping the
dependency Go's MVS won't make further changes later.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-12-14 22:09:20 +00:00
Paulo Gomes e9ea240462
fuzz: Align documentation with other repos
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-12-14 22:08:53 +00:00
Paulo Gomes efb6c17d4d
fuzz: Use build script from upstream
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-12-14 22:08:39 +00:00
Hidde Beydals f971376fe8
Merge pull request #776 from fluxcd/update-dockertest
build: update dockertest to Go Mod compatible v3
2022-12-14 15:13:05 +00:00
Hidde Beydals 648825603c build: update dockertest to Go Mod compatible v3
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-12-14 14:38:37 +00:00
Stefan Prodan 5149144fc5
Merge pull request #774 from somtochiama/ssa-docs
Document behaviour of atomic fields with server-side apply
2022-12-07 18:09:06 +02:00
Somtochi Onyekwere 3ad92a27d8 Add note on atomic fields
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-12-07 15:44:32 +01:00
Stefan Prodan a0c79e1721
Merge pull request #754 from klausenbusk/components
Add support for Kustomize components
2022-12-05 13:18:46 +02:00
Kristian Klausen b25dea8366 Add support for Kustomize components
Fix #753

Signed-off-by: Kristian Klausen <kristian@klausen.dk>
2022-12-03 00:04:14 +01:00
Stefan Prodan e7e42e96b6
Merge pull request #771 from pjbgf/fix-broken-fuzz
build: Fix cifuzz tests and improve fuzz tests' reliability
2022-11-23 16:44:45 +02:00
Paulo Gomes c636df07d0
build: Improve fuzz tests' reliability
Establish conventions which aligns with what is supported upstream
today, whilst expanding on documentation to ensure folks have
pointers on how to debug/check for issues going forwards.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-11-23 14:15:37 +00:00
Stefan Prodan ee8c46ab4f
Merge pull request #769 from fluxcd/release-0.31.0
Release v0.31.0
2022-11-18 14:33:40 +02:00
Stefan Prodan fb27853566
Release v0.31.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-11-18 14:10:59 +02:00
Stefan Prodan 8fc3c72fa9
Merge pull request #768 from fluxcd/source-controller-v0.32.1
Update Source API to v0.32.1
2022-11-18 13:19:31 +02:00
Stefan Prodan 7673ab4f2e
Update Source API to v0.32.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-11-18 12:57:17 +02:00
Stefan Prodan 18e231b69c
Merge pull request #767 from fluxcd/deps-up-kms
Update dependencies
2022-11-18 11:36:36 +02:00
Stefan Prodan 8f8c1b29b5
Update dependencies
- cloud.google.com/go/kms to version 1.6.0
- github.com/aws/aws-sdk-go to version 1.44.140
- github.com/aws/aws-sdk-go-v2 to version 1.17.1
- github.com/aws/aws-sdk-go-v2/config to version 1.18.2
- github.com/aws/aws-sdk-go-v2/credentials to version 1.13.2
- github.com/aws/aws-sdk-go-v2/service/kms to version 1.18.17
- github.com/aws/aws-sdk-go-v2/service/sts to version 1.17.4
- github.com/fluxcd/source-controller/api to version 0.32.0
- github.com/hashicorp/vault/api to version 1.8.2
- google.golang.org/api to version 0.103.0
- google.golang.org/genproto to version 0.0.0-20221117204609-8f9c96812029

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-11-18 10:31:14 +02:00
Stefan Prodan 814a79f8c1
Merge pull request #763 from souleb/use-pkg-kustomize
Refactor: Generate manifests with `flux/pkg/kustomize`
2022-11-16 17:26:43 +02:00
Soule BA 69370f0d62
Update fluxcd/pkg dependencies
Signed-off-by: Soule BA <bah.soule@gmail.com>
2022-11-16 15:47:23 +01:00
Soule BA ab04480ef3
Replace internal/generator by flux/pkg/kustomize
Signed-off-by: Soule BA <bah.soule@gmail.com>
2022-11-14 23:02:38 +01:00
Paulo Gomes 1e8dc842d3
Merge pull request #765 from fluxcd/rm-nsswitch
Remove nsswitch.conf creation from Dockerfile
2022-11-14 17:46:28 +00:00
Stefan Prodan 2c4e0201ef
Remove nsswitch.conf creation from Dockerfile
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-11-14 18:15:52 +02:00
Stefan Prodan 625c5afafc
Merge pull request #761 from fluxcd/fix-error-handling
Don't override the reconcile error on status patching
2022-11-10 12:36:34 +02:00
Stefan Prodan 20f3447e3a
Don't override the reconcile error on status patching
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-11-10 12:19:25 +02:00
Paulo Gomes 9582513a04
Merge pull request #760 from pjbgf/use-edge-gpg
build: Bump gpg to alpine's edge
2022-11-09 16:44:13 +00:00
Paulo Gomes d8e820b222
build: Bump gpg to alpine's edge
LibKSBA is a dependency to GnuPG, which has a CVE that
is yet to be patched on Alpine's stable channel. This
PR installs GnuPG from the edge channel, and should be
reverted once libksba's version 1.6.2 is in main.

https://pkgs.alpinelinux.org/packages?name=libksba&branch=edge
https://gnupg.org/blog/20221017-pepe-left-the-ksba.html

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-11-09 16:18:33 +00:00
Stefan Prodan 47073a38f4
Merge pull request #758 from fluxcd/event-v1beta1
Use Flux Event API v1beta1
2022-11-09 12:36:57 +02:00
Stefan Prodan c315d5f546
Use Flux Event API v1beta1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-11-09 11:56:28 +02:00
Stefan Prodan 9fd283be60
Merge pull request #759 from fluxcd/sops-azkv-update
Update `keyvault/azkeys` Azure SDK to v0.9.0
2022-11-09 11:53:11 +02:00
Hidde Beydals d10a45bf7f Update `keyvault/azkeys` Azure SDK to v0.9.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-11-09 09:19:08 +00:00
Stefan Prodan 4a391bde5c
Merge pull request #751 from fluxcd/release-v0.30.0
Release v0.30.0
2022-10-21 19:37:08 +03:00
Stefan Prodan acc533f12e
Release v0.30.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-21 19:05:01 +03:00
Stefan Prodan 4aec2a66f3
Merge pull request #750 from fluxcd/kube-1.25.3
Update dependencies
2022-10-21 18:20:37 +03:00
Stefan Prodan ecb5e3c096
Update dependencies
- `k8s.io/*` v0.25.3
- `aws-sdk-go-v2/service/kms` v1.18.13
- `fluxcd/source-controller/api` v0.31.0
- `fluxcd/image-reflector-controller/api` v0.22.1
- `golang.org/x/text` v0.4.0 (fix CVE-2022-32149)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-21 18:06:44 +03:00
Stefan Prodan 85c97280ea
Merge pull request #749 from fluxcd/api-widen-timeout-validation
api: allow configuration of `h` unit for timeouts
2022-10-21 17:22:40 +03:00
Hidde Beydals 4835ece070 api: allow configuration of `h` unit for timeouts
To allow waiting for `HelmRelease` resources with an exceptionally
high timeout of `1h` or more.

Related to: https://github.com/fluxcd/helm-controller/pull/549

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-10-21 12:24:30 +00:00
Stefan Prodan def45c50b3
Merge pull request #747 from fluxcd/fetch-tar-mem
Optimise the memory usage of artifact operations
2022-10-19 21:32:00 +03:00
Stefan Prodan 5c30abcb0d
Optimise memory usage of artifact operations
- update fluxcd/pkg/tar to v0.2.0 (https://github.com/fluxcd/pkg/pull/377)
- update fluxcd/pkg/http/fetch to v0.2.0 (https://github.com/fluxcd/pkg/pull/378)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-19 19:10:17 +03:00
Stefan Prodan 0c7d631741
Merge pull request #746 from fluxcd/refact-docs
Refactor: Remove docs which overlap with Flux website
2022-10-19 18:57:03 +03:00
Stefan Prodan 3e935d0b8f
Refactor: Remove docs which overlap with Flux website
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-19 18:23:55 +03:00
Stefan Prodan 0f131a0361
Merge pull request #745 from fluxcd/status-refactoring
Refactor: Adopt Flux runtime conditions and status standards
2022-10-18 17:29:38 +03:00
Stefan Prodan 2f81a3966b
Add Reconciling status condition to API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-18 15:59:17 +03:00
Stefan Prodan 747a2c9e93
Report each action in `Reconciling` condition
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-17 17:45:39 +03:00
Stefan Prodan 3bbd729039
Add `ProgressingWithRetry` reason to `Reconciling` condition
ProgressingWithRetry signals that the controller is going to retry the last failed reconciliation at a later time.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-14 22:24:42 +03:00
Stefan Prodan 933a8db290
Switch to serial patcher for status updates
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-14 19:26:59 +03:00
Stefan Prodan 1357acb196
Add kstatus conformance tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-14 16:56:53 +03:00
Stefan Prodan 7799bb0920
Refactor: Adopt Flux runtime conditions and status standards
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-14 14:22:53 +03:00
Stefan Prodan 52be7c873d
Merge pull request #744 from fluxcd/refactor-inventory
Refactor: Move inventory helpers to internal package
2022-10-11 14:17:38 +03:00
Stefan Prodan 484cbcc14c
Refactor: Move inventory helpers to internal package
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-11 13:45:54 +03:00
Stefan Prodan cfe35399e0
Merge pull request #743 from fluxcd/refactor-artifact-fetcher
Refactor: Acquire artifacts with `fluxcd/pkg/http/fetch`
2022-10-10 15:56:34 +03:00
Stefan Prodan 3090eff734
Refactor: Acquire artifacts with `fluxcd/pkg/http/fetch`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-10 15:30:58 +03:00
Stefan Prodan ce46ec8f78
Merge pull request #742 from fluxcd/refactor-impersonation
Refactor: Use impersonation from `fluxcd/pkg/runtime/client`
2022-10-07 18:14:36 +03:00
Stefan Prodan 06e91e047b
Refactor: Use impersonation from `fluxcd/pkg/runtime/client`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-07 17:36:41 +03:00
Stefan Prodan 3086ae4cf1
Merge pull request #740 from fluxcd/refactor-generator
Refactor: Extract generator to internal package
2022-10-07 13:32:34 +03:00
Stefan Prodan 731188e45b
Refactor: Extract generator to internal package
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-07 12:49:36 +03:00
Stefan Prodan 99b2eaed1e
Merge pull request #739 from fluxcd/refactor-decryptor
Refactor: Extract decrytor to internal package
2022-10-07 12:03:45 +03:00
Stefan Prodan 06ce60f7bf
Refactor: Extract decrytor to internal package
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-06 19:45:12 +03:00
Max Jonas Werner 5c8aa7a227
Merge pull request #738 from fluxcd/alternative-kustomization-files
Support alternative kustomization file names
2022-10-04 16:14:41 +02:00
Max Jonas Werner c3c4cc13ac
support alternative kustomization file names
`KustomizeGenerator.WriteFile` now detects alternative kustomization
file names such as `kustomization.yml` and `Kustomization`.

closes #737

Signed-off-by: Max Jonas Werner <max@e13.dev>
2022-10-04 15:34:00 +02:00
Stefan Prodan af6ed825bd
Merge pull request #736 from fluxcd/release-v0.29.0
Release v0.29.0
2022-09-29 20:00:34 +03:00
Stefan Prodan db3131d7d4
Release v0.29.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-29 19:42:14 +03:00
Stefan Prodan 47c5b70518
Merge pull request #735 from fluxcd/controller-runtime-v0.13.0
Update dependencies
2022-09-29 19:36:56 +03:00
Stefan Prodan fc7d9dfb77
Update dependencies
- k8s.io/* v0.25.2
- sigs.k8s.io/controller-runtime v0.13.0
- fluxcd/pkg/runtime v0.19.0
- aws/aws-sdk-go-v2 v1.16.16
- hashicorp/vault/api v1.8.0
- fluxcd/source-controller/api v0.30.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-29 19:15:31 +03:00
Stefan Prodan 521e03f240
Merge pull request #733 from fluxcd/build-go1.19
Build with Go 1.19
2022-09-28 18:39:06 +03:00
Stefan Prodan 69509c92e2
Build with Go 1.19
- Update Go to 1.19 in CI
- Use Go 1.19 in base image
- Update controller-gen v0.8.0 (v0.7 fails with Go 1.19) and regenerate manifests

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-28 18:17:34 +03:00
Stefan Prodan 503686ea62
Merge pull request #731 from fluxcd/api-validate-duration
api: add custom validation for v1.Duration types
2022-09-20 12:21:50 +03:00
Stefan Prodan 21d02283ec
api: add custom validation for v1.Duration types
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-20 11:56:09 +03:00
Stefan Prodan 095c63ddb7
Merge pull request #730 from fluxcd/fix-class-wait
Fix health checking for global objects
2022-09-16 11:08:59 +03:00
Stefan Prodan 65a58330fc
Fix health checking for global objects
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-14 12:32:49 +03:00
Stefan Prodan b31e039eb4
Merge pull request #727 from fluxcd/release-v0.28.0
Release v0.28.0
2022-09-12 12:43:05 +03:00
Stefan Prodan 3bc4c03485
Release v0.28.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-12 12:20:11 +03:00
Stefan Prodan 8feccf0aeb
Merge pull request #726 from bkreitch/try-offline-methods-first
Sort SOPS masterkeys so offline decrypt methods are tried first
2022-09-12 12:06:11 +03:00
Boris Kreitchman 5fe7910ab8 Sort masterkeys so offline decrypt methods are tried first
Signed-off-by: Boris Kreitchman <bkreitch@gmail.com>
2022-09-10 15:38:57 +03:00
Stefan Prodan 9e0930cfa1
Merge pull request #723 from pjbgf/native-fuzz
fuzz: Refactor Fuzzers based on Go native fuzzing
2022-09-10 09:47:24 +03:00
Stefan Prodan 795fc160ee
Merge pull request #724 from fluxcd/sc-v0.29.0
Update Source API to v0.29.0
2022-09-10 09:43:55 +03:00
Stefan Prodan 0c6916e34a
Update Source API to v0.29.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-10 09:25:38 +03:00
Paulo Gomes d2af6edc56
tests: Fix subtests calling Fail from parent
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-09-07 12:27:33 +01:00
Paulo Gomes 73f005e541
fuzz: Refactor Fuzzers based on Go native fuzzing
The existing fuzzers are converted into the Go native format. This
works well with most fuzzers, apart from the one that fuzzes the
controller.

That specific test depends on funcs and vars that are defined on
suite_test.go, which is not supported when building fuzzers leveraging
Go native fuzz for oss-fuzz. That test is therefore ignored when
executed with make fuzz-native. But, all tests are covered with
make fuzz-smoketest, in order to support oss-fuzz.

Once the controller is rewritten we can revist this and ensure that
fuzzers does not require envtest nor embedded CRDs.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-09-07 12:26:43 +01:00
Stefan Prodan 9716996f27
Merge pull request #722 from pjbgf/fuzz-update
fuzz: Fuzz optimisations
2022-09-03 09:09:25 +03:00
Paulo Gomes ce3d201413
fuzz: Use Go 1.18 on CI and fix cache path
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-09-03 03:55:29 +01:00
Paulo Gomes b7f9239f9a
fuzz: Reuse go cache from host
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-09-03 03:55:01 +01:00
Paulo Gomes 17102e3b91
fuzz: Ensure latest base images are used
Latest base image should contain Go 1.18, removing
the need of updating that ourselves, apart from
benefiting from latest changes upstream.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-09-02 17:25:16 +01:00
Stefan Prodan f9559ec6de
Merge pull request #721 from fluxcd/update-aws-kms
SOPS: Update the AWS SDK for KMS
2022-09-02 12:58:39 +03:00
Stefan Prodan 589eff21ac
Update the AWS SDK for KMS
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-02 12:03:53 +03:00
Stefan Prodan 3d17bc95c1
Merge pull request #720 from fluxcd/ssa-class-stage
Reconcile Kubernetes class type objects in a dedicated stage
2022-09-02 12:01:06 +03:00
Stefan Prodan 928f22df5c
Reconcile Kubernetes class type objects in a dedicated stage
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-02 11:31:54 +03:00
Stefan Prodan dca8c484aa
Merge pull request #718 from somtochiama/update-runtime
Align controller logs to Kubernetes structured logging
2022-09-01 19:43:21 +03:00
Somtochi Onyekwere 8046c86a6a Update controller-runtime
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-09-01 17:11:50 +01:00
Stefan Prodan 0efcc4ce25
Merge pull request #716 from dholbach/update-flux-docs-structure
update to new doc links structure
2022-08-30 17:12:10 +03:00
Daniel Holbach ed1ac6877d update to new doc links structure
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-08-30 15:26:51 +02:00
Stefan Prodan 11f0378151
Merge pull request #715 from fluxcd/release-v0.27.1
Release v0.27.1
2022-08-29 13:46:32 +03:00
Stefan Prodan d8027a68b4
Release v0.27.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-29 13:04:40 +03:00
Stefan Prodan 7e9063f95f
Merge pull request #714 from fluxcd/kube-1.25
Update Kubernetes packages to v1.25.0
2022-08-29 12:58:24 +03:00
Stefan Prodan ac10ca5ba4
Update Kubernetes packages to v1.25.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-29 12:33:53 +03:00
Max Jonas Werner 737f93e7ab
Merge pull request #712 from suryapandian/update-doc-on-tgt-ns
Update doc on target namespace
2022-08-24 12:39:07 +02:00
Surya 0f0b2aaf13
Update docs/spec/v1beta2/kustomization.md
Co-authored-by: Max Jonas Werner <makkes@users.noreply.github.com>
Signed-off-by: Surya <surya.pandian@truelayer.com>
2022-08-24 10:46:31 +01:00
Surya aaeab4a5fd
Update docs/spec/v1beta1/kustomization.md
Co-authored-by: Max Jonas Werner <makkes@users.noreply.github.com>
Signed-off-by: Surya <surya.pandian@truelayer.com>
2022-08-24 10:46:18 +01:00
Surya 5d95817362
Update kustomization.md
Signed-off-by: Surya <surya.pandian@truelayer.com>
2022-08-20 21:57:22 +01:00
Surya ad74b81222
Update kustomization.md
Signed-off-by: Surya <surya.pandian@truelayer.com>
2022-08-20 21:56:53 +01:00
Surya 2a84f3d874
Update kustomization.md
Signed-off-by: Surya <surya.pandian@truelayer.com>
2022-08-20 17:02:04 +01:00
Surya e63edd6408
Update kustomization.md
Signed-off-by: Surya <surya.pandian@truelayer.com>
2022-08-20 17:00:26 +01:00
Paulo Gomes a97f1d123f
Merge pull request #708 from Santosh1176/fix-2952/kc
Enable RecoverPanic option on reconciler
2022-08-15 09:58:22 +01:00
Santosh Kaluskar e486234e4c Enable RecoverPanic option on reconciler
Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com>
2022-08-13 21:05:10 +05:30
Stefan Prodan e3838182c8
Merge pull request #706 from fluxcd/improve-sops-error-log
Add file path to sops decryption errors
2022-08-09 14:04:51 +03:00
Stefan Prodan 602238d171
Add file path to sops decryption errors
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-09 12:40:08 +03:00
Stefan Prodan b965178de7
Merge pull request #705 from fluxcd/release-v0.27.0
Release v0.27.0
2022-08-08 20:05:08 +03:00
Stefan Prodan 0851cae9b4
Release v0.27.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-08 19:38:25 +03:00
Stefan Prodan 74a260f594
Merge pull request #704 from fluxcd/deps-up
Update dependencies
2022-08-08 19:30:22 +03:00
Stefan Prodan 3708bc74ac
Update dependencies
- k8s.io/* v0.24.3
- github.com/aws/aws-sdk-go v1.44.70
- sigs.k8s.io/cli-utils v0.32.0
- sigs.k8s.io/kustomize/api v0.12.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-08 18:56:37 +03:00
Stefan Prodan 89c6d82c7f
Merge pull request #684 from fluxcd/oci
[RFC-0003] Add support for OCIRepository sources
2022-08-08 18:47:50 +03:00
Stefan Prodan a7d790f1b2
Add support for OCIRepository sources
- allow `OCIRepository` to be specified in `sourceRef.kind`
- react to `OCIRepository` artifacts events
- add end-to-end test for OCI repositories

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-08 18:26:03 +03:00
Stefan Prodan d6688648df
Merge pull request #703 from fluxcd/kustomize/v4.5.6
Update controller to kustomize v4.5.6
2022-08-01 13:07:11 +03:00
Stefan Prodan 1bb856959d
Update controller to kustomize v4.5.6
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-01 12:47:05 +03:00
Stefan Prodan c7d3bd37c3
Merge pull request #700 from anbotero/prune-typo
Fix typo from pune to prune
2022-07-26 12:28:24 +02:00
Andrés Botero 323c2d3253
Fix typo from pune to prune
Signed-off-by: Andrés Botero <yosoy@andresbotero.co>
2022-07-19 10:18:26 -05:00
Paulo Gomes 71802c66f7
Merge pull request #697 from pjbgf/release-v0.26.3
Release v0.26.3
2022-07-13 15:39:07 +01:00
Paulo Gomes f3a08b1cd6
Release v0.26.3
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-13 15:14:17 +01:00
Hidde Beydals 1c661ad7c0
Merge pull request #691 from fluxcd/sops-recover-store-panic 2022-07-13 16:08:49 +02:00
Hidde Beydals 2cdc9a578d decryptor: recover from SOPS store panic
Based on user reports, there seems to be a small chance for the
underlying SOPS store implementation to panic when a user provides input
and/or output format instructions which do not actually match the type
of the file. Recover from this to ensure continuity of operations.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-07-13 15:50:54 +02:00
Paulo Gomes fa4facb1a3
Merge pull request #696 from pjbgf/update-deps
Update dependencies
2022-07-13 13:40:14 +01:00
Paulo Gomes ddb51b7c27
Update dependencies
- github.com/aws/aws-sdk-go to version 1.44.53.
- github.com/aws/aws-sdk-go-v2 to version 1.16.7.
- github.com/aws/aws-sdk-go-v2/config to version 1.15.14.
- github.com/aws/aws-sdk-go-v2/credentials to version 1.12.9.
- github.com/aws/aws-sdk-go-v2/service/kms to version 1.17.5.
- github.com/aws/aws-sdk-go-v2/service/sts to version 1.16.9.
- golang.org/x/net to version 0.0.0-20220708220712-1185a9018129.
- google.golang.org/api to version 0.87.0.
- google.golang.org/genproto to version 0.0.0-20220712132514-bdd2acd4974d.
- google.golang.org/grpc to version 1.48.0.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-13 13:16:32 +01:00
Paulo Gomes ac020c6fea
Fix github.com/emicklei/go-restful (CVE-2022-1996)
This addresses CVE-2022-1996, due to v2.16.0 including
emicklei/go-restful@9266625.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-13 13:13:28 +01:00
Paulo Gomes d1de33e8f6
Merge pull request #694 from pjbgf/go-1.18
build: Upgrade to Go 1.18
2022-07-06 17:31:55 +01:00
Paulo Gomes 4f00c552d9
build: Upgrade to Go 1.18
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-06 17:06:01 +01:00
Stefan Prodan b0509d567a
Merge pull request #692 from pjbgf/update-deps
Update dependencies
2022-07-01 16:39:04 +03:00
Paulo Gomes 2e17fbab77
Update dependencies
- github.com/aws/aws-sdk-go to version 1.44.46.
- github.com/aws/aws-sdk-go-v2 to version 1.16.6.
- github.com/aws/aws-sdk-go-v2/config to version 1.15.12.
- github.com/aws/aws-sdk-go-v2/credentials to version 1.12.7.
- github.com/aws/aws-sdk-go-v2/service/kms to version 1.17.4.
- github.com/aws/aws-sdk-go-v2/service/sts to version 1.16.8.
- github.com/hashicorp/vault/api to version 1.7.2.
- golang.org/x/net to version 0.0.0-20220630215102-69896b714898.
- google.golang.org/api to version 0.86.0.
- google.golang.org/genproto to version 0.0.0-20220630174209-ad1d48641aa7.
- gopkg.in/yaml.v3 to version 3.0.1.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-01 13:27:50 +01:00
Stefan Prodan 08b4726e3c
Merge pull request #689 from fluxcd/artifact-downloader
Retry downloading artifacts on not found errors
2022-07-01 14:29:13 +03:00
Stefan Prodan cfd5200fbb
Retry downloading the artifact on not found errors
- Extract the artifact operations such as download, verify, untar into a dedicated struct
- Introduce a dedicated type for artifact not found errors
- On artifact not found errors, log the error, update the ready status message and requeue the object
- Retry the artifact download at the interval set with `--requeue-dependency` (defaults to 30s)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-07-01 13:55:47 +03:00
Stefan Prodan db3c321163
Merge pull request #688 from fluxcd/release-v0.26.2
Release v0.26.2
2022-06-29 16:02:41 +03:00
Stefan Prodan 319c4a8e41
Release v0.26.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-29 15:38:31 +03:00
Stefan Prodan 2aa69b61af
Merge pull request #687 from somtochiama/polling-opts
Fix job wait by adding polling options to impersonation client
2022-06-29 13:55:37 +03:00
Somtochi Onyekwere 13044520c1 Pass polling options to impersonation client
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-06-28 15:28:56 +01:00
Stefan Prodan 57a0a1f238
Merge pull request #678 from fluxcd/release-v0.26.1
Release v0.26.1
2022-06-08 14:50:36 +03:00
Stefan Prodan 32d0d06a57
Release v0.26.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-08 14:28:04 +03:00
Stefan Prodan 98ea573b30
Merge pull request #677 from fluxcd/update-pkgs
Update fluxcd/pkg dependencies
2022-06-08 14:09:35 +03:00
Stefan Prodan 55356425fc
Update fluxcd/pkg dependencies
- fluxcd/pkg/apis/kustomize v0.4.2
- fluxcd/pkg/apis/meta v0.14.2
- fluxcd/pkg/kustomize v0.5.2
- fluxcd/pkg/runtime v0.16.2
- fluxcd/pkg/ssa v0.17.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-08 13:44:29 +03:00
Stefan Prodan 293da3e9ac
Merge pull request #676 from fluxcd/update-deps
Update dependencies
2022-06-07 16:58:54 +03:00
Stefan Prodan ab667bffda
Update dependencies
- k8s.io/* v0.24.1
- aws-sdk-go v1.44.28
- vault/api v1.6.0
- source-controller/api v0.25.3

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-07 16:34:14 +03:00
Stefan Prodan f6d03e0350
Merge pull request #675 from fluxcd/docs-refac
docs: Add example section and dockerconfigjson encryption
2022-06-07 16:04:51 +03:00
Stefan Prodan a41274ff97
docs: Add example section and dockerconfigjson encryption
- remove the Go spec section
- add basic usage example
- fix SOPS CLI examples
- explain how to generate image pull secrets from encrypted dockerconfigjson files

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-07 15:32:16 +03:00
Hidde Beydals 23249965a5
Merge pull request #672 from fluxcd/release-v0.26.0 2022-06-01 15:47:23 +02:00
Stefan Prodan 8cce0de8f0 Release v0.26.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-01 15:27:36 +02:00
Stefan Prodan f7eb827377
Merge pull request #671 from fluxcd/source-controller/api-v0.25.0
Update source-controller/api to v0.25.0
2022-06-01 16:05:43 +03:00
Stefan Prodan 009bffe796
Update source-controller/api to v0.25.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-01 15:16:29 +03:00
Hidde Beydals 8b7e7ecb1a
Merge pull request #670 from aryan9600/aws-kms-decryption 2022-05-30 15:02:53 +02:00
Sanskar Jaiswal 72f0e605be sops/awskms: fix compatibility tests with upstream sops
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-30 18:03:04 +05:30
Hidde Beydals 65af429834
Merge pull request #667 from aryan9600/aws-kms-decryption 2022-05-27 21:24:35 +02:00
Sanskar Jaiswal 10bc7eadff sops/awskms: fix awskms config creation and expand tests
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-28 00:36:54 +05:30
Stefan Prodan bb5c1531e8
Merge pull request #665 from fluxcd/go-yaml-v3.0.0
Update go-yaml to v3.0.0
2022-05-26 18:41:37 +03:00
Stefan Prodan 2738c29808
Update GH Actions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-26 17:01:41 +03:00
Stefan Prodan adbfaf7b7d
Update go-yaml to v3.0.0
Fix CVE-2022-28948

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-26 16:07:37 +03:00
Stefan Prodan a31488c723
Merge pull request #661 from fluxcd/update-deps-cves
Update Alpine to v3.16
2022-05-25 13:14:56 +03:00
Hidde Beydals 0539f6f3dc Drop deprecated github.com/golang/protobuf
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-25 10:40:33 +02:00
Hidde Beydals 0d7cb093c3 Update dependencies
- github.com/aws/aws-sdk-go-v2/config to v1.15.7
- github.com/aws/aws-sdk-go-v2/credentials to v1.12.2
- github.com/aws/aws-sdk-go-v2/service/kms to v1.17.2
- github.com/aws/aws-sdk-go-v2/service/kms to v1.17.2
- github.com/aws/aws-sdk-go-v2/service/sts to v1.16.6
- golang.org/x/crypto to v0.0.0-20220518034528-6f7dac969898
- golang.org/x/net to v0.0.0-20220524220425-1d687d428aca
- google.golang.org/api to v0.81.0
- google.golang.org/genproto to v0.0.0-20220525015930-6ca3db687a9d
- google.golang.org/grpc to v1.46.2

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-25 10:20:34 +02:00
Stefan Prodan 70ee93cbaa
Update Alpine to v3.16
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-25 10:27:05 +03:00
Stefan Prodan 886974aa56
Update runc to v1.1.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-25 10:25:43 +03:00
Hidde Beydals fec5316ef8
Merge pull request #635 from SomtochiAma/gcp-kms-cred 2022-05-24 22:27:42 +02:00
Hidde Beydals cbb0fc9df5 sops/gcpkms: disable integration tests
This temporarily disables the integration tests as we are waiting for
the CNCF to provide us with GCP credits.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-24 21:52:01 +02:00
Somtochi Onyekwere 2ac475ebef sops/gcpkms: add key source implementation
This adds a SOPS GCP KMS key source which makes use of the latest GCP
client, and supports both injection of master key credentials and a
default client making use of environmental runtime values.

The implementation fully replaces SOPS', and is covered with
compatability tests.

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-05-24 21:51:46 +02:00
Max Jonas Werner 2f454b41df
Merge pull request #660 from fluxcd/kustomize-v4.5.5
Update controller to kustomize v4.5.5
2022-05-24 14:46:27 +02:00
Stefan Prodan c82cbac445
Update controller to kustomize v4.5.5
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-24 15:12:54 +03:00
Stefan Prodan 367e3d2bf9
Merge pull request #650 from fluxcd/kube-1.24
Update dependencies
2022-05-24 15:03:31 +03:00
Stefan Prodan 1535282fa1
Merge pull request #657 from fluxcd/gen-test-relbase
generator: test secure build relative base dir
2022-05-24 11:48:43 +03:00
Hidde Beydals db95625609 generator: test secure build relative base dir
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-23 12:14:20 +02:00
Stefan Prodan e5d47c264f
Merge pull request #655 from SomtochiAma/image-digest
Set digests in image override
2022-05-22 10:38:53 +03:00
Max Jonas Werner 62fb2d96a2
Merge pull request #656 from fluxcd/relicense-sops
Relicense SOPS module to MPL 2.0
2022-05-22 09:03:24 +02:00
Hidde Beydals 4cde465a81
Merge pull request #641 from aryan9600/aws-kms-decryption 2022-05-20 14:30:18 +02:00
Sanskar Jaiswal c8a00fb495 update sops awskms files to use MPL 2.0
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-20 17:39:42 +05:30
Hidde Beydals 327a3560b3 Relicense SOPS module to MPL 2.0
This relicenses all of our SOPS implementation code to MPL 2.0, where
Apache 2.0 was previously used due to code being written from scratch.

By making this license change, we are better capable of contributing
the changes upstream.

In case there is doubt about validity of DCO sign-off to make such
changes: all code where Apache 2.0 license applies were authored by
myself. In addition, Apache 2.0 is compatible with MPL 2.0[1][2].

[1]: https://opensource.com/law/11/9/mpl-20-copyleft-and-license-compatibility
[2]: https://blog.gerv.net/2013/02/relicensing-when-do-you-have-to-ask/

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-20 13:10:06 +02:00
Sanskar Jaiswal d7307bbd51 add secret mount note in docs
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-20 14:43:21 +05:30
Somtochi Onyekwere 17664e8862 remove empty test
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-05-19 13:22:42 +01:00
Somtochi Onyekwere 8c246a5450 Set digests in image override
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-05-19 13:15:11 +01:00
Sanskar Jaiswal 326e20c41b update code comments and kms decryption docs
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-19 14:34:16 +05:30
Sanskar Jaiswal 1ee85e5988 add and update tests for awskms and hcvault
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-19 14:34:16 +05:30
Sanskar Jaiswal e5a37b7013 migrate aws kms implementation to aws-go-sdk-v2
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-19 14:34:15 +05:30
Sanskar Jaiswal c801f75458 add docs
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-19 14:33:31 +05:30
Sanskar Jaiswal 53aded2596 add support for AWS KMS credentials using .spec.decryption
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-19 14:33:22 +05:30
Stefan Prodan e7a34238a6
Update dependencies
- fluxcd/pkg/apis/meta v0.14.0
- fluxcd/pkg/runtime v0.16.0
- fluxcd/pkg/ssa v0.16.0
- k8s.io/* v0.24.0

Note that fluxcd/pkg/runtime v0.16 comes with support for Kubernetes API Priority and Fairness feature.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-11 18:41:59 +03:00
Hidde Beydals 87797221ac
Merge pull request #647 from fluxcd/sops-v3.7.3 2022-05-10 09:19:51 +02:00
Hidde Beydals fa1faa4819 Update other dependencies
- github.com/fluxcd/pkg/kustomize to v0.4.0
- github.com/fluxcd/source-controller/api to v0.24.4
- golang.org/x/net to v0.0.0-20220425223048-2871e0cb64e4
- sigs.k8s.io/cli-utils to v0.30.0

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-09 22:05:39 +02:00
Hidde Beydals e5653b2ff3 Drop SOPS LocalClient implementation
As patch has been merged upstream, and `keyservice.LocalClient` does
now accept the `KeyServiceServer` interface.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-09 22:02:05 +02:00
Hidde Beydals d3b343d758 Update SOPS to v3.7.3
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-09 21:58:56 +02:00
Hidde Beydals ced173004b
Merge pull request #646 from fluxcd/release-v0.25.0
Release v0.25.0
2022-05-03 19:17:42 +02:00
Hidde Beydals 65bb0cf2aa Release v0.25.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-03 18:55:02 +02:00
Hidde Beydals d35b0776c6
Merge pull request #645 from fluxcd/docs-kubeconfig 2022-05-03 16:16:53 +02:00
Hidde Beydals 2b2246c876 spec: take note of KubeConfig.SecretRef.Key field
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-03 15:59:04 +02:00
Stefan Prodan ba03c878b0
Merge pull request #638 from fluxcd/no-remote-bases
Disallow remote bases usage in Kustomize overlays
2022-05-03 11:35:05 +03:00
Hidde Beydals 3f9999b9ee
Merge pull request #615 from nstogner/secret-ref-key 2022-04-29 20:23:53 +02:00
Nick Stogner 6aeff8c924 Support defining a KubeConfig Secret data key
Signed-off-by: Nick Stogner <nicholas.stogner@gmail.com>
2022-04-29 10:04:14 -04:00
Hidde Beydals a139a022a7
Merge pull request #644 from fluxcd/decryptor-detect-dockercfg
decryptor: improve detection of in and out formats for Secret data fields
2022-04-29 15:41:41 +02:00
Hidde Beydals 36df540a5d decryptor: detect format of Secret data field
This checks the base64 decoded bytes from a Secret field for any of the
marker bytes, thereby allowing data to be encrypted into any format.
Instead of the previous behavior which assumed it to either be YAML or
JSON.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-29 15:26:36 +02:00
Hidde Beydals a7639c68d3 decryptor: detect DockerConfigJsonKey as JSON out
This ensures the Secret field gets formatted back into JSON, instead of
it being detected as binary output.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-29 11:00:44 +02:00
Hidde Beydals e0ba73f4be
Merge pull request #643 from fluxcd/release-v0.24.4 2022-04-28 10:18:13 +02:00
Hidde Beydals 6c523b820a Release v0.24.4
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-28 09:58:22 +02:00
Stefan Prodan cafbe253a1
Disallow remote bases usage in Kustomize overlays
Add an optional flag for disabling remote bases. While the `--no-remote-bases` is set to `false` by default, Flux users are encouraged to enable it on production system for security and performance reasons. Using Kustomize remote bases means that kustomize-controller must clone the remote repositories on every reconciliation instead of using the source-controller artifacts cache. Allowing remote bases on multi-tenant clusters, means platform admins have no control over which repositories make up the desired state.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-27 14:54:43 +03:00
Hidde Beydals bcfd42466c
Merge pull request #637 from fluxcd/fix-build-panics 2022-04-27 12:26:30 +02:00
Hidde Beydals 6854ff519c generator: recover from kustomize build panics
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-27 12:11:40 +02:00
Stefan Prodan d1a686235c
Add test for build panic
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-27 12:58:56 +03:00
Stefan Prodan ac4594d053
Merge pull request #636 from seh/revise-sops-format-detection-for-generated-secrets
Use Secret generator keys for SOPS format hint
2022-04-27 11:37:40 +03:00
Steven E. Harris e6beca11b1
Confirm format detection of file sources via tests
Signed-off-by: Steven E. Harris <seh@panix.com>
2022-04-26 11:07:17 -04:00
Steven E. Harris ee0e4c1674
Remove invalid "EnvSources" entry from test case
Signed-off-by: Steven E. Harris <seh@panix.com>
2022-04-26 11:07:17 -04:00
Steven E. Harris 7162f5e6fa
Use Secret generator keys for SOPS format hint
Rather than inspecting the source file name supplied to kustomize's
Secret generator to determine the format of the SOPS-encrypted file
content, instead inspect the Secret key (when supplied separately from
the source file name) as a more reliable heuristic.

Doing so allows kustomization authors to name their SOPS-encrypted
output files with a ".json" extension accurately reflecting the format
in which SOPS writes its encrypted output, even if the encrypted
content itself is not in JSON format.

Signed-off-by: Steven E. Harris <seh@panix.com>
2022-04-26 11:07:17 -04:00
Hidde Beydals ef77093efd
Merge pull request #633 from fluxcd/release-v0.24.3
Release v0.24.3
2022-04-22 11:59:36 +02:00
Hidde Beydals f2986712d8 Release v0.24.3
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-22 11:35:55 +02:00
Hidde Beydals 4c7b436e4c
Merge pull request #632 from fluxcd/update-sc 2022-04-22 11:31:30 +02:00
Hidde Beydals 0cc81fcc17 Update source-controller to v0.24.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-22 11:14:09 +02:00
Hidde Beydals cda51febc7
Merge pull request #631 from cwyl02/ychen/exp-backoff-retry 2022-04-22 09:45:45 +02:00
Hidde Beydals 5d10770b37
Merge pull request #630 from aryan9600/fix-tmp-dir-macos
Ensure generated temp dir is absolute on all OSes
2022-04-22 09:45:11 +02:00
Sanskar Jaiswal d499ed8063 Ensure generated temp dir is absolute on all OSes
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-04-22 09:01:46 +02:00
York Chen 827f814f2f
feat: flags to configure exponential backoff retry
Signed-off-by: York Chen <ychen@d2iq.com>
2022-04-21 10:09:39 -04:00
Hidde Beydals 7dca61f430
Merge pull request #629 from fluxcd/release-v0.24.2 2022-04-21 11:13:55 +02:00
Hidde Beydals 0976a4fb33 Release v0.24.2
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-21 10:55:16 +02:00
Hidde Beydals ee5a411b4c
Merge pull request #628 from fluxcd/update-deps 2022-04-21 09:24:46 +02:00
Hidde Beydals 897fc8d617 Update golang.org/x/crypto
This forces it past a CVE-2022-27191 version.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-20 19:51:51 +02:00
Hidde Beydals 65d0fe9e47
Merge pull request #627 from fluxcd/release-v0.24.1 2022-04-20 17:45:04 +02:00
Hidde Beydals 1cd31e6e4b Release v0.24.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-20 17:29:32 +02:00
Hidde Beydals 6985449947
Merge pull request #626 from fluxcd/kustomize-fs-remote 2022-04-20 17:29:23 +02:00
Hidde Beydals 880587f20d generator: ensure remote build dirs can be reached
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-20 17:12:33 +02:00
Hidde Beydals 69a9e9d6bf
Merge pull request #624 from fluxcd/release-v0.24.0 2022-04-19 14:10:00 +02:00
Hidde Beydals 4340d2f641 Release v0.24.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-19 13:46:28 +02:00
Hidde Beydals 31a8fb4e41
Merge pull request #623 from fluxcd/update-deps 2022-04-19 13:33:07 +02:00
Hidde Beydals 87ea78c24c Update dependencies
- github.com/fluxcd/source-controller/api to v0.24.0
- golang.org/x/net to v0.0.0-20220418201149-a630d4f3e7a2

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-19 13:18:06 +02:00
Hidde Beydals 2f41b20d6b
Merge pull request #621 from fluxcd/update-deps 2022-04-15 16:47:30 +02:00
Hidde Beydals f0bcd0ced0 Update dependencies
Azure SDK dependencies cannot be updated, as this requires us to move to
Go 1.18.

- github.com/fluxcd/pkg/apis/kustomize to version 0.3.3
- github.com/fluxcd/pkg/apis/meta to version 0.12.2
- github.com/fluxcd/pkg/runtime to version 0.14.1
- github.com/fluxcd/pkg/ssa to version 0.15.2
- github.com/hashicorp/go-retryablehttp to version 0.7.1
- github.com/hashicorp/vault/api to version 1.5.0
- github.com/onsi/gomega to version 1.19.0
- golang.org/x/net to version 0.0.0-20220412020605-290c469a71a5
- sigs.k8s.io/cli-utils to version 0.29.4

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-15 16:28:46 +02:00
Hidde Beydals 14996311be api: update dependencies
- github.com/fluxcd/pkg/apis/kustomize to v0.3.3
- github.com/fluxcd/pkg/apis/meta to v0.12.2
- k8s.io/apiextensions-apiserver to v0.23.5
- k8s.io/apimachinery to v0.23.5
- sigs.k8s.io/controller-runtime to v0.11.2

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-15 16:28:46 +02:00
Hidde Beydals 39872cd02f
Merge pull request #620 from fluxcd/fssecure 2022-04-15 16:04:23 +02:00
Hidde Beydals f4528fb25d controllers: use own Kustomize FS implementation
For details, see: https://github.com/fluxcd/pkg/pull/262

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-15 15:48:23 +02:00
Hidde Beydals ad91006d4e
Merge pull request #619 from fluxcd/kustomize-decryptor-impr 2022-04-14 09:36:51 +02:00
Hidde Beydals 105ebd9f47 controllers: improve decryptor and add tests
- Refactored recursion while iterating over Kustomization files.
  References of files that have been visited are cached, and not
  visited again. In addition, symlinks are confirmed to not traverse
  outside the working directory.
- Optimized various bits around (un)marshalling (encrypted) data, and
  YAML -> JSON -> YAML roundtrips are prevented where not required.
- Added support for decrypting INI Kustomize EnvSource references using
  the dedicated SOPS store for the format.
- Introduced support for decrypting Kustomize FileSources:
  https://pkg.go.dev/sigs.k8s.io/kustomize@v1.0.2/pkg/types#DataSources

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-14 09:17:43 +02:00
Stefan Prodan 4da17e1ffb
Merge pull request #610 from dholbach/update-link
update toolkit.fluxcd.io docs link
2022-04-05 18:06:52 +03:00
Hidde Beydals 6bc847b339
Merge pull request #614 from pjbgf/release-v0.23.0 2022-04-05 16:15:38 +02:00
Paulo Gomes f90dbc9bb5
Release v0.23.0
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-05 12:54:18 +01:00
Hidde Beydals cbd02eaf03
Merge pull request #607 from fluxcd/sops-keyservice-imprv 2022-04-05 13:20:56 +02:00
Hidde Beydals 62dafa1baf decryptor: switch Printf to Errorf
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-05 13:07:01 +02:00
Hidde Beydals bf4cefe011 decryptor: mention Secret name in import errors
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-05 12:44:35 +02:00
Hidde Beydals 9db141d9db sops/keyservice: tidy and add tests
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-05 12:44:35 +02:00
Hidde Beydals ffdda3f3da sops/azkv: add Token utility type
This adds a new Token type which can be used to configure an
azcore.TokenCredential on a master key. Due to this introduction, the
server only has to go through the AADConfig once.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-05 12:44:35 +02:00
Hidde Beydals dfbeae9487 sops/age: add ParsedIdentities utility type
This adds a new ParsedIdentities type which can be used to parse a set
of age identities just once, instead of parsing them for every Decrypt
request.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-05 12:44:35 +02:00
Hidde Beydals ed49f8427f sops/pgp: add GnuPGHome utility type
This adds a new GnuPGHome type which can be used to create a new
contained GnuPG home directory. The type is self-validating, ensuring
it adheres to e.g. permission rules set out by GnuPG, and allows for
importing keys from armored bytes and files.

Because of this introduction, the decryptor service no longer has to
write data from a Secret to a temporary file, but is instead able to
directly import them into the keyring from the Secret entry's bytes.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-04 23:57:46 +02:00
Hidde Beydals eaec2b9164 sops/hcvault: tidy and test keysource impl
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-04 23:57:46 +02:00
Hidde Beydals 6554be2208 sops/pgp: tidy and test keysource implementation
This revises the PGP keysource implementation, removing bits of code
that were not actually in use, or not viable in combination with how we
work with keys. In short:

- crypto/openpgp implementation has been removed. As it is unable to read
  the keystore created by newer versions of GnuPG. Given we import user
  provided keys _with_ GnuPG, this was basically dead code.
- All capabilities around fetching public keys from a server have been
  removed.
- "Jailing" of GnuPG shell-out is now handled in `gpgExec`, in addition,
  arguments for encrypt and decrypt execs have been revised to ensure
  they e.g. do not instruct to use the agent.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-04 23:57:46 +02:00
Hidde Beydals 182ddbf837 sops/age: tidy and test keysource implementation
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-04 23:57:46 +02:00
Hidde Beydals 2487b51e51 sops/keyservice: error on unfulfilled requirements
This ensures we signal early that we will be unable to fulfill the
request, instead of letting the underlying keysource implementation
run into mayhem. Which can be problematic for e.g. PGP, which has
assumptions about things being located relative to the given home
directory, resulting in possible unexpected behavior if an empty path
is given.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-04 23:57:46 +02:00
Hidde Beydals 512e749219 sops/keyservice: handle nil key requests
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-04 23:57:46 +02:00
Hidde Beydals e5c2730342 sops/keyservice: allow config of server via opts
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-04 23:57:46 +02:00
Hidde Beydals 2e30a18b50 sops/keyservice: keep server fields private
This ensures data used for decryption is not exposed widely after
constructing the Server, and prevents a bypass to the default server
fallback.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-04 23:57:46 +02:00
Hidde Beydals 7450a1a9a3 sops/keyservice: simplify switch logic
These bits of code have a history of accidents around the fallback
behavior. By simplifying it, the fallback should generally always work,
unless you put in instructions to take another route.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-04 23:57:46 +02:00
Hidde Beydals 31bfd5a057 sops/keyservice: remove prompt capabilities
The original keyservice implementation was forked from SOPS, keeping
the prompt capabilities intact. However, since the implementations have
started to grow, it is better to remove this capability and resort to
a hardcoded `false` default for the fallback server. As the controller
is never expected to have an interactive TTY/shell.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-04 23:57:46 +02:00
Stefan Prodan 97a451869b
Merge pull request #611 from pjbgf/documentation-v1beta2
Update KubeConfig documentation
2022-04-04 18:59:54 +03:00
Paulo Gomes d0069707e0
Update KubeConfig documentation
When the flag --default-service-account was added it changed
slightly the behaviour of the spec.KubeConfig field. It forces
the impersonation to always take place, either via the contents
of spec.ServiceAccountName or its fallback at controller level.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-04 16:20:19 +01:00
Daniel Holbach 033efe9fdd update toolkit.fluxcd.io docs link
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-04-01 12:03:44 +02:00
Stefan Prodan 3ebc24ed73
Merge pull request #608 from aryan9600/job-status
Implement health check for Kubernetes jobs
2022-04-01 12:57:59 +03:00
Sanskar Jaiswal ed5fb9fd6c add custom statusreader for jobs
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-04-01 15:11:13 +05:30
Stefan Prodan 55f14b7daf
Merge pull request #593 from pjbgf/new-kube-flag
Add kubeconfig flags
2022-04-01 12:38:31 +03:00
Paulo Gomes d29032e914
Add flags to control kubeconfig support
Two new flags were added to allow users to enable the
use of user.Exec and InsecureTLS in the kubeconfigs
provided remote apply reconciliations.

Breaking change: both functionalities are no longer
enabled by default.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-01 10:13:55 +01:00
Paulo Gomes 74a8258d26
Download SOPS when running tests
Some tests requires the sops CLI to be installed,
by adding it as a requirement of the Makefile tests
target we make it easier for new contributors to
engage with the codebase.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-01 10:11:27 +01:00
Paulo Gomes bce675b629
Align Makefile with other repositories
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-01 10:11:26 +01:00
Paulo Gomes 1ba95077df
Fix build tag syntax
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-01 10:11:25 +01:00
Stefan Prodan 412877ce55
Merge pull request #609 from fluxcd/example-typo
docs/spec/v1beta2: fix recommended settings typo
2022-04-01 09:33:06 +03:00
Sunny 1e616ed9e0
docs/spec/v1beta2: fix recommended settings typo
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-04-01 08:22:11 +05:30
Hidde Beydals e5c845a056
Merge pull request #605 from fluxcd/release-v0.22.3 2022-03-29 17:00:15 +02:00
Hidde Beydals 9e34005a79 Release v0.22.3
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-29 16:36:52 +02:00
Hidde Beydals c58ae672ee
Merge pull request #606 from fluxcd/kustomize-4.5.4 2022-03-29 16:32:03 +02:00
Stefan Prodan b6cb225b9b
Update controller to kustomize v4.5.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-29 17:11:25 +03:00
Hidde Beydals 55b0f4f9d2
Merge pull request #604 from fluxcd/sops-azkv-compat 2022-03-29 13:44:30 +02:00
Hidde Beydals 692e4a726b sops/azkv: ensure compatibility with upstream
To please the older Azure SDK, the upstream SOPS implementation base64
URL encodes data before encryption, and decodes it afterwards. With the
new SDK, this has changed, requiring us to do the opposite to ensure
compatibility.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-29 13:22:53 +02:00
Hidde Beydals da09e21043 sops/azkv: test compatibility with upstream
Add integration tests to ensure compatibility between our own Azure
keyservice implementation and upstream.
Tests are enabled to only run for `main`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-29 13:22:53 +02:00
Stefan Prodan 9ca247674f
Merge pull request #603 from fluxcd/docs-recommended-settings
Add recommended settings to API docs
2022-03-29 12:50:47 +03:00
Stefan Prodan 8770770c1f
Add recommended settings to API docs
Add example of deploying applications from Git to production environments.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-29 11:30:10 +03:00
Stefan Prodan c4f8b18a8b
Merge pull request #602 from ilanpillemer/align-deps-for-fuzzing
Align version of dependencies when Fuzzing
2022-03-29 10:19:51 +03:00
Ilan a6f536e5e0 align fuzzing deps as per task 3 flux2 issue 2552
Signed-off-by: Ilan <ilan.pillemer@gmail.com>
2022-03-28 11:28:03 +01:00
Sunny f689e4ea06
Merge pull request #599 from makkes/fix-changelog
docs: fix PR link in Changelog
2022-03-28 14:52:29 +05:30
Max Jonas Werner 7627650dad
docs: fix PR link in Changelog
Signed-off-by: Max Jonas Werner <mail@makk.es>
2022-03-28 10:26:33 +02:00
Hidde Beydals 4fd02f83ad
Merge pull request #598 from fluxcd/release-v0.22.2 2022-03-25 18:39:37 +01:00
Hidde Beydals a7cee3692b Release v0.22.2
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-25 18:23:59 +01:00
Hidde Beydals cf9b0fc0cb
Merge pull request #597 from fluxcd/fix-azkv-fallback 2022-03-25 18:17:47 +01:00
Hidde Beydals dc5486f8ab Bump version of source-controller CRDs
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-25 18:03:19 +01:00
Hidde Beydals e97ec3b5c8 build: configure --load for build via default
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-25 18:03:19 +01:00
Hidde Beydals 069a1065fc sops/keyservice: properly fallback to default
This solves a regression bug introduced in `v0.22.0`, which caused the
keyservice to not properly fall back to the default for Azure Key Vault
decryption requests.

A couple of nitpicks that I ran into while inspecting the code have
been adressed as well.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-25 18:03:17 +01:00
Hidde Beydals ceb6a5d7c4
Merge pull request #596 from fluxcd/update-sc 2022-03-25 17:46:11 +01:00
Hidde Beydals 189c683d73 Update source-controller API to v0.22.3
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-25 16:58:06 +01:00
Hidde Beydals 5d8bcf98ae
Merge pull request #594 from fluxcd/update-kustomize 2022-03-25 13:59:34 +01:00
Hidde Beydals ae16621f60 Update Kustomize to v4.5.3
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-25 11:02:34 +01:00
Stefan Prodan 43b04f7fa2
Merge pull request #592 from fluxcd/release-0.22.1
Release v0.22.1
2022-03-24 08:42:31 +02:00
Stefan Prodan ce0d631890
Release v0.22.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-24 08:23:40 +02:00
Stefan Prodan 59c8d7b173
Merge pull request #591 from fluxcd/event-annotations
Ensure annotations are prefixed with Group FQDN
2022-03-24 08:20:29 +02:00
Stefan Prodan 0787d8bbd6
Fix Kustomize version in go.mod comment
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-24 07:58:32 +02:00
Hidde Beydals db5777f06c Ensure annotations are prefixed with Group FQDN
This to facilitate improvements on the notification-controller side,
where annotations prefixed with the FQDN of the Group of the Involved
Object will be transformed into "fields".

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-23 22:30:31 +01:00
Hidde Beydals fd78fe55e5
Merge pull request #588 from pjbgf/sc-v1beta2-doc 2022-03-22 11:18:43 +01:00
Paulo Gomes b320df075a
Add note on new source-controller v1beta2
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-22 09:59:37 +00:00
Stefan Prodan 318e27dc7d
Merge pull request #587 from fluxcd/changelog-fix
Add Azure Key Vault integration to changelog
2022-03-22 10:20:10 +02:00
Stefan Prodan 7450d9ad6e
Add Azure Key Vault integration to changelog
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-21 18:32:04 +02:00
Stefan Prodan 7138ccf381
Merge pull request #586 from fluxcd/release-v0.22.0
Release v0.22.0
2022-03-21 13:55:52 +02:00
Stefan Prodan c10399dfd7
Release v0.22.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-21 13:36:26 +02:00
Stefan Prodan 8883ee3e3a
Merge pull request #585 from fluxcd/tidy-compat
Run tidy compat before Go test
2022-03-21 13:26:56 +02:00
Stefan Prodan ff7848a2e5
Run tidy compat before Go test
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-21 13:07:46 +02:00
Hidde Beydals 753bf8ddef
Merge pull request #584 from fluxcd/update-deps 2022-03-18 14:29:03 +01:00
Hidde Beydals 400b685249 Update dependencies
- github.com/Azure/azure-sdk-for-go/sdk/azcore to v0.22.0
- github.com/Azure/azure-sdk-for-go/sdk/azidentity to v0.13.2
- github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys to v0.4.0
- github.com/ProtonMail/go-crypto to v0.0.0-20220113124808-70ae35bab23f
- github.com/cyphar/filepath-securejoin to v0.2.3
- github.com/drone/envsubst to v1.0.3
- github.com/fluxcd/pkg/apis/kustomize to v0.3.2
- github.com/fluxcd/pkg/ssa to v0.15.1
- github.com/hashicorp/vault/api to v1.4.1
- go.mozilla.org/sops/v3 to v3.7.2
- golang.org/x/net to v0.0.0-20220225172249-27dd8689420f
- google.golang.org/grpc to v1.45.0
- k8s.io/api to v0.23.4
- k8s.io/apiextensions-apiserver to v0.23.4
- k8s.io/apimachinery to v0.23.4
- k8s.io/client-go to v0.23.4
- sigs.k8s.io/cli-utils to v0.29.3

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-18 14:09:52 +01:00
Hidde Beydals 592a23fd0e api: update dependencies
- github.com/fluxcd/pkg/apis/kustomize to v0.3.2
- k8s.io/apiextensions-apiserver to v0.23.4
- k8s.io/apimachinery to v0.23.4

Kubernetes dependencies have been updated to `v0.23.4` due to
(apparent) release issues with `v0.23.5`, leaving some of the
submodules unpublished (for at least `k8s.io/apiextensions-apiserver`).

Ref: https://github.com/kubernetes/kubernetes/issues/108763

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-18 14:09:00 +01:00
Hidde Beydals a4dc03e57c
Merge pull request #575 from fluxcd/runtime-meta-rc 2022-03-18 13:33:25 +01:00
Hidde Beydals 855d57c491 Use new standardized meta and runtime pkgs
This includes an update of the source-controller to v0.22.0, to pull in
the v1beta2 API which makes use of the same packages.

Co-authored-by: Sunny <darkowlzz@protonmail.com>
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-18 12:04:39 +01:00
Hidde Beydals 423cddeb06
Merge pull request #495 from dquagebeur/feature/azurekv 2022-03-14 10:44:45 +01:00
Hidde Beydals 9f768615a9 Document SOPS Azure Key Vault in spec
This includes a refactor of the other entries, to start moving guides
to the website while containing minimal technical (instructions)
in-spec.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-14 10:29:02 +01:00
Hidde Beydals 6876a1e95a sops/azkv: support YAML Azure authentication files
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-14 10:28:56 +01:00
Hidde Beydals 02343b047b sops/azkv: support fields from `az` generated SP
This supports the fields as documented in the AKS documentation:
https://docs.microsoft.com/en-us/azure/aks/kubernetes-service-principal?tabs=azure-cli#manually-create-a-service-principal

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-14 10:28:53 +01:00
Hidde Beydals 369193ee59 sops/azkv: update to SDK including azidentity
This updates to the `github.com/Azure/azure-sdk-for-go` SDK, which is
the (apparent) successor of the previous SDK, and allows for easier
configuration of credentials through the `azidentity` package.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-14 10:28:46 +01:00
Hidde Beydals f67efe0dc6 sops/azkv: configure retry and throttle on client
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-14 10:28:46 +01:00
Hidde Beydals a72e687607 sops/azkv: refactor initial Azure Keyvault impl
- Ensure key source follows upstream SOPS contracts as closely as
  possible (e.g. `MasterKey` interface).
- Prevent unnecesary FS operations by allowing token creation and
  and authorizer configuration to be factored from file bytes.
- Ensure a limited number of configuration option is taken into
  account, excluding e.g. file path references.
- Ensure server maintains backwards compatibility with previously
  supported "global" Azure configuration, _without_ relying on file
  assumptions and/or inspections (but rather, server configurations).

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-14 10:28:46 +01:00
David Quagebeur 343f937e59 sops/azkv: support for credentials via SecretRef
Signed-off-by: David Quagebeur <david.quagebeur@worldline.com>
2022-03-14 10:27:55 +01:00
Stefan Prodan 608531e499
Merge pull request #582 from kingdonb/fixup-kubeval
fixup reference to kubeval
2022-03-07 14:44:04 +02:00
Kingdon Barrett 89841cbe28
fixup reference to kubeval
Update docs/spec/v1beta2/kustomization.md

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
2022-03-07 07:27:26 -05:00
Stefan Prodan 55cdef576e
Merge pull request #581 from fluxcd/ssa-merge
Allow shared ownership of in-cluster objects applied with kubectl
2022-03-07 13:59:55 +02:00
Stefan Prodan d56695a93b
Allow shared ownership of in-cluster objects applied with kubectl
Introduce an annotation that configures kustomize-controller to co-manage objects applied with kubectl.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-04 12:37:30 +02:00
Stefan Prodan b5c441e89a
Merge pull request #578 from fluxcd/printcolumn-reorder
api: Move Status in CRD printcolumn to the end
2022-02-25 15:46:22 +02:00
Sunny 869ef77fdf
api: Move Status in CRD printcolumn to the end
Status content could be very long compare to other fields. Moving it to
the end helps improve the visibility of other fields.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-02-25 15:23:46 +02:00
Stefan Prodan f2f9395c4d
Merge pull request #573 from harshi1122/Typo
Fixed typo : If applied, this commit will ensure no grammatical errors
2022-02-25 15:23:31 +02:00
Stefan Prodan ebf0f2eac5
Merge pull request #580 from pjbgf/fix-fuzz
Use main go.mod for fuzz tests
2022-02-25 15:19:14 +02:00
Paulo Gomes f224109d26
Use main go.mod for fuzz tests
Fixes issues building fuzzers whilst also ensuring
that they are linking back to current version of
kustomizer-controller and ./api.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-24 17:16:24 +00:00
Stefan Prodan 991d29e806
Merge pull request #577 from fluxcd/release-v0.21.1
Release v0.21.1
2022-02-23 10:50:26 +02:00
Stefan Prodan 91f6d8e0a8
Release v0.21.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-23 10:32:25 +02:00
Stefan Prodan 4b139e899f
Merge pull request #576 from fluxcd/ssa-v0.14.1
Convert `stringData` to `data` before applying Secrets
2022-02-23 10:15:59 +02:00
Stefan Prodan 55ebe211ed
Convert `stringData` to `data` before applying Secrets
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-22 17:54:33 +02:00
Stefan Prodan 22c4a1a321
Merge pull request #574 from pjbgf/patch-180222
Update dependencies
2022-02-18 12:22:52 +02:00
harshi1122 f123852771 'Done'
Signed-off-by: harshi1122 <harshitha1155@gmail.com>
2022-02-18 14:55:40 +05:30
Paulo Gomes 3a7828e1de
Update github.com/docker/distribution to v2.8.0 (CVE fix)
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-18 09:08:10 +00:00
Paulo Gomes 5080bb6fbb
Update github.com/prometheus/client_golang to v1.11.1 (CVE fix)
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-18 09:05:43 +00:00
Stefan Prodan b73d337095
Merge pull request #571 from fluxcd/release-v0.21.0
Release v0.21.0
2022-02-16 14:11:37 +02:00
Stefan Prodan af84d6d0ab
Release v0.21.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-16 13:56:22 +02:00
Stefan Prodan 5666108837
Merge pull request #570 from seh/tolerate-absent-post-build-subst-references
Tolerate absence of resources in post-build substitution
2022-02-15 17:28:21 +02:00
Steven E. Harris af038d6df5
Copyedit Kustomization documentation
Signed-off-by: Steven E. Harris <seh@panix.com>
2022-02-15 09:27:45 -05:00
Steven E. Harris eba4168672
Tolerate absence of resources in post-build subst.
In a Kustomization's post-build substitution sources, introduce a new
"Optional" field to allow referencing a Kubernetes ConfigMap or Secret
that may not exist at time of reconciliation. Treat substitution when
the referenced object is missing as if the object had been present but
empty, lacking any variable bindings.

Retain the longstanding behavior of interpreting references to
Kubernetes objects being mandatory by default, such that
reconciliation fails if such a referenced object does not exist. Only
when the "Optional" field is set to true will reconciliation tolerate
finding the referenced object to be missing.

Signed-off-by: Steven E. Harris <seh@panix.com>
2022-02-15 09:27:41 -05:00
Steven E. Harris e665bccf89
Trap failure to create Vault instance in tests
When the Docker service isn't running, the test suite can't create a
Vault instance. Trap this failure earlier in the test program to
preclude panicking after tests relying on Vault have failed.

Signed-off-by: Steven E. Harris <seh@panix.com>
2022-02-13 16:13:55 -05:00
Steven E. Harris e437cb83c2
Use strings.ReplaceAll function when applicable
Signed-off-by: Steven E. Harris <seh@panix.com>
2022-02-13 16:13:54 -05:00
Hidde Beydals 34e2da27fa
Merge pull request #568 from fluxcd/release-v0.20.2 2022-02-10 09:52:05 +01:00
Stefan Prodan 2b70aa4536
Release v0.20.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-10 10:25:15 +02:00
Stefan Prodan 851f78f5c0
Merge pull request #567 from fluxcd/kustomize-4.5.2
Update controller to kustomize v4.5.2
2022-02-10 10:17:47 +02:00
Stefan Prodan f29ae5e833
Update controller to kustomize v4.5.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-10 09:58:19 +02:00
Stefan Prodan e0488c9f5f
Merge pull request #566 from kingdonb/fixup-docs
Clarify spec.path in API docs
2022-02-10 09:27:49 +02:00
Kingdon Barrett 3d95b875e1
Clarify that spec.path is in the Kustomization
+ in the `spec.path` of the Flux `Kustomization`

In #2357 it was noted that we mention `spec.path` but the code example
provided for context is a `GitRepository`. This is a leap too far, let's
provide this to better clarify the context.

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
2022-02-09 16:17:19 -05:00
Stefan Prodan 110ee5b15b
Merge pull request #564 from dholbach/fix-typo
Fix typo in API docs
2022-02-08 15:09:02 +02:00
Daniel Holbach d768b6cf76 fix typo
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-02-08 10:25:01 +01:00
Stefan Prodan 1cd4221c0d
Merge pull request #563 from fluxcd/release-v0.20.1
Release v0.20.1
2022-02-07 13:37:06 +02:00
Stefan Prodan e4dad227d4
Release v0.20.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-07 13:19:49 +02:00
Stefan Prodan 5d90428b35
Merge pull request #562 from fluxcd/transfer-ownership
Transfer ownership of the kubectl managed fields
2022-02-07 11:35:39 +02:00
Stefan Prodan 5ac991b6af
Transfer ownership of the kubectl managed fields
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-07 10:56:41 +02:00
Stefan Prodan c7f97a0577
Merge pull request #559 from fluxcd/kustomize-v4.5.0
Update controller to kustomize v4.5.1
2022-02-07 10:39:32 +02:00
Stefan Prodan 7bcc52baf0
Update controller to kustomize v4.5.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-03 09:13:33 +02:00
Stefan Prodan 0d6f5afd04
Merge pull request #555 from fluxcd/release-v0.20.0
Release v0.20.0
2022-02-01 10:36:31 +02:00
Stefan Prodan d188195def
Release v0.20.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-01 10:01:01 +02:00
Stefan Prodan ceefe5ae09
Merge pull request #552 from fluxcd/impersonation-finalize
Ensure object are finalized under impersonation
2022-01-31 14:15:06 +02:00
Stefan Prodan 65aaa1d69a
Ensure object are finalized under impersonation
If the service account used for impersonation has been deleted, skip pruning, log the error and continue with finalization to allow tenants removals from clusters.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-31 13:20:12 +02:00
Stefan Prodan cd6fff0220
Merge pull request #551 from fluxcd/source-controller/api-v0.21.1
Update source-controller/api to v0.21.1
2022-01-31 12:40:12 +02:00
Stefan Prodan ea95f0c85c
Update source-controller/api to v0.21.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-31 12:07:33 +02:00
Stefan Prodan 8e74f2c10c
Merge pull request #527 from fluxcd/ssa-override-kubectl-manager
Revoke kubectl managed fields ownership
2022-01-31 12:01:55 +02:00
Stefan Prodan f353ba44a7
Introduce a dedicated manager for status updates to avoid conflicts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-31 11:29:54 +02:00
Stefan Prodan 38541078fa
Revoke kubectl managed fields ownership
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-31 11:25:11 +02:00
Stefan Prodan 4b59d7705e
Merge pull request #550 from fluxcd/default-service-account
Allow setting a default service account for impersonation
2022-01-31 11:23:40 +02:00
Stefan Prodan 4d7cba91b0
Allow setting a default service account for impersonation
Introduce the flag `--default-service-account` for allowing cluster admins to enforce impersonation for resources reconciliation.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-27 18:25:02 +02:00
Stefan Prodan 09e6c29593
Merge pull request #549 from fluxcd/no-cross-namespace-refs
Allow disabling cross-namespace references
2022-01-27 11:36:28 +02:00
Stefan Prodan 518c8a021b
Allow disabling cross-namespace references
Introduce the flag `--no-cross-namespace-refs` (defaults to false) for allowing cluster admins to disable cross-namespace references to sources.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-26 22:50:10 +02:00
Stefan Prodan d22f98448d
Merge pull request #547 from mvoitko/fix/missing-port-protocol-in-manager-config
Fix the missing protocol for the first port in manager config
2022-01-25 10:37:30 +02:00
Max Voitko 7a511efe38 Fix the missing protocol for the first port in manager config
Signed-off-by: Maksym Voitko <max.voitko@gmail.com>
2022-01-25 00:36:34 +02:00
Stefan Prodan 0b018312e1
Merge pull request #544 from fluxcd/validate-resouces
Fix preflight validation
2022-01-21 13:53:22 +02:00
Stefan Prodan 4ee01a2db0
Fix preflight validation
Validate that the resources built with kustomize conform to the Kubernetes API conventions before passing them to the server-side apply engine.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-21 13:05:40 +02:00
Stefan Prodan 593ac59f29
Merge pull request #543 from souleb/token-permissions
Add Permissions to github Workflows
2022-01-20 18:34:11 +02:00
Soule BA f1327dca09
Add Permissions to github Workflows
Improve GITHUB_TOKEN permissions in the workflows.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2022-01-20 16:35:43 +01:00
Stefan Prodan b6eeb141f2
Merge pull request #541 from fluxcd/cosign-sbom
Publish SBOM and sign release artifacts
2022-01-20 16:13:32 +02:00
Stefan Prodan be87d12e59
Publish SBOM and sign release artifacts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-20 15:04:08 +02:00
Stefan Prodan 6658d78b1b
Merge pull request #538 from souleb/issue-516
SOPS: Add support for HashiCorp Vault token-based authentication
2022-01-20 10:53:31 +02:00
Stefan Prodan 12d9fabcc4
Merge pull request #539 from aryan9600/aryan9600/security-context
Drop capabilities, enable seccomp and enforce runAsNonRoot
2022-01-20 10:02:31 +02:00
Soule BA c579e71430
add native support for sops decryption/encryption with Vault
If implemented, the kustomize controller will be able to retrieve a
secret containing a VAULT TOKEN and use it to decrypt the sops encrypted
master key. It will then use it to decrypt the data key and finally use the data
key to decrypt the final data.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2022-01-19 21:59:10 +01:00
Stefan Prodan 91e96a2069
Merge pull request #540 from yiannistri/dev-docs
Update development documentation
2022-01-19 14:26:20 +02:00
Yiannis 76487334ff Update dev docs
Signed-off-by: Yiannis <yiannis.triantafyllopoulos@gmail.com>
2022-01-19 12:11:32 +00:00
Sanskar Jaiswal c0d5eeea2d drop capabilities, enable seccomp and enforce runAsNonRoot
Further restricts the SecurityContext that the controller runs under, by enabling the default seccomp profile and dropping all linux capabilities.
This was set at container-level to ensure backwards compatibility with use cases in which sidecars are injected into the source-controller pod
without setting less restrictive settings.
Add a uid and gid for the container to enforce runAsNonRoot and ensure
the use of non root users.

BREAKING CHANGES:
1) The use of new seccomp API requires Kubernetes 1.19.
2) the controller container is now executed under 65534:65534 (userid:groupid).
   This change may break deployments that hard-coded the user name 'controller' in their PodSecurityPolicy.

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
Co-authored-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-19 12:54:29 +05:30
Stefan Prodan c626836c41
Merge pull request #536 from pjbgf/fuzz
Refactor Fuzz implementation
2022-01-17 16:05:14 +02:00
Stefan Prodan 0a6505fc59
Merge pull request #537 from gvillafanetapia/doc-escape-vars
Docs - Add var substitution operator escape syntax
2022-01-17 09:47:27 +02:00
Gonzalo Villafañe Tapia 6c343e15ae Docs - Add var substitution operator escape syntax
Signed-off-by: Gonzalo Villafañe Tapia <gvillafanetapia@gmail.com>
2022-01-14 17:46:10 -03:00
Paulo Gomes 50c043eb4f
Refactor fuzzing
Structure the fuzz implementation to be closer to what go native will support.
Add Makefile target to enable smoketesting fuzzers.
Add smoketest as CI workflow.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-14 15:38:24 +00:00
AdamKorcz 7f8441672e
Fuzzing: Initial commit
Signed-off-by: AdamKorcz <adam@adalogics.com>
2022-01-14 14:55:37 +00:00
Stefan Prodan b18584a652
Merge pull request #535 from kingdonb/patch-finalizers
Use patch instead of update when adding finalizers
2022-01-14 08:24:26 +02:00
Kingdon Barrett 441b48aeef Use patch instead of update when adding finalizers
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
2022-01-13 19:44:10 -05:00
Stefan Prodan 4e8fd15c64
Merge pull request #534 from fluxcd/release-v0.19.1
Release v0.19.1
2022-01-13 20:09:24 +02:00
Stefan Prodan 57cf14430d
Release v0.19.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-13 19:54:39 +02:00
Stefan Prodan f39a7712fd
Merge pull request #533 from fluxcd/ssa-exclude-status
Update fluxcd/pkg/ssa to exclude the status field from apply
2022-01-13 19:17:03 +02:00
Stefan Prodan 02c6708362
Update fluxcd/pkg/ssa to exclude the status field from apply
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-13 18:50:56 +02:00
Stefan Prodan ea07b48278
Merge pull request #529 from aryan9600/aryan9600/go-install-tool
Use go install instead of go get in Makefile
2022-01-11 17:52:56 +02:00
Sanskar Jaiswal 9075b72d57 use go install instead of go get in Makefile
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-01-11 20:22:38 +05:30
Stefan Prodan a195294799
Merge pull request #528 from fluxcd/release-v0.19.0
Release v0.19.0
2022-01-10 16:06:50 +02:00
Stefan Prodan d4e13e5c0c
Release v0.19.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-10 15:29:01 +02:00
Stefan Prodan 748120f6b0
Merge pull request #521 from HardBrainer/main
Add condition to checkDependencies when SourceRef is the same
2022-01-10 11:21:09 +02:00
Florian Fl Bauer 8435a5ba41 If applied, this commit will solve race condition when using two Kustomizations with the same SourceRef
Signed-off-by: Florian Fl Bauer <florian.fl.bauer@deutschebahn.com>
2022-01-07 14:17:40 +01:00
Stefan Prodan ed4d153c37
Merge pull request #526 from fluxcd/hpa-diff-fix
Fix HPA diff (upstream bug)
2022-01-06 11:11:49 +02:00
Stefan Prodan 9b0bb3dcf9
Fix HPA diff (upstream bug)
Update fluxcd/ssa to v0.8.0 that implements a workaround for a Kubernetes API server-side apply dry-run bug where the HPA custom metrics are duplicated.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-06 10:45:42 +02:00
Stefan Prodan 23efa8212a
Merge pull request #525 from fluxcd/update-runc
Restore runc and image-spec patches
2022-01-06 09:22:38 +02:00
Stefan Prodan 75b6130490
Restore runc and image-spec patches
Fix for CVE-2021-30465 and CVE-2021-41190

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-05 19:52:15 +02:00
Stefan Prodan 00257e0cc9
Merge pull request #478 from fluxcd/go-v1.17
Update Go to v1.17 and controller-runtime to v0.11
2022-01-05 18:08:38 +02:00
Stefan Prodan 5466544f7f
Update source-controller/api to v0.20.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-05 17:33:47 +02:00
Stefan Prodan ab9c0e96b9
Merge pull request #523 from gecube/patch-1
Fix typo in API spec docs
2022-01-05 10:42:50 +02:00
George Gaál 2b32f0f7a3 Update kustomization.md
fix typo

Signed-off-by: Gaál George <gb12335@gmail.com>
2021-12-30 15:21:21 +01:00
Stefan Prodan 1e84289623
Merge pull request #522 from pjbgf/audit-followup
Fix inconsistent code-style raised at security audit
2021-12-22 10:35:00 +02:00
Paulo Gomes facda8b422
Check EventRecorder is not nil
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2021-12-21 21:10:43 +00:00
Aurel Canciu ec9fdb1550
Update flux pkg components
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-12-20 14:50:41 +01:00
Aurel Canciu 57220f8c70
Update Go to v1.17
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-12-16 14:23:15 +01:00
Stefan Prodan 8d61ff76d3
Merge pull request #514 from fluxcd/release-v0.18.2
Release v0.18.2
2021-12-09 18:20:02 +02:00
Stefan Prodan 5b95d1d667
Release v0.18.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-09 17:40:57 +02:00
Stefan Prodan 37827651da
Merge pull request #513 from souleb/fix-sops-decrypt-defaultserver
sops: ensure proper wiring to default server
2021-12-09 16:51:41 +02:00
Soule BA 3191f497e6
fix encryption using the defaultServer
Signed-off-by: Soule BA <bah.soule@gmail.com>
2021-12-09 15:04:01 +01:00
Stefan Prodan 07d3c9969b
Merge pull request #509 from fluxcd/ssa-v0.4.0
Update dependencies (fix CVE-2021-43784)
2021-12-09 12:04:48 +02:00
Stefan Prodan 24bdda0c1c
Update dependencies
- fluxcd/pkg/ssa v0.6.0
- fluxcd/source-controller/api v0.19.1
- github.com/opencontainers/runc to v1.0.3 (fix CVE-2021-43784)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-09 11:47:50 +02:00
Stefan Prodan 2bb2fb204f
Merge pull request #512 from pjbgf/security-advisories
Update golang.org/x/text to v0.3.7 (fix CVE-2021-38561)
2021-12-09 11:47:28 +02:00
Paulo Gomes 24ab11d820
Bump dependencies to patch security advisories
Advisories fixed:
golang.org/x/text GO-2021-0113

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2021-12-09 09:16:06 +00:00
Stefan Prodan 284b63744d
Merge pull request #501 from SomtochiAma/weird-ssa-behaviour
Document behaviour when changes are made to fields not stored in git
2021-12-02 12:12:20 +02:00
Somtochi Onyekwere 6fa1c8a9dd Add docs for when KC doesn't revert
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-12-02 10:41:20 +01:00
Stefan Prodan 1cb35f5b66
Merge pull request #505 from SomtochiAma/docs-apply
Add test for varsub in secret
2021-12-02 11:13:23 +02:00
Somtochi Onyekwere 0d9bd5a554 Add line above yaml block
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-29 12:02:45 +01:00
Somtochi Onyekwere f6403df16f Add test for varsub in secret
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-25 12:34:20 +01:00
Stefan Prodan 2fa13ce887
Merge pull request #500 from fluxcd/release-0.18.1
Release v0.18.1
2021-11-23 15:59:19 +02:00
Stefan Prodan 6e2c38ce90
Release v0.18.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-23 15:42:33 +02:00
Stefan Prodan f878292ec2
Merge pull request #499 from fluxcd/source-controller/api-v0.19.0
Update source-controller/api to v0.19.0
2021-11-23 15:11:54 +02:00
Stefan Prodan 5e9c75b847
Update source-controller/api to v0.19.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-23 14:43:21 +02:00
Stefan Prodan 94b0c9ae76
Merge pull request #498 from fluxcd/replace-deprecated
Replace deprecated dependencies
2021-11-23 14:41:26 +02:00
Stefan Prodan 1badc828b4
Replace deprecated dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-23 14:21:21 +02:00
Hidde Beydals 00a92eac96
Merge pull request #497 from fluxcd/update-deps 2021-11-22 13:07:41 +01:00
Hidde Beydals 09d98b0baa Update opencontainers/{image-spec, runc}
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-22 12:36:06 +01:00
Stefan Prodan 27be168c0b
Merge pull request #490 from fluxcd/release-0.18.0
Release v0.18.0
2021-11-12 16:53:39 +02:00
Stefan Prodan 5b0734b50f
Release v0.18.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-12 16:38:18 +02:00
Stefan Prodan 688ccb5b05
Merge pull request #489 from fluxcd/verify-artifact-checksum
Verify artifacts integrity
2021-11-12 16:10:04 +02:00
Stefan Prodan e9c002cf62
Update source-controller/api to v0.18.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-12 15:32:38 +02:00
Stefan Prodan bedb53e0fa
Verify artifacts integrity
After downloading an artifact, compute its checksum and verify that it matches the original checksum advertised by source-controller.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-12 14:03:58 +02:00
Stefan Prodan 989dad2b69
Merge pull request #488 from fluxcd/kustomize-v4.4.1
Update controller to kustomize v4.4.1
2021-11-12 10:34:28 +02:00
Stefan Prodan bbe9d9c36f
Update controller to kustomize v4.4.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-12 10:15:33 +02:00
Stefan Prodan ac702482b7
Merge pull request #485 from fluxcd/release-v0.17.0
Release v0.17.0
2021-11-09 14:37:28 +02:00
Stefan Prodan 8eac59574f
Release v0.17.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-09 14:18:49 +02:00
Stefan Prodan 5b820ec1fe
Merge pull request #484 from fluxcd/ignore-resources
Allow disabling the reconciliation of in-cluster resources
2021-11-09 11:26:31 +02:00
Stefan Prodan 0ce7c1267e
Allow disabling the reconciliation of in-cluster resources
Introduce `kustomize.toolkit.fluxcd.io/reconcile` annotation. When set to `disabled`, the controller will no longer apply changes from source, nor it will prune the annotated resource.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-09 10:50:52 +02:00
Stefan Prodan a38d14fc7b
Merge pull request #483 from fluxcd/warn-about-sops-secrets
Warn when secrets are not decrypted before apply
2021-11-08 16:16:46 +02:00
Stefan Prodan 4958b9c8ce
Warn when secrets are not decrypted before apply
If decryption is not enabled, SOPS encrypted secrets will fail to apply with a validation error that doesn't give any hints. It's better to exit early and throw an error that tells users to enable decryption.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-08 15:58:27 +02:00
Stefan Prodan d9296967d1
Merge pull request #482 from fluxcd/DeletePropagationBackground
Set delete propagation policy to background
2021-11-08 15:19:42 +02:00
Stefan Prodan f2715a74c8
Set delete propagation policy to background
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-08 15:02:12 +02:00
Aurel Canciu 6a3e01a307
Merge pull request #481 from fluxcd/error-messages-lowercase
Lowercase first letters for fmt.Errorf messages
2021-11-04 20:10:19 +01:00
Aurel Canciu 4410e8df6d
Lowercase first letters for fmt.Errorf messages
Some of these error messages were likely imported from somewhere else.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-11-04 19:32:52 +01:00
Stefan Prodan 984d2a47b8
Merge pull request #480 from fluxcd/gopass-replacement
Remove gopass dependency
2021-11-04 15:08:18 +02:00
Aurel Canciu f03d2c9b05
Remove PGP passphrase prompt
We do not support encrypted PGP private keys hence the prompt function
logic can be reduced to signaling an error.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-11-04 13:14:25 +01:00
Aurel Canciu 6712ece2c7
Update google.golang.org/grpc to v1.42.0
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-11-04 12:57:06 +01:00
Aurel Canciu 1bfbd9add2
Update hashicorp/go-retryablehttp to v0.7.0
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-11-04 12:56:28 +01:00
Hidde Beydals 0cd63f8a06
Merge pull request #479 from rishabh96b/rm-ioutil 2021-10-30 00:44:43 +02:00
Rishabh Bohra b8cebd3838
chore: remove deprecated io/ioutil
Signed-off-by: Rishabh Bohra <rishabhbohra01@gmail.com>
2021-10-29 20:28:25 +05:30
Hidde Beydals c915c5c0f7
Merge pull request #475 from dholbach/move-contributor-doc 2021-10-26 16:28:10 +02:00
Daniel Holbach 2101c4c39b As part of fluxcd/.github#4, create DEVELOPMENT.md
Will link to this doc from fluxcd.io/contributing
	so new folks can find this easily.

Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-10-26 16:02:42 +02:00
Stefan Prodan 693283ea6f
Merge pull request #467 from dholbach/fix-contributing-sections
'how to ...' should not be under comms
2021-10-20 10:11:50 +03:00
Stefan Prodan dd01686e49
Merge pull request #470 from fluxcd/release-v0.16.0
Release v0.16.0
2021-10-19 13:53:14 +03:00
Stefan Prodan 76eb4833d2
Release v0.16.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-19 11:50:13 +03:00
Stefan Prodan fd30e4e9e7
Merge pull request #469 from fluxcd/secretGenerator-docs
SOPS: Document env secret generator
2021-10-19 11:25:52 +03:00
Stefan Prodan c610944139
SOPS: Fix dotenv decryption error reporting
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-19 11:10:10 +03:00
Stefan Prodan 95dca0feb6
SOPS: Document env secret generator
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-19 10:03:46 +03:00
Stefan Prodan 5ab853d822
Merge pull request #465 from fluxcd/ssa-wait
Fix cluster scope detection of applied objects
2021-10-19 09:54:27 +03:00
Stefan Prodan 7a26305dc8
Fix cluster scope detection of applied objects
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-19 09:34:18 +03:00
Daniel Holbach 8e075d0a3d 'how to ...' should not be under comms
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-10-18 15:58:14 +02:00
Stefan Prodan e0be92eefd
Merge pull request #463 from SomtochiAma/dotenv-decrpt
SOPS: Decrypt dotenv files used in kustomize secret generator
2021-10-18 14:59:42 +03:00
Somtochi Onyekwere 84a88d5878 Decrypt dotenv files
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-10-17 15:27:04 +01:00
Stefan Prodan bacf7cfd2e
Merge pull request #462 from darkowlzz/buildkit-caching
workflows/e2e: Use buildkit local cache
2021-10-14 13:40:42 +03:00
Sunny 0a38c12817 workflows/e2e: Use buildkit local cache
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-10-13 19:54:05 +05:30
Stefan Prodan e3241dbd93
Merge pull request #461 from darkowlzz/makefile-improvements
Makefile minor improvements
2021-10-13 16:38:06 +03:00
Sunny 6b80fba9be Makefile minor improvements
- Set BUILD_PLATFORMS to linux/amd64 by default to allow exporting the
  built image native to the platform.
- Rename ENVTEST_AKUBERNETES_VERSION to ENVTEST_KUBERNETES_VERSION.
- Use ?= operator with ENVTEST_KUBERNETES_VERSION to allow setting it
  from environment variable.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-10-13 17:49:21 +05:30
Stefan Prodan ff76e57d4d
Merge pull request #460 from fluxcd/release-v0.15.5
Release v0.15.5
2021-10-13 14:03:29 +03:00
Stefan Prodan 3a67da5d8e
Release v0.15.5
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-13 13:26:37 +03:00
Stefan Prodan 6df6237d69
Merge pull request #459 from fluxcd/ssa-drift
Improve drift detection
2021-10-13 12:52:26 +03:00
Stefan Prodan c096414383
Improve drift detection
Update `github.com/fluxcd/pkg/ssa` to v0.1.0.
Remove server-side generated fields (metadata and status) before checking for semantic equality.
Removing the server generated fields means that we no longer have to look for `spec` to properly detect drift.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-13 12:16:52 +03:00
Stefan Prodan 4ed25e099e
Merge pull request #458 from darkowlzz/xx-builds
Use tonistiigi/xx for cross-platform builds
2021-10-13 10:48:24 +03:00
Sunny 8d89ab20be Update github actions to work with new builds
e2e:
- Enable buildx.
- Build only for linux/amd64 and export the built image.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-10-13 03:39:44 +05:30
Sunny 2193b6350b Use tonistiigi/xx for cross-platform builds
Update the Dockerfile to use tonistiigi/xx to cross-compile the
manager binaries natively and speed up the multi-arch image build
time.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-10-13 00:52:00 +05:30
Stefan Prodan 32a79a956e
Merge pull request #456 from fluxcd/release-v0.15.4
Release v0.15.4
2021-10-12 12:28:48 +03:00
Stefan Prodan a596394fde
Release v0.15.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-12 12:12:41 +03:00
Stefan Prodan d53c0d1c36
Merge pull request #455 from fluxcd/fix-hpa-v2beta1
Fix Service and HPA v2beta1 validation
2021-10-12 12:04:58 +03:00
Stefan Prodan f133d2cb5f
Fix HPA v2beta1 validation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-12 11:50:11 +03:00
Stefan Prodan 7ecf6fdc64
Merge pull request #452 from fluxcd/release-v0.15.3
Release v0.15.3
2021-10-11 18:39:41 +03:00
Stefan Prodan aae8cbd684
Release v0.15.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-11 18:23:22 +03:00
Stefan Prodan 57c6302eb8
Merge pull request #451 from fluxcd/ssa-fix-diff
Fix drift detection in Secrets and ConfigMaps
2021-10-11 18:20:39 +03:00
Stefan Prodan a292f28699
Fix drift detection in Secrets and ConfigMaps
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-11 16:26:01 +03:00
Stefan Prodan f7054124d1
Merge pull request #449 from fluxcd/release-v0.15.2
Release v0.15.2
2021-10-10 16:01:42 +03:00
Stefan Prodan 1edd9207fc
Release v0.15.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-10 15:48:24 +03:00
Stefan Prodan 439b1689e4
Merge pull request #448 from fluxcd/fix-ssa
Fix SSA upstream bugs for Kubernetes < 1.22
2021-10-10 15:45:32 +03:00
Stefan Prodan 7282308883
Fix SSA upstream bugs for Kubernetes < 1.22
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-10 15:28:12 +03:00
Stefan Prodan 5144667726
Merge pull request #446 from fluxcd/release-v0.15.1
Release v0.15.1
2021-10-08 18:31:31 +03:00
Stefan Prodan 481f8af7fa
Release v0.15.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-08 18:17:51 +03:00
Stefan Prodan 1ad10b10d0
Merge pull request #445 from fluxcd/fix-inventory-panic
Fix inventory panic for v1beta1 objects
2021-10-08 18:13:01 +03:00
Stefan Prodan cd5b6930b3
Fix inventory panic for v1beta1 objects
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-08 17:48:05 +03:00
Stefan Prodan 49fd4356ae
Merge pull request #444 from fluxcd/tag-0.15
Bump image tag to v0.15.0
2021-10-08 14:28:06 +03:00
Stefan Prodan 2c223b44e8
Bump image tag to v0.15.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-08 14:09:29 +03:00
Stefan Prodan 19d18f0f0d
Merge pull request #443 from fluxcd/release-0.15.0
Release v0.15.0
2021-10-08 14:04:26 +03:00
Stefan Prodan 7c635c53fa
Release v0.15.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-08 13:49:28 +03:00
Stefan Prodan d4b75726d7
Merge pull request #442 from fluxcd/fixes
Various fixes
2021-10-08 10:50:27 +03:00
Stefan Prodan a2b816c3da
Update SSA to force apply RBAC
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-08 10:26:16 +03:00
Stefan Prodan 652da7f1e4
Guard against waiting deadlock
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-08 10:04:23 +03:00
Stefan Prodan 145b2389cf
Pin runc to fix CVE-2021-30465
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-07 21:42:30 +03:00
Stefan Prodan b837b8f629
Fix flapping kstatus test due to rate limits
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-07 17:52:55 +03:00
Stefan Prodan 5fe3ac8c9f
Merge pull request #426 from fluxcd/v1beta2
[RFC] Server-side reconciliation for the v1beta2 API
2021-10-07 17:06:46 +03:00
Stefan Prodan 51a7189087
Restore `spec.validation` and mark it as deprecated
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-07 14:17:02 +03:00
Stefan Prodan ad2fe66dbf
Merge pull request #441 from darkowlzz/use-testenv
Replace envtest with testenv
2021-10-07 14:06:34 +03:00
Sunny dd3935ce8e Replace envtest with testenv
testenv now supports provisioning users. Replace envtest with testenv.

Also, reorder the cleanup to stop the test environment before stopping
the file server to avoid anything in the cluster trying to connect to
the file server after it's stopped.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-10-07 16:21:22 +05:30
Stefan Prodan dba56a569e
Add example for `.spec.wait` usage
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-07 11:37:39 +03:00
Stefan Prodan efd1cb4b9a
Merge pull request #439 from darkowlzz/envtest-stop-controllers
envtest: Add cancellable context to stop controllers
2021-10-06 19:16:31 +03:00
Sunny b7abdf2b84 envtest: Add cancellable context to stop controllers
In suite test, the context created by SetupSignalHandler() watches for
shutdown signal to cancel the context. This makes it possible to stop
the controllers by sending a kill signal that cancels the context.

This change allows controller context cancellation by creating another
context from SetupSignalHandler() context with a CancelFunc that's
called at the end of the test, instead of sending a kill signal.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-10-06 19:15:47 +05:30
Stefan Prodan 50c71354ab
Update kustomize to v4.4.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-04 14:47:45 +03:00
Stefan Prodan 6346591f02
Use ssa package from fluxcd/pkg
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-01 10:21:15 +03:00
Stefan Prodan d0222867e6
Skip pruning for objects with a different owner
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:40 +03:00
Stefan Prodan 64084ea03b
Add test for reconciling an empty source
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:40 +03:00
Stefan Prodan 9c533e4a52
Run SSA resource manager tests in CI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:40 +03:00
Stefan Prodan 9c8f284b7f
Add `spec.wait` usage to the API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:40 +03:00
Stefan Prodan 468f00e416
Implement health checking for all resources
- Add `.spec.wait` optional boolean field to API
- Wait for all applied resources to become ready when `.spec.wait` is set to `true`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:39 +03:00
Stefan Prodan 8baead9b2e
Add e2e test for CRDs+CRs reconciliation using cert-manager
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:39 +03:00
Stefan Prodan 97bbc59eb6
Skip finalizer pruning when impersonation fails
When impersonation fails, emit an event with the stale objects and continue with the finalization as this is not a retryable error.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:39 +03:00
Stefan Prodan 69069c3ab3
Refactor reconciliation into actions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:39 +03:00
Stefan Prodan b33e3b3449
Update the status when health checking starts
Set the healthiness status to progressing and specify the health check timeout in the condition message.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:39 +03:00
Stefan Prodan 1e01d800c5
Implement reconciliation using server-side apply
Reconciler behaviour:
- Creates an inventory of objects to be applied (persisted in-cluster under `.status.inventory`).
- Applies first custom resource definitions (CRDs) and namespaces, waits for them to register and only then applies the custom resources.
- Validates all resources with server-side dry-run apply (namespaced objects must contain `metadata.namespace`, defaulting to the `default` namespace is no longer supported).
- Reconciles only the resources that drifted.
- Prunes the objects that were previously applied but are missing from the current inventory.
- Emits events for only the resources that where created, configured or deleted.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:34:40 +03:00
Stefan Prodan 79dd86581c
Remove kubectl dependency
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:33:26 +03:00
Stefan Prodan 3a03d235c2
Add SSA resource manager
Package ssa contains utilities for managing Kubernetes resources using sever-side apply.
Package objectutil contains utilities for manipulating Kubernetes objects.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:33:26 +03:00
Stefan Prodan 7ffe62b8e7
Introduce v1beta2 API
Changes from v1beta1:
- `spec.validation` removed (server-side validation is implicit)
- `spec.status.snapshot` replaced by `spec.status.inventory`
- `spec.patchesStrategicMerge` deprecated in favour of `spec.patches`
- `spec.patchesJson6902` deprecated in favour of `spec.patches`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:33:26 +03:00
Stefan Prodan ea369a0281
Merge pull request #435 from makkes/fix-health-checks
fix: don't skip all errors when recording health check status
2021-09-30 17:27:51 +03:00
Max Jonas Werner 435815c2a5
fix: don't skip all errors when recording health check status
fixes #432

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-09-30 15:31:02 +02:00
Stefan Prodan 74f08c3f1b
Merge pull request #425 from fluxcd/refactor-tests
Refactor tests
2021-09-10 17:07:58 +03:00
Stefan Prodan 14329c6fa0
Refactor tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-10 16:51:22 +03:00
Stefan Prodan 3cb1ce8029
Run tests with envtest installed in testbin
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-10 15:08:31 +03:00
Stefan Prodan 8534a1463a
Merge pull request #424 from fluxcd/release-v0.14.1
Release v0.14.1
2021-09-09 15:37:50 +03:00
Stefan Prodan 54efaca039
Release v0.14.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-09 15:21:36 +03:00
Stefan Prodan 9838b77597
Merge pull request #420 from michalschott/main
Mask the Kubernetes Secrets data from dry-run and apply logs
2021-09-09 15:13:24 +03:00
Michal Schott 72bc54477a
Filter dryrun errors for senstive data.
Signed-off-by: Michal Schott <michal.schott@onegini.com>
2021-09-08 16:32:18 +02:00
Michal Schott cb93667050
Redact secret data.
Signed-off-by: Michal Schott <michal.schott@onegini.com>
2021-09-03 21:52:22 +02:00
Hidde Beydals 52c61f82f3
Merge pull request #404 from makkes/default-observed-generation
feat: set default observedGeneration to -1 on Kustomizations
2021-08-27 17:37:52 +02:00
Max Jonas Werner d7690d8564
feat: set default observedGeneration to -1 on Kustomizations
This is a follow-up to
https://github.com/fluxcd/helm-controller/pull/294, porting the same
code to the kustomize-controller so that all Flux 2 controllers work
the same way in this regard.

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-08-27 17:15:24 +02:00
Stefan Prodan ea052f845d
Merge pull request #417 from fluxcd/release-v0.14.0
Release v0.14.0
2021-08-26 12:05:18 +03:00
Stefan Prodan 053f68b8ff
Release v0.14.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-26 11:37:05 +03:00
Stefan Prodan 96890d3c98
Merge pull request #416 from fluxcd/kustomize-v4.3.0
Update controller to kustomize v4.3.0
2021-08-26 10:50:33 +03:00
Stefan Prodan 80d712e5e9
Update controller to kustomize v4.3.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-26 09:08:39 +03:00
Stefan Prodan c637838682
Merge pull request #411 from fluxcd/skip-gc-for-ownerReference
Skip garbage collection of objects with owner references
2021-08-26 09:02:36 +03:00
Stefan Prodan 1032b6b696
Merge pull request #412 from jalseth/main
Improve trimString function
2021-08-25 18:04:22 +03:00
James Alseth 6f32e53970
Improve trimString function
Previously, the function iterated until the length limit was hit, which
is relatively slow and increases with the length of the limit. The new
implementation is easier to reason about and operates in constant time,
leading to better performance.

Signed-off-by: James Alseth <james@jalseth.me>
2021-08-24 19:18:41 -07:00
Stefan Prodan 16c451ba40
Add GC owner reference tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-19 17:15:04 +03:00
Stefan Prodan a49bbf9ed3
Skip garbage collection of objects with owner references
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-18 12:49:28 +03:00
Stefan Prodan 34582cb0dd
Merge pull request #408 from SomtochiAma/add-kustomize-replacement
Add tests for various kustomize transformers.
2021-08-16 18:04:02 +03:00
Somtochi Onyekwere b1071bf871 Add kustomize transformer tests
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-08-16 15:40:14 +01:00
Stefan Prodan ebbf7bcfc9
Merge pull request #406 from SomtochiAma/add-kustomize-replacement
Add kustomize replacement transformer test
2021-08-13 10:00:04 +03:00
Somtochi Onyekwere 659e660b6d Tests for replacement transformer
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-08-13 07:28:19 +01:00
Stefan Prodan b0d1959dda
Merge pull request #402 from fluxcd/release-v0.13.3
Release v0.13.3
2021-08-05 16:39:29 +03:00
Stefan Prodan 0e55929c95
Release v0.13.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-05 16:12:19 +03:00
Stefan Prodan 00579b4c2c
Merge pull request #401 from fluxcd/update-deps
Update dependencies
2021-08-05 16:05:02 +03:00
Stefan Prodan c89374c758
Update source-controller/api to v0.15.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-05 15:41:07 +03:00
Stefan Prodan fe0f946840
Update dependencies
- k8s.io/* v0.21.3
- controller-runtime v0.9.5
- kubectl 1.21.3

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-05 10:45:32 +03:00
Stefan Prodan 85d73f30d9
Merge pull request #400 from fluxcd/sops-kubeconfig
Make the kubeconfig secrets compatible with SOPS
2021-08-05 10:34:13 +03:00
Stefan Prodan 5d1cb91841
Make the kubeconfig secrets compatible with SOPS
Add `values.yaml` to the supported kubeconfig secret key names in order for SOPS to correctly detect the storage format based on the file extension.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-04 14:43:33 +03:00
Stefan Prodan 81a4090328
Merge pull request #397 from darkowlzz/rm-util-objectkey
Remove old util ObjectKey
2021-08-01 12:21:25 +03:00
Sunny 930e7d398e
Remove old util ObjectKey
Replace old utility function ObjectKey with controller-runtime's
client.ObjectKeyFromObject.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-08-01 04:27:35 +05:30
Stefan Prodan 9d66fc71ba
Merge pull request #394 from makkes/prevent-npes
fix: prevent nil pointer dereference in health checks
2021-07-27 10:18:29 +03:00
Max Jonas Werner 08920d3286
fix: prevent nil pointer dereference in health checks
When checking the health status of each declared resource, kstatus
might return nil for certain resources (for whatever reason). In that
case, this information is now conveyed in the health status event.

https://github.com/fluxcd/kustomize-controller/pull/374

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-07-26 19:03:46 +02:00
Stefan Prodan 969bd4d2c8
Merge pull request #390 from fluxcd/test-fix
Fix generation conflicts in tests
2021-07-08 18:42:41 +03:00
Stefan Prodan f556cb29f6
Fix generation conflicts in tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-07-08 18:21:22 +03:00
Stefan Prodan 6ec3edcb98
Merge pull request #376 from ViBiOh/kustomization_prune_update
Add test for prune toggling
2021-07-08 14:39:47 +03:00
Vincent Boutour 23b0a2d455
Adding test for materializing #375
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
2021-07-07 18:01:57 +02:00
Hidde Beydals d7572972ce
Merge pull request #389 from oliverbaehler/main 2021-07-07 17:38:13 +02:00
Oliver Bähler 6cc6e1d391 More explicit example
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
2021-07-07 15:06:41 +02:00
Oliver Bähler 69f9ebd1e7 Var substitution opt-in
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
2021-07-07 14:24:39 +02:00
Stefan Prodan 5376558311
Merge pull request #386 from fluxcd/release-v0.13.2
Release v0.13.2
2021-07-05 14:54:27 +03:00
Stefan Prodan 59ccfb0601
Release v0.13.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-07-05 14:31:51 +03:00
Stefan Prodan c6fb374804
Merge pull request #385 from fluxcd/alpine-3.14
Update Alpine v3.14 and kubectl v1.21.2
2021-07-05 14:23:18 +03:00
Stefan Prodan 5b2711f943
Update Alpine and kubectl
Update Alpine to v3.14
Update kubectl to v1.21.2

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-07-05 14:09:33 +03:00
Stefan Prodan b7380ab152
Merge pull request #383 from fluxcd/kustomize-v4.2.0
Update controller to kustomize v4.2.0
2021-07-05 10:41:05 +03:00
Stefan Prodan bb71e74d53
Merge pull request #374 from makkes/better-health-check-messaging
feat: make it easier to reason about health check failures
2021-07-05 10:34:15 +03:00
Stefan Prodan 540b5898d3
Merge pull request #384 from jodok/patch-1
fixed typo
2021-07-05 10:18:24 +03:00
Max Jonas Werner bbc4208d1c
feat: make it easier to reason about health check failures
Whenever a health check times out now, the most recently collected
error for each resource will be printed as part of the error message.
This excludes errors for those resources for which no error was
reported in the last update. This is because whenever a timeout
occurs, an error is reported on ALL resources, even those that have
been seen as healthy before.

Also, this commit causes all successfully checked resources to be
omitted in the error event.

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-07-04 21:51:41 +02:00
Jodok Batlogg d7c45de5ca fixed typo
Signed-off-by: Jodok Batlogg <jodok@batlogg.com>
2021-07-03 00:08:11 +02:00
Stefan Prodan 017c7c15b5
Update controller to kustomize v4.2.0
- sigs.k8s.io/kustomize/api v0.8.11
- sigs.k8s.io/kustomize/kyaml v0.11.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-07-02 13:28:20 +03:00
Stefan Prodan 0a435c9a58
Merge pull request #382 from fluxcd/release-0.13.1
Release v0.13.1
2021-06-30 14:15:02 +03:00
Stefan Prodan 1445b7e066
Release v0.13.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-30 13:32:29 +03:00
Stefan Prodan 55bf6fffde
Merge pull request #381 from fluxcd/kubectl-v1.21.1
Update kubectl to v1.21.1
2021-06-30 12:29:50 +03:00
Stefan Prodan 4f4106bfa1
Update kubectl to v1.21.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-30 11:38:54 +03:00
Stefan Prodan 56024c29ad
Merge pull request #380 from fluxcd/e2e-kubernetes-v1.21.1
e2e: Update Kubernetes to v1.21.1
2021-06-29 17:25:01 +03:00
Stefan Prodan f99a04658a
e2e: Update Kubernetes to v1.21.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-29 17:08:54 +03:00
Stefan Prodan 1199d0e205
Merge pull request #377 from JaneLiuL/main
Test kustomization depend on for improve ut
2021-06-28 15:57:13 +03:00
Jane Liu L d72d8f5b2d
Test kustomization depend on for improve ut
Signed-off-by: Jane Liu L <jane.l.liu@ericsson.com>
2021-06-28 20:13:44 +08:00
Jane Liu L 8ade434726
Test kustomization depend on for improve ut
Signed-off-by: Jane Liu L <jane.l.liu@ericsson.com>
2021-06-28 20:04:24 +08:00
Stefan Prodan 9c87a02f42
Merge pull request #378 from fluxcd/fix-ci-kubectl
Fix CI: Override kubebuilder kubectl
2021-06-28 14:11:22 +03:00
Stefan Prodan 4621ef30aa
Fix CI: Override kubebuilder kubectl
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-28 13:40:32 +03:00
Stefan Prodan 8a9e3995da
Merge pull request #370 from fluxcd/fix-kustomize-patch-docs
Add the generic patch field to the API spec docs
2021-06-18 11:08:39 +03:00
Stefan Prodan 2370360c10
Add the generic patch field to the API spec docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-18 10:42:34 +03:00
Stefan Prodan 1f2fcea1b9
Merge pull request #367 from fluxcd/yaml-anchors-drop
Add YAML anchors to breaking changes
2021-06-15 14:47:26 +03:00
Stefan Prodan f31b9ca611
Add YAML anchors to breaking changes
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-15 14:25:26 +03:00
Stefan Prodan 90ab001c5e
Merge pull request #366 from fluxcd/release-v0.13.0
Release v0.13.0
2021-06-14 16:54:22 +03:00
Stefan Prodan 9d323aa686
Release v0.13.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-14 16:37:11 +03:00
Stefan Prodan 6672928023
Merge pull request #364 from Kissy/generic-patches
Add support for in-line generic patches to Flux Kustomization API
2021-06-14 14:28:15 +03:00
Stefan Prodan cdabadbb5d
Merge pull request #365 from fluxcd/gc-tests-docs
Document GC checksum annotation
2021-06-14 14:21:53 +03:00
Stefan Prodan 7772a1f679
Document the checksum annotation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-14 13:49:10 +03:00
Stefan Prodan 24f78af641
Simplify staleness check
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-14 13:45:38 +03:00
Stefan Prodan 2d85398921
Add test for GC disabling
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-14 13:43:05 +03:00
Stefan Prodan f8cac4a35d
Add missing ConfigMap RBAC
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-14 13:41:14 +03:00
Stefan Prodan 2838997fb6
Merge pull request #362 from JaneLiuL/main
Move the GC checksum from labels to annotations
2021-06-14 12:19:45 +03:00
Guillaume Le Biller 14bce3c666
Update pkg/apis/kustomize to v0.2.0
Signed-off-by: Guillaume Le Biller <glebiller@Traveldoo.com>
2021-06-11 16:45:50 +02:00
Jane Liu L 6979dbab83
Move the GC checksum from labels to annotations
Signed-off-by: Jane Liu L <jane.l.liu@ericsson.com>
2021-06-11 21:06:24 +08:00
Guillaume Le Biller b797eac907
Implement generic patches in Kustomization
Allow patching multiple resources instead of a single existing one as
StrategicMerge & JSON6902 are forced to target existing named resources.

Signed-off-by: Guillaume Le Biller <glebiller@Traveldoo.com>
2021-06-11 09:04:37 +02:00
Stefan Prodan 30dd0c33b0
Merge pull request #343 from fluxcd/kustomize-v4
Upgrade controller to Kustomize v4
2021-06-09 18:03:54 +03:00
Stefan Prodan 1202cc157b
Update source-controller/api to v0.14.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-09 17:35:47 +03:00
Stefan Prodan f6e0a23623
Use github.repository for nightly builds
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-09 14:06:13 +03:00
Stefan Prodan 2ada9f213a
Update kustomize/kyaml to v0.10.21
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-09 09:47:38 +03:00
Stefan Prodan ce4445f714
Update fluxcd/pkg/runtime to v0.12.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:33 +03:00
Stefan Prodan dce166f7a6
Update controller-runtime and controller-gen
- Bump controller-runtime to v0.9.0
- Bump controller-gen to v0.5.0
- Use Environment.AddUser to generate the envtest cluster admin kubeconfig

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:16 +03:00
Stefan Prodan 89cdab4a3c
Update cli-utils to v0.25.1-0.20210603052138-670dee18a123
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:15 +03:00
Stefan Prodan 4dd9c23579
Update kustomize to v4.1.3
- make kstatus work with the latest version of kyaml by using a forked version of cli-utils https://github.com/fluxcd/cli-utils/pull/1
- update Kubernetes packages to v0.21.1
- update controller-runtime to v0.9.0-beta.5 due to breaking changes in client-go v0.21.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:15 +03:00
Stefan Prodan aeef1e228a
Upgrade to kustomize v4
- Upgrade sigs.k8s.io/kustomize/api from v0.7.4 to v0.8.9
- Upgrade sigs.k8s.io/cli-utils from v0.22.4 to v0.25.0
- Pin sigs.k8s.io/kustomize/kyaml to v0.10.17 (cli-utils compat)
- Pin k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd (cli-utils compat)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:15 +03:00
Stefan Prodan 848c6e97d6
Update source-controller/api to v0.13.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:15 +03:00
Stefan Prodan 6ce22c9603
Use ash2k's cli-utils PR
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:15 +03:00
Stefan Prodan a97a62c4ab
Update kustomize to v4.1.3
- make kstatus work with the latest version of kyaml by using a forked version of cli-utils https://github.com/fluxcd/cli-utils/pull/1
- update Kubernetes packages to v0.21.1
- update controller-runtime to v0.9.0-beta.5 due to breaking changes in client-go v0.21.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:15 +03:00
Stefan Prodan 0711908892
Workaround for kustomize build panic
Serialize kustomize build runs to avoid kyaml OpenAPI concurrent map read/write panic
https://github.com/kubernetes-sigs/kustomize/issues/3659

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:14 +03:00
Stefan Prodan e5ee0367f8
Upgrade to kustomize v4
- Upgrade sigs.k8s.io/kustomize/api from v0.7.4 to v0.8.9
- Upgrade sigs.k8s.io/cli-utils from v0.22.4 to v0.25.0
- Pin sigs.k8s.io/kustomize/kyaml to v0.10.17 (cli-utils compat)
- Pin k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd (cli-utils compat)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:14 +03:00
Stefan Prodan 7354b196ad
Merge pull request #361 from fluxcd/nightly-builds
Add nightly builds workflow
2021-06-08 20:33:09 +03:00
Stefan Prodan 58bba7c19a
Add nightly builds workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:17:58 +03:00
Stefan Prodan 3af21f2a3e
Merge pull request #354 from fluxcd/release-v0.12.2
Release v0.12.2
2021-06-02 19:10:27 +03:00
Stefan Prodan f14354300a
Release v0.12.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-02 18:58:27 +03:00
Stefan Prodan 8eb2041063
Merge pull request #353 from gmaiztegi/sops-any-format-secret-generator
Support decrypting any file format in secret generator
2021-06-02 18:52:13 +03:00
Gorka Maiztegi 56739d387b Support decrypting any file format in secret generator
Signed-off-by: Gorka Maiztegi <gmaiztegi@reviewpro.com>
2021-05-31 16:06:05 +02:00
Hidde Beydals 57f6610956
Merge pull request #351 from fluxcd/release-v0.12.1
Release v0.12.1
2021-05-26 16:24:24 +02:00
Stefan Prodan 71f0d981f8
Release v0.12.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-26 17:09:59 +03:00
Stefan Prodan da70a135ee
Merge pull request #350 from fluxcd/go-1.16
Update Go to v1.16
2021-05-26 17:04:20 +03:00
Stefan Prodan 3bb5bece0c
Update source-controller/api to v0.13.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-26 16:46:11 +03:00
Stefan Prodan 8dd53f60fc
Update Go to v1.16
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-26 16:45:53 +03:00
Hidde Beydals fe9e63b549
Merge pull request #346 from ordovicia/fix-timeout-handling
Fix validation and application timeout handling
2021-05-18 11:24:12 +02:00
Hidehito Yabuuchi 871c2a14bf Fix validation and application timeout handling
Signed-off-by: Hidehito Yabuuchi <hdht.ybuc@gmail.com>
2021-05-18 17:47:58 +09:00
Stefan Prodan 185ba3216f
Merge pull request #342 from fluxcd/prerelease-workflow
Publish on-demand RC container images
2021-05-11 13:16:51 +03:00
Stefan Prodan 598c34eff4
Publish on-demand RC container images
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-11 10:57:55 +03:00
Stefan Prodan 9061419b0e
Merge pull request #335 from fluxcd/release-v0.12.0
Release v0.12.0
2021-04-29 11:20:13 +03:00
Stefan Prodan 4efb8b2314
Release v0.12.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-29 11:04:55 +03:00
Stefan Prodan 2a03b6e922
Merge pull request #329 from bob-rohan/328_base64_encoded_sops_encrypted_secrets
SOPS: Decrypt Kubernetes secrets generated by kustomize
2021-04-29 10:32:12 +03:00
bob.rohan a77ea03ec6 Decrypt base64 encoded SOPS encrypted secrets
Signed-off-by: Bob Rohan <bob.rohan@hodge.co.uk>
2021-04-28 11:54:25 +01:00
Stefan Prodan 774da2d256
Merge pull request #333 from superbrothers/server-dry-run
Extracting validation error from apply server dry run output
2021-04-28 08:43:09 +03:00
Hidde Beydals b15052a6cf
Merge pull request #334 from dholbach/update-install-url
update install script url
2021-04-27 17:06:33 +02:00
Daniel Holbach 93e7c97613 update install script url
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-04-27 16:32:45 +02:00
Kazuki Suda e91129c4f1
Confirm the right string is returned
Signed-off-by: Kazuki Suda <kazuki.suda@gmail.com>
2021-04-27 19:29:03 +09:00
Kazuki Suda 178ae70f0d
Extracting validation error from apply server dry run output
Signed-off-by: Kazuki Suda <kazuki.suda@gmail.com>
2021-04-27 18:08:38 +09:00
Stefan Prodan c237e9ffce
Merge pull request #331 from fluxcd/release-v0.11.1
Release v0.11.1
2021-04-22 11:31:36 +03:00
Stefan Prodan 63a14b4fc2
Release v0.11.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-22 11:16:49 +03:00
Stefan Prodan e6f93cbb02
Merge pull request #330 from fluxcd/source-controller/api-v0.12.0
Update source-controller/api to v0.12.0
2021-04-22 11:01:08 +03:00
Stefan Prodan 036e3cf42b
Update fluxcd/source-controller/api to v0.12.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-22 10:40:17 +03:00
Stefan Prodan 1ba5d2b9e0
Merge pull request #327 from fluxcd/meta-v0.9.0
Update fluxcd/pkg/apis/meta to v0.9.0
2021-04-21 13:54:59 +03:00
Stefan Prodan 56a1fab4c2
Update fluxcd/pkg/apis/meta to v0.9.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-21 13:41:34 +03:00
Stefan Prodan 39f86ccc42
Merge pull request #322 from chanwit/refactor_indexers_to_use_HOLs
Refactor indexers to use high-order functions
2021-04-21 12:23:31 +03:00
Stefan Prodan 273bf032f0
Merge pull request #326 from fluxcd/fluxcd/pkg/runtime-v0.10.2
Update fluxcd/pkg/runtime to v0.10.2
2021-04-19 15:21:42 +03:00
Stefan Prodan aa66416734
Update fluxcd/pkg/runtime to v0.10.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-19 15:03:00 +03:00
Chanwit Kaewkasi 147df26298 replace redundant indexers code with high-order functions
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2021-04-14 22:51:35 +07:00
Stefan Prodan 80ebb79224
Merge pull request #321 from fluxcd/kubectl-1.21.0
Update dependencies
2021-04-14 13:13:43 +03:00
Stefan Prodan 9125f335e0
Update dependencies
- kubectl v1.21.0
- go.mozilla.org/sops/v3 v3.7.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-14 12:53:58 +03:00
Stefan Prodan b2af3bafd0
Merge pull request #319 from dholbach/add-cii
Add CII badge
2021-04-08 13:58:08 +03:00
Daniel Holbach 1ccc3b469e Add CII badge
ref: https://bestpractices.coreinfrastructure.org/en/projects/4787

Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-04-08 12:18:41 +02:00
Stefan Prodan 23f08ba3f6
Merge pull request #317 from allenporter/log-level
Make log level info for 'Dependencies do not meet ready condition'
2021-04-08 11:54:30 +03:00
Hidde Beydals 9799db2c5c
Merge pull request #318 from fluxcd/gc-e2e-to-go
Move GC test to Go test suite
2021-04-08 10:40:09 +02:00
Hidde Beydals fa6565b806 Move GC test to Go test suite
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-08 10:18:02 +02:00
Allen Porter 63d6c8c802 Make log level info for 'Dependencies do not meet ready condition'
Reduce the log level from error to info to match the level of the event.

Signed-off-by: Allen Porter <allen.porter@gmail.com>
Signed-off-by: Allen Porter <allen@thebends.org>
2021-04-07 23:33:08 -07:00
Stefan Prodan 7a79cf1718
Merge pull request #314 from fluxcd/release-v0.11.0
Release v0.11.0
2021-04-06 16:35:48 +03:00
Stefan Prodan d1f0e979ff
Release v0.11.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-06 15:57:12 +03:00
Hidde Beydals b7793ac1ab
Merge pull request #313 from fluxcd/override-e2e-to-go 2021-04-06 11:50:52 +02:00
Hidde Beydals 5a8d5026f6 Move Kustomize patch tests to Go test suite
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-06 11:18:11 +02:00
Hidde Beydals 4f7ee4c61f
Merge pull request #312 from fluxcd/kubectl-apply-timeout
Detect and replace empty err output on apply
2021-04-01 17:20:40 +02:00
Hidde Beydals 32363048f4 Detect and replace empty err output on apply
This should give users some guidance when `kubectl apply` itself does
not give any useful output back itself, till date only observed when
it times out waiting.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-01 17:05:25 +02:00
Hidde Beydals efecc8a793
Merge pull request #309 from fluxcd/age-encryption 2021-04-01 15:33:50 +02:00
Hidde Beydals 8d304ad130 Document age decryption in spec
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-01 15:17:33 +02:00
Hidde Beydals 8688fd6159 Look for `.agekey` to prevent future collisions
The previous `.txt` is very generic and could have resulted in
collisions when a new encryption format would be introduced in the
future.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-01 13:20:17 +02:00
Hidde Beydals 21996ec82a Test SOPS decryption in Go tests and remove e2e
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-01 13:02:43 +02:00
Hidde Beydals b8bdc0c999 Support decrypting using age keys
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-03-31 11:55:44 +02:00
Hidde Beydals c3e1252665 Only GPG import keys with `.asc` extension
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-03-30 13:20:13 +02:00
Stefan Prodan 198b8e7dc1
Merge pull request #307 from fluxcd/release-v0.10.0
Release v0.10.0
2021-03-26 16:17:20 +02:00
Stefan Prodan 77598d568b
Release v0.10.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-26 16:03:23 +02:00
Hidde Beydals 71f31fa96a
Merge pull request #304 from fluxcd/sops-v3.7.0
Update SOPS to v3.7.0
2021-03-26 10:24:09 +01:00
Hidde Beydals 9aee369f31 Update SOPS to v3.7.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-03-25 22:36:31 +01:00
Stefan Prodan 041b270584
Merge pull request #303 from fluxcd/le-config
Set leader election deadline to 30s
2021-03-25 16:19:58 +02:00
Stefan Prodan ca1760b364
Use controller name in LeaderElectionID
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-25 14:20:34 +02:00
Stefan Prodan 43c05a7a20
Set leader election deadline to 30s
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-25 13:33:15 +02:00
Stefan Prodan 15c1096fab
Merge pull request #300 from fluxcd/release-v0.9.3
Release v0.9.3
2021-03-17 12:35:08 +02:00
Stefan Prodan ddd4abbfbe
Release v0.9.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-17 12:21:23 +02:00
Stefan Prodan 4122003658
Merge pull request #299 from fluxcd/suspend-metric
Expose suspended status as Prometheus metric
2021-03-17 12:05:29 +02:00
Stefan Prodan 446545c71f
Expose suspended status as Prometheus metric
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-17 11:27:21 +02:00
Stefan Prodan c1ffccbbf9
Merge pull request #298 from fluxcd/update-deps-cr
Update dependencies
2021-03-15 18:27:11 +02:00
Stefan Prodan 5ce0db3a75
Add CodeQL scanning to CI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-15 16:30:13 +02:00
Stefan Prodan 95c2f1d04c
Update dependencies
- github.com/fluxcd/source-controller/api v0.9.1
- github.com/fluxcd/pkg/runtime v0.8.4
- sigs.k8s.io/controller-runtime v0.8.3

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-15 16:29:52 +02:00
Stefan Prodan 5da1fc043d
Merge pull request #295 from floric/fix/fixed-typos
Fixed small typos
2021-03-06 10:55:35 +02:00
Florian Richter 8312a2574c Fixed small typos
Signed-off-by: Florian Richter <floririchte@gmail.com>
2021-03-05 21:35:00 +01:00
Stefan Prodan 592e1ccd91
Merge pull request #294 from fluxcd/release-v0.9.2
Release v0.9.2
2021-03-05 11:05:22 +02:00
Stefan Prodan c6a1a26dc7
Release v0.9.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-05 10:43:28 +02:00
Stefan Prodan 4f1b241b8c
Merge pull request #293 from fluxcd/remove-ctx
Do not override the artifact fetch timeout
2021-03-05 10:36:31 +02:00
Stefan Prodan 8708205edc
Do not override the artifact fetch timeout
Use the timeout set by the http client when retrying with exponential backoff

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-05 08:46:52 +02:00
Stefan Prodan ff38a3f2cc
Merge pull request #291 from fluxcd/var-validation
Validate the var names before substitution
2021-03-02 07:48:38 +02:00
Stefan Prodan cb72a77753
Validate the var names before substitution
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-27 12:09:57 +02:00
Stefan Prodan f2c986a39a
Merge pull request #289 from fluxcd/http-retry
Retry with exponential backoff when fetching artifacts
2021-02-27 11:35:18 +02:00
Stefan Prodan 9d48b6299d
Retry with exponential backoff when fetching artifacts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-26 12:29:14 +02:00
Hidde Beydals 31b3cd2717
Merge pull request #288 from fluxcd/release-v0.9.1
Release v0.9.1
2021-02-25 14:28:15 +01:00
Hidde Beydals a1074c5f2c Release v0.9.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-25 14:13:11 +01:00
Hidde Beydals 432a64b197
Merge pull request #287 from fluxcd/cli-utils-update
Update sigs.k8s.io/cli-utils to v0.22.2
2021-02-25 14:09:21 +01:00
Hidde Beydals 98515649d9 Update sigs.k8s.io/cli-utils to v0.22.2
This is the first release that includes a patch of the
`CachingClusterReader` so that it continues on all list errors.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-25 13:42:47 +01:00
Stefan Prodan 15acc03193
Merge pull request #286 from fluxcd/release-v0.9.0
Release v0.9.0
2021-02-24 13:02:11 +02:00
Stefan Prodan f375697690
Release v0.9.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-24 12:27:41 +02:00
Stefan Prodan d7d5bc1fd5
Merge pull request #285 from fluxcd/source-v0.9.0
Update dependencies
2021-02-23 17:00:34 +02:00
Stefan Prodan 750cbdfbb2
Update dependencies
- fluxcd/pkg/apis/meta v0.8.0
- fluxcd/source-controller/api v0.9.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-23 16:45:38 +02:00
Stefan Prodan 3e024dc5e5
Merge pull request #284 from fluxcd/release-ci
Refactor release workflow
2021-02-23 16:31:32 +02:00
Stefan Prodan 8a98b0ff68
Refactor release workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-23 16:04:56 +02:00
Stefan Prodan 2aefdc0df3
Merge pull request #283 from fluxcd/kubectl-1.20.4
Update kubectl to v1.20.4
2021-02-23 12:22:32 +02:00
Stefan Prodan a1ab63e8f8
Update kubectl to v1.20.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-23 11:54:31 +02:00
Stefan Prodan 2f28126364
Merge pull request #271 from fluxcd/force-apply
Add support for recreating objects when immutable fields are updated
2021-02-23 11:30:47 +02:00
Stefan Prodan 65cfce2978
Add spec.force to API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-22 17:36:37 +02:00
Stefan Prodan 30c793ed60
Update fluxcd/pkg/runtime to v0.8.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-22 17:04:19 +02:00
Aurel Canciu 729dc9770e
Support recreating objects on immutable field updates
Allow passing --force to kubectl apply. Useful when dealing with
immutable field changes in resources.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-02-22 16:59:01 +02:00
Stefan Prodan 453b6e6e46
Merge pull request #281 from davidkarlsen/fixGpgImport
Avoid prompts on import by adding batch flag to gpg
2021-02-22 11:43:30 +02:00
Stefan Prodan 064e536e39
Merge pull request #280 from gimlet-io/filter-validation-errors
Extracting validation error from apply dry run output
2021-02-22 11:40:39 +02:00
David J. M. Karlsen 750a45a34b
Avoid promts on import by adding batch flag to gpg
Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
2021-02-20 23:36:31 +01:00
Laszlo Fogas 48ab6a0205 Extracting validation error from apply dry run output
Signed-off-by: Laszlo Fogas <laszlo@laszlo.cloud>
2021-02-19 16:28:09 +01:00
Hidde Beydals 528e1183a5
Merge pull request #278 from fluxcd/release-v0.8.1
Release v0.8.1
2021-02-18 10:56:50 +01:00
Hidde Beydals e936390744 Release v0.8.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-18 10:35:06 +01:00
Stefan Prodan 5f966d0ff6
Merge pull request #275 from fluxcd/substitute-from
Implement var substitution from ConfigMaps and Secrets
2021-02-16 14:57:55 +02:00
Stefan Prodan 401fec6c8d
Allow disabling var substitution for certain resources
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-16 10:40:01 +02:00
Stefan Prodan 0ac1f9e631
Implement var substitution from ConfigMaps and Secrets
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-16 09:20:00 +02:00
Stefan Prodan 947bd57f7b
Merge pull request #273 from fluxcd/local-run
Allow the controller to be run locally
2021-02-14 12:00:57 +02:00
Stefan Prodan a77d6cb96e
Allow the controller to be run locally
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-14 11:25:18 +02:00
Stefan Prodan 527af26a49
Merge pull request #270 from fluxcd/release-v0.8.0
Release v0.8.0
2021-02-12 14:05:06 +02:00
Stefan Prodan df8f1718aa
Release v0.8.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-12 13:51:42 +02:00
Stefan Prodan 23467e61b4
Merge pull request #269 from fluxcd/kustomize/api-v0.7.4
Update kustomize/api to v0.7.4 (last version without kyaml)
2021-02-12 12:41:37 +02:00
Stefan Prodan e3601cd2c9
Update kustomize/api to v0.7.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-12 12:15:48 +02:00
Stefan Prodan 9dc20e9ac9
Merge pull request #253 from fluxcd/envsubst
[RFC] Add support for variable substitutions
2021-02-12 12:05:45 +02:00
Stefan Prodan acaaafc3e6
Add note about prefixing variables
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-11 18:35:46 +02:00
Stefan Prodan f694414d6d
Add Drone envsubst install to docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-11 18:17:58 +02:00
Stefan Prodan f3d9c36691
Add support for variable substitutions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-11 18:17:53 +02:00
Stefan Prodan 1e30988ed5
Merge pull request #268 from fluxcd/source-not-found
Add source kind and name to not found error
2021-02-09 10:05:47 +02:00
Stefan Prodan e99f328200
Add source kind and name to not found error
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-08 15:20:13 +02:00
Stefan Prodan 736867d359
Merge pull request #267 from fluxcd/skip-gc
Allow disabling of prune on certain resources
2021-02-08 15:02:05 +02:00
Stefan Prodan b2cfe6d3f8
Allow disabling of prune on certain resources
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-07 14:16:25 +02:00
Hidde Beydals 1849d614f0
Merge pull request #266 from fluxcd/pprof 2021-02-07 13:08:05 +01:00
Hidde Beydals b6a9b7023b Enable pprof endpoints on metrics server
Using the helper from `pkg/runtime/pprof`, which follows the suggestion
from controller-runtime to use `AddMetricsExtraHandler`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-07 12:42:44 +01:00
Stefan Prodan d0f3aa11a5
Merge pull request #265 from jasonBirchall/patch-1
Add "toolkit" to the API reference in README
2021-02-04 16:02:58 +02:00
Jason Birchall 573e950883 Add "toolkit" to the API reference in README
When following the README, I noticed the `apiVersion` is slightly wrong. This commit adds `toolkit` to the alert and provider code blocks to allow people to copy and paste.

Signed-off-by: jasonBirchall <jason.birchall@digital.justice.gov.uk>
2021-02-04 13:43:18 +00:00
Hidde Beydals 0c3e73f9af
Merge pull request #264 from fluxcd/kustomize-patches 2021-02-04 09:48:59 +01:00
Hidde Beydals d7cdeb6d39 Add link to APIExtensions in generated docs
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-04 09:33:34 +01:00
Hidde Beydals 65ceea860e Document Strategic Merge and JSON 6902 overrides
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-04 09:33:31 +01:00
Hidde Beydals 6e2ac22901 Test Strategic Merge and JSON 6902 patches
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-03 22:40:17 +01:00
Hidde Beydals 7c23accfeb Use Strategic Merge and JSON 6902 patches
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-03 21:52:36 +01:00
Hidde Beydals 17a6bff52e Add Patches{StrategicMerge,JSON6902} fields to API
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-03 20:31:11 +01:00
Hidde Beydals 02de763ad8 Depend on the Kustomize API from `fluxcd/pkg`
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-03 20:12:58 +01:00
Stefan Prodan 975534b367
Merge pull request #263 from fluxcd/release-v0.7.4
Release v0.7.4
2021-02-02 17:08:17 +02:00
Stefan Prodan c9ef4e87a4
Release v0.7.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-02 16:11:34 +02:00
Stefan Prodan d7eeea3d12
Merge pull request #262 from fluxcd/healthy-condition
Add Healthy status condition
2021-02-02 15:35:00 +02:00
Stefan Prodan 5e17dd48f4
Add Healthy status condition
- record the last health assessment result in a dedicated status condition
- use the condition status when issuing events to prevent notifications spam

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-02 14:59:06 +02:00
Stefan Prodan 26ec841147
Merge pull request #261 from fluxcd/release-v0.7.3
Release v0.7.3
2021-02-01 16:57:08 +02:00
Stefan Prodan 7e7adb5d34
Release v0.7.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-01 16:38:00 +02:00
Stefan Prodan d910238d59
Merge pull request #260 from splushii/validation-impersonation
Support impersonation for validation
2021-01-30 16:35:27 +02:00
Christian Hernvall d0f2dc6e4a
Support impersonation for validation
Signed-off-by: Christian Hernvall <c.hernvall@yubico.com>
2021-01-29 14:56:45 +01:00
Stefan Prodan 0adfca7553
Merge pull request #259 from fluxcd/release-v0.7.2
Release v0.7.2
2021-01-26 11:21:42 +02:00
Stefan Prodan fe61bcf391
Release v0.7.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-26 11:06:33 +02:00
Stefan Prodan d22f1c22a3
Update Alpine to 3.13
Fix user group assignment

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-26 11:03:46 +02:00
Stefan Prodan 9ad68d952d
Merge pull request #258 from nairb774/priceless_meitner
impersonation: Clear config.BearerTokenFile when setting BearerToken.
2021-01-26 10:22:17 +02:00
Brian Atkinson 2ca0edcf92 impersonation: Clear config.BearerTokenFile when setting BearerToken.
When running in a cluster, the BearerTokenFile is set to point to
`/var/run/secrets/kubernetes.io/serviceaccount/token` where the service
account's token is auto-mounted. If this value is not cleared, the
setting of the BearerToken field will have no effect. Relevant
documentation:
https://pkg.go.dev/k8s.io/client-go@v0.20.2/rest#Config.BearerTokenFile

Signed-off-by: Brian Atkinson <brian@atkinson.mn>
2021-01-25 15:14:35 -08:00
Stefan Prodan 2d38de8779
Merge pull request #257 from fluxcd/release-v0.7.1
Release v0.7.1
2021-01-25 17:28:20 +02:00
Stefan Prodan 119ec4bf50
Release v0.7.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-25 17:09:45 +02:00
Stefan Prodan 31690a6aa1
Merge pull request #256 from fluxcd/fix-retry
Fix reconciliation retry scheduler
2021-01-25 13:31:46 +02:00
Stefan Prodan 100d362ce7
Fix reconciliation retry scheduler
Log the reconciliation error instead of returning it, so that controller-runtime doesn't requeue immediately. Reconciliation failures should be scheduled at the specified retry interval.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-25 13:17:38 +02:00
Stefan Prodan 62972bec54
Merge pull request #251 from fluxcd/release-v0.7.0
Release v0.7.0
2021-01-22 17:38:15 +02:00
Stefan Prodan b158f28382
Release v0.7.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-22 17:24:23 +02:00
Stefan Prodan 89017ca9cc
Merge pull request #250 from fluxcd/retry-interval
Allow failed reconciliations to be scheduled at a different interval
2021-01-22 17:06:22 +02:00
Stefan Prodan 0e0277aaef
Update RetryInterval description
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-22 16:22:37 +02:00
Stefan Prodan e5c93965a5
Add reconciliation unit test
Verify that objects are create in cluster and labeled accordingly

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-22 15:52:19 +02:00
Stefan Prodan dfba88ccc1
Requeue a failed reconciliation based on retry interval
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-22 15:50:45 +02:00
Stefan Prodan 4df56cb7ab
Add RetryInterval as optional field to API
The spec.retryInterval is the interval at which to retry a previously failed reconciliation.
When not specified, it defaults to the spec.interval value.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-22 15:48:28 +02:00
Stefan Prodan ba979afdd7
Merge pull request #249 from fluxcd/fix/test-kubeconfig
Specify kubeconfig in tests
2021-01-22 14:50:55 +02:00
Philip Laine 26a46c9855 Specify kubeconfig in tests
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2021-01-22 12:50:04 +01:00
Stefan Prodan 2a2ca32e7f
Merge pull request #248 from fluxcd/source-controller/api-v0.7.0
Update source-controller/api to v0.7.0
2021-01-21 19:57:23 +02:00
Stefan Prodan 95cf7ddba4
Update source-controller/api to v0.7.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-21 18:37:40 +02:00
Stefan Prodan 360a9ec612
Merge pull request #247 from fluxcd/flux-runtime-v0.8.0
Update fluxcd/pkg/runtime to v0.8.0
2021-01-21 13:47:39 +02:00
Stefan Prodan 62a764a28e
Use the object reference type from fluxcd/pkg/meta
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-21 13:24:32 +02:00
Stefan Prodan 9a7185e3c3
Update fluxcd/pkg/runtime to v0.8.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-21 13:08:41 +02:00
Stefan Prodan 00255603bd
Merge pull request #245 from fluxcd/release-v0.6.3
Release v0.6.3
2021-01-19 16:26:11 +02:00
Stefan Prodan 848c3f3b59
Release v0.6.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-19 15:44:04 +02:00
Stefan Prodan 3a09ac62ec
Merge pull request #241 from fluxcd/kustomize/api-v0.7.2
Update kustomize/api to v0.7.2 and disable kyaml
2021-01-19 12:22:45 +02:00
Stefan Prodan 085588b632
Disable kyaml
Workaround for upstream bug: https://github.com/kubernetes-sigs/kustomize/issues/3446

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-18 14:14:23 +02:00
Stefan Prodan 7859a639ed
Update kustomize/api to v0.7.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-17 22:00:51 +02:00
Stefan Prodan 276c901531
Merge pull request #240 from fluxcd/k8s.io/api-v0.20.2
Update Kubernetes packages to v1.20.2
2021-01-16 16:10:56 +02:00
Stefan Prodan d58bff0fe6
Update Kubernetes packages to v1.20.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-16 15:53:45 +02:00
Hidde Beydals 3463b969b6
Merge pull request #239 from fluxcd/release-v0.6.2
Release v0.6.2
2021-01-15 16:11:36 +01:00
Hidde Beydals a4b61edb1a Release v0.6.2
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-01-15 15:54:37 +01:00
Hidde Beydals 80c216921f
Merge pull request #238 from fluxcd/accept-all-kustomization-filenames
Look for all accepted Kustomization filenames
2021-01-15 15:48:54 +01:00
Hidde Beydals 59c24e7d38 Look for all accepted Kustomization filenames
Before this commit we only checked if a `kustomization.yaml` existed at
the root of the given directory, this caused problems when people for
example used `.yml` as the extension, as the generated
`kustomization.yaml` would conflict with the `.yml` file.

After this commit all recognized Kustomization filenames as listed by
Kustomize itself are accepted, including files _without_ an extension
(`Kustomization`).

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-01-15 15:31:20 +01:00
Hidde Beydals ecff7ea4e0
Merge pull request #235 from fluxcd/release-v0.6.1
Release v0.6.1
2021-01-14 18:52:25 +01:00
Hidde Beydals 04a4f46a54 Release v0.6.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-01-14 15:30:29 +01:00
Hidde Beydals 0f6129b3c8
Merge pull request #234 from fluxcd/upgrade-runtime-v0.6.1 2021-01-14 12:58:55 +01:00
Hidde Beydals 49dbba4d7a Upgrade source-controller API to v0.6.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-01-14 12:44:15 +01:00
Hidde Beydals c6353b4afd Upgrade runtime package to v0.6.2
To include a bug fix to the `ReconcilateAtChangedPredicate`
and renaming to `ReconcileRequestedPredicate`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-01-14 12:34:10 +01:00
Stefan Prodan c7f7fda0d9
Merge pull request #233 from playertwo/main
Add QPS and Burst kube api client parameters as CLI arguments
2021-01-13 17:40:56 +02:00
playertwo 51237cae00 Add QPS and Burst kube api client parameters as CLI arguments
Signed-off-by: playertwo <842517+playertwo@users.noreply.github.com>
2021-01-13 18:10:12 +03:00
Stefan Prodan 5356194f5a
Merge pull request #232 from fluxcd/release-v0.6.0
Release v0.6.0
2021-01-12 15:32:57 +02:00
Stefan Prodan 675ba9a033
Release v0.6.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-12 15:17:45 +02:00
Stefan Prodan 786a620515
Merge pull request #231 from fluxcd/source-controller/api-v0.6.0
Update source API and kubectl
2021-01-12 14:36:23 +02:00
Stefan Prodan eb17062fe6
Update e2e tests to source-controller v0.6.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-12 14:21:03 +02:00
Stefan Prodan e86528f3bc
Update kubectl to v1.20.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-12 13:46:13 +02:00
Stefan Prodan ac74d002cc
Update source-controller/api to v0.6.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-12 13:45:49 +02:00
Hidde Beydals c328b51cac
Merge pull request #230 from fluxcd/multi-arch-image
Publish as single multi-arch Docker image
2021-01-11 13:42:05 +01:00
Hidde Beydals 74ee869133 Publish as single multi-arch Docker image
This commit bundles the `kustomize-controller:$VER-arm64` ARM image tag
range that was previously released separately with the
`kustomize-controller:$VER` image, as GitHub now provides us insights
into image layer statistics.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-01-11 12:57:25 +01:00
Stefan Prodan 607ade6ea6
Merge pull request #229 from fluxcd/kustomize/api-v0.7.1
Update kustomize/api to v0.7.1
2021-01-11 12:51:35 +02:00
Stefan Prodan faeea742ee
Update kustomize/api to v0.7.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-11 12:37:41 +02:00
Stefan Prodan bb419bc506
Merge pull request #221 from fluxcd/controller-runtime-update
Upgrade controller-runtime to v0.7.0
2021-01-11 12:26:12 +02:00
Stefan Prodan 5a0e5abd9a
Setup impersonation for GC and health checks
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 11:51:04 +02:00
Stefan Prodan 6b9db36a49
Update fluxcd/pkg/runtime to v0.6.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 11:50:59 +02:00
Stefan Prodan 696f91d380
Refactor impersonation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 11:50:59 +02:00
Stefan Prodan f14cd2323c
Upgrade controller-runtime to v0.7.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 11:50:58 +02:00
Stefan Prodan 428493f111
Merge pull request #224 from mflendrich/fix-223
No longer treat dirs as kustomization files
2021-01-04 09:56:26 +02:00
Michał Flendrich af358709f5 No longer treat dirs as kustomization files.
Fixes https://github.com/fluxcd/kustomize-controller/issues/223

Signed-off-by: Michał Flendrich <michal@flendrich.pro>
2020-12-24 21:04:38 +01:00
Stefan Prodan 072cd12aa9
Merge pull request #222 from fluxcd/release-v0.5.3
Release v0.5.3
2020-12-18 12:37:33 +02:00
Stefan Prodan 73611c988d
Release v0.5.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-18 12:23:47 +02:00
Stefan Prodan f0a31470c9
Merge pull request #220 from nlamirault/feat/sops-errors
Add SOPS user error to logs
2020-12-17 20:39:11 +02:00
Nicolas Lamirault 460eae2a2d
Add: Sops user error
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
2020-12-17 19:07:31 +01:00
Stefan Prodan 5efc06838a
Merge pull request #218 from fluxcd/gc-debug
Add debug logs to garbage collection
2020-12-17 11:37:03 +02:00
Stefan Prodan b7db5cb6ab
Merge pull request #219 from ordovicia/emit-healthcheck-when-was-unready
Emit healthcheck event when Kustomization was not ready
2020-12-17 11:06:06 +02:00
Hidehito Yabuuchi 8b132d18be Emit healthcheck event when Kustomization was not ready
Signed-off-by: Hidehito Yabuuchi <hdht.ybuc@gmail.com>
2020-12-17 17:50:05 +09:00
Stefan Prodan fe3cc52e37
Add debug logs to garbage collection
Log the GC query errors to help diagnose objects skipped from pruning

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-17 10:39:51 +02:00
Stefan Prodan 37e1c98473
Merge pull request #215 from fluxcd/release-v0.5.2
Release v0.5.2
2020-12-16 17:28:11 +02:00
Stefan Prodan 23ce057821
Release v0.5.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-16 17:11:51 +02:00
Stefan Prodan 8be1e169d2
Merge pull request #210 from fluxcd/gc-prune
Refactor garbage collection
2020-12-16 16:29:37 +02:00
Stefan Prodan a7138076b0
Pin controller-runtime to v0.6.3
Avoid v0.6.4 bug where custom resources can't be converted to v1.ListOptions

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-16 16:01:01 +02:00
Hidde Beydals 6a3c585e3f
Merge pull request #211 from fluxcd/safe-rel-path 2020-12-16 13:31:47 +01:00
Stefan Prodan 88b6d40ef5
Increase termination grace period to 1m
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-16 14:28:42 +02:00
Hidde Beydals d7a0deac97 Write KubeConfig to tmp file in working dir
Instead of using the name of the secret, as this can cause unexpected
collisions in edge case scenarios.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-16 12:59:19 +01:00
Hidde Beydals 69a7e75a91 Make Path an optional field and remove validation
As due to secure joins, the requirement on both providing a path
and/or requiring it to be in a certain format offers little value
over the UX experience of not having to provide it when you just
want to reconcile whatever can be found in the root of the source
reference.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-16 12:44:13 +01:00
Hidde Beydals 6a4bf74cf3 Add safe guards for relative paths
This commit ensures that relative (user configurable) paths never
traverse outside their working directory.

It does _not_ provide protection against path traversal within
`kustomization.yaml` files.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-16 12:44:13 +01:00
Stefan Prodan 59845b0891
Refactor garbage collection
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-16 13:09:30 +02:00
Stefan Prodan 8296b8e1f1
Merge pull request #206 from fluxcd/release-v0.5.1
Release v0.5.1
2020-12-14 18:18:55 +02:00
Stefan Prodan df525d4633
Release v0.5.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-14 17:56:17 +02:00
Stefan Prodan 45c0809024
Merge pull request #205 from fluxcd/filter-apply-errors
Refactor apply error reporting
2020-12-14 17:48:25 +02:00
Stefan Prodan d65ea71699
Refactor apply error reporting
- filter kubectl apply output and extract errors
- limit apply output to 20K charts (avoid reaching max etcd size)
- log kubectl exit code when the process is killed

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-14 17:34:55 +02:00
Hidde Beydals 4da53d13a1
Merge pull request #201 from fluxcd/upgrade-deps
Upgrade source-controller to v0.5.2
2020-12-11 15:14:39 +01:00
Hidde Beydals 0615bb6138 Upgrade source-controller to v0.5.2
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-11 14:54:15 +01:00
Stefan Prodan e950a9db3f
Merge pull request #200 from fluxcd/fix-changelog
Fix changelog PR links
2020-12-11 15:46:41 +02:00
Stefan Prodan a8b90ee996
Fix changelog PR links
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-11 15:19:59 +02:00
Stefan Prodan d94d36c0a2
Merge pull request #199 from fluxcd/release-v0.5.0
Release v0.5.0
2020-12-11 14:14:04 +02:00
Stefan Prodan b09af484ec
Release v0.5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-11 13:54:43 +02:00
Stefan Prodan b6344b91c5
Merge pull request #198 from fluxcd/kustomize-pkg-update
Update kustomize/api to v0.7.0
2020-12-11 11:57:01 +02:00
Stefan Prodan faa2fff7b4
Update kustomize/api to v0.7.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-11 11:41:14 +02:00
Stefan Prodan afeb51dc80
Merge pull request #195 from fluxcd/update-pkg
Upgrade dependencies
2020-12-10 20:09:05 +02:00
Stefan Prodan 1438ef8735
Upgrade dependencies
- `github.com/fluxcd/pkg/apis/meta` to `v0.5.0`
- `github.com/fluxcd/pkg/runtime` to `v0.4.0`
- `github.com/fluxcd/source-controller/api` to `v0.5.1`
- `k8s.io/{api,apiextensions-apiserver,apimachinery,cli-runtime,client-go}` to `v0.19.4`
- `sigs.k8s.io/controller-runtime` to `v0.6.4`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-10 19:48:41 +02:00
Stefan Prodan 814dc3d4b0
Merge pull request #194 from SomtochiAma/override-image
Implement container image setters
2020-12-10 16:30:41 +02:00
Somtochi Onyekwere ddc4eb631e Adds e2e tests for image override
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2020-12-10 14:59:20 +01:00
Somtochi Onyekwere 5e62583cec Implements image overrides
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2020-12-10 13:23:55 +01:00
Somtochi Onyekwere 5b3d8df5b5 Add image type to API spec
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2020-12-10 13:23:55 +01:00
Somtochi Onyekwere 3ebf16cbbb Updates doc with API spec for images
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2020-12-10 13:23:55 +01:00
Michael Bridgen bbf5f2e5ed
Merge pull request #189 from fluxcd/flux2-team
Share fluxcd/flux2 maintainers
2020-12-01 12:19:03 +00:00
Michael Bridgen 4381276396 Share fluxcd/flux2 maintainer
See https://github.com/fluxcd/flux2/discussions/515.

Signed-off-by: Michael Bridgen <michael@weave.works>
2020-11-30 13:31:53 +00:00
Stefan Prodan 461c1ce492
Merge pull request #188 from fluxcd/docs-dependson
Use cert-manager example for dependsOn docs
2020-11-30 10:26:22 +02:00
Stefan Prodan 962f02ad65
Use cert-manager example for dependsOn docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-29 16:09:29 +02:00
Stefan Prodan 75e927a56a
Merge pull request #186 from fluxcd/release-v0.4.0
Release v0.4.0
2020-11-26 18:04:55 +02:00
Stefan Prodan b46bda7eb8
Release v0.4.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-26 17:47:31 +02:00
Stefan Prodan 9190c76aef
Merge pull request #185 from fluxcd/fix-suspended
Remove default value from suspend field
2020-11-26 15:06:27 +02:00
Stefan Prodan 26c125990a
Merge pull request #184 from sylr/field-manager
Set --field-manager when applying
2020-11-26 15:06:10 +02:00
Sylvain Rabot 3f34e450ec
Set --field-manager when applying
Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
2020-11-26 13:32:26 +01:00
Stefan Prodan 53e31d663f
Remove default value from suspend field
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-26 14:17:38 +02:00
Stefan Prodan 6a55d5db72
Merge pull request #183 from fluxcd/suspend
Do not mark suspended resource as not ready
2020-11-26 11:29:31 +02:00
Stefan Prodan bed1418a01
Setup probes with runtime helpers
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-26 09:51:59 +02:00
Stefan Prodan 5a9e122e77
Set progressing after source readiness check
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-26 09:29:34 +02:00
Stefan Prodan 2312d69a51
Do not mark suspended resource as not ready
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-26 09:00:52 +02:00
Stefan Prodan 200d4c0fb6
Merge pull request #182 from fluxcd/nterval
Requeue after interval on source not found errors
2020-11-24 13:02:54 +02:00
Stefan Prodan 73546e92d2
Requeue after interval on source not found errors
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-24 11:35:47 +02:00
Stefan Prodan 229b850107
Merge pull request #181 from fluxcd/release-v0.3.0
Release v0.3.0
2020-11-20 12:56:25 +02:00
Stefan Prodan baf02a291f
Release v0.3.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-20 12:40:56 +02:00
Stefan Prodan 59b113467f
Merge pull request #180 from fluxcd/sa
Use ServiceAccountName for impersonation
2020-11-20 12:13:25 +02:00
Stefan Prodan 8f7f0d8c8f
Document that KubeConfig takes precedence over ServiceAccountName
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-20 11:34:35 +02:00
Stefan Prodan c150d15251
Add impersonation e2e test
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-20 11:22:28 +02:00
Stefan Prodan 0c9170241f
Use ServiceAccountName for impersonation
Drop the ServiceAccount field in favour of ServiceAccountName to prevent privilege escalation in multi-tenancy environments.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-20 10:58:24 +02:00
Stefan Prodan 41a8a7eaf9
Merge pull request #174 from relu/adopt-k8s-conditions
Refactor to adopt k8s standardized Condition type
2020-11-19 20:32:22 +02:00
Aurel Canciu ac6cc88e29
Refactor to adopt k8s standardized Condition type
Updates to use metav1.Condition type and removes references for
deprecated corev1.Condition* constants and uses the new k8s api/meta
helpers in place of the old pkg/apis/meta types.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-19 19:49:04 +02:00
Stefan Prodan d854a830e0
Merge pull request #178 from fluxcd/aws-fix
Add fsGroup to security context
2020-11-19 15:45:07 +02:00
Stefan Prodan 1a0836b9ea
Add fsGroup to security context
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-19 15:17:23 +02:00
Hidde Beydals c584ec0c78
Merge pull request #177 from fluxcd/prune-readiness-deletion-timestamp
Use DeletionTimestamp for prune and readiness
2020-11-19 12:48:52 +01:00
Hidde Beydals c53e5eeab2 Use DeletionTimestamp for prune and readiness
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-11-19 12:23:48 +01:00
Stefan Prodan bb5142c89e
Merge pull request #176 from kowalczykp/extend-kustomization-gen-docs
Add docs for excluding non-k8 YAML files in kustomization generation
2020-11-18 12:27:18 +02:00
Paweł Kowalczyk 36909aa2e4 Add docs for excluding non-k8 YAML files in kustomization generation
Signed-off-by: Paweł Kowalczyk <kowalczyk.paw@gmail.com>
2020-11-18 10:27:59 +01:00
Stefan Prodan cfcbbfdcee
Merge pull request #172 from fluxcd/release-v0.2.2
Release v0.2.2
2020-11-12 15:51:03 +02:00
Stefan Prodan 97187edc4e
Release v0.2.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-12 15:35:10 +02:00
Stefan Prodan 203bc942bb
Merge pull request #171 from fluxcd/status-patch
Patch status sub-resource
2020-11-12 13:27:51 +02:00
Stefan Prodan 5aded37954
Patch status sub-resource
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-12 13:04:16 +02:00
Stefan Prodan d7a07160fc
Merge pull request #170 from fluxcd/kustomize-api-v0.6.5
Update kustomize/api to v0.6.5
2020-11-12 12:54:49 +02:00
Stefan Prodan 04712ac7ee
Update kustomize/api to v0.6.5
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-12 12:36:35 +02:00
Stefan Prodan b02e0f695d
Merge pull request #168 from fluxcd/validation-none
Allow disabling validation
2020-11-12 12:31:34 +02:00
Stefan Prodan 2ba6252d76
Allow disabling validation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-12 12:18:04 +02:00
Stefan Prodan a3a743e9cc
Merge pull request #169 from fluxcd/kind-update
Update engineerd/setup-kind to v0.5.0
2020-11-12 12:16:22 +02:00
Stefan Prodan b0917e332e
Update engineerd/setup-kind to v0.5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-12 11:57:58 +02:00
Stefan Prodan 749c067775
Merge pull request #166 from tvi/patch-1
docs: minor typo fix
2020-11-08 09:43:01 +02:00
Tomas Virgl eba1c5e389 docs: minor typo fix
Signed-off-by: Tomas Virgl <tomas@virgl.net>
2020-11-08 00:55:00 +01:00
Stefan Prodan c2b5e2bed6
Merge pull request #165 from fluxcd/release-v0.2.1
Release v0.2.1
2020-11-04 16:04:31 +02:00
Stefan Prodan 1668fe935f
Release v0.2.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-04 15:46:41 +02:00
Stefan Prodan 68df7100c3
Merge pull request #164 from fluxcd/status-update
Use latest generation when updating final status
2020-11-04 14:35:58 +02:00
Stefan Prodan 8ec066bf37
Use latest generation when updating final status
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-04 13:04:01 +02:00
Stefan Prodan 0f635d2669
Merge pull request #162 from fluxcd/omit-gc-label
Omit checksum label if GC is disabled
2020-11-03 17:12:21 +02:00
Stefan Prodan d8caeb7cec
Remove unused code
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-03 16:07:44 +02:00
Stefan Prodan 97cef5a84e
Add labels and selector example to docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-03 15:44:54 +02:00
Stefan Prodan 46f828ff43
Omit checksum label if GC is disabled
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-03 15:22:25 +02:00
Stefan Prodan 5f697457c9
Merge pull request #161 from relu/k8s-1.19
Update k8s to 1.19 + kustomize 0.6.4
2020-11-02 12:20:00 +02:00
Aurel Canciu fc85f6f746
Update pkg components & k8s 1.19, kustomize 0.6.4
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-01 18:14:07 +02:00
Stefan Prodan a562eb0de6
Merge pull request #159 from cit-consulting/main
Add openssh client to support git+ssh Kustomize resources
2020-10-29 16:17:56 +02:00
Vladimir Konkov 44dec24309 add openssh client to support git+ssh Kustomize resources
Signed-off-by: Vladimir Konkov <vkonkov@citc.ru>
2020-10-29 16:38:23 +03:00
Stefan Prodan 3944752e82
Merge pull request #157 from fluxcd/release-v0.2.0
Release v0.2.0
2020-10-29 14:17:18 +02:00
Stefan Prodan 72a3aa4d2f
Release v0.2.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-29 14:03:06 +02:00
Hidde Beydals 5f76a28ef3
Merge pull request #156 from fluxcd/refactor-predicates-enqueuers 2020-10-28 22:57:55 +01:00
Hidde Beydals 26db48b9f0 Compare artifact <> Kustomizations in enqueuers
The reason for this is the `EnqueueRequestsFromMapFunc` calling the
enqueuer for _both_ the old and the new object, and we only want to act
on the ones that contain a revision different from the one that we have
recorded in the status object of the `Kustomization`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-28 22:36:34 +01:00
Hidde Beydals 752b6b6bf1 Bundle revision change predicates into one
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-28 21:56:44 +01:00
Hidde Beydals debbebde60
Merge pull request #155 from fluxcd/log-reconcile-reqs 2020-10-28 13:49:32 +01:00
Hidde Beydals 824af43beb Add Kustomization finalizers permissions
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-28 13:31:08 +01:00
Hidde Beydals 6bd8971cec Re-add status GET permissions
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-28 13:21:53 +01:00
Hidde Beydals e8d2c31b40 Log reconciliation requests by watcher
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-28 13:11:17 +01:00
Stefan Prodan 31e4da9744
Merge pull request #154 from fluxcd/copyright
Change copyright to Flux authors
2020-10-27 19:09:18 +02:00
Stefan Prodan dde74d9ea5
Change copyright to Flux authors
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-27 18:49:02 +02:00
Hidde Beydals 2c3c8a97f5
Merge pull request #153 from fluxcd/watch-in-controller
Move dedicated watchers to in-controller watches
2020-10-27 14:37:29 +01:00
Hidde Beydals 2b861622b1 Move dedicated watchers to in-controller watches
This prevents the resources from getting annotated, and instead uses
the `handler.EnqueueRequestsFromMapFunc` to queue requests based on
changes to the source objects.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-27 13:05:34 +01:00
Stefan Prodan 8bb4f4c80b
Merge pull request #151 from ordovicia/supress-healthchecks-when-no-changes
Suppress health check events when no changes made
2020-10-22 14:54:43 +03:00
Stefan Prodan 423dc6850f
Merge pull request #152 from fluxcd/use-annotation-helpers
Use annotation helpers
2020-10-22 14:54:29 +03:00
Michael Bridgen 3ca1bf2f16 Cross-reference anything from apis/meta to godoc
This means ReconcileRequestStatus is also given a link to the godoc,
as a consolation for not having its field inlined.
2020-10-22 12:02:19 +01:00
Michael Bridgen e78726f97c Factor out requestReconciliation
There were two of these methods, identical aside from the receiver --
and the requirement on the receiver was just that it was a client that
knows the Kustomization type.
2020-10-22 11:37:13 +01:00
Michael Bridgen b8d71327f7 Use reconcile request annotation helpers
Per https://github.com/fluxcd/pkg/issues/39
2020-10-22 11:37:13 +01:00
Hidehito Yabuuchi 5ed7463552 Suppress health check events regardless of dependencies
Because if a dependency is failing, the reconciliation will never get to
the health check part.
2020-10-21 19:28:44 +09:00
Hidde Beydals 81a990f05c
Merge pull request #150 from fluxcd/finalizer-checks 2020-10-21 12:07:27 +02:00
Hidehito Yabuuchi 4df55dde11 Suppress health check events when no changes made 2020-10-21 19:05:04 +09:00
Hidde Beydals 546cbdd78f Setup health and ready endpoints 2020-10-21 11:52:50 +02:00
Hidde Beydals 3315e66586 Switch to controller-runtime utils for finalizers 2020-10-21 11:15:30 +02:00
Stefan Prodan 198eda8e1f
Merge pull request #148 from fluxcd/docs/improve-kubeconfig-docs
Improve remote cluster documentation
2020-10-20 15:33:13 +03:00
Hidde Beydals 154560f60e Improve remote cluster documentation
To highlight the fact that it works with just a KubeConfig, and not just
CAPI.
2020-10-20 14:03:53 +02:00
Stefan Prodan df3af2949e
Merge pull request #147 from fluxcd/release-v0.1.2
Release v0.1.2
2020-10-16 15:25:02 +03:00
Stefan Prodan e847dd5beb
Release v0.1.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-16 14:48:45 +03:00
Stefan Prodan c0c960008a
Merge pull request #146 from fluxcd/remote-cluster-docs
Update remote cluster docs
2020-10-16 13:02:40 +03:00
Stefan Prodan 028c368975
Add targeting non-capi clusters to docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-16 12:40:17 +03:00
Stefan Prodan fafe8539c7
Update fossa and add rebase action
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-16 12:39:29 +03:00
Stefan Prodan fd47af2ec1
Merge pull request #135 from stealthybox/gc-healthcheck-kubeconfig
Implement non-caching, per-kustomization GC-client/statusPoller for cross-cluster kubeconfigs
2020-10-16 11:52:05 +03:00
leigh capili ceb439d13c Document Kustomization.spec.kubeConfig for Cluster API 2020-10-15 09:44:44 -06:00
leigh capili 7a1c06571a Implement non-caching, per-kustomization GC-client/statusPoller for cross-cluster kubeconfigs 2020-10-15 09:44:44 -06:00
Stefan Prodan 7ec444545b
Merge pull request #145 from fluxcd/fix-error-event
Set correct status on failure events
2020-10-15 16:29:52 +03:00
Stefan Prodan e1c7fb1bd0
Merge pull request #143 from fluxcd/yaml-validation
Validate manifests when generating kustomization.yaml
2020-10-15 16:23:00 +03:00
Stefan Prodan 40b4f9e452
Merge pull request #141 from fluxcd/fix-source-404
Fix status reporting when the source is not found
2020-10-15 16:20:35 +03:00
Stefan Prodan 826051ac54
Set correct status on failure events
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-15 16:12:58 +03:00
Stefan Prodan ec0c43d311
Validate manifests when generating kustomization.yaml
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-15 14:18:20 +03:00
Stefan Prodan 4fc1466443
Fix status reporting when the source is not found
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-15 10:12:06 +03:00
Stefan Prodan 2a2cee36ac
Update e2e to source-controller v0.1.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-14 19:35:58 +03:00
Stefan Prodan 41796c036f
Merge pull request #140 from fluxcd/release-v0.1.1
Release v0.1.1
2020-10-13 18:15:50 +03:00
Stefan Prodan 2125d6c938
Release v0.1.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-13 17:59:46 +03:00
Stefan Prodan 9feda00bb4
Merge pull request #139 from fluxcd/docs-add-ns
Add namespace to API docs examples
2020-10-13 17:41:33 +03:00
Stefan Prodan 4b6ca1dbf4
Add namespace to API docs examples
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-13 17:26:10 +03:00
Stefan Prodan 43c99d22f0
Merge pull request #138 from fluxcd/metrics
Implement Prometheus instrumentation
2020-10-13 13:22:13 +03:00
Stefan Prodan d4cef2f046
Use events and metrics from fluxcd/pkg/runtime
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-13 12:37:45 +03:00
Stefan Prodan deb902a13f
Record reconcile duration as Prometheus histogram
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-13 09:50:00 +03:00
Stefan Prodan a82352e892
Make the condition metric exporter generic
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-13 08:42:04 +03:00
Stefan Prodan b2d19e469f
Set ready metric to unknown when condition is missing
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-09 18:53:49 +03:00
Stefan Prodan ef360ebc3e
Add metrics recorder test
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-09 18:47:59 +03:00
Stefan Prodan 6223abdd06
Record the ready status as Prometheus metric
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-09 16:27:43 +03:00
Stefan Prodan d5b1df4ee6
Merge pull request #137 from fluxcd/kustomize-api-v0.6.3
Update kustomize/api to v0.6.3
2020-10-08 15:08:13 +03:00
Stefan Prodan 627d186764
Update API version in readme
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-08 14:48:00 +03:00
Stefan Prodan c9e89aac90
Update kustomize/api to v0.6.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-08 14:47:04 +03:00
Hidde Beydals 9be9ca924c
Merge pull request #134 from fluxcd/build/fluxcd-pkg-main
Use GitHub actions from fluxcd/pkg@main
2020-10-06 09:56:19 +02:00
Hidde Beydals b93ca7558d Use GitHub actions from fluxcd/pkg@main
As `master` was replaced with `main`.
2020-10-06 09:39:00 +02:00
Stefan Prodan 16cfb31d93
Merge pull request #133 from fluxcd/main-branch
Set default branch to main
2020-10-05 16:00:43 +03:00
stefanprodan d15726935a Set default branch to main 2020-10-05 15:41:20 +03:00
Stefan Prodan 89781b049c
Merge pull request #132 from phillebaba/helm-bug-doc
Update health check docs
2020-10-05 15:21:01 +03:00
Philip Laine 9e03c57fab Update health check docs 2020-10-04 12:19:00 +02:00
Stefan Prodan 2fe3c008e1
Merge pull request #131 from fluxcd/gotk-system
Set default namespace to gotk-system
2020-10-02 16:48:36 +03:00
stefanprodan 1184614239 Set default namespace to gotk-system 2020-10-02 16:24:00 +03:00
Stefan Prodan 8e16bd4c92
Merge pull request #130 from fluxcd/release-v0.1.0
Release v0.1.0
2020-09-30 20:57:25 +03:00
stefanprodan 5a3422d5a8 Release v0.1.0 2020-09-30 20:01:55 +03:00
Stefan Prodan 4b445a9128
Merge pull request #129 from fluxcd/api-v1beta1
Promote the kustomize.toolkit.fluxcd.io API to v1beta1
2020-09-30 19:39:55 +03:00
stefanprodan 50104826ae Promote API to v1beta1 2020-09-30 19:10:27 +03:00
Stefan Prodan 5830894058
Merge pull request #128 from fluxcd/meta-api
Implement `fluxcd/pkg/meta/api` in APIs
2020-09-30 14:21:09 +03:00
stefanprodan 7b8fef2984 Implement `fluxcd/pkg/meta/api` in APIs 2020-09-30 14:01:17 +03:00
Stefan Prodan de960c741a
Merge pull request #126 from fluxcd/capi-kubeconfig
Implement reconciliation for remote clusters provisioned with CAPI
2020-09-30 12:10:09 +03:00
stefanprodan 4a283d74b4 Implement reconciliation on remote clusters 2020-09-30 11:36:37 +03:00
stefanprodan 2da8d7ca0c Add KubeConfig field to API 2020-09-30 01:00:44 +03:00
Stefan Prodan ed929826dd
Merge pull request #124 from fluxcd/last-handled-reconcile-at
Record last handled reconcile at annotation
2020-09-29 22:05:37 +03:00
stefanprodan 45bfe6dfe5 Record last handled reconcile at annotation 2020-09-29 21:14:19 +03:00
Stefan Prodan 1b20d255a8
Merge pull request #123 from fluxcd/target-namespace
Implement namespace overriding
2020-09-29 20:31:48 +03:00
stefanprodan e5e2cd7dcb Implement namespace overriding 2020-09-29 18:56:24 +03:00
stefanprodan a0f705ff6e Add TargetNamespace to API 2020-09-29 15:38:47 +03:00
Stefan Prodan b5c7744714
Merge pull request #121 from fluxcd/release-v0.0.13
Release v0.0.13
2020-09-22 13:27:44 +03:00
stefanprodan 4b2f8b187d Release v0.0.13 2020-09-22 13:13:20 +03:00
Stefan Prodan 3e83c96e50
Merge pull request #119 from fluxcd/arm-v7
Publish ARM v7/v8 multi-arch image to GHCR
2020-09-21 10:03:21 +03:00
stefanprodan b1785349c7 Publish ARM v7/v8 multi-arch image to GHCR 2020-09-21 09:47:15 +03:00
Stefan Prodan e9e9719c04
Merge pull request #117 from fluxcd/s3-bucket-source
Add support for S3 bucket sources
2020-09-21 09:08:34 +03:00
stefanprodan 36fd99a7e4 Update Update kustomize/kyaml to v0.8.1 2020-09-20 09:38:30 +03:00
stefanprodan 1b377ce594 Add S3 source to diagram 2020-09-19 15:26:08 +03:00
stefanprodan 1978f987de Update kustomize/api to v0.6.1 2020-09-19 15:16:36 +03:00
stefanprodan 0d6f715efc Add support for S3 bucket sources 2020-09-19 13:32:38 +03:00
Stefan Prodan c907900cef
Merge pull request #118 from phillebaba/feature/succeeded-event
Send event when reconcile succeeds with update metadata
2020-09-19 13:31:01 +03:00
Philip Laine 8fed231d2b Change event message 2020-09-19 11:53:17 +02:00
Philip Laine cff825d6cf Send event when reconcile succeeds with update metadata 2020-09-19 11:53:15 +02:00
Stefan Prodan ac340ef134
Merge pull request #115 from fluxcd/ci-check-images
ci: Add sanity check for container images
2020-09-18 11:00:38 +03:00
stefanprodan 920522d628 ci: Add sanity check for container images 2020-09-17 20:12:40 +03:00
Stefan Prodan 9b5ab7510a
Merge pull request #114 from fluxcd/ready-reason
Normalize the ready condition reasons
2020-09-17 12:57:23 +03:00
Stefan Prodan a4106710f7
Merge pull request #113 from idvoretskyi/idvoretskyi-fossa
FOSSA scan enabled
2020-09-17 12:38:31 +03:00
stefanprodan 81e1c38a1f Add the API package to release docs 2020-09-17 12:24:23 +03:00
stefanprodan 2b9370e658 Normalize the ready condition reasons
- use reconciliation instead of apply for condition reasons
- add the reconciliation errors to the condition message
- trim the condition message to 4000 characters
- update the API docs and readme with the new condition reasons
2020-09-17 12:23:50 +03:00
Ihor Dvoretskyi 26f87422e5 FOSSA scan enabled
Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
2020-09-16 16:06:10 +00:00
Stefan Prodan b570fa0d92
Merge pull request #112 from fluxcd/gc-checksum
Use manifests checksum in GC snapshot
2020-09-16 14:00:32 +03:00
stefanprodan fcd0155550 Add the deleted object kind to GC events 2020-09-16 10:39:34 +03:00
stefanprodan 1679d9cd35 Label objects with the kustomization name/namespace 2020-09-16 10:00:14 +03:00
stefanprodan 544e7cf0eb Use manifests checksum in GC snapshot 2020-09-16 09:34:22 +03:00
Hidde Beydals 5e13402483
Merge pull request #111 from fluxcd/feature/deps-in-ns 2020-09-15 15:35:12 +02:00
Hidde Beydals 118dcbb9d8 api-docs: add overwrites for external packages 2020-09-15 15:19:53 +02:00
Hidde Beydals e46add39ed Support dependency references to other namespaces 2020-09-15 15:18:34 +02:00
Stefan Prodan 1aecc2eb4b
Merge pull request #110 from fluxcd/kubectl-cache
Set kubectl cache dir to /tmp
2020-09-15 13:49:37 +03:00
stefanprodan df1761f8f5 Set kubectl cache dir to /tmp 2020-09-15 13:28:14 +03:00
Stefan Prodan e30707ec1a
Merge pull request #109 from fluxcd/release-v0.0.12
Release v0.0.12
2020-09-14 15:51:21 +03:00
stefanprodan f34a4df7ec Release v0.0.12 2020-09-14 15:02:44 +03:00
Stefan Prodan e4f6f38633
Merge pull request #108 from fluxcd/health-checks-docs
Update health assessment docs
2020-09-14 12:20:33 +03:00
stefanprodan 3bf2c497cd Update health check docs
Add kstatus compatible kinds to health assessment section
2020-09-14 10:49:59 +03:00
stefanprodan 9363703634 Refactor kstatus health check 2020-09-14 10:48:24 +03:00
Stefan Prodan d105ecff2f
Merge pull request #101 from phillebaba/feature/kstatus
Implement kstatus for health checks
2020-09-14 09:43:24 +03:00
Philip Laine 042f9dcbae Change poll rate 2020-09-13 15:41:20 +02:00
Stefan Prodan d45a435ec4
Merge pull request #107 from fluxcd/release-v0.0.11
Release v0.0.11
2020-09-12 11:37:55 +03:00
stefanprodan b7f15191ed Release v0.0.11 2020-09-12 11:22:25 +03:00
stefanprodan 9e91d2123d Update source-controller/api to v0.0.16 2020-09-12 11:12:16 +03:00
Stefan Prodan ea9f542164
Merge pull request #106 from fluxcd/watch-all-namespaces
Add watch all namespaces flag
2020-09-11 16:14:06 +03:00
stefanprodan d8fcc297ef Add watch all namespaces flag 2020-09-11 15:52:50 +03:00
Stefan Prodan ab56cdf489
Merge pull request #105 from fluxcd/rbac-patch-events
Include PATCH rule for events in manager-role
2020-09-11 09:20:06 +03:00
Hidde Beydals 9140483c8d Include PATCH rule for events in manager-role
During high custom resource count / low interval tests, I was greated
with a `cannot patch resource "events"` message. This happened due to
event compaction, where it will perform a patch instead of a create.
By giving the role the permission to do so this should no longer pose
a problem.
2020-09-10 21:19:44 +02:00
Hidde Beydals 681d858257 Tweak `make manifest` target to reenable RBAC gen 2020-09-10 21:18:41 +02:00
Stefan Prodan 845947c814
Merge pull request #103 from fluxcd/use-pkg-for-runtime-bits
Use annotation and predicate from fluxcd/pkg
2020-09-10 15:56:20 +03:00
Michael Bridgen 47f5d0b4b0 Use annotation and predicate from fluxcd/pkg
The reconcileAt annotation and the predicate that recognises it are
now in fluxcd/pkg/runtime. This removes (near) duplicate definitions
in favour of using those.
2020-09-10 13:43:49 +01:00
Stefan Prodan 1c59cdb34a
Merge pull request #104 from fluxcd/gc-v2
Refactor garbage collector
2020-09-10 14:53:54 +03:00
stefanprodan 087be46136 Refactor garbage collector 2020-09-10 14:26:14 +03:00
Stefan Prodan 76cd349b6b
Merge pull request #102 from fluxcd/info-log
Configure manager logging and set level to info
2020-09-09 15:21:37 +03:00
stefanprodan eedd8c519b Configure manager logging and set level to info 2020-09-09 15:05:37 +03:00
Philip Laine 2baaba29a5 Fix failing tests 2020-09-08 23:23:42 +02:00
Philip Laine 4e45c916e2 Refactor health check completed logic 2020-09-08 23:21:47 +02:00
Philip Laine c113c2043f Change SourceRef to use CrossNamespaceSourceReference 2020-09-08 21:48:42 +02:00
Philip Laine ea627e3448 Change health check from WorkloadReference to CrossNamespaceObjectReference 2020-09-07 23:31:31 +02:00
Philip Laine d711b699bb Fix cli-util version 2020-09-07 21:50:50 +02:00
Philip Laine ca80431ef8 Change kind ref in health checks to group kind 2020-09-06 20:43:00 +02:00
Philip Laine 9c54e2cb30 Implement kstatus check 2020-09-06 17:59:25 +02:00
stefanprodan 04c6802995 ci: Update build-push-action to v2 2020-09-05 10:58:16 +03:00
Stefan Prodan d0158fddc9
Merge pull request #100 from fluxcd/release-v0.0.10
Release v0.0.10
2020-09-05 10:54:07 +03:00
stefanprodan a0e9162bdf Release v0.0.10 2020-09-05 10:53:25 +03:00
Stefan Prodan 1cdb5f1296
Merge pull request #99 from fluxcd/fix-gc
Fix GC snapshot
2020-09-05 10:48:29 +03:00
stefanprodan 38f2ec2862 Fix GC snapshot 2020-09-05 10:35:29 +03:00
stefanprodan ab31d252ad Update api to v0.0.9 2020-09-04 14:24:40 +03:00
Stefan Prodan 2f9745e3b6
Merge pull request #97 from fluxcd/release-v0.0.9
Release v0.0.9
2020-09-04 12:57:34 +03:00
stefanprodan 11b9c0ea4d Update source-controller/api to v0.0.13 2020-09-04 12:38:48 +03:00
stefanprodan d1da558e11 Release v0.0.9 2020-09-04 12:13:42 +03:00
Stefan Prodan fe8e5e96ac
Merge pull request #96 from fluxcd/arm64-build
Publish amd64/arm64 images to GHCR
2020-09-04 10:24:34 +03:00
stefanprodan f777dd8f0d Add opencontainers source label 2020-09-02 18:56:34 +03:00
stefanprodan 02857c24f9 Publish amd64/arm64 images to GHCR 2020-09-02 17:06:49 +03:00
stefanprodan e820a941b5 Adapt dockerfile for buildkit arm64 build 2020-09-02 17:04:10 +03:00
Stefan Prodan e59d1cdb72
Merge pull request #95 from fluxcd/sops
Implement Mozilla SOPS decryption
2020-09-02 17:00:54 +03:00
Hidde Beydals 07f13e56eb GPG decryption in contained environment 2020-09-02 15:42:02 +02:00
stefanprodan 2f33ba0ae6 Add secrets decryption section to docs 2020-09-01 18:41:57 +03:00
stefanprodan e2743c72f2 Add SOPS decryption e2e tests 2020-09-01 15:51:41 +03:00
stefanprodan c605ccf6d2 Implement Mozilla SOPS decryption 2020-09-01 15:51:22 +03:00
stefanprodan 7e06af6d4b Refactor garbage collection 2020-09-01 13:35:05 +03:00
stefanprodan 86e96a0976 Add decryption optional field to API 2020-09-01 12:35:55 +03:00
stefanprodan b00a841162 Refactor kustomization file generation 2020-09-01 12:34:50 +03:00
Stefan Prodan 87d071d47b
Merge pull request #93 from fluxcd/fix-gc
Fix GC ignore unknown resource kind
2020-08-31 12:42:04 +03:00
stefanprodan f9b748378b Fix GC ignore unknown resource kind 2020-08-31 12:04:34 +03:00
Stefan Prodan 58886ad685
Merge pull request #92 from fluxcd/kgo
Implement kustomize create and build
2020-08-31 11:55:30 +03:00
stefanprodan 2963ad27e0 Implement kustomize create and build
- Replace kustomize shell-out with kustomize/api
- Remove kustomize binary from Dockerfile
- Update kubectl binary to 1.19.0
2020-08-31 11:06:47 +03:00
stefanprodan 88bea9401d Update kustomize/api to v0.6.0 2020-08-31 10:14:38 +03:00
Stefan Prodan da5ba9bddc
Merge pull request #91 from fluxcd/rename-unsortable-err
api: rename Unsortable to CircularDependencyError
2020-08-29 11:33:03 +03:00
Hidde Beydals 1628d827a0 api: rename Unsortable to CircularDependencyError
As this better reflects the error's contents.
2020-08-28 10:53:57 +02:00
Stefan Prodan 63ee08396d
Merge pull request #86 from fluxcd/logger-pkg
Use logger package from fluxcd/pkg
2020-08-21 13:05:09 +03:00
stefanprodan e34fe0c0d5 Use logger package from fluxcd/pkg
Update source-controller/api to v0.0.11, client-go to v0.18.8 and controller-runtime to v0.6.2
2020-08-21 12:37:33 +03:00
Hidde Beydals ce90147119
Merge pull request #85 from fluxcd/makefile-target-fixes 2020-08-20 10:58:05 +02:00
Hidde Beydals 2aa9ea876b Make various targets work after api pkg change 2020-08-20 10:44:45 +02:00
Stefan Prodan c3941e290e
Merge pull request #84 from fluxcd/release-v0.0.8
Release v0.0.8
2020-08-18 14:57:43 +03:00
stefanprodan 018a747089 Release v0.0.8 2020-08-18 14:44:35 +03:00
Stefan Prodan dbb75a47f9
Merge pull request #83 from fluxcd/api-pkg
Make the api package a dedicated module
2020-08-18 14:33:16 +03:00
stefanprodan c2db29b2f6 Make the api package a dedicated module 2020-08-18 14:15:26 +03:00
Hidde Beydals dbbb672570
Merge pull request #82 from fluxcd/dedicated-pkg
Make use of dedicated fluxcd/pkg/testserver module
2020-08-18 12:47:55 +02:00
Hidde Beydals 3187928893 Make use of dedicated fluxcd/pkg/testserver
This includes a dependency change from github/fluxcd/source-controller
to github.com/fluxcd/source-controller/api (v0.0.9) to decrease the
amount of indirect dependencies.
2020-08-18 12:35:13 +02:00
stefanprodan 65f511a58b Allow kustomizations to load files from outside their root
Add git OS package to enable kustomize remote URLs
2020-08-18 11:34:16 +03:00
Stefan Prodan e7d8a15edf
Merge pull request #81 from fluxcd/kubectl-1.18.8
Update kubectl to v1.18.8
2020-08-17 11:36:06 +03:00
stefanprodan 398d1fb532 Update kubectl to v1.18.8 2020-08-17 11:22:27 +03:00
Stefan Prodan ec9a4047ff
Merge pull request #80 from fluxcd/ks-short-name
Add ks as short name to CRD
2020-08-13 14:21:59 +03:00
stefanprodan b13949d373 Add ks as short name to CRD 2020-08-06 13:31:51 +03:00
Stefan Prodan 8b95d14b9f
Merge pull request #79 from fluxcd/cleanup-docker
Remove unused Alpine packages
2020-08-06 13:10:56 +03:00
stefanprodan 699c98f873 Remove unused Alpine packages 2020-08-06 12:42:14 +03:00
Hidde Beydals e0d8834605
Merge pull request #78 from fluxcd/release-v0.0.7
Release v0.0.7
2020-07-31 09:51:37 +02:00
Hidde Beydals 3a88cd86b7 Release v0.0.7 2020-07-31 09:36:46 +02:00
Hidde Beydals baac8566d7
Merge pull request #77 from fluxcd/spec/domain-change 2020-07-31 09:34:07 +02:00
stefanprodan fc65d2c882 Update source-controller to v0.0.7 2020-07-31 09:47:33 +03:00
Hidde Beydals 5905f3a85f Change CRD domain to 'kustomize.toolkit.fluxcd.io'
Due to required domain changes for the helm-controller so that it
can co-exist in a cluster with the Helm Operator, other Toolkit
components are moving to a *.toolklit.fluxcd.io domain too.
2020-07-30 22:40:16 +02:00
Stefan Prodan f61016f15a
Merge pull request #76 from fluxcd/fix-event-reason
Set event reason from ready status reason
2020-07-30 15:55:31 +03:00
stefanprodan 40ff1a7038 Rename apply succeeded reason 2020-07-30 14:48:29 +03:00
stefanprodan 3d7687e216 Set event reason from ready status reason 2020-07-30 14:13:46 +03:00
Stefan Prodan 93781f9ded
Merge pull request #75 from fluxcd/release-v0.0.6
Release v0.0.6
2020-07-25 10:48:16 +03:00
stefanprodan 8d133ecc7b Release v0.0.6 2020-07-25 10:07:31 +03:00
Stefan Prodan 8d66aed717
Merge pull request #74 from fluxcd/fix-impersonation
Use SA token for impersonation
2020-07-25 10:00:24 +03:00
stefanprodan c3599135c9 Use SA token for impersonation 2020-07-25 09:45:31 +03:00
Stefan Prodan ee371947fe
Merge pull request #73 from fluxcd/use-central-ghactions
Remove local actions and use those from pkg
2020-07-25 07:23:24 +03:00
Michael Bridgen 14be04818f Remove local actions and use those from pkg 2020-07-24 12:16:12 +01:00
Hidde Beydals 95b200360e
Merge pull request #72 from fluxcd/enhancement/dep-observed-generation 2020-07-23 17:45:23 +02:00
Hidde Beydals 4231b9b6c8 Take observed generation of deps into account
To prevent operations from being performed while they are "Ready",
but the latest generation of the depenceny has not been reconciled
yet.
2020-07-23 17:15:33 +02:00
Hidde Beydals 99482c8db8 Record ObservedGeneration in status Kustomization 2020-07-23 17:14:19 +02:00
Hidde Beydals e462adbf47 Spec: add KustomizationStatus.ObservedGeneration 2020-07-23 17:14:16 +02:00
Stefan Prodan 3e683557fb
Merge pull request #71 from fluxcd/release-v0.0.5
Release v0.0.5
2020-07-20 14:14:19 +03:00
stefanprodan d9a3fdad34 Release v0.0.5 2020-07-20 14:00:06 +03:00
Stefan Prodan 795d9a4cb3
Merge pull request #70 from fluxcd/crd-v1
Upgrade CRDs to apiextensions.k8s.io/v1
2020-07-20 13:58:48 +03:00
stefanprodan 3459cc31c4 Update source-controller to v0.0.6 2020-07-20 13:45:46 +03:00
stefanprodan f9a37d6f44 Upgrade CRDs to apiextensions.k8s.io/v1 2020-07-20 12:46:45 +03:00
Hidde Beydals 68add1e864
Merge pull request #69 from fluxcd/enhancement/finalizers
Refactor garbage collector to finalizer
2020-07-16 15:25:49 +02:00
Hidde Beydals 61c1dce06c Refactor garbage collector to finalizer 2020-07-16 15:06:37 +02:00
Stefan Prodan 8a360619c6
Merge pull request #67 from fluxcd/release-v0.0.4
Release v0.0.4
2020-07-16 11:16:09 +03:00
stefanprodan d2b7155d71 Release v0.0.4 2020-07-16 10:55:52 +03:00
Stefan Prodan 01a163e3e8
Merge pull request #66 from fluxcd/cross-namespace-source-ref
Implement cross-namespace source references
2020-07-16 10:41:46 +03:00
stefanprodan 2a025c49cb Implement cross-namespace source references 2020-07-16 10:28:15 +03:00
stefanprodan edb479f778 Update kustomize/api to v0.5.1 2020-07-16 08:57:24 +03:00
Stefan Prodan 3fdd29901d
Merge pull request #64 from fluxcd/refactor-reconciliation
Improve error handling and reporting
2020-07-15 16:01:10 +03:00
stefanprodan 0934fda436 Improve error handling and reporting
- return reconciliation error so that controller runtime metrics record failures
- change structure logging labels to match the controller runtime format
- prevent spurious info events by issuing events only when revision changes
2020-07-15 15:00:45 +03:00
Hidde Beydals 11358d7388
Merge pull request #63 from fluxcd/build/org-secrets
Use Docker organization secrets in build
2020-07-14 07:48:00 +02:00
Hidde Beydals 0b03bcdb8a Use Docker organization secrets in build 2020-07-13 23:31:56 +02:00
Stefan Prodan a7a32f0cc1
Merge pull request #62 from mcristina422/patch-1
Fix typo in readme
2020-07-13 22:38:39 +03:00
Michael Cristina eda04f9646
Fix typo in readme 2020-07-13 14:18:41 -05:00
Stefan Prodan e5eaaa6e5d
Merge pull request #61 from fluxcd/release-v0.0.3
Release v0.0.3
2020-07-13 17:49:10 +03:00
stefanprodan f0434cd28d Release v0.0.3 2020-07-13 17:35:09 +03:00
Stefan Prodan 2fab4b51c9
Merge pull request #60 from fluxcd/reconcile-annotation
Rename syncAt annotation to reconcileAt
2020-07-13 17:28:04 +03:00
stefanprodan f79ac6dd44 Rename syncAt annotation to reconcileAt
Use `fluxcd.io/reconcileAt` annotation across all controllers.
2020-07-13 17:14:57 +03:00
stefanprodan 47d239312a Update source-controller to v0.0.5 2020-07-13 17:14:13 +03:00
Stefan Prodan 57806b9fdd
Merge pull request #59 from fluxcd/metrics-port
Change metrics port to 8080
2020-07-13 13:16:52 +03:00
stefanprodan e3d437c3f7 Change metrics port to 8080
Use same port as source/helm/notification controllers
2020-07-13 12:59:38 +03:00
Stefan Prodan 75879d11f9
Merge pull request #58 from fluxcd/enhancement/logging
Setup production logging
2020-07-13 12:17:53 +03:00
stefanprodan 3acb82fa0b Setup production logging
For production the log format is JSON, the timestamps format is ISO8601
and stack traces are logged when the level is set to debug.
2020-07-13 12:03:15 +03:00
Stefan Prodan d827b3790b
Merge pull request #57 from fluxcd/last-attempted-revision
Add last attempted revision to status
2020-07-10 11:48:24 +03:00
stefanprodan 706e85ecec Use fluxcd/pkg/untar for artifact extraction 2020-07-10 10:44:57 +03:00
stefanprodan a69af9d57c Add last attempted revision to status 2020-07-10 09:54:45 +03:00
Stefan Prodan ae42e59185
Merge pull request #56 from fluxcd/unit-tests
Add reconciliation test
2020-07-07 08:49:29 +03:00
stefanprodan a4197f2a5d Add makefile target for downloading source CRD 2020-07-06 18:33:46 +03:00
stefanprodan b6380abfb7 Install kubectl 1.18 in CI 2020-07-06 18:06:34 +03:00
stefanprodan 6c50c1d1eb Update kustomize to v3.8.0 in CI 2020-07-06 17:56:27 +03:00
stefanprodan a7fae2d5c7 Update source-controller to v0.0.2 2020-07-06 17:43:44 +03:00
stefanprodan 90c87646c4 Add namespace reconciliation test 2020-07-06 17:37:17 +03:00
stefanprodan a7877ad665 Init unit tests with ginkgo 2020-07-06 14:49:20 +03:00
Stefan Prodan 1e22205f97
Merge pull request #55 from fluxcd/kustomize-3.8.0
Update kustomize to v3.8.0
2020-07-06 13:42:09 +03:00
stefanprodan 561d9e5ad0 Update kustomize to v3.8.0 2020-07-06 13:25:13 +03:00
Stefan Prodan 74cb7638c4
Merge pull request #54 from fluxcd/release-v0.0.2
Release v0.0.2
2020-07-02 13:06:06 +03:00
stefanprodan 7e7dcc5f03 Release v0.0.2 2020-07-02 12:25:45 +03:00
stefanprodan d6a01c0ee3 Use tk and gitops-system in docs 2020-07-02 12:20:27 +03:00
Stefan Prodan 5e850f42cb
Merge pull request #53 from fluxcd/events
Implement event recording
2020-07-02 12:05:08 +03:00
stefanprodan 4d3a3a7bae Emit events for garbage collection 2020-07-02 11:52:03 +03:00
stefanprodan 406ce977a4 Add revision to events metadata 2020-07-02 08:01:06 +03:00
stefanprodan 2ebd5b6450 Implement event recording
- emit Kubernetes events for reconciliation actions
- forward events to notification controller
- remove the Profile API/CRD
2020-07-01 20:39:48 +03:00
Stefan Prodan 570d2ea05e
Merge pull request #51 from fluxcd/fluxcd-pkg
Migrate to fluxcd/pkg
2020-06-30 17:40:41 +03:00
stefanprodan ab15f3c185 Migrate to fluxcd/pkg 2020-06-30 17:25:03 +03:00
Stefan Prodan 4a64092904
Merge pull request #50 from fluxcd/enhancement/move-suspend-check
Check suspend status before progressing
2020-06-30 17:17:39 +03:00
Hidde Beydals 3f6edc5280 Check suspend status before progressing
When a release is marked as suspended no operations should be performed
for the release except acknowledging the reconciler has noticed it has
been suspended. This means the suspend check should happen _before_ the
Kustomization is marked as progressing (which should be an indicator
reconciliation is enabled for the Kustomization).
2020-06-30 11:15:43 +02:00
Stefan Prodan 7e080f14a9
Merge pull request #48 from fluxcd/release-v0.0.1
Release v0.0.1
2020-06-24 18:55:13 +03:00
stefanprodan 2722caf179 Release v0.0.1 2020-06-24 18:01:37 +03:00
Stefan Prodan 37d84d749e
Merge pull request #47 from fluxcd/requeue-dependency
Configurable dependency requeuing
2020-06-22 17:20:28 +03:00
stefanprodan d11e76d322 Configurable dependency requeuing
Add command argument for configuring the interval at which failing dependencies are reevaluated.
2020-06-20 10:30:37 +03:00
Hidde Beydals e4b5a29f3a
Merge pull request #46 from fluxcd/maintainers/hidde
Update MAINTAINERS
2020-06-19 17:16:59 +02:00
Hidde Beydals 74abe1f753
Merge pull request #45 from fluxcd/docs/api-ref
Generate API documentation
2020-06-19 17:16:43 +02:00
Hidde Beydals fc6813a8a2 Add Hidde to MAINTAINERS 2020-06-19 17:02:01 +02:00
Hidde Beydals fefa8f07cb Generate API documentation 2020-06-19 17:00:10 +02:00
Stefan Prodan a4b7e18033
Merge pull request #43 from fluxcd/go-license
Add Go license to forked package
2020-06-10 13:20:23 +03:00
stefanprodan 912d5fa744 Add Go license to forked package 2020-06-10 13:06:51 +03:00
Stefan Prodan 0027556409
Merge pull request #42 from fluxcd/release-v0.0.1-beta.2
Release v0.0.1 beta.2
2020-06-10 12:07:37 +03:00
stefanprodan 9c18d044de Fix artifact extraction 2020-06-10 11:55:54 +03:00
stefanprodan dd736c7df8 Update source-controller to v0.0.1-beta.2 2020-06-10 11:29:08 +03:00
stefanprodan 8f7f388e5d Release v0.0.1-beta.2 2020-06-10 11:02:04 +03:00
stefanprodan 62e159d481 Update Alpine to 3.12 2020-06-10 11:01:53 +03:00
Stefan Prodan 8b8c03f715
Merge pull request #41 from fluxcd/runtime-ns
Watch resources in the runtime namespace only
2020-06-10 10:55:21 +03:00
stefanprodan 1f25b5852b Watch resources in the runtime namespace only 2020-06-09 15:53:20 +03:00
Stefan Prodan 60c30a1e27
Merge pull request #40 from fluxcd/release-v0.0.1-beta.1
Release v0.0.1-beta.1
2020-05-29 17:24:05 +03:00
stefanprodan 8646b112f7 Release v0.0.1-beta.1 2020-05-29 15:50:58 +03:00
Stefan Prodan 66d444fa8e
Merge pull request #39 from fluxcd/kustomize-3.6.1
Update kustomize to v3.6.1
2020-05-29 15:40:02 +03:00
stefanprodan 9e044f5cbf Update kustomize to v3.6.1 2020-05-29 15:26:38 +03:00
Stefan Prodan c44c4d1583
Merge pull request #38 from fluxcd/retry-apply
Retry apply on missing Kind
2020-05-13 19:51:14 +03:00
stefanprodan 0c47dfd549 Retry apply on missing Kind 2020-05-13 19:04:00 +03:00
Stefan Prodan 43d5844d1a
Merge pull request #37 from fluxcd/release-v0.0.1-alpha.9
Release v0.0.1-alpha.9
2020-05-12 07:44:26 +03:00
stefanprodan a6d37d9f44 Release v0.0.1-alpha.9 2020-05-11 23:40:59 +03:00
Stefan Prodan bc598ea812
Merge pull request #36 from fluxcd/set-default-ns
Set kubectl context to default namespace
2020-05-11 23:37:19 +03:00
stefanprodan 39107e5803 Update kustomize to v3.5.5 2020-05-11 23:24:45 +03:00
stefanprodan eea58724dc Set kubectl context to default namespace 2020-05-11 23:06:02 +03:00
Stefan Prodan 3dacef2a88
Merge pull request #35 from fluxcd/sync-bug-fix
Fix assignment to entry in nil map
2020-05-11 23:04:36 +03:00
stefanprodan 23f9733f74 Update kustomize api to v0.3.3 2020-05-11 22:50:25 +03:00
stefanprodan d80ff203ee Fix assignment to entry in nil map 2020-05-11 22:29:52 +03:00
Stefan Prodan 7cd9168ccd
Merge pull request #34 from fluxcd/release-v0.0.1-alpha.8
Release v0.0.1-alpha.8
2020-05-10 11:40:49 +03:00
stefanprodan ac363ba02e Release v0.0.1-alpha.8 2020-05-09 13:17:31 +03:00
Stefan Prodan d5bcc3b3ff
Merge pull request #33 from fluxcd/health-checks
Improve health checking
2020-05-09 12:32:17 +03:00
stefanprodan 7e584dcbf2 Improve health checking
Wait for a deployment to be created before running the liveness check
2020-05-09 12:18:44 +03:00
stefanprodan c0bc8905d2 Update install instructions 2020-05-09 12:17:14 +03:00
stefanprodan 819240d54b Add multi-tenancy to spec docs 2020-05-09 12:16:16 +03:00
Stefan Prodan 6cfe2ff236
Merge pull request #32 from fluxcd/dep-sort
Sort dependencies with Tarjan's SCCS algorithm
2020-05-08 15:49:44 +03:00
Hidde Beydals fdbf69cea5 Sort dependencies with Tarjan's SCCS algorithm 2020-05-08 14:30:07 +02:00
Hidde Beydals 89ac8fb588
Merge pull request #31 from fluxcd/gitrepository-watcher-sync 2020-05-06 12:11:47 +02:00
Hidde Beydals a8cf35aa56 controllers: GitRepositoryWatcher log improvements
* log namespaced Kustomization name
* do not log success message on annotation failure
* change log messages to better reflect reality
2020-05-06 11:37:17 +02:00
Stefan Prodan fbb0516af3
Merge pull request #30 from fluxcd/source-controller-v0.0.1-alpha.6
Update source-controller to v0.0.1-alpha.6
2020-05-06 12:33:18 +03:00
stefanprodan 84f23a732b Update source-controller to v0.0.1-alpha.6 2020-05-06 11:45:43 +03:00
218 changed files with 32083 additions and 4537 deletions

View File

@ -1,6 +0,0 @@
FROM giantswarm/tiny-tools
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -1,9 +0,0 @@
name: 'kubebuilder'
description: 'A GitHub Action to run kubebuilder commands'
author: 'Stefan Prodan'
branding:
icon: 'command'
color: 'blue'
runs:
using: 'docker'
image: 'Dockerfile'

View File

@ -1,12 +0,0 @@
#!/bin/sh -l
VERSION=2.3.1
curl -sL https://go.kubebuilder.io/dl/${VERSION}/linux/amd64 | tar -xz -C /tmp/
mkdir -p $GITHUB_WORKSPACE/kubebuilder
mv /tmp/kubebuilder_${VERSION}_linux_amd64/* $GITHUB_WORKSPACE/kubebuilder/
ls -lh $GITHUB_WORKSPACE/kubebuilder/bin
echo "::add-path::$GITHUB_WORKSPACE/kubebuilder/bin"
echo "::add-path::$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/kubebuilder/bin"

View File

@ -1,6 +0,0 @@
FROM giantswarm/tiny-tools
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -1,9 +0,0 @@
name: 'kustomize'
description: 'A GitHub Action to run kustomize commands'
author: 'Stefan Prodan'
branding:
icon: 'command'
color: 'blue'
runs:
using: 'docker'
image: 'Dockerfile'

View File

@ -1,12 +0,0 @@
#!/bin/sh -l
VERSION=3.1.0
curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v${VERSION}/kustomize_${VERSION}_linux_amd64
mkdir -p $GITHUB_WORKSPACE/bin
cp ./kustomize $GITHUB_WORKSPACE/bin
chmod +x $GITHUB_WORKSPACE/bin/kustomize
ls -lh $GITHUB_WORKSPACE/bin
echo "::add-path::$GITHUB_WORKSPACE/bin"
echo "::add-path::$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin"

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

@ -0,0 +1,34 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
labels: ["dependencies"]
schedule:
interval: "monthly"
groups:
go-deps:
patterns:
- "*"
allow:
- dependency-type: "direct"
ignore:
# Kubernetes deps are updated by fluxcd/pkg
- dependency-name: "k8s.io/*"
- dependency-name: "sigs.k8s.io/*"
# KMS SDKs are updated by SOPS
- dependency-name: "github.com/Azure/*"
- dependency-name: "github.com/aws/*"
- dependency-name: "github.com/hashicorp/vault/*"
# Flux APIs pkg are updated at release time
- dependency-name: "github.com/fluxcd/kustomize-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"

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

@ -0,0 +1,40 @@
# Configuration file to declaratively configure labels
# Ref: https://github.com/EndBug/label-sync#Config-files
- name: area/kustomize
description: Kustomize related issues and pull requests
color: '#00e54d'
- name: area/kstatus
description: Health checking related issues and pull requests
color: '#25D5CA'
aliases: ['area/health-checks']
- name: area/sops
description: SOPS related issues and pull requests
color: '#FEE5D1'
- name: area/server-side-apply
description: SSA related issues and pull requests
color: '#2819CB'
- name: area/varsub
description: Post-build variable substitution related issues and pull requests
color: '#8D195D'
- 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'
- name: backport:release/v1.4.x
description: To be backported to release/v1.4.x
color: '#ffd700'
- name: backport:release/v1.5.x
description: To be backported to release/v1.5.x
color: '#ffd700'
- name: backport:release/v1.6.x
description: To be backported to release/v1.6.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@436145e922f9561fc5ea157ff406f21af2d6b363 # v3.2.0
# 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}.

24
.github/workflows/cifuzz.yaml vendored Normal file
View File

@ -0,0 +1,24 @@
name: fuzz
on:
pull_request:
branches:
- main
permissions:
contents: read # for actions/checkout to fetch code
jobs:
smoketest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: 1.24.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Smoke test Fuzzers
run: make fuzz-smoketest

View File

@ -4,80 +4,159 @@ on:
pull_request:
push:
branches:
- master
- 'main'
- 'release/**'
permissions:
contents: read # for actions/checkout to fetch code
jobs:
kind:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore Go cache
uses: actions/cache@v1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Cache Docker layers
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-ghcache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-go-
${{ runner.os }}-buildx-ghcache-
- name: Setup Go
uses: actions/setup-go@v2-beta
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: 1.14.x
go-version: 1.24.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup Kubernetes
uses: engineerd/setup-kind@v0.3.0
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
version: v0.20.0
cluster_name: kind
node_image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
- name: Setup Kustomize
uses: ./.github/actions/kustomize
- name: Setup Kubebuilder
uses: ./.github/actions/kubebuilder
- name: Run tests
run: make test
uses: fluxcd/pkg/actions/kustomize@main
- name: Enable integration tests
# Only run integration tests for main branch
if: github.ref == 'refs/heads/main'
run: |
echo 'GO_TEST_ARGS=-tags integration' >> $GITHUB_ENV
- name: Run controller tests
env:
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
TEST_AZURE_CLIENT_ID: ${{ secrets.TEST_AZURE_CLIENT_ID }}
TEST_AZURE_TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
TEST_AZURE_CLIENT_SECRET: ${{ secrets.TEST_AZURE_CLIENT_SECRET }}
TEST_AZURE_VAULT_URL: ${{ secrets.TEST_AZURE_VAULT_URL }}
TEST_AZURE_VAULT_KEY_NAME: ${{ secrets.TEST_AZURE_VAULT_KEY_NAME }}
TEST_AZURE_VAULT_KEY_VERSION: ${{ secrets.TEST_AZURE_VAULT_KEY_VERSION }}
run: make test
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
git --no-pager diff
echo 'run make test and commit changes'
exit 1
fi
- name: Build container image
run: make docker-build IMG=test/kustomize-controller:latest
env:
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
run: |
make docker-build IMG=test/kustomize-controller:latest \
BUILD_PLATFORMS=linux/amd64 \
BUILD_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \
--load"
- # Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Load test image
run: kind load docker-image test/kustomize-controller:latest
- name: Deploy source-controller
- name: Install CRDs
run: make install
- name: Run default status test
run: |
kustomize build https://github.com/fluxcd/source-controller//config/default?ref=v0.0.1-alpha.4 | kubectl apply -f-
kubectl -n source-system rollout status deploy/source-controller --timeout=1m
- name: Deploy kustomize-controller
run: make dev-deploy IMG=test/kustomize-controller:latest
env:
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
kubectl apply -f config/testdata/status-defaults
RESULT=$(kubectl get kustomization status-defaults -o go-template={{.status}})
EXPECTED='map[observedGeneration:-1]'
if [ "${RESULT}" != "${EXPECTED}" ] ; then
echo -e "${RESULT}\n\ndoes not equal\n\n${EXPECTED}"
exit 1
fi
kubectl delete -f config/testdata/status-defaults
- name: Deploy controllers
run: |
make dev-deploy IMG=test/kustomize-controller:latest
kubectl -n kustomize-system rollout status deploy/source-controller --timeout=1m
kubectl -n kustomize-system rollout status deploy/kustomize-controller --timeout=1m
- name: Run tests for removing kubectl managed fields
run: |
kubectl create ns managed-fields
kustomize build github.com/stefanprodan/podinfo//kustomize?ref=6.3.5 > /tmp/podinfo.yaml
kubectl -n managed-fields apply -f /tmp/podinfo.yaml
kubectl -n managed-fields apply -f ./config/testdata/managed-fields
kubectl -n managed-fields wait kustomization/podinfo --for=condition=ready --timeout=4m
OUTDATA=$(kubectl -n managed-fields get deploy podinfo --show-managed-fields -oyaml)
if echo "$OUTDATA" | grep -q "kubectl";then
echo "kubectl client-side manager not removed"
exit 1
fi
kubectl -n managed-fields apply --server-side --force-conflicts -f /tmp/podinfo.yaml
kubectl -n managed-fields annotate --overwrite kustomization/podinfo reconcile.fluxcd.io/requestedAt="$(date +%s)"
kubectl -n managed-fields wait kustomization/podinfo --for=condition=ready --timeout=4m
OUTDATA=$(kubectl -n managed-fields get deploy podinfo --show-managed-fields -oyaml)
if echo "$OUTDATA" | grep -q "kubectl";then
echo "kubectl server-side manager not removed"
exit 1
fi
kubectl delete ns managed-fields
- name: Run overlays tests
run: |
kubectl apply -k ./config/testdata/overlays
kubectl wait kustomizations/webapp-staging --for=condition=ready --timeout=4m
kubectl wait kustomizations/webapp-production --for=condition=ready --timeout=4m
kubectl -n kustomize-system apply -k ./config/testdata/overlays
kubectl -n kustomize-system wait kustomizations/webapp-staging --for=condition=ready --timeout=4m
kubectl -n kustomize-system wait kustomizations/webapp-production --for=condition=ready --timeout=4m
- name: Run dependencies tests
run: |
kubectl apply -k ./config/testdata/dependencies
kubectl wait kustomizations/common --for=condition=ready --timeout=4m
kubectl wait kustomizations/backend --for=condition=ready --timeout=4m
kubectl wait kustomizations/frontend --for=condition=ready --timeout=4m
- name: Run GC tests
kubectl -n kustomize-system apply -k ./config/testdata/dependencies
kubectl -n kustomize-system wait kustomizations/common --for=condition=ready --timeout=4m
kubectl -n kustomize-system wait kustomizations/backend --for=condition=ready --timeout=4m
kubectl -n kustomize-system wait kustomizations/frontend --for=condition=ready --timeout=4m
- name: Run impersonation tests
run: |
kubectl get ns
kubectl delete -k ./config/testdata/overlays
until kubectl get ns staging 2>&1 | grep NotFound ; do sleep 2; done
kubectl -n impersonation apply -f ./config/testdata/impersonation
kubectl -n impersonation wait kustomizations/podinfo --for=condition=ready --timeout=4m
kubectl -n impersonation delete kustomizations/podinfo
until kubectl -n impersonation get deploy/podinfo 2>&1 | grep NotFound ; do sleep 2; done
- name: Run OCI tests
run: |
kubectl create ns oci
kubectl -n oci apply -f ./config/testdata/oci
kubectl -n oci wait kustomizations/oci --for=condition=ready --timeout=4m
- name: Run CRDs + CRs tests
run: |
kubectl -n kustomize-system apply -f ./config/testdata/crds-crs
kubectl -n kustomize-system wait kustomizations/certs --for=condition=ready --timeout=4m
kubectl -n kustomizer-cert-test wait issuers/my-ca-issuer --for=condition=ready --timeout=1m
- name: Logs
run: |
kubectl -n source-system logs deploy/source-controller
kubectl -n kustomize-system logs deploy/source-controller
kubectl -n kustomize-system logs deploy/kustomize-controller
- name: Debug failure
if: failure()
run: |
kubectl get gitrepositories -oyaml
kubectl get kustomizations -oyaml
kubectl -n kustomize-system get gitrepositories -oyaml
kubectl -n kustomize-system get kustomizations -oyaml
kubectl -n kustomize-system get all
kubectl -n source-system logs deploy/source-controller
kubectl -n kustomize-system logs deploy/kustomize-controller
kubectl -n oci get ocirepository/oci -oyaml
kubectl -n oci get kustomization/oci -oyaml
kubectl -n kustomize-system logs deploy/source-controller
kubectl -n kustomize-system logs deploy/kustomize-controller

35
.github/workflows/nightly.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: nightly
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
env:
REPOSITORY: ${{ github.repository }}
permissions:
contents: read # for actions/checkout to fetch code
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
with:
buildkitd-flags: "--debug"
- name: Build multi-arch container image
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0 # v6.17.0
with:
push: false
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: |
${{ env.REPOSITORY }}:nightly

View File

@ -3,50 +3,158 @@ on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'image tag prefix'
default: 'rc'
required: true
permissions:
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:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Kustomize
uses: ./.github/actions/kustomize
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Generate release asset
uses: fluxcd/pkg/actions/kustomize@main
- name: Prepare
id: prep
run: |
VERSION="${{ github.event.inputs.tag }}-${GITHUB_SHA::8}"
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF/refs\/tags\//}
fi
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@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Login to GitHub Container Registry
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@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
username: fluxcdbot
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
- name: Generate images meta
id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with:
images: |
fluxcd/${{ env.CONTROLLER }}
ghcr.io/fluxcd/${{ env.CONTROLLER }}
tags: |
type=raw,value=${{ steps.prep.outputs.VERSION }}
- name: Publish images
id: build-push
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0 # v6.17.0
with:
sbom: true
provenance: true
push: true
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
- name: Sign images
env:
COSIGN_EXPERIMENTAL: 1
run: |
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
cp config/default/* config/release
cd config/release
kustomize edit set image fluxcd/kustomize-controller=fluxcd/kustomize-controller:${{ steps.get_version.outputs.VERSION }}
kustomize build . > kustomize-controller.yaml
- name: Push image
uses: docker/build-push-action@v1
kustomize build ./config/crd > ./config/release/${{ env.CONTROLLER }}.crds.yaml
kustomize build ./config/manager > ./config/release/${{ env.CONTROLLER }}.deployment.yaml
- uses: anchore/sbom-action/download-syft@e11c554f704a0b820cbf8c51673f6945e0731532 # v0.20.0
- name: Create release and SBOM
id: run-goreleaser
if: startsWith(github.ref, 'refs/tags/v')
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: fluxcd/kustomize-controller
tag_with_ref: true
- name: Create release
id: create_release
uses: actions/create-release@latest
version: latest
args: release --clean --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: true
body: |
[CHANGELOG](https://github.com/fluxcd/kustomize-controller/blob/master/CHANGELOG.md)
- name: Upload artifacts
id: upload-release-asset
uses: actions/upload-release-asset@v1
- name: Generate SLSA metadata
id: slsa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./config/release/kustomize-controller.yaml
asset_name: kustomize-controller.yaml
asset_content_type: text/plain
ARTIFACTS: "${{ steps.run-goreleaser.outputs.artifacts }}"
run: |
hashes=$(echo $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 }}

52
.github/workflows/scan.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: scan
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '18 10 * * 3'
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for codeQL to write security events
jobs:
fossa:
name: FOSSA
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run FOSSA scan and upload build data
uses: fossa-contrib/fossa-action@3d2ef181b1820d6dcd1972f86a767d18167fa19b # v3.0.1
with:
# FOSSA Push-Only API Token
fossa-api-key: 5ee8bf422db1471e0bcf2bcb289185de
github-token: ${{ github.token }}
codeql:
name: CodeQL
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: 1.24.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Initialize CodeQL
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
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@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18

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

19
.gitignore vendored
View File

@ -1,17 +1,26 @@
# Binaries for programs and plugins
# Binaries for programs and plugins.
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
# Test binary, built with `go test -c`.
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
# Output of the go coverage tool.
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
# Build tools downloaded at runtime.
bin/
# Release manifests generated at runtime.
config/release/
config/crd/bases/ocirepositories.yaml
config/crd/bases/gitrepositories.yaml
config/crd/bases/buckets.yaml
build/
# CRDs for fuzzing tests.
internal/controllers/testdata/crd

57
.goreleaser.yaml Normal file
View File

@ -0,0 +1,57 @@
project_name: kustomize-controller
builds:
- skip: true
release:
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:
- glob: config/release/*.yaml
source:
enabled: true
name_template: "{{ .ProjectName }}_{{ .Version }}_source_code"
sboms:
- id: source
artifacts: source
documents:
- "{{ .ProjectName }}_{{ .Version }}_sbom.spdx.json"
# signs the checksum file
# all files (including the sboms) are included in the checksum
# https://goreleaser.com/customization/sign
signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: "${artifact}.pem"
args:
- sign-blob
- "--yes"
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"
artifacts: checksum
output: true

File diff suppressed because it is too large Load Diff

View File

@ -1,73 +0,0 @@
# Contributing
Kustomize Controller is [Apache 2.0 licensed](LICENSE) and accepts contributions
via GitHub pull requests. This document outlines some of the conventions on
to make it easier to get your contribution accepted.
We gratefully welcome improvements to issues and documentation as well as to
code.
## Certificate of Origin
By contributing to this project you agree to the Developer Certificate of
Origin (DCO). This document was created by the Linux Kernel community and is a
simple statement that you, as a contributor, have the legal right to make the
contribution. No action from you is required, but it's a good idea to see the
[DCO](DCO) file for details before you start contributing code to Kustomize
Controller.
## Communications
The project uses Slack: To join the conversation, simply join the
[CNCF](https://slack.cncf.io/) Slack workspace and use the
[#flux](https://cloud-native.slack.com/messages/flux/) channel.
The developers use a mailing list to discuss development as well.
Simply subscribe to [flux-dev on cncf.io](https://lists.cncf.io/g/cncf-flux-dev)
to join the conversation (this will also add an invitation to your
Google calendar for our [Flux
meeting](https://docs.google.com/document/d/1l_M0om0qUEN_NNiGgpqJ2tvsF2iioHkaARDeh6b70B0/edit#)).
### How to run the test suite
Prerequisites:
* go >= 1.13
* kubebuilder >= 2.3
* kustomize >= 3.1
You can run the unit tests by simply doing
```bash
make test
```
## Acceptance policy
These things will make a PR more likely to be accepted:
- a well-described requirement
- tests for new code
- tests for old code!
- new code and tests follow the conventions in old code and tests
- a good commit message (see below)
- all code must abide [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
- names should abide [What's in a name](https://talks.golang.org/2014/names.slide#1)
- code must build on both Linux and Darwin, via plain `go build`
- code should have appropriate test coverage and tests should be written
to work with `go test`
In general, we will merge a PR once one maintainer has endorsed it.
For substantial changes, more people may become involved, and you might
get asked to resubmit the PR or divide the changes into more than one PR.
### Format of the Commit Message
For Kustomize Controller we prefer the following rules for good commit messages:
- Limit the subject to 50 characters and write as the continuation
of the sentence "If applied, this commit will ..."
- Explain what and why in the body, if more than a trivial change;
wrap it at 72 characters.
The [following article](https://chris.beams.io/posts/git-commit/#seven-rules)
has some more helpful advice on documenting your work.

94
DEVELOPMENT.md Normal file
View File

@ -0,0 +1,94 @@
# Development
> **Note:** Please take a look at <https://fluxcd.io/contributing/flux/>
> to find out about how to contribute to Flux and how to interact with the
> Flux Development team.
## Installing required dependencies
There are a number of dependencies required to be able to run the controller and its test suite locally:
- [Install Go](https://golang.org/doc/install)
- [Install Kustomize](https://kubernetes-sigs.github.io/kustomize/installation/)
- [Install Docker](https://docs.docker.com/engine/install/)
- (Optional) [Install Kubebuilder](https://book.kubebuilder.io/quick-start.html#installation)
## How to run the test suite
Prerequisites:
* Go >= 1.24
You can run the test suite by simply doing
```sh
make test
```
## How to run the controller locally
Install the controller's CRDs on your test cluster:
```sh
make install
```
Note that `kustomize-controller` depends on [source-controller](https://github.com/fluxcd/source-controller) to acquire its artifacts. If `source-controller` is not running on your test cluster, you need to tell `kustomize-controller` where to find it.
Port forward to source-controller artifacts server:
```sh
kubectl -n flux-system port-forward svc/source-controller 8080:80
```
Export the local address as `SOURCE_CONTROLLER_LOCALHOST`:
```sh
export SOURCE_CONTROLLER_LOCALHOST=localhost:8080
```
Alternatively, if your test cluster is already running `source-controller` and `kustomize-controller`, you need to scale down the in-cluster `kustomize-controller`:
```
kubectl -n flux-system scale deployment/kustomize-controller --replicas=0
```
Run the controller locally:
```sh
make run
```
## How to install the controller
### Building the container image
Set the name of the container image to be created from the source code. This will be used when building, pushing and referring to the image on YAML files:
```sh
export IMG=registry-path/kustomize-controller:latest
```
Build the container image, tagging it as `$(IMG)`:
```sh
make docker-build
```
Push the image into the repository:
```sh
make docker-push
```
**Note**: `make docker-build` will build an image for the `amd64` architecture.
### Deploying into a cluster
Deploy `kustomize-controller` into the cluster that is configured in the local kubeconfig file (i.e. `~/.kube/config`):
```sh
make deploy
```
Running the above will also deploy `source-controller` and its CRDs to the cluster.

View File

@ -1,15 +1,19 @@
FROM golang:1.13 as builder
ARG GO_VERSION=1.24
ARG XX_VERSION=1.6.1
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder
# Copy the build utilities.
COPY --from=xx / /
ARG TARGETPLATFORM
WORKDIR /workspace
RUN kustomize_ver=3.5.4 && \
kustomize_url=https://github.com/kubernetes-sigs/kustomize/releases/download && \
curl -sL ${kustomize_url}/kustomize%2Fv${kustomize_ver}/kustomize_v${kustomize_ver}_linux_amd64.tar.gz | \
tar xz && mv kustomize /usr/local/bin/kustomize
RUN kubectl_ver=1.18.2 && \
curl -sL https://storage.googleapis.com/kubernetes-release/release/v${kubectl_ver}/bin/linux/amd64/kubectl \
-o /usr/local/bin/kubectl && chmod +x /usr/local/bin/kubectl
# copy api submodule
COPY api/ api/
# copy modules manifests
COPY go.mod go.mod
@ -20,23 +24,23 @@ RUN go mod download
# copy source code
COPY main.go main.go
COPY api/ api/
COPY controllers/ controllers/
COPY internal/ internal/
# build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o kustomize-controller main.go
ENV CGO_ENABLED=0
RUN xx-go build -trimpath -a -o kustomize-controller main.go
FROM alpine:3.11
FROM alpine:3.21
RUN apk add --no-cache openssh-client ca-certificates tar tini 'git>=2.12.0' socat curl bash
ARG TARGETPLATFORM
RUN apk --no-cache add ca-certificates tini git openssh-client gnupg \
&& update-ca-certificates
COPY --from=builder /usr/local/bin/kustomize /usr/local/bin/
COPY --from=builder /usr/local/bin/kubectl /usr/local/bin/
COPY --from=builder /workspace/kustomize-controller /usr/local/bin/
RUN addgroup -S controller && adduser -S -g controller controller
USER 65534:65534
USER controller
ENV GNUPGHOME=/tmp
ENTRYPOINT [ "/sbin/tini", "--", "kustomize-controller" ]

View File

@ -2,6 +2,7 @@ The maintainers are generally available in Slack at
https://cloud-native.slack.com in #flux (https://cloud-native.slack.com/messages/CLAJ40HV3)
(obtain an invitation at https://slack.cncf.io/).
In alphabetical order:
This project shares maintainers from the main Flux v2 git repository,
as listed in
Stefan Prodan, Weaveworks <stefan@weave.works> (github: @stefanprodan, slack: stefanprodan)
https://github.com/fluxcd/flux2/blob/main/MAINTAINERS

190
Makefile
View File

@ -1,29 +1,101 @@
# Image URL to use all building/pushing image targets
IMG ?= fluxcd/kustomize-controller:latest
# Produce CRDs that work back to Kubernetes 1.13
CRD_OPTIONS ?= crd
# Produce CRDs that work back to Kubernetes 1.16
CRD_OPTIONS ?= crd:crdVersions=v1
SOURCE_VER ?= $(shell go list -m all | grep github.com/fluxcd/source-controller/api | awk '{print $$2}')
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
# Use the same version of SOPS already referenced on go.mod
SOPS_VER := $(shell go list -m all | grep github.com/getsops/sops | awk '{print $$2}')
# Repository root based on Git metadata
REPOSITORY_ROOT := $(shell git rev-parse --show-toplevel)
BUILD_DIR := $(REPOSITORY_ROOT)/build
# FUZZ_TIME defines the max amount of time, in Go Duration,
# each fuzzer should run for.
FUZZ_TIME ?= 1m
# If gobin not set, create one on ./build and add to path.
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
GOBIN=$(BUILD_DIR)/gobin
else
GOBIN=$(shell go env GOBIN)
endif
export PATH:=$(GOBIN):${PATH}
# Allows for defining additional Go test args, e.g. '-tags integration'.
GO_TEST_ARGS ?=
# Allows for defining additional Docker buildx arguments, e.g. '--push'.
BUILD_ARGS ?= --load
# Architectures to build images for.
BUILD_PLATFORMS ?= linux/amd64
# Architecture to use envtest with
ENVTEST_ARCH ?= amd64
# Paths to download the CRD dependencies at.
GITREPO_CRD ?= config/crd/bases/gitrepositories.yaml
BUCKET_CRD ?= config/crd/bases/buckets.yaml
OCIREPO_CRD ?= config/crd/bases/ocirepositories.yaml
# 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_CRD_VER=$(BUILD_DIR)/.src-crd-$(SOURCE_VER)
# API (doc) generation utilities
CONTROLLER_GEN_VERSION ?= v0.16.1
GEN_API_REF_DOCS_VERSION ?= e327d0730470cbd61b06300f81c5fcf91c23c113
all: manager
# Run tests
test: generate fmt vet manifests
go test ./... -coverprofile cover.out
# Download the envtest binaries to testbin
ENVTEST_ASSETS_DIR=$(BUILD_DIR)/testbin
ENVTEST_KUBERNETES_VERSION?=latest
install-envtest: setup-envtest
mkdir -p ${ENVTEST_ASSETS_DIR}
$(ENVTEST) use $(ENVTEST_KUBERNETES_VERSION) --arch=$(ENVTEST_ARCH) --bin-dir=$(ENVTEST_ASSETS_DIR)
SOPS = $(GOBIN)/sops
$(SOPS): ## Download latest sops binary if none is found.
$(call go-install-tool,$(SOPS),github.com/getsops/sops/v3/cmd/sops@$(SOPS_VER))
# Run controller 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 download-crd-deps install-envtest $(SOPS)
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./... $(GO_TEST_ARGS) -v -coverprofile cover.out
# Build manager binary
manager: generate fmt vet
go build -o bin/manager main.go
go build -o $(BUILD_DIR)/bin/manager main.go
# Run against the configured Kubernetes cluster in ~/.kube/config
run: generate fmt vet manifests
go run ./main.go
go run ./main.go --metrics-addr=:8089
# Delete previously downloaded CRDs and record the new version of the source
# CRDs.
$(SOURCE_CRD_VER):
rm -f $(BUILD_DIR)/.src-crd*
$(MAKE) cleanup-crd-deps
if ! test -d "$(BUILD_DIR)"; then mkdir -p $(BUILD_DIR); fi
touch $(SOURCE_CRD_VER)
$(GITREPO_CRD):
curl -s https://raw.githubusercontent.com/fluxcd/source-controller/${SOURCE_VER}/config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml -o $(GITREPO_CRD)
$(BUCKET_CRD):
curl -s https://raw.githubusercontent.com/fluxcd/source-controller/${SOURCE_VER}/config/crd/bases/source.toolkit.fluxcd.io_buckets.yaml -o $(BUCKET_CRD)
$(OCIREPO_CRD):
curl -s https://raw.githubusercontent.com/fluxcd/source-controller/${SOURCE_VER}/config/crd/bases/source.toolkit.fluxcd.io_ocirepositories.yaml -o $(OCIREPO_CRD)
# Download the CRDs the controller depends on
download-crd-deps: $(SOURCE_CRD_VER) $(GITREPO_CRD) $(BUCKET_CRD) $(OCIREPO_CRD)
# Delete the downloaded CRD dependencies.
cleanup-crd-deps:
rm -f $(GITREPO_CRD) $(BUCKET_CRD) $(OCIREPO_CRD)
# Install CRDs into a cluster
install: manifests
@ -54,41 +126,101 @@ dev-cleanup: manifests
# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role paths="./..." output:crd:artifacts:config="config/crd/bases"
cd api; $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role paths="./..." output:crd:artifacts:config="../config/crd/bases"
# Generate API reference documentation
api-docs: gen-crd-api-reference-docs
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir=./api/v1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/v1/kustomize.md
# Run go mod tidy
tidy:
cd api; rm -f go.sum; go mod tidy -compat=1.24
rm -f go.sum; go mod tidy -compat=1.24
# Run go fmt against code
fmt:
go fmt ./...
cd api; go fmt ./...
# Run go vet against code
vet:
go vet ./...
cd api; go vet ./...
# Generate code
generate: controller-gen
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
cd api; $(CONTROLLER_GEN) object:headerFile="../hack/boilerplate.go.txt" paths="./..."
# Build the docker image
docker-build:
docker build . -t ${IMG}
docker buildx build \
--platform=$(BUILD_PLATFORMS) \
-t ${IMG} \
${BUILD_ARGS} .
# Push the docker image
docker-push:
docker push ${IMG}
# find or download controller-gen
# download controller-gen if necessary
controller-gen:
ifeq (, $(shell which controller-gen))
@{ \
set -e ;\
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
go mod init tmp ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5 ;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
}
CONTROLLER_GEN=$(GOBIN)/controller-gen
else
CONTROLLER_GEN=$(shell which controller-gen)
endif
# Set the docker image in-cluster
docker-deploy:
kubectl -n flux-system set image deployment/kustomize-controller manager=${IMG}
# Find or download controller-gen
CONTROLLER_GEN = $(GOBIN)/controller-gen
.PHONY: controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION))
# Find or download gen-crd-api-reference-docs
GEN_CRD_API_REFERENCE_DOCS = $(GOBIN)/gen-crd-api-reference-docs
.PHONY: gen-crd-api-reference-docs
gen-crd-api-reference-docs: ## Download gen-crd-api-reference-docs locally if necessary
$(call go-install-tool,$(GEN_CRD_API_REFERENCE_DOCS),github.com/ahmetb/gen-crd-api-reference-docs@$(GEN_API_REF_DOCS_VERSION))
ENVTEST = $(GOBIN)/setup-envtest
.PHONY: envtest
setup-envtest: ## Download envtest-setup locally if necessary.
$(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest)
# go-install-tool will 'go install' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
define go-install-tool
@[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(GOBIN) go install $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
# Build fuzzers used by oss-fuzz.
fuzz-build:
rm -rf $(BUILD_DIR)/fuzz/
mkdir -p $(BUILD_DIR)/fuzz/out/
docker build . --pull --tag local-fuzzing:latest -f tests/fuzz/Dockerfile.builder
docker run --rm \
-e FUZZING_LANGUAGE=go -e SANITIZER=address \
-e CIFUZZ_DEBUG='True' -e OSS_FUZZ_PROJECT_NAME=fluxcd \
-v "$(shell go env GOMODCACHE):/root/go/pkg/mod" \
-v "$(BUILD_DIR)/fuzz/out":/out \
local-fuzzing:latest
# Run each fuzzer once to ensure they will work when executed by oss-fuzz.
fuzz-smoketest: fuzz-build
docker run --rm \
-v "$(BUILD_DIR)/fuzz/out":/out \
-v "$(shell pwd)/tests/fuzz/oss_fuzz_run.sh":/runner.sh \
local-fuzzing:latest \
bash -c "/runner.sh"
# Run fuzz tests for the duration set in FUZZ_TIME.
fuzz-native:
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) \
FUZZ_TIME=$(FUZZ_TIME) \
./tests/fuzz/native_go_run.sh

11
PROJECT
View File

@ -1,10 +1,13 @@
domain: fluxcd.io
domain: toolkit.fluxcd.io
repo: github.com/fluxcd/kustomize-controller
resources:
- group: kustomize
kind: Kustomization
version: v1alpha1
version: v1
- group: kustomize
kind: Profile
version: v1alpha1
kind: Kustomization
version: v1beta2
- group: kustomize
kind: Kustomization
version: v1beta1
version: "2"

304
README.md
View File

@ -1,299 +1,55 @@
# kustomize-controller
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4787/badge)](https://bestpractices.coreinfrastructure.org/projects/4787)
[![e2e](https://github.com/fluxcd/kustomize-controller/workflows/e2e/badge.svg)](https://github.com/fluxcd/kustomize-controller/actions)
[![report](https://goreportcard.com/badge/github.com/fluxcd/kustomize-controller)](https://goreportcard.com/report/github.com/fluxcd/kustomize-controller)
[![license](https://img.shields.io/github/license/fluxcd/kustomize-controller.svg)](https://github.com/fluxcd/kustomize-controller/blob/master/LICENSE)
[![license](https://img.shields.io/github/license/fluxcd/kustomize-controller.svg)](https://github.com/fluxcd/kustomize-controller/blob/main/LICENSE)
[![release](https://img.shields.io/github/release/fluxcd/kustomize-controller/all.svg)](https://github.com/fluxcd/kustomize-controller/releases)
The kustomize-controller is a Kubernetes operator, specialized in running
continuous delivery pipelines for infrastructure and workloads
The kustomize-controller is a [Flux](https://github.com/fluxcd/flux2) component,
specialized in running continuous delivery pipelines for infrastructure and workloads
defined with Kubernetes manifests and assembled with Kustomize.
The cluster desired state is described through a Kubernetes Custom Resource named `Kustomization`.
Based on the creation, mutation or removal of a `Kustomization` resource in the cluster,
the controller performs actions to reconcile the cluster current state with the desired state.
![overview](docs/diagrams/kustomize-controller-overview.png)
Features:
## Features
* watches for `Kustomization` objects
* fetches artifacts produced by [source-controller](https://github.com/fluxcd/source-controller) from `Source` objects
* watches `Source` objects for revision changes
* generates the `kustomization.yaml` file if needed
* generates Kubernetes manifests with kustomize build
* validates the build output with client-side or APIServer dry-run
* applies the generated manifests on the cluster
* generates Kubernetes manifests with Kustomize SDK
* decrypts Kubernetes secrets with Mozilla SOPS and KMS
* validates the generated manifests with Kubernetes server-side apply dry-run
- detects drift between the desired and state and cluster state
- corrects drift by patching objects with Kubernetes server-side apply
* prunes the Kubernetes objects removed from source
* checks the health of the deployed workloads
* runs `Kustomizations` in a specific order, taking into account the depends-on relationship
* reports on Slack or Discord whenever a `Kustomization` status changes
* notifies whenever a `Kustomization` status changes
Specifications:
* [API](docs/spec/v1alpha1/README.md)
## Specifications
* [API](docs/spec/v1/README.md)
* [Controller](docs/spec/README.md)
## Usage
## Guides
The kustomize-controller is part of a composable GitOps toolkit and depends on
[source-controller](https://github.com/fluxcd/source-controller) to provide the raw Kubernetes
manifests and `kustomization.yaml` file.
* [Get started with Flux](https://fluxcd.io/flux/get-started/)
* [Setup Notifications](https://fluxcd.io/flux/guides/notifications/)
* [Manage Kubernetes secrets with Flux and SOPS](https://fluxcd.io/flux/guides/mozilla-sops/)
* [How to build, publish and consume OCI Artifacts with Flux](https://fluxcd.io/flux/cheatsheets/oci-artifacts/)
* [Flux and Kustomize FAQ](https://fluxcd.io/flux/faq/#kustomize-questions)
### Install the controllers
## Roadmap
Install source-controller with:
The roadmap for the Flux family of projects can be found at <https://fluxcd.io/roadmap/>.
```bash
kustomize build https://github.com/fluxcd/source-controller//config/default?ref=v0.0.1-alpha.4 \
kubectl apply -f-
```
## Contributing
Install kustomize-controller with:
```bash
kustomize build https://github.com/fluxcd/kustomize-controller//config/default?ref=v0.0.1-alpha.7 \
kubectl apply -f-
```
### Define a Git repository source
Create a source object that points to a Git repository containing Kubernetes and Kustomize manifests:
```yaml
apiVersion: source.fluxcd.io/v1alpha1
kind: GitRepository
metadata:
name: podinfo
namespace: default
spec:
interval: 1m
url: https://github.com/stefanprodan/podinfo-deploy
ref:
branch: master
```
For private repositories, SSH or token based authentication can be
[configured with Kubernetes secrets](https://github.com/fluxcd/source-controller/blob/master/docs/spec/v1alpha1/gitrepositories.md).
Save the above file and apply it on the cluster.
You can wait for the source controller to assemble an artifact from the head of the repo master branch with:
```bash
kubectl wait gitrepository/podinfo --for=condition=ready
```
The source controller will check for new commits in the master branch every minute. You can force a git sync with:
```bash
kubectl annotate --overwrite gitrepository/podinfo source.fluxcd.io/syncAt="$(date +%s)"
```
### Define a kustomization
Create a kustomization object that uses the git repository defined above:
```yaml
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: podinfo-dev
spec:
interval: 5m
path: "./overlays/dev/"
prune: true
sourceRef:
kind: GitRepository
name: podinfo
validation: client
healthChecks:
- kind: Deployment
name: podinfo
namespace: dev
timeout: 80s
```
> **Note** that if your repository contains only plain Kubernetes manifests,
> the controller will
> [automatically generate](docs/spec/v1alpha1/kustomization.md#generate-kustomizationyaml)
> a kustomization.yaml file inside the specified path.
A detailed explanation of the Kustomization object and its fields
can be found in the [specification doc](docs/spec/v1alpha1/README.md).
Based on the above definition, the kustomize-controller fetches the Git repository content from source-controller,
generates Kubernetes manifests by running kustomize build inside `./overlays/dev/`,
and validates them with a dry-run apply. If the manifests pass validation, the controller will apply them
on the cluster and starts the health assessment of the deployed workload. If the health checks are passing, the
Kustomization object status transitions to a ready state.
![workflow](docs/diagrams/kustomize-controller-flow.png)
You can wait for the kustomize controller to complete the deployment with:
```bash
kubectl wait kustomization/podinfo-dev --for=condition=ready
```
When the controller finishes the reconciliation, it will log the applied objects:
```bash
kubectl -n kustomize-system logs deploy/kustomize-controller | jq .
```
```json
{
"level": "info",
"ts": 1587195448.071468,
"logger": "controllers.Kustomization",
"msg": "Kustomization applied in 1.436096591s",
"kustomization": "default/podinfo-dev",
"output": {
"namespace/dev": "created",
"service/podinfo": "created",
"deployment.apps/podinfo": "created",
"horizontalpodautoscaler.autoscaling/podinfo": "created"
}
}
```
You can trigger a kustomize build and apply any time with:
```bash
kubectl annotate --overwrite kustomization/podinfo-dev kustomize.fluxcd.io/syncAt="$(date +%s)"
```
When the source controller pulls a new Git revision, the kustomize controller will detect that the
source revision changed, and will apply those changes right away.
If the kustomization build or apply fails, the controller sets the ready condition to `false` and logs the error:
```yaml
status:
conditions:
- lastTransitionTime: "2020-04-16T07:27:58Z"
message: 'apply failed'
reason: ApplyFailed
status: "False"
type: Ready
```
```json
{
"kustomization": "default/podinfo-dev",
"error": "Error from server (NotFound): error when creating \"podinfo-dev.yaml\": namespaces \"dev\" not found\n"
}
```
### Control the execution order
When running a kustomization, you may need to make sure other kustomizations have been
successfully applied beforehand. A kustomization can specify a list of dependencies with `spec.dependsOn`.
When combined with health assessment, a kustomization will run after all its dependencies health checks are passing.
For example, a service mesh proxy injector should be running before deploying applications inside the mesh:
```yaml
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: istio
spec:
interval: 10m
path: "./profiles/default/"
sourceRef:
kind: GitRepository
name: istio
healthChecks:
- kind: Deployment
name: istiod
namespace: istio-system
timeout: 2m
---
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: podinfo-dev
spec:
dependsOn:
- istio
interval: 5m
path: "./overlays/dev/"
prune: true
sourceRef:
kind: GitRepository
name: podinfo
```
### Deploy releases to production
For production deployments, instead of synchronizing with a branch you can use a semver range to target stable releases:
```yaml
apiVersion: source.fluxcd.io/v1alpha1
kind: GitRepository
metadata:
name: podinfo-releases
spec:
interval: 5m
url: https://github.com/stefanprodan/podinfo-deploy
ref:
semver: ">=0.0.1-rc.1 <1.0.0"
```
With `ref.semver` we configure source controller to pull the Git tags and create an artifact from the most recent tag
that matches the semver range.
Create a production kustomization and reference the git source that follows the latest semver release:
```yaml
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: podinfo-production
spec:
interval: 10m
path: "./overlays/production/"
sourceRef:
kind: GitRepository
name: podinfo-releases
```
Based on the above definition, the kustomize controller will build and apply a kustomization that matches the semver range
set in the Git repository manifest.
### Configure alerting
The kustomize controller can post message to Slack or Discord whenever a kustomization status changes.
Alerting can be configured by creating a profile that targets a list of kustomizations:
```yaml
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Profile
metadata:
name: default
spec:
alert:
type: slack
verbosity: info
address: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
username: kustomize-controller
channel: general
kustomizations:
- '*'
```
The alert provider type can be: `slack` or `discord` and the verbosity can be set to `info` or `error`.
The `*` wildcard tells the controller to use this profile for all kustomizations that are present
in the same namespace as the profile.
Multiple profiles can be used to send alerts to different channels or Slack organizations.
When the verbosity is set to `error`, the controller will alert on any error encountered during the
reconciliation process. This includes kustomize build and validation errors, apply errors and
health check failures.
![error alert](docs/diagrams/slack-error-alert.png)
When the verbosity is set to `info`, the controller will alert if:
* a Kubernetes object was created, updated or deleted
* heath checks are passing
* a dependency is delaying the execution
* an error occurs
![info alert](docs/diagrams/slack-info-alert.png)
This project is Apache 2.0 licensed and accepts contributions via GitHub pull requests.
To start contributing please see the [development guide](DEVELOPMENT.md).

36
api/go.mod Normal file
View File

@ -0,0 +1,36 @@
module github.com/fluxcd/kustomize-controller/api
go 1.24.0
require (
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
)
// Fix CVE-2022-28948
replace gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1
require (
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/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/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
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
sigs.k8s.io/yaml v1.5.0 // indirect
)

121
api/go.sum Normal file
View File

@ -0,0 +1,121 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
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.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/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/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.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
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=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
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.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.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.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=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
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.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.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.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.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=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
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.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
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=

21
api/v1/doc.go Normal file
View File

@ -0,0 +1,21 @@
/*
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 v1 contains API Schema definitions for the kustomize.toolkit.fluxcd.io
// v1 API group.
// +kubebuilder:object:generate=true
// +groupName=kustomize.toolkit.fluxcd.io
package v1

View File

@ -0,0 +1,33 @@
/*
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 v1
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: "kustomize.toolkit.fluxcd.io", Version: "v1"}
// 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
)

34
api/v1/inventory_types.go Normal file
View File

@ -0,0 +1,34 @@
/*
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 v1
// ResourceInventory contains a list of Kubernetes resource object references
// that have been applied by a Kustomization.
type ResourceInventory struct {
// Entries of Kubernetes resource object references.
Entries []ResourceRef `json:"entries"`
}
// ResourceRef contains the information necessary to locate a resource within a cluster.
type ResourceRef struct {
// ID is the string representation of the Kubernetes resource object's metadata,
// in the format '<namespace>_<name>_<group>_<kind>'.
ID string `json:"id"`
// Version is the API version of the Kubernetes resource object's kind.
Version string `json:"v"`
}

View File

@ -0,0 +1,391 @@
/*
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 v1
import (
"time"
"github.com/fluxcd/pkg/apis/kustomize"
"github.com/fluxcd/pkg/apis/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
KustomizationKind = "Kustomization"
KustomizationFinalizer = "finalizers.fluxcd.io"
MaxConditionMessageLength = 20000
EnabledValue = "enabled"
DisabledValue = "disabled"
MergeValue = "Merge"
IfNotPresentValue = "IfNotPresent"
IgnoreValue = "Ignore"
DeletionPolicyMirrorPrune = "MirrorPrune"
DeletionPolicyDelete = "Delete"
DeletionPolicyWaitForTermination = "WaitForTermination"
DeletionPolicyOrphan = "Orphan"
)
// KustomizationSpec defines the configuration to calculate the desired state
// from a Source using Kustomize.
type KustomizationSpec struct {
// CommonMetadata specifies the common labels and annotations that are
// applied to all resources. Any existing label or annotation will be
// overridden if its key matches a common one.
// +optional
CommonMetadata *CommonMetadata `json:"commonMetadata,omitempty"`
// DependsOn may contain a DependencyReference slice
// with references to Kustomization resources that must be ready before this
// Kustomization can be reconciled.
// +optional
DependsOn []DependencyReference `json:"dependsOn,omitempty"`
// Decrypt Kubernetes secrets before applying them on the cluster.
// +optional
Decryption *Decryption `json:"decryption,omitempty"`
// The interval at which to reconcile the Kustomization.
// 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
Interval metav1.Duration `json:"interval"`
// The interval at which to retry a previously failed reconciliation.
// When not specified, the controller uses the KustomizationSpec.Interval
// value to retry failures.
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
// +optional
RetryInterval *metav1.Duration `json:"retryInterval,omitempty"`
// The KubeConfig for reconciling the Kustomization on a remote cluster.
// When used in combination with KustomizationSpec.ServiceAccountName,
// forces the controller to act on behalf of that Service Account at the
// target cluster.
// If the --default-service-account flag is set, its value will be used as
// a controller level fallback for when KustomizationSpec.ServiceAccountName
// is empty.
// +optional
KubeConfig *meta.KubeConfigReference `json:"kubeConfig,omitempty"`
// Path to the directory containing the kustomization.yaml file, or the
// set of plain YAMLs a kustomization.yaml should be generated for.
// Defaults to 'None', which translates to the root path of the SourceRef.
// +optional
Path string `json:"path,omitempty"`
// PostBuild describes which actions to perform on the YAML manifest
// generated by building the kustomize overlay.
// +optional
PostBuild *PostBuild `json:"postBuild,omitempty"`
// Prune enables garbage collection.
// +required
Prune bool `json:"prune"`
// DeletionPolicy can be used to control garbage collection when this
// Kustomization is deleted. Valid values are ('MirrorPrune', 'Delete',
// 'WaitForTermination', 'Orphan'). 'MirrorPrune' mirrors the Prune field
// (orphan if false, delete if true). Defaults to 'MirrorPrune'.
// +kubebuilder:validation:Enum=MirrorPrune;Delete;WaitForTermination;Orphan
// +optional
DeletionPolicy string `json:"deletionPolicy,omitempty"`
// A list of resources to be included in the health assessment.
// +optional
HealthChecks []meta.NamespacedObjectKindReference `json:"healthChecks,omitempty"`
// NamePrefix will prefix the names of all managed resources.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=200
// +kubebuilder:validation:Optional
// +optional
NamePrefix string `json:"namePrefix,omitempty" yaml:"namePrefix,omitempty"`
// NameSuffix will suffix the names of all managed resources.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=200
// +kubebuilder:validation:Optional
// +optional
NameSuffix string `json:"nameSuffix,omitempty" yaml:"nameSuffix,omitempty"`
// Strategic merge and JSON patches, defined as inline YAML objects,
// capable of targeting objects based on kind, label and annotation selectors.
// +optional
Patches []kustomize.Patch `json:"patches,omitempty"`
// Images is a list of (image name, new name, new tag or digest)
// for changing image names, tags or digests. This can also be achieved with a
// patch, but this operator is simpler to specify.
// +optional
Images []kustomize.Image `json:"images,omitempty"`
// The name of the Kubernetes service account to impersonate
// when reconciling this Kustomization.
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// Reference of the source where the kustomization file is.
// +required
SourceRef CrossNamespaceSourceReference `json:"sourceRef"`
// This flag tells the controller to suspend subsequent kustomize executions,
// it does not apply to already started executions. Defaults to false.
// +optional
Suspend bool `json:"suspend,omitempty"`
// TargetNamespace sets or overrides the namespace in the
// kustomization.yaml file.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Optional
// +optional
TargetNamespace string `json:"targetNamespace,omitempty"`
// Timeout for validation, apply and health checking operations.
// Defaults to 'Interval' duration.
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`
// Force instructs the controller to recreate resources
// when patching fails due to an immutable field change.
// +kubebuilder:default:=false
// +optional
Force bool `json:"force,omitempty"`
// Wait instructs the controller to check the health of all the reconciled
// resources. When enabled, the HealthChecks are ignored. Defaults to false.
// +optional
Wait bool `json:"wait,omitempty"`
// Components specifies relative paths to specifications of other Components.
// +optional
Components []string `json:"components,omitempty"`
// HealthCheckExprs is a list of healthcheck expressions for evaluating the
// health of custom resources using Common Expression Language (CEL).
// The expressions are evaluated only when Wait or HealthChecks are specified.
// +optional
HealthCheckExprs []kustomize.CustomHealthCheck `json:"healthCheckExprs,omitempty"`
}
// CommonMetadata defines the common labels and annotations.
type CommonMetadata struct {
// Annotations to be added to the object's metadata.
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// Labels to be added to the object's metadata.
// +optional
Labels map[string]string `json:"labels,omitempty"`
}
// Decryption defines how decryption is handled for Kubernetes manifests.
type Decryption struct {
// Provider is the name of the decryption engine.
// +kubebuilder:validation:Enum=sops
// +required
Provider string `json:"provider"`
// ServiceAccountName is the name of the service account used to
// authenticate with KMS services from cloud providers. If a
// static credential for a given cloud provider is defined
// inside the Secret referenced by SecretRef, that static
// credential takes priority.
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// The secret name containing the private OpenPGP keys used for decryption.
// A static credential for a cloud provider defined inside the Secret
// takes priority to secret-less authentication with the ServiceAccountName
// field.
// +optional
SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
}
// PostBuild describes which actions to perform on the YAML manifest
// generated by building the kustomize overlay.
type PostBuild struct {
// Substitute holds a map of key/value pairs.
// The variables defined in your YAML manifests that match any of the keys
// defined in the map will be substituted with the set value.
// Includes support for bash string replacement functions
// e.g. ${var:=default}, ${var:position} and ${var/substring/replacement}.
// +optional
Substitute map[string]string `json:"substitute,omitempty"`
// SubstituteFrom holds references to ConfigMaps and Secrets containing
// the variables and their values to be substituted in the YAML manifests.
// The ConfigMap and the Secret data keys represent the var names, and they
// must match the vars declared in the manifests for the substitution to
// happen.
// +optional
SubstituteFrom []SubstituteReference `json:"substituteFrom,omitempty"`
}
// SubstituteReference contains a reference to a resource containing
// the variables name and value.
type SubstituteReference 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"`
// Optional indicates whether the referenced resource must exist, or whether to
// tolerate its absence. If true and the referenced resource is absent, proceed
// as if the resource was present but empty, without any variables defined.
// +kubebuilder:default:=false
// +optional
Optional bool `json:"optional,omitempty"`
}
// KustomizationStatus defines the observed state of a kustomization.
type KustomizationStatus struct {
meta.ReconcileRequestStatus `json:",inline"`
// ObservedGeneration is the last reconciled generation.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// The last successfully applied revision.
// Equals the Revision of the applied Artifact from the referenced Source.
// +optional
LastAppliedRevision string `json:"lastAppliedRevision,omitempty"`
// The last successfully applied origin revision.
// Equals the origin revision of the applied Artifact from the referenced Source.
// Usually present on the Metadata of the applied Artifact and depends on the
// Source type, e.g. for OCI it's the value associated with the key
// "org.opencontainers.image.revision".
// +optional
LastAppliedOriginRevision string `json:"lastAppliedOriginRevision,omitempty"`
// LastAttemptedRevision is the revision of the last reconciliation attempt.
// +optional
LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"`
// Inventory contains the list of Kubernetes resource object references that
// have been successfully applied.
// +optional
Inventory *ResourceInventory `json:"inventory,omitempty"`
}
// GetTimeout returns the timeout with default.
func (in Kustomization) GetTimeout() time.Duration {
duration := in.Spec.Interval.Duration - 30*time.Second
if in.Spec.Timeout != nil {
duration = in.Spec.Timeout.Duration
}
if duration < 30*time.Second {
return 30 * time.Second
}
return duration
}
// GetRetryInterval returns the retry interval
func (in Kustomization) GetRetryInterval() time.Duration {
if in.Spec.RetryInterval != nil {
return in.Spec.RetryInterval.Duration
}
return in.GetRequeueAfter()
}
// GetRequeueAfter returns the duration after which the Kustomization must be
// reconciled again.
func (in Kustomization) GetRequeueAfter() time.Duration {
return in.Spec.Interval.Duration
}
// GetDeletionPolicy returns the deletion policy and default value if not specified.
func (in Kustomization) GetDeletionPolicy() string {
if in.Spec.DeletionPolicy == "" {
return DeletionPolicyMirrorPrune
}
return in.Spec.DeletionPolicy
}
// GetDependsOn returns the dependencies as a list of meta.NamespacedObjectReference.
//
// This function makes the Kustomization type conformant with the meta.ObjectWithDependencies interface
// and allows the controller-runtime to index Kustomizations by their dependencies.
func (in Kustomization) GetDependsOn() []meta.NamespacedObjectReference {
deps := make([]meta.NamespacedObjectReference, len(in.Spec.DependsOn))
for i := range in.Spec.DependsOn {
deps[i] = meta.NamespacedObjectReference{
Name: in.Spec.DependsOn[i].Name,
Namespace: in.Spec.DependsOn[i].Namespace,
}
}
return deps
}
// GetConditions returns the status conditions of the object.
func (in Kustomization) GetConditions() []metav1.Condition {
return in.Status.Conditions
}
// SetConditions sets the status conditions on the object.
func (in *Kustomization) SetConditions(conditions []metav1.Condition) {
in.Status.Conditions = conditions
}
// +genclient
// +kubebuilder:storageversion
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=ks
// +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=""
// Kustomization is the Schema for the kustomizations API.
type Kustomization struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KustomizationSpec `json:"spec,omitempty"`
// +kubebuilder:default:={"observedGeneration":-1}
Status KustomizationStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// KustomizationList contains a list of kustomizations.
type KustomizationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Kustomization `json:"items"`
}
func init() {
SchemeBuilder.Register(&Kustomization{}, &KustomizationList{})
}

72
api/v1/reference_types.go Normal file
View File

@ -0,0 +1,72 @@
/*
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 v1
import (
"fmt"
)
// CrossNamespaceSourceReference contains enough information to let you locate the
// typed Kubernetes resource object at cluster level.
type CrossNamespaceSourceReference struct {
// API version of the referent.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Kind of the referent.
// +kubebuilder:validation:Enum=OCIRepository;GitRepository;Bucket
// +required
Kind string `json:"kind"`
// Name of the referent.
// +required
Name string `json:"name"`
// Namespace of the referent, defaults to the namespace of the Kubernetes
// resource object that contains the reference.
// +optional
Namespace string `json:"namespace,omitempty"`
}
// String returns a string representation of the CrossNamespaceSourceReference
// in the format "Kind/Name" or "Kind/Namespace/Name" if Namespace is set.
func (s *CrossNamespaceSourceReference) String() string {
if s.Namespace != "" {
return fmt.Sprintf("%s/%s/%s", s.Kind, s.Namespace, s.Name)
}
return fmt.Sprintf("%s/%s", s.Kind, s.Name)
}
// DependencyReference defines a Kustomization dependency on another Kustomization resource.
type DependencyReference struct {
// Name of the referent.
// +required
Name string `json:"name"`
// Namespace of the referent, defaults to the namespace of the Kustomization
// 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"`
}

View File

@ -0,0 +1,350 @@
//go:build !ignore_autogenerated
/*
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.
*/
// Code generated by controller-gen. DO NOT EDIT.
package v1
import (
"github.com/fluxcd/pkg/apis/kustomize"
"github.com/fluxcd/pkg/apis/meta"
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 *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 *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 *Decryption) DeepCopyInto(out *Decryption) {
*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 Decryption.
func (in *Decryption) DeepCopy() *Decryption {
if in == nil {
return nil
}
out := new(Decryption)
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 *Kustomization) DeepCopyInto(out *Kustomization) {
*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 Kustomization.
func (in *Kustomization) DeepCopy() *Kustomization {
if in == nil {
return nil
}
out := new(Kustomization)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Kustomization) 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 *KustomizationList) DeepCopyInto(out *KustomizationList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Kustomization, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationList.
func (in *KustomizationList) DeepCopy() *KustomizationList {
if in == nil {
return nil
}
out := new(KustomizationList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *KustomizationList) 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 *KustomizationSpec) DeepCopyInto(out *KustomizationSpec) {
*out = *in
if in.CommonMetadata != nil {
in, out := &in.CommonMetadata, &out.CommonMetadata
*out = new(CommonMetadata)
(*in).DeepCopyInto(*out)
}
if in.DependsOn != nil {
in, out := &in.DependsOn, &out.DependsOn
*out = make([]DependencyReference, len(*in))
copy(*out, *in)
}
if in.Decryption != nil {
in, out := &in.Decryption, &out.Decryption
*out = new(Decryption)
(*in).DeepCopyInto(*out)
}
out.Interval = in.Interval
if in.RetryInterval != nil {
in, out := &in.RetryInterval, &out.RetryInterval
*out = new(metav1.Duration)
**out = **in
}
if in.KubeConfig != nil {
in, out := &in.KubeConfig, &out.KubeConfig
*out = new(meta.KubeConfigReference)
(*in).DeepCopyInto(*out)
}
if in.PostBuild != nil {
in, out := &in.PostBuild, &out.PostBuild
*out = new(PostBuild)
(*in).DeepCopyInto(*out)
}
if in.HealthChecks != nil {
in, out := &in.HealthChecks, &out.HealthChecks
*out = make([]meta.NamespacedObjectKindReference, len(*in))
copy(*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)
}
out.SourceRef = in.SourceRef
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(metav1.Duration)
**out = **in
}
if in.Components != nil {
in, out := &in.Components, &out.Components
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.HealthCheckExprs != nil {
in, out := &in.HealthCheckExprs, &out.HealthCheckExprs
*out = make([]kustomize.CustomHealthCheck, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationSpec.
func (in *KustomizationSpec) DeepCopy() *KustomizationSpec {
if in == nil {
return nil
}
out := new(KustomizationSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KustomizationStatus) DeepCopyInto(out *KustomizationStatus) {
*out = *in
out.ReconcileRequestStatus = in.ReconcileRequestStatus
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.Inventory != nil {
in, out := &in.Inventory, &out.Inventory
*out = new(ResourceInventory)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationStatus.
func (in *KustomizationStatus) DeepCopy() *KustomizationStatus {
if in == nil {
return nil
}
out := new(KustomizationStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PostBuild) DeepCopyInto(out *PostBuild) {
*out = *in
if in.Substitute != nil {
in, out := &in.Substitute, &out.Substitute
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.SubstituteFrom != nil {
in, out := &in.SubstituteFrom, &out.SubstituteFrom
*out = make([]SubstituteReference, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostBuild.
func (in *PostBuild) DeepCopy() *PostBuild {
if in == nil {
return nil
}
out := new(PostBuild)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceInventory) DeepCopyInto(out *ResourceInventory) {
*out = *in
if in.Entries != nil {
in, out := &in.Entries, &out.Entries
*out = make([]ResourceRef, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInventory.
func (in *ResourceInventory) DeepCopy() *ResourceInventory {
if in == nil {
return nil
}
out := new(ResourceInventory)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceRef) DeepCopyInto(out *ResourceRef) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef.
func (in *ResourceRef) DeepCopy() *ResourceRef {
if in == nil {
return nil
}
out := new(ResourceRef)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SubstituteReference) DeepCopyInto(out *SubstituteReference) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubstituteReference.
func (in *SubstituteReference) DeepCopy() *SubstituteReference {
if in == nil {
return nil
}
out := new(SubstituteReference)
in.DeepCopyInto(out)
return out
}

View File

@ -1,90 +0,0 @@
/*
Copyright 2020 The Flux CD contributors.
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 v1alpha1
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// Condition contains condition information for a kustomization.
type Condition struct {
// Type of the condition, currently ('Ready').
// +required
Type string `json:"type"`
// Status of the condition, one of ('True', 'False', 'Unknown').
// +required
Status corev1.ConditionStatus `json:"status"`
// LastTransitionTime is the timestamp corresponding to the last status
// change of this condition.
// +required
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
// Reason is a brief machine readable explanation for the condition's last
// transition.
// +required
Reason string `json:"reason,omitempty"`
// Message is a human readable description of the details of the last
// transition, complementing reason.
// +optional
Message string `json:"message,omitempty"`
}
const (
// ReadyCondition represents the fact that a given kustomization has passed
// validation and was successfully applied on the cluster.
ReadyCondition string = "Ready"
)
const (
// ApplySucceedReason represents the fact that the kustomization apply succeed.
ApplySucceedReason string = "ApplySucceed"
// ApplyFailedReason represents the fact that the kustomization apply failed.
ApplyFailedReason string = "ApplyFailed"
// PruneFailedReason represents the fact that the kustomization pruning failed.
PruneFailedReason string = "PruneFailed"
// ArtifactFailedReason represents the fact that the artifact download failed.
ArtifactFailedReason string = "ArtifactFailed"
// BuildFailedReason represents the fact that the kustomize build command failed.
BuildFailedReason string = "BuildFailed"
// DependencyNotReady represents the fact that the one of the dependencies is not ready.
DependencyNotReadyReason string = "DependencyNotReady"
// HealthCheckFailedReason represents the fact that the one of the health check failed.
HealthCheckFailedReason string = "HealthCheckFailed"
// InitializedReason represents the fact that a given resource has been initialized.
InitializedReason string = "Initialized"
// ProgressingReason represents the fact that a kustomization reconciliation
// is underway.
ProgressingReason string = "Progressing"
// SuspendedReason represents the fact that the kustomization execution is suspended.
SuspendedReason string = "Suspended"
// ValidationFailedReason represents the fact that the dry-run apply failed.
ValidationFailedReason string = "ValidationFailed"
)

View File

@ -1,225 +0,0 @@
/*
Copyright 2020 The Flux CD contributors.
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 v1alpha1
import (
"time"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// KustomizationSpec defines the desired state of a kustomization.
type KustomizationSpec struct {
// A list of kustomizations that must be ready before this
// kustomization can be applied.
// +optional
DependsOn []string `json:"dependsOn,omitempty"`
// The interval at which to apply the kustomization.
// +required
Interval metav1.Duration `json:"interval"`
// Path to the directory containing the kustomization file.
// +kubebuilder:validation:Pattern="^\\./"
// +required
Path string `json:"path"`
// Enables garbage collection.
// +required
Prune bool `json:"prune"`
// A list of workloads (Deployments, DaemonSets and StatefulSets)
// to be included in the health assessment.
// +optional
HealthChecks []WorkloadReference `json:"healthChecks,omitempty"`
// The Kubernetes service account used for applying the kustomization.
// +optional
ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"`
// Reference of the source where the kustomization file is.
// +required
SourceRef corev1.TypedLocalObjectReference `json:"sourceRef"`
// This flag tells the controller to suspend subsequent kustomize executions,
// it does not apply to already started executions. Defaults to false.
// +optional
Suspend bool `json:"suspend,omitempty"`
// Timeout for validation, apply and health checking operations.
// Defaults to 'Interval' duration.
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`
// Validate the Kubernetes objects before applying them on the cluster.
// The validation strategy can be 'client' (local dry-run) or 'server' (APIServer dry-run).
// +kubebuilder:validation:Enum=client;server
// +optional
Validation string `json:"validation,omitempty"`
}
// WorkloadReference defines a reference to a Deployment, DaemonSet or StatefulSet.
type WorkloadReference struct {
// Kind is the type of resource being referenced.
// +kubebuilder:validation:Enum=Deployment;DaemonSet;StatefulSet
// +required
Kind string `json:"kind"`
// Name is the name of resource being referenced.
// +required
Name string `json:"name"`
// Namespace is the namespace of resource being referenced.
// +required
Namespace string `json:"namespace"`
}
// ServiceAccount defines a reference to a Kubernetes service account.
type ServiceAccount struct {
// Name is the name of the service account being referenced.
// +required
Name string `json:"name"`
// Namespace is the namespace of the service account being referenced.
// +required
Namespace string `json:"namespace"`
}
// KustomizationStatus defines the observed state of a kustomization.
type KustomizationStatus struct {
// +optional
Conditions []Condition `json:"conditions,omitempty"`
// The last successfully applied revision.
// The revision format for Git sources is <branch|tag>/<commit-sha>.
// +optional
LastAppliedRevision string `json:"lastAppliedRevision,omitempty"`
// The last successfully applied revision metadata.
// +optional
Snapshot *Snapshot `json:"snapshot,omitempty"`
}
func KustomizationReady(kustomization Kustomization, snapshot *Snapshot, revision, reason, message string) Kustomization {
kustomization.Status.Conditions = []Condition{
{
Type: ReadyCondition,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.Now(),
Reason: reason,
Message: message,
},
}
kustomization.Status.Snapshot = snapshot
kustomization.Status.LastAppliedRevision = revision
return kustomization
}
func KustomizationProgressing(kustomization Kustomization) Kustomization {
kustomization.Status.Conditions = []Condition{
{
Type: ReadyCondition,
Status: corev1.ConditionUnknown,
LastTransitionTime: metav1.Now(),
Reason: ProgressingReason,
Message: "reconciliation in progress",
},
}
return kustomization
}
func KustomizationNotReady(kustomization Kustomization, reason, message string) Kustomization {
kustomization.Status.Conditions = []Condition{
{
Type: ReadyCondition,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.Now(),
Reason: reason,
Message: message,
},
}
return kustomization
}
func KustomizationNotReadySnapshot(kustomization Kustomization, snapshot *Snapshot, reason, message string) Kustomization {
kustomization.Status.Conditions = []Condition{
{
Type: ReadyCondition,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.Now(),
Reason: reason,
Message: message,
},
}
kustomization.Status.Snapshot = snapshot
return kustomization
}
// GetTimeout returns the timeout with default
func (in *Kustomization) GetTimeout() time.Duration {
duration := in.Spec.Interval.Duration
if in.Spec.Timeout != nil {
duration = in.Spec.Timeout.Duration
}
if duration < time.Minute {
return time.Minute
}
return duration
}
const (
// SyncAtAnnotation is the annotation used for triggering a
// sync outside of the specified schedule.
SyncAtAnnotation string = "kustomize.fluxcd.io/syncAt"
// SourceIndexKey is the key used for indexing kustomizations
// based on their sources.
SourceIndexKey string = ".metadata.source"
// DependencyIndexKey is the key used for indexing kustomizations
// based on their dependencies.
DependencyIndexKey string = ".metadata.dependency"
)
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +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:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
// Kustomization is the Schema for the kustomizations API.
type Kustomization struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KustomizationSpec `json:"spec,omitempty"`
Status KustomizationStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// KustomizationList contains a list of kustomizations.
type KustomizationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Kustomization `json:"items"`
}
func init() {
SchemeBuilder.Register(&Kustomization{}, &KustomizationList{})
}

View File

@ -1,91 +0,0 @@
/*
Copyright 2020 The Flux CD contributors.
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 v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ProfileSpec defines the desired state of Profile
type ProfileSpec struct {
// Alerting configuration of the kustomizations targeted by this profile.
// +optional
Alert *AlertProvider `json:"alert"`
// The list of kustomizations that this profile applies to.
// +required
Kustomizations []string `json:"kustomizations"`
}
// Alert is the configuration of alerting for a specific provider
type AlertProvider struct {
// HTTP(S) webhook address of this provider
// +required
Address string `json:"address"`
// Alert channel for this provider
// +required
Channel string `json:"channel"`
// Bot username for this provider
// +required
Username string `json:"username"`
// Filter alerts based on verbosity level, defaults to ('error').
// +kubebuilder:validation:Enum=info;error
// +optional
Verbosity string `json:"verbosity,omitempty"`
// Type of provider
// +kubebuilder:validation:Enum=slack;discord
// +required
Type string `json:"type"`
}
// ProfileStatus defines the observed state of Profile
type ProfileStatus struct {
// +optional
Conditions []Condition `json:"conditions,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +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:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
// Profile is the Schema for the profiles API
type Profile struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ProfileSpec `json:"spec,omitempty"`
Status ProfileStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ProfileList contains a list of Profile
type ProfileList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Profile `json:"items"`
}
func init() {
SchemeBuilder.Register(&Profile{}, &ProfileList{})
}

View File

@ -0,0 +1,43 @@
/*
Copyright 2020 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 v1beta1
const (
// HealthyCondition is the condition type used
// to record the last health assessment result.
HealthyCondition string = "Healthy"
// PruneFailedReason represents the fact that the
// pruning of the Kustomization failed.
PruneFailedReason string = "PruneFailed"
// ArtifactFailedReason represents the fact that the
// artifact download of the kustomization failed.
ArtifactFailedReason string = "ArtifactFailed"
// BuildFailedReason represents the fact that the
// kustomize build of the Kustomization failed.
BuildFailedReason string = "BuildFailed"
// HealthCheckFailedReason represents the fact that
// one of the health checks of the Kustomization failed.
HealthCheckFailedReason string = "HealthCheckFailed"
// ValidationFailedReason represents the fact that the
// validation of the Kustomization manifests has failed.
ValidationFailedReason string = "ValidationFailed"
)

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

@ -0,0 +1,20 @@
/*
Copyright 2020 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 v1beta1 contains API Schema definitions for the kustomize v1beta1 API group
// +kubebuilder:object:generate=true
// +groupName=kustomize.toolkit.fluxcd.io
package v1beta1

View File

@ -1,5 +1,5 @@
/*
Copyright 2020 The Flux CD contributors.
Copyright 2020 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.
@ -14,10 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1alpha1 contains API Schema definitions for the kustomize v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=kustomize.fluxcd.io
package v1alpha1
package v1beta1
import (
"k8s.io/apimachinery/pkg/runtime/schema"
@ -26,7 +23,7 @@ import (
var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "kustomize.fluxcd.io", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: "kustomize.toolkit.fluxcd.io", Version: "v1beta1"}
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

View File

@ -0,0 +1,311 @@
/*
Copyright 2020 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 v1beta1
import (
"time"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"github.com/fluxcd/pkg/apis/kustomize"
"github.com/fluxcd/pkg/apis/meta"
)
const (
KustomizationKind = "Kustomization"
KustomizationFinalizer = "finalizers.fluxcd.io"
MaxConditionMessageLength = 20000
DisabledValue = "disabled"
)
// KustomizationSpec defines the desired state of a kustomization.
type KustomizationSpec struct {
// DependsOn may contain a meta.NamespacedObjectReference slice
// with references to Kustomization resources that must be ready before this
// Kustomization can be reconciled.
// +optional
DependsOn []meta.NamespacedObjectReference `json:"dependsOn,omitempty"`
// Decrypt Kubernetes secrets before applying them on the cluster.
// +optional
Decryption *Decryption `json:"decryption,omitempty"`
// The interval at which to reconcile the Kustomization.
// +required
Interval metav1.Duration `json:"interval"`
// The interval at which to retry a previously failed reconciliation.
// When not specified, the controller uses the KustomizationSpec.Interval
// value to retry failures.
// +optional
RetryInterval *metav1.Duration `json:"retryInterval,omitempty"`
// The KubeConfig for reconciling the Kustomization on a remote cluster.
// When specified, KubeConfig takes precedence over ServiceAccountName.
// +optional
KubeConfig *KubeConfig `json:"kubeConfig,omitempty"`
// Path to the directory containing the kustomization.yaml file, or the
// set of plain YAMLs a kustomization.yaml should be generated for.
// Defaults to 'None', which translates to the root path of the SourceRef.
// +optional
Path string `json:"path,omitempty"`
// PostBuild describes which actions to perform on the YAML manifest
// generated by building the kustomize overlay.
// +optional
PostBuild *PostBuild `json:"postBuild,omitempty"`
// Prune enables garbage collection.
// +required
Prune bool `json:"prune"`
// A list of resources to be included in the health assessment.
// +optional
HealthChecks []meta.NamespacedObjectKindReference `json:"healthChecks,omitempty"`
// Strategic merge and JSON patches, defined as inline YAML objects,
// capable of targeting objects based on kind, label and annotation selectors.
// +optional
Patches []kustomize.Patch `json:"patches,omitempty"`
// Strategic merge patches, defined as inline YAML objects.
// +optional
PatchesStrategicMerge []apiextensionsv1.JSON `json:"patchesStrategicMerge,omitempty"`
// JSON 6902 patches, defined as inline YAML objects.
// +optional
PatchesJSON6902 []kustomize.JSON6902Patch `json:"patchesJson6902,omitempty"`
// Images is a list of (image name, new name, new tag or digest)
// for changing image names, tags or digests. This can also be achieved with a
// patch, but this operator is simpler to specify.
// +optional
Images []kustomize.Image `json:"images,omitempty"`
// The name of the Kubernetes service account to impersonate
// when reconciling this Kustomization.
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// Reference of the source where the kustomization file is.
// +required
SourceRef CrossNamespaceSourceReference `json:"sourceRef"`
// This flag tells the controller to suspend subsequent kustomize executions,
// it does not apply to already started executions. Defaults to false.
// +optional
Suspend bool `json:"suspend,omitempty"`
// TargetNamespace sets or overrides the namespace in the
// kustomization.yaml file.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Optional
// +optional
TargetNamespace string `json:"targetNamespace,omitempty"`
// Timeout for validation, apply and health checking operations.
// Defaults to 'Interval' duration.
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`
// Validate the Kubernetes objects before applying them on the cluster.
// The validation strategy can be 'client' (local dry-run), 'server'
// (APIServer dry-run) or 'none'.
// When 'Force' is 'true', validation will fallback to 'client' if set to
// 'server' because server-side validation is not supported in this scenario.
// +kubebuilder:validation:Enum=none;client;server
// +optional
Validation string `json:"validation,omitempty"`
// Force instructs the controller to recreate resources
// when patching fails due to an immutable field change.
// +kubebuilder:default:=false
// +optional
Force bool `json:"force,omitempty"`
}
// Decryption defines how decryption is handled for Kubernetes manifests.
type Decryption struct {
// Provider is the name of the decryption engine.
// +kubebuilder:validation:Enum=sops
// +required
Provider string `json:"provider"`
// The secret name containing the private OpenPGP keys used for decryption.
// +optional
SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
}
// KubeConfig references a Kubernetes secret that contains a kubeconfig file.
type KubeConfig struct {
// SecretRef holds the name to a secret that contains a 'value' key with
// the kubeconfig file as the value. It must be in the same namespace as
// the Kustomization.
// It is recommended that the kubeconfig is self-contained, and the secret
// is regularly updated if credentials such as a cloud-access-token expire.
// Cloud specific `cmd-path` auth helpers will not function without adding
// binaries and credentials to the Pod that is responsible for reconciling
// the Kustomization.
// +required
SecretRef meta.LocalObjectReference `json:"secretRef,omitempty"`
}
// PostBuild describes which actions to perform on the YAML manifest
// generated by building the kustomize overlay.
type PostBuild struct {
// Substitute holds a map of key/value pairs.
// The variables defined in your YAML manifests
// that match any of the keys defined in the map
// will be substituted with the set value.
// Includes support for bash string replacement functions
// e.g. ${var:=default}, ${var:position} and ${var/substring/replacement}.
// +optional
Substitute map[string]string `json:"substitute,omitempty"`
// SubstituteFrom holds references to ConfigMaps and Secrets containing
// the variables and their values to be substituted in the YAML manifests.
// The ConfigMap and the Secret data keys represent the var names and they
// must match the vars declared in the manifests for the substitution to happen.
// +optional
SubstituteFrom []SubstituteReference `json:"substituteFrom,omitempty"`
}
// SubstituteReference contains a reference to a resource containing
// the variables name and value.
type SubstituteReference 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"`
}
// KustomizationStatus defines the observed state of a kustomization.
type KustomizationStatus struct {
// ObservedGeneration is the last reconciled generation.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// The last successfully applied revision.
// The revision format for Git sources is <branch|tag>/<commit-sha>.
// +optional
LastAppliedRevision string `json:"lastAppliedRevision,omitempty"`
// LastAttemptedRevision is the revision of the last reconciliation attempt.
// +optional
LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"`
meta.ReconcileRequestStatus `json:",inline"`
// The last successfully applied revision metadata.
// +optional
Snapshot *Snapshot `json:"snapshot,omitempty"`
}
// GetTimeout returns the timeout with default.
func (in Kustomization) GetTimeout() time.Duration {
duration := in.Spec.Interval.Duration
if in.Spec.Timeout != nil {
duration = in.Spec.Timeout.Duration
}
if duration < time.Minute {
return time.Minute
}
return duration
}
// GetRetryInterval returns the retry interval
func (in Kustomization) GetRetryInterval() time.Duration {
if in.Spec.RetryInterval != nil {
return in.Spec.RetryInterval.Duration
}
return in.Spec.Interval.Duration
}
func (in Kustomization) GetDependsOn() (types.NamespacedName, []meta.NamespacedObjectReference) {
return types.NamespacedName{
Namespace: in.Namespace,
Name: in.Name,
}, in.Spec.DependsOn
}
// GetStatusConditions returns a pointer to the Status.Conditions slice
func (in *Kustomization) GetStatusConditions() *[]metav1.Condition {
return &in.Status.Conditions
}
const (
// GitRepositoryIndexKey is the key used for indexing kustomizations
// based on their Git sources.
GitRepositoryIndexKey string = ".metadata.gitRepository"
// BucketIndexKey is the key used for indexing kustomizations
// based on their S3 sources.
BucketIndexKey string = ".metadata.bucket"
)
// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=ks
// +kubebuilder:subresource:status
// +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:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
// +kubebuilder:deprecatedversion:warning="v1beta1 Kustomization is deprecated, upgrade to v1"
// Kustomization is the Schema for the kustomizations API.
type Kustomization struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KustomizationSpec `json:"spec,omitempty"`
// +kubebuilder:default:={"observedGeneration":-1}
Status KustomizationStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// KustomizationList contains a list of kustomizations.
type KustomizationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Kustomization `json:"items"`
}
func init() {
SchemeBuilder.Register(&Kustomization{}, &KustomizationList{})
}
func trimString(str string, limit int) string {
if len(str) <= limit {
return str
}
return str[0:limit] + "..."
}

View File

@ -0,0 +1,47 @@
/*
Copyright 2020 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 v1beta1
import "fmt"
// CrossNamespaceSourceReference contains enough information to let you locate the
// typed referenced object at cluster level
type CrossNamespaceSourceReference struct {
// API version of the referent
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Kind of the referent
// +kubebuilder:validation:Enum=GitRepository;Bucket
// +required
Kind string `json:"kind"`
// Name of the referent
// +required
Name string `json:"name"`
// Namespace of the referent, defaults to the Kustomization namespace
// +optional
Namespace string `json:"namespace,omitempty"`
}
func (s *CrossNamespaceSourceReference) String() string {
if s.Namespace != "" {
return fmt.Sprintf("%s/%s/%s", s.Kind, s.Namespace, s.Name)
}
return fmt.Sprintf("%s/%s", s.Kind, s.Name)
}

View File

@ -1,5 +1,5 @@
/*
Copyright 2020 The Flux CD contributors.
Copyright 2020 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.
@ -14,23 +14,25 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
package v1beta1
import (
"bytes"
"io"
"strings"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/yaml"
)
// Snapshot holds the metadata of the Kubernetes objects
// generated for a source revision
type Snapshot struct {
// The source revision.
// The manifests sha1 checksum.
// +required
Revision string `json:"revision"`
Checksum string `json:"checksum"`
// A list of Kubernetes kinds grouped by namespace.
// +required
@ -49,9 +51,9 @@ type SnapshotEntry struct {
Kinds map[string]string `json:"kinds"`
}
func NewSnapshot(manifests []byte, revision string) (*Snapshot, error) {
func NewSnapshot(manifests []byte, checksum string) (*Snapshot, error) {
snapshot := Snapshot{
Revision: revision,
Checksum: checksum,
Entries: []SnapshotEntry{},
}
@ -84,7 +86,7 @@ func (s *Snapshot) addEntry(item *unstructured.Unstructured) {
found := false
for _, tracker := range s.Entries {
if tracker.Namespace == item.GetNamespace() {
tracker.Kinds[item.GetKind()] = item.GetAPIVersion()
tracker.Kinds[item.GroupVersionKind().String()] = item.GetKind()
found = true
break
}
@ -93,31 +95,42 @@ func (s *Snapshot) addEntry(item *unstructured.Unstructured) {
s.Entries = append(s.Entries, SnapshotEntry{
Namespace: item.GetNamespace(),
Kinds: map[string]string{
item.GetKind(): item.GetAPIVersion(),
item.GroupVersionKind().String(): item.GetKind(),
},
})
}
}
func (s *Snapshot) NonNamespacedKinds() []string {
kinds := make([]string, 0)
func (s *Snapshot) NonNamespacedKinds() []schema.GroupVersionKind {
kinds := make([]schema.GroupVersionKind, 0)
for _, tracker := range s.Entries {
if tracker.Namespace == "" {
for k, _ := range tracker.Kinds {
kinds = append(kinds, k)
for gvk, kind := range tracker.Kinds {
if strings.Contains(gvk, ",") {
gv, err := schema.ParseGroupVersion(strings.Split(gvk, ",")[0])
if err == nil {
kinds = append(kinds, gv.WithKind(kind))
}
}
}
}
}
return kinds
}
func (s *Snapshot) NamespacedKinds() map[string][]string {
nsk := make(map[string][]string)
func (s *Snapshot) NamespacedKinds() map[string][]schema.GroupVersionKind {
nsk := make(map[string][]schema.GroupVersionKind)
for _, tracker := range s.Entries {
if tracker.Namespace != "" {
var kinds []string
for k, _ := range tracker.Kinds {
kinds = append(kinds, k)
var kinds []schema.GroupVersionKind
for gvk, kind := range tracker.Kinds {
if strings.Contains(gvk, ",") {
gv, err := schema.ParseGroupVersion(strings.Split(gvk, ",")[0])
if err == nil {
kinds = append(kinds, gv.WithKind(kind))
}
}
}
nsk[tracker.Namespace] = kinds
}

View File

@ -1,7 +1,7 @@
// +build !ignore_autogenerated
//go:build !ignore_autogenerated
/*
Copyright 2020 The Flux CD contributors.
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.
@ -18,40 +18,63 @@ limitations under the License.
// Code generated by controller-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
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"
"k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AlertProvider) DeepCopyInto(out *AlertProvider) {
func (in *CrossNamespaceSourceReference) DeepCopyInto(out *CrossNamespaceSourceReference) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertProvider.
func (in *AlertProvider) DeepCopy() *AlertProvider {
// 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(AlertProvider)
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 *Condition) DeepCopyInto(out *Condition) {
func (in *Decryption) DeepCopyInto(out *Decryption) {
*out = *in
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
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 Condition.
func (in *Condition) DeepCopy() *Condition {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Decryption.
func (in *Decryption) DeepCopy() *Decryption {
if in == nil {
return nil
}
out := new(Condition)
out := new(Decryption)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KubeConfig) DeepCopyInto(out *KubeConfig) {
*out = *in
out.SecretRef = in.SecretRef
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeConfig.
func (in *KubeConfig) DeepCopy() *KubeConfig {
if in == nil {
return nil
}
out := new(KubeConfig)
in.DeepCopyInto(out)
return out
}
@ -120,21 +143,62 @@ func (in *KustomizationSpec) DeepCopyInto(out *KustomizationSpec) {
*out = *in
if in.DependsOn != nil {
in, out := &in.DependsOn, &out.DependsOn
*out = make([]string, len(*in))
*out = make([]meta.NamespacedObjectReference, len(*in))
copy(*out, *in)
}
if in.Decryption != nil {
in, out := &in.Decryption, &out.Decryption
*out = new(Decryption)
(*in).DeepCopyInto(*out)
}
out.Interval = in.Interval
if in.HealthChecks != nil {
in, out := &in.HealthChecks, &out.HealthChecks
*out = make([]WorkloadReference, len(*in))
copy(*out, *in)
}
if in.ServiceAccount != nil {
in, out := &in.ServiceAccount, &out.ServiceAccount
*out = new(ServiceAccount)
if in.RetryInterval != nil {
in, out := &in.RetryInterval, &out.RetryInterval
*out = new(v1.Duration)
**out = **in
}
in.SourceRef.DeepCopyInto(&out.SourceRef)
if in.KubeConfig != nil {
in, out := &in.KubeConfig, &out.KubeConfig
*out = new(KubeConfig)
**out = **in
}
if in.PostBuild != nil {
in, out := &in.PostBuild, &out.PostBuild
*out = new(PostBuild)
(*in).DeepCopyInto(*out)
}
if in.HealthChecks != nil {
in, out := &in.HealthChecks, &out.HealthChecks
*out = make([]meta.NamespacedObjectKindReference, len(*in))
copy(*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([]apiextensionsv1.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)
}
out.SourceRef = in.SourceRef
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(v1.Duration)
@ -157,11 +221,12 @@ func (in *KustomizationStatus) DeepCopyInto(out *KustomizationStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]Condition, len(*in))
*out = make([]v1.Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
out.ReconcileRequestStatus = in.ReconcileRequestStatus
if in.Snapshot != nil {
in, out := &in.Snapshot, &out.Snapshot
*out = new(Snapshot)
@ -180,122 +245,28 @@ func (in *KustomizationStatus) DeepCopy() *KustomizationStatus {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Profile) DeepCopyInto(out *Profile) {
func (in *PostBuild) DeepCopyInto(out *PostBuild) {
*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 Profile.
func (in *Profile) DeepCopy() *Profile {
if in == nil {
return nil
}
out := new(Profile)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Profile) 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 *ProfileList) DeepCopyInto(out *ProfileList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Profile, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
if in.Substitute != nil {
in, out := &in.Substitute, &out.Substitute
*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 ProfileList.
func (in *ProfileList) DeepCopy() *ProfileList {
if in == nil {
return nil
}
out := new(ProfileList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ProfileList) 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 *ProfileSpec) DeepCopyInto(out *ProfileSpec) {
*out = *in
if in.Alert != nil {
in, out := &in.Alert, &out.Alert
*out = new(AlertProvider)
**out = **in
}
if in.Kustomizations != nil {
in, out := &in.Kustomizations, &out.Kustomizations
*out = make([]string, len(*in))
if in.SubstituteFrom != nil {
in, out := &in.SubstituteFrom, &out.SubstituteFrom
*out = make([]SubstituteReference, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileSpec.
func (in *ProfileSpec) DeepCopy() *ProfileSpec {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostBuild.
func (in *PostBuild) DeepCopy() *PostBuild {
if in == nil {
return nil
}
out := new(ProfileSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ProfileStatus) DeepCopyInto(out *ProfileStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileStatus.
func (in *ProfileStatus) DeepCopy() *ProfileStatus {
if in == nil {
return nil
}
out := new(ProfileStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceAccount) DeepCopyInto(out *ServiceAccount) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccount.
func (in *ServiceAccount) DeepCopy() *ServiceAccount {
if in == nil {
return nil
}
out := new(ServiceAccount)
out := new(PostBuild)
in.DeepCopyInto(out)
return out
}
@ -345,16 +316,16 @@ func (in *SnapshotEntry) DeepCopy() *SnapshotEntry {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkloadReference) DeepCopyInto(out *WorkloadReference) {
func (in *SubstituteReference) DeepCopyInto(out *SubstituteReference) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadReference.
func (in *WorkloadReference) DeepCopy() *WorkloadReference {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubstituteReference.
func (in *SubstituteReference) DeepCopy() *SubstituteReference {
if in == nil {
return nil
}
out := new(WorkloadReference)
out := new(SubstituteReference)
in.DeepCopyInto(out)
return out
}

View File

@ -0,0 +1,55 @@
/*
Copyright 2021 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 v1beta2
const (
// HealthyCondition represents the last recorded
// health assessment result.
HealthyCondition string = "Healthy"
// PruneFailedReason represents the fact that the
// pruning of the Kustomization failed.
PruneFailedReason string = "PruneFailed"
// ArtifactFailedReason represents the fact that the
// source artifact download failed.
ArtifactFailedReason string = "ArtifactFailed"
// BuildFailedReason represents the fact that the
// kustomize build failed.
BuildFailedReason string = "BuildFailed"
// HealthCheckFailedReason represents the fact that
// one of the health checks failed.
HealthCheckFailedReason string = "HealthCheckFailed"
// 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"
// ProgressingWithRetryReason represents the fact that
// the reconciliation encountered an error that will be retried.
ProgressingWithRetryReason string = "ProgressingWithRetry"
)

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

@ -0,0 +1,20 @@
/*
Copyright 2021 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 v1beta2 contains API Schema definitions for the kustomize.toolkit.fluxcd.io v1beta2 API group.
// +kubebuilder:object:generate=true
// +groupName=kustomize.toolkit.fluxcd.io
package v1beta2

View File

@ -0,0 +1,33 @@
/*
Copyright 2021 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 v1beta2
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: "kustomize.toolkit.fluxcd.io", Version: "v1beta2"}
// 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
)

View File

@ -0,0 +1,33 @@
/*
Copyright 2021 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 v1beta2
// ResourceInventory contains a list of Kubernetes resource object references that have been applied by a Kustomization.
type ResourceInventory struct {
// Entries of Kubernetes resource object references.
Entries []ResourceRef `json:"entries"`
}
// ResourceRef contains the information necessary to locate a resource within a cluster.
type ResourceRef struct {
// ID is the string representation of the Kubernetes resource object's metadata,
// in the format '<namespace>_<name>_<group>_<kind>'.
ID string `json:"id"`
// Version is the API version of the Kubernetes resource object's kind.
Version string `json:"v"`
}

View File

@ -0,0 +1,336 @@
/*
Copyright 2021 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 v1beta2
import (
"time"
"github.com/fluxcd/pkg/apis/kustomize"
"github.com/fluxcd/pkg/apis/meta"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
KustomizationKind = "Kustomization"
KustomizationFinalizer = "finalizers.fluxcd.io"
MaxConditionMessageLength = 20000
EnabledValue = "enabled"
DisabledValue = "disabled"
MergeValue = "merge"
)
// KustomizationSpec defines the configuration to calculate the desired state from a Source using Kustomize.
type KustomizationSpec struct {
// CommonMetadata specifies the common labels and annotations that are applied to all resources.
// Any existing label or annotation will be overridden if its key matches a common one.
// +optional
CommonMetadata *CommonMetadata `json:"commonMetadata,omitempty"`
// DependsOn may contain a meta.NamespacedObjectReference slice
// with references to Kustomization resources that must be ready before this
// Kustomization can be reconciled.
// +optional
DependsOn []meta.NamespacedObjectReference `json:"dependsOn,omitempty"`
// Decrypt Kubernetes secrets before applying them on the cluster.
// +optional
Decryption *Decryption `json:"decryption,omitempty"`
// The interval at which to reconcile the Kustomization.
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
// +required
Interval metav1.Duration `json:"interval"`
// The interval at which to retry a previously failed reconciliation.
// When not specified, the controller uses the KustomizationSpec.Interval
// value to retry failures.
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
// +optional
RetryInterval *metav1.Duration `json:"retryInterval,omitempty"`
// The KubeConfig for reconciling the Kustomization on a remote cluster.
// When used in combination with KustomizationSpec.ServiceAccountName,
// forces the controller to act on behalf of that Service Account at the
// target cluster.
// If the --default-service-account flag is set, its value will be used as
// a controller level fallback for when KustomizationSpec.ServiceAccountName
// is empty.
// +optional
KubeConfig *meta.KubeConfigReference `json:"kubeConfig,omitempty"`
// Path to the directory containing the kustomization.yaml file, or the
// set of plain YAMLs a kustomization.yaml should be generated for.
// Defaults to 'None', which translates to the root path of the SourceRef.
// +optional
Path string `json:"path,omitempty"`
// PostBuild describes which actions to perform on the YAML manifest
// generated by building the kustomize overlay.
// +optional
PostBuild *PostBuild `json:"postBuild,omitempty"`
// Prune enables garbage collection.
// +required
Prune bool `json:"prune"`
// A list of resources to be included in the health assessment.
// +optional
HealthChecks []meta.NamespacedObjectKindReference `json:"healthChecks,omitempty"`
// Strategic merge and JSON patches, defined as inline YAML objects,
// capable of targeting objects based on kind, label and annotation selectors.
// +optional
Patches []kustomize.Patch `json:"patches,omitempty"`
// Strategic merge patches, defined as inline YAML objects.
// Deprecated: Use Patches instead.
// +optional
PatchesStrategicMerge []apiextensionsv1.JSON `json:"patchesStrategicMerge,omitempty"`
// JSON 6902 patches, defined as inline YAML objects.
// Deprecated: Use Patches instead.
// +optional
PatchesJSON6902 []kustomize.JSON6902Patch `json:"patchesJson6902,omitempty"`
// Images is a list of (image name, new name, new tag or digest)
// for changing image names, tags or digests. This can also be achieved with a
// patch, but this operator is simpler to specify.
// +optional
Images []kustomize.Image `json:"images,omitempty"`
// The name of the Kubernetes service account to impersonate
// when reconciling this Kustomization.
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// Reference of the source where the kustomization file is.
// +required
SourceRef CrossNamespaceSourceReference `json:"sourceRef"`
// This flag tells the controller to suspend subsequent kustomize executions,
// it does not apply to already started executions. Defaults to false.
// +optional
Suspend bool `json:"suspend,omitempty"`
// TargetNamespace sets or overrides the namespace in the
// kustomization.yaml file.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Optional
// +optional
TargetNamespace string `json:"targetNamespace,omitempty"`
// Timeout for validation, apply and health checking operations.
// Defaults to 'Interval' duration.
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`
// Force instructs the controller to recreate resources
// when patching fails due to an immutable field change.
// +kubebuilder:default:=false
// +optional
Force bool `json:"force,omitempty"`
// Wait instructs the controller to check the health of all the reconciled resources.
// When enabled, the HealthChecks are ignored. Defaults to false.
// +optional
Wait bool `json:"wait,omitempty"`
// Components specifies relative paths to specifications of other Components.
// +optional
Components []string `json:"components,omitempty"`
// Deprecated: Not used in v1beta2.
// +kubebuilder:validation:Enum=none;client;server
// +optional
Validation string `json:"validation,omitempty"`
}
// CommonMetadata defines the common labels and annotations.
type CommonMetadata struct {
// Annotations to be added to the object's metadata.
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// Labels to be added to the object's metadata.
// +optional
Labels map[string]string `json:"labels,omitempty"`
}
// Decryption defines how decryption is handled for Kubernetes manifests.
type Decryption struct {
// Provider is the name of the decryption engine.
// +kubebuilder:validation:Enum=sops
// +required
Provider string `json:"provider"`
// The secret name containing the private OpenPGP keys used for decryption.
// +optional
SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
}
// PostBuild describes which actions to perform on the YAML manifest
// generated by building the kustomize overlay.
type PostBuild struct {
// Substitute holds a map of key/value pairs.
// The variables defined in your YAML manifests
// that match any of the keys defined in the map
// will be substituted with the set value.
// Includes support for bash string replacement functions
// e.g. ${var:=default}, ${var:position} and ${var/substring/replacement}.
// +optional
Substitute map[string]string `json:"substitute,omitempty"`
// SubstituteFrom holds references to ConfigMaps and Secrets containing
// the variables and their values to be substituted in the YAML manifests.
// The ConfigMap and the Secret data keys represent the var names and they
// must match the vars declared in the manifests for the substitution to happen.
// +optional
SubstituteFrom []SubstituteReference `json:"substituteFrom,omitempty"`
}
// SubstituteReference contains a reference to a resource containing
// the variables name and value.
type SubstituteReference 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"`
// Optional indicates whether the referenced resource must exist, or whether to
// tolerate its absence. If true and the referenced resource is absent, proceed
// as if the resource was present but empty, without any variables defined.
// +kubebuilder:default:=false
// +optional
Optional bool `json:"optional,omitempty"`
}
// KustomizationStatus defines the observed state of a kustomization.
type KustomizationStatus struct {
meta.ReconcileRequestStatus `json:",inline"`
// ObservedGeneration is the last reconciled generation.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// The last successfully applied revision.
// Equals the Revision of the applied Artifact from the referenced Source.
// +optional
LastAppliedRevision string `json:"lastAppliedRevision,omitempty"`
// LastAttemptedRevision is the revision of the last reconciliation attempt.
// +optional
LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"`
// Inventory contains the list of Kubernetes resource object references that have been successfully applied.
// +optional
Inventory *ResourceInventory `json:"inventory,omitempty"`
}
// GetTimeout returns the timeout with default.
func (in Kustomization) GetTimeout() time.Duration {
duration := in.Spec.Interval.Duration - 30*time.Second
if in.Spec.Timeout != nil {
duration = in.Spec.Timeout.Duration
}
if duration < 30*time.Second {
return 30 * time.Second
}
return duration
}
// GetRetryInterval returns the retry interval
func (in Kustomization) GetRetryInterval() time.Duration {
if in.Spec.RetryInterval != nil {
return in.Spec.RetryInterval.Duration
}
return in.GetRequeueAfter()
}
// GetRequeueAfter returns the duration after which the Kustomization must be
// reconciled again.
func (in Kustomization) GetRequeueAfter() time.Duration {
return in.Spec.Interval.Duration
}
// GetDependsOn returns the list of dependencies across-namespaces.
func (in Kustomization) GetDependsOn() []meta.NamespacedObjectReference {
return in.Spec.DependsOn
}
// GetConditions returns the status conditions of the object.
func (in Kustomization) GetConditions() []metav1.Condition {
return in.Status.Conditions
}
// SetConditions sets the status conditions on the object.
func (in *Kustomization) SetConditions(conditions []metav1.Condition) {
in.Status.Conditions = conditions
}
// GetStatusConditions returns a pointer to the Status.Conditions slice.
// Deprecated: use GetConditions instead.
func (in *Kustomization) GetStatusConditions() *[]metav1.Condition {
return &in.Status.Conditions
}
// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=ks
// +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:deprecatedversion:warning="v1beta2 Kustomization is deprecated, upgrade to v1"
// Kustomization is the Schema for the kustomizations API.
type Kustomization struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KustomizationSpec `json:"spec,omitempty"`
// +kubebuilder:default:={"observedGeneration":-1}
Status KustomizationStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// KustomizationList contains a list of kustomizations.
type KustomizationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Kustomization `json:"items"`
}
func init() {
SchemeBuilder.Register(&Kustomization{}, &KustomizationList{})
}

View File

@ -0,0 +1,47 @@
/*
Copyright 2021 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 v1beta2
import "fmt"
// CrossNamespaceSourceReference contains enough information to let you locate the
// typed Kubernetes resource object at cluster level.
type CrossNamespaceSourceReference struct {
// API version of the referent.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Kind of the referent.
// +kubebuilder:validation:Enum=OCIRepository;GitRepository;Bucket
// +required
Kind string `json:"kind"`
// Name of the referent.
// +required
Name string `json:"name"`
// Namespace of the referent, defaults to the namespace of the Kubernetes resource object that contains the reference.
// +optional
Namespace string `json:"namespace,omitempty"`
}
func (s *CrossNamespaceSourceReference) String() string {
if s.Namespace != "" {
return fmt.Sprintf("%s/%s/%s", s.Kind, s.Namespace, s.Name)
}
return fmt.Sprintf("%s/%s", s.Kind, s.Name)
}

View File

@ -0,0 +1,345 @@
//go:build !ignore_autogenerated
/*
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.
*/
// Code generated by controller-gen. DO NOT EDIT.
package v1beta2
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 *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 *Decryption) DeepCopyInto(out *Decryption) {
*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 Decryption.
func (in *Decryption) DeepCopy() *Decryption {
if in == nil {
return nil
}
out := new(Decryption)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Kustomization) DeepCopyInto(out *Kustomization) {
*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 Kustomization.
func (in *Kustomization) DeepCopy() *Kustomization {
if in == nil {
return nil
}
out := new(Kustomization)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Kustomization) 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 *KustomizationList) DeepCopyInto(out *KustomizationList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Kustomization, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationList.
func (in *KustomizationList) DeepCopy() *KustomizationList {
if in == nil {
return nil
}
out := new(KustomizationList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *KustomizationList) 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 *KustomizationSpec) DeepCopyInto(out *KustomizationSpec) {
*out = *in
if in.CommonMetadata != nil {
in, out := &in.CommonMetadata, &out.CommonMetadata
*out = new(CommonMetadata)
(*in).DeepCopyInto(*out)
}
if in.DependsOn != nil {
in, out := &in.DependsOn, &out.DependsOn
*out = make([]meta.NamespacedObjectReference, len(*in))
copy(*out, *in)
}
if in.Decryption != nil {
in, out := &in.Decryption, &out.Decryption
*out = new(Decryption)
(*in).DeepCopyInto(*out)
}
out.Interval = in.Interval
if in.RetryInterval != nil {
in, out := &in.RetryInterval, &out.RetryInterval
*out = new(v1.Duration)
**out = **in
}
if in.KubeConfig != nil {
in, out := &in.KubeConfig, &out.KubeConfig
*out = new(meta.KubeConfigReference)
(*in).DeepCopyInto(*out)
}
if in.PostBuild != nil {
in, out := &in.PostBuild, &out.PostBuild
*out = new(PostBuild)
(*in).DeepCopyInto(*out)
}
if in.HealthChecks != nil {
in, out := &in.HealthChecks, &out.HealthChecks
*out = make([]meta.NamespacedObjectKindReference, len(*in))
copy(*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([]apiextensionsv1.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)
}
out.SourceRef = in.SourceRef
if in.Timeout != nil {
in, out := &in.Timeout, &out.Timeout
*out = new(v1.Duration)
**out = **in
}
if in.Components != nil {
in, out := &in.Components, &out.Components
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationSpec.
func (in *KustomizationSpec) DeepCopy() *KustomizationSpec {
if in == nil {
return nil
}
out := new(KustomizationSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KustomizationStatus) DeepCopyInto(out *KustomizationStatus) {
*out = *in
out.ReconcileRequestStatus = in.ReconcileRequestStatus
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.Inventory != nil {
in, out := &in.Inventory, &out.Inventory
*out = new(ResourceInventory)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationStatus.
func (in *KustomizationStatus) DeepCopy() *KustomizationStatus {
if in == nil {
return nil
}
out := new(KustomizationStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PostBuild) DeepCopyInto(out *PostBuild) {
*out = *in
if in.Substitute != nil {
in, out := &in.Substitute, &out.Substitute
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.SubstituteFrom != nil {
in, out := &in.SubstituteFrom, &out.SubstituteFrom
*out = make([]SubstituteReference, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostBuild.
func (in *PostBuild) DeepCopy() *PostBuild {
if in == nil {
return nil
}
out := new(PostBuild)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceInventory) DeepCopyInto(out *ResourceInventory) {
*out = *in
if in.Entries != nil {
in, out := &in.Entries, &out.Entries
*out = make([]ResourceRef, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInventory.
func (in *ResourceInventory) DeepCopy() *ResourceInventory {
if in == nil {
return nil
}
out := new(ResourceInventory)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceRef) DeepCopyInto(out *ResourceRef) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef.
func (in *ResourceRef) DeepCopy() *ResourceRef {
if in == nil {
return nil
}
out := new(ResourceRef)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SubstituteReference) DeepCopyInto(out *SubstituteReference) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubstituteReference.
func (in *SubstituteReference) DeepCopy() *SubstituteReference {
if in == nil {
return nil
}
out := new(SubstituteReference)
in.DeepCopyInto(out)
return out
}

View File

@ -1,222 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.5
creationTimestamp: null
name: kustomizations.kustomize.fluxcd.io
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
type: string
- JSONPath: .status.conditions[?(@.type=="Ready")].message
name: Status
type: string
- JSONPath: .metadata.creationTimestamp
name: Age
type: date
group: kustomize.fluxcd.io
names:
kind: Kustomization
listKind: KustomizationList
plural: kustomizations
singular: kustomization
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: Kustomization is the Schema for the kustomizations API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: KustomizationSpec defines the desired state of a kustomization.
properties:
dependsOn:
description: A list of kustomizations that must be ready before this
kustomization can be applied.
items:
type: string
type: array
healthChecks:
description: A list of workloads (Deployments, DaemonSets and StatefulSets)
to be included in the health assessment.
items:
description: WorkloadReference defines a reference to a Deployment,
DaemonSet or StatefulSet.
properties:
kind:
description: Kind is the type of resource being referenced.
enum:
- Deployment
- DaemonSet
- StatefulSet
type: string
name:
description: Name is the name of resource being referenced.
type: string
namespace:
description: Namespace is the namespace of resource being referenced.
type: string
required:
- kind
- name
- namespace
type: object
type: array
interval:
description: The interval at which to apply the kustomization.
type: string
path:
description: Path to the directory containing the kustomization file.
pattern: ^\./
type: string
prune:
description: Enables garbage collection.
type: boolean
serviceAccount:
description: The Kubernetes service account used for applying the kustomization.
properties:
name:
description: Name is the name of the service account being referenced.
type: string
namespace:
description: Namespace is the namespace of the service account being
referenced.
type: string
required:
- name
- namespace
type: object
sourceRef:
description: Reference of the source where the kustomization file is.
properties:
apiGroup:
description: APIGroup is the group for the resource being referenced.
If APIGroup is not specified, the specified Kind must be in the
core API group. For any other third-party types, APIGroup is required.
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
type: string
required:
- kind
- name
type: object
suspend:
description: This flag tells the controller to suspend subsequent kustomize
executions, it does not apply to already started executions. Defaults
to false.
type: boolean
timeout:
description: Timeout for validation, apply and health checking operations.
Defaults to 'Interval' duration.
type: string
validation:
description: Validate the Kubernetes objects before applying them on
the cluster. The validation strategy can be 'client' (local dry-run)
or 'server' (APIServer dry-run).
enum:
- client
- server
type: string
required:
- interval
- path
- prune
- sourceRef
type: object
status:
description: KustomizationStatus defines the observed state of a kustomization.
properties:
conditions:
items:
description: Condition contains condition information for a kustomization.
properties:
lastTransitionTime:
description: LastTransitionTime is the timestamp corresponding
to the last status change of this condition.
format: date-time
type: string
message:
description: Message is a human readable description of the details
of the last transition, complementing reason.
type: string
reason:
description: Reason is a brief machine readable explanation for
the condition's last transition.
type: string
status:
description: Status of the condition, one of ('True', 'False',
'Unknown').
type: string
type:
description: Type of the condition, currently ('Ready').
type: string
required:
- status
- type
type: object
type: array
lastAppliedRevision:
description: The last successfully applied revision. The revision format
for Git sources is <branch|tag>/<commit-sha>.
type: string
snapshot:
description: The last successfully applied revision metadata.
properties:
entries:
description: A list of Kubernetes kinds grouped by namespace.
items:
description: Snapshot holds the metadata of namespaced Kubernetes
objects
properties:
kinds:
additionalProperties:
type: string
description: The list of Kubernetes kinds.
type: object
namespace:
description: The namespace of this entry.
type: string
required:
- kinds
type: object
type: array
revision:
description: The source revision.
type: string
required:
- entries
- revision
type: object
type: object
type: object
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,133 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.5
creationTimestamp: null
name: profiles.kustomize.fluxcd.io
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
type: string
- JSONPath: .status.conditions[?(@.type=="Ready")].message
name: Status
type: string
- JSONPath: .metadata.creationTimestamp
name: Age
type: date
group: kustomize.fluxcd.io
names:
kind: Profile
listKind: ProfileList
plural: profiles
singular: profile
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: Profile is the Schema for the profiles API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ProfileSpec defines the desired state of Profile
properties:
alert:
description: Alerting configuration of the kustomizations targeted by
this profile.
properties:
address:
description: HTTP(S) webhook address of this provider
type: string
channel:
description: Alert channel for this provider
type: string
type:
description: Type of provider
enum:
- slack
- discord
type: string
username:
description: Bot username for this provider
type: string
verbosity:
description: Filter alerts based on verbosity level, defaults to
('error').
enum:
- info
- error
type: string
required:
- address
- channel
- type
- username
type: object
kustomizations:
description: The list of kustomizations that this profile applies to.
items:
type: string
type: array
required:
- kustomizations
type: object
status:
description: ProfileStatus defines the observed state of Profile
properties:
conditions:
items:
description: Condition contains condition information for a kustomization.
properties:
lastTransitionTime:
description: LastTransitionTime is the timestamp corresponding
to the last status change of this condition.
format: date-time
type: string
message:
description: Message is a human readable description of the details
of the last transition, complementing reason.
type: string
reason:
description: Reason is a brief machine readable explanation for
the condition's last transition.
type: string
status:
description: Status of the condition, one of ('True', 'False',
'Unknown').
type: string
type:
description: Type of the condition, currently ('Ready').
type: string
required:
- status
- type
type: object
type: array
type: object
type: object
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- bases/kustomize.fluxcd.io_kustomizations.yaml
- bases/kustomize.fluxcd.io_profiles.yaml
- bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml
# +kubebuilder:scaffold:crdkustomizeresource

View File

@ -1,10 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kustomize-system
bases:
resources:
- 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
resources:
- namespace.yaml
- namespace.yaml

View File

@ -15,9 +15,13 @@ spec:
app: kustomize-controller
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8282"
prometheus.io/port: "8080"
spec:
terminationGracePeriodSeconds: 10
terminationGracePeriodSeconds: 60
# Required for AWS IAM Role bindings
# https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts-technical-overview.html
securityContext:
fsGroup: 1337
containers:
- name: manager
image: fluxcd/kustomize-controller
@ -25,16 +29,37 @@ spec:
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop: [ "ALL" ]
seccompProfile:
type: RuntimeDefault
ports:
- containerPort: 8282
- containerPort: 8080
name: http-prom
protocol: TCP
- containerPort: 9440
name: healthz
protocol: TCP
env:
- name: RUNTIME_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
args:
- --watch-all-namespaces
- --log-level=info
- --log-encoding=json
- --enable-leader-election
readinessProbe:
httpGet:
path: /readyz
port: healthz
livenessProbe:
httpGet:
port: http-prom
path: /metrics
args:
- --enable-leader-election
- --log-json
path: /healthz
port: healthz
resources:
limits:
cpu: 1000m

View File

@ -5,4 +5,4 @@ resources:
images:
- name: fluxcd/kustomize-controller
newName: fluxcd/kustomize-controller
newTag: v0.0.1-alpha.7
newTag: v1.6.0

View File

@ -5,7 +5,7 @@ metadata:
name: kustomization-editor-role
rules:
- apiGroups:
- kustomize.fluxcd.io
- kustomize.toolkit.fluxcd.io
resources:
- kustomizations
verbs:
@ -17,7 +17,7 @@ rules:
- update
- watch
- apiGroups:
- kustomize.fluxcd.io
- kustomize.toolkit.fluxcd.io
resources:
- kustomizations/status
verbs:

View File

@ -5,7 +5,7 @@ metadata:
name: kustomization-viewer-role
rules:
- apiGroups:
- kustomize.fluxcd.io
- kustomize.toolkit.fluxcd.io
resources:
- kustomizations
verbs:
@ -13,7 +13,7 @@ rules:
- list
- watch
- apiGroups:
- kustomize.fluxcd.io
- kustomize.toolkit.fluxcd.io
resources:
- kustomizations/status
verbs:

View File

@ -4,29 +4,41 @@ kind: Role
metadata:
name: leader-election-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- apiGroups:
- "coordination.k8s.io"
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete

View File

@ -1,24 +0,0 @@
# permissions for end users to edit profiles.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: profile-editor-role
rules:
- apiGroups:
- kustomize.fluxcd.io
resources:
- profiles
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- kustomize.fluxcd.io
resources:
- profiles/status
verbs:
- get

View File

@ -1,20 +0,0 @@
# permissions for end users to view profiles.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: profile-viewer-role
rules:
- apiGroups:
- kustomize.fluxcd.io
resources:
- profiles
verbs:
- get
- list
- watch
- apiGroups:
- kustomize.fluxcd.io
resources:
- profiles/status
verbs:
- get

View File

@ -1,13 +1,34 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- kustomize.fluxcd.io
- ""
resources:
- configmaps
- secrets
- serviceaccounts
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
- serviceaccounts/token
verbs:
- create
- apiGroups:
- kustomize.toolkit.fluxcd.io
resources:
- kustomizations
verbs:
@ -19,7 +40,17 @@ rules:
- update
- watch
- apiGroups:
- kustomize.fluxcd.io
- kustomize.toolkit.fluxcd.io
resources:
- kustomizations/finalizers
verbs:
- create
- delete
- get
- patch
- update
- apiGroups:
- kustomize.toolkit.fluxcd.io
resources:
- kustomizations/status
verbs:
@ -27,36 +58,20 @@ rules:
- patch
- update
- apiGroups:
- kustomize.fluxcd.io
resources:
- profiles
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- kustomize.fluxcd.io
resources:
- profiles/status
verbs:
- get
- patch
- update
- apiGroups:
- source.fluxcd.io
- source.toolkit.fluxcd.io
resources:
- buckets
- gitrepositories
- ocirepositories
verbs:
- get
- list
- watch
- apiGroups:
- source.fluxcd.io
- source.toolkit.fluxcd.io
resources:
- buckets/status
- gitrepositories/status
- ocirepositories/status
verbs:
- get

View File

@ -1,4 +1,4 @@
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: webapp-dev
@ -9,17 +9,10 @@ spec:
sourceRef:
kind: GitRepository
name: webapp-latest
validation: client
healthChecks:
- kind: Deployment
name: backend
namespace: webapp
- kind: Deployment
name: frontend
namespace: webapp
wait: true
timeout: 2m
---
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: webapp-production
@ -30,7 +23,6 @@ spec:
sourceRef:
kind: GitRepository
name: webapp-releases
validation: client
healthChecks:
- kind: Deployment
name: backend

View File

@ -1,13 +0,0 @@
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Profile
metadata:
name: default
spec:
alert:
type: slack
address: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
username: kustomize-controller
channel: general
verbosity: info
kustomizations:
- '*'

View File

@ -1,4 +1,4 @@
apiVersion: source.fluxcd.io/v1alpha1
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: webapp-latest
@ -8,7 +8,7 @@ spec:
ref:
branch: master
---
apiVersion: source.fluxcd.io/v1alpha1
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: webapp-releases

View File

@ -0,0 +1,23 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: certs
spec:
interval: 15m
url: https://github.com/stefanprodan/kustomizer
ref:
tag: "v1.1.0"
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: certs
spec:
interval: 10m
path: "./testdata/certs"
prune: true
sourceRef:
kind: GitRepository
name: certs
wait: true
timeout: 2m

View File

@ -1,19 +1,18 @@
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: backend
spec:
dependsOn:
- common
- name: common
interval: 5m
path: "./deploy/webapp/backend/"
prune: true
sourceRef:
kind: GitRepository
name: webapp
validate: server
healthChecks:
- kind: Deployment
name: backend
namespace: webapp
timeout: 2m
timeout: 2m

View File

@ -1,4 +1,4 @@
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: common
@ -9,4 +9,3 @@ spec:
sourceRef:
kind: GitRepository
name: webapp
validate: client

View File

@ -1,20 +1,19 @@
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: frontend
spec:
dependsOn:
- common
- backend
- name: common
- name: backend
interval: 5m
path: "./deploy/webapp/frontend/"
prune: true
sourceRef:
kind: GitRepository
name: webapp
validate: server
healthChecks:
- kind: Deployment
name: frontend
namespace: webapp
timeout: 2m
timeout: 2m

View File

@ -1,4 +1,4 @@
apiVersion: source.fluxcd.io/v1alpha1
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: webapp
@ -6,4 +6,4 @@ spec:
interval: 10m
url: https://github.com/stefanprodan/podinfo
ref:
semver: ">=3.2.3"
semver: ">=6.3.5"

72
config/testdata/impersonation/test.yaml vendored Normal file
View File

@ -0,0 +1,72 @@
apiVersion: v1
kind: Namespace
metadata:
name: impersonation
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: gotk-reconciler
namespace: impersonation
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: gotk-reconciler
namespace: impersonation
rules:
- apiGroups: ['*']
resources: ['*']
verbs: ['*']
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: gotk-reconciler
namespace: impersonation
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: gotk-reconciler
subjects:
- kind: ServiceAccount
name: gotk-reconciler
namespace: impersonation
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: podinfo
namespace: impersonation
spec:
interval: 5m
url: https://github.com/stefanprodan/podinfo
ref:
tag: "6.3.5"
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: podinfo
namespace: impersonation
spec:
targetNamespace: impersonation
serviceAccountName: gotk-reconciler
interval: 5m
path: "./kustomize"
prune: true
sourceRef:
kind: GitRepository
name: podinfo
patches:
- patch: |
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: podinfo
spec:
minReplicas: 1
target:
kind: HorizontalPodAutoscaler
wait: true
timeout: 1m

View File

@ -0,0 +1,23 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: podinfo
spec:
interval: 15m
path: "./kustomize/"
prune: true
sourceRef:
kind: GitRepository
name: podinfo
timeout: 1m
targetNamespace: managed-fields
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: podinfo
spec:
interval: 5m
url: https://github.com/stefanprodan/podinfo
ref:
semver: "6.3.5"

37
config/testdata/oci/podinfo.yaml vendored Normal file
View File

@ -0,0 +1,37 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: OCIRepository
metadata:
name: oci
namespace: oci
spec:
interval: 10m
url: oci://ghcr.io/stefanprodan/manifests/podinfo
ref:
tag: "6.3.5"
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: oci
namespace: oci
spec:
targetNamespace: oci
interval: 10m
path: "./"
prune: true
sourceRef:
kind: OCIRepository
name: oci
wait: true
timeout: 2m
patches:
- patch: |-
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: podinfo
spec:
minReplicas: 1
target:
name: podinfo
kind: HorizontalPodAutoscaler

View File

@ -1,4 +1,4 @@
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: webapp-production
@ -9,7 +9,6 @@ spec:
sourceRef:
kind: GitRepository
name: webapp-releases
validation: client
healthChecks:
- kind: Deployment
name: backend
@ -19,7 +18,7 @@ spec:
namespace: production
timeout: 2m
---
apiVersion: source.fluxcd.io/v1alpha1
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: webapp-releases
@ -27,4 +26,4 @@ spec:
interval: 5m
url: https://github.com/stefanprodan/podinfo
ref:
semver: ">=3.2.3"
semver: ">=6.3.5"

View File

@ -1,4 +1,4 @@
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: webapp-staging
@ -9,7 +9,6 @@ spec:
sourceRef:
kind: GitRepository
name: webapp-releases
validation: client
healthChecks:
- kind: Deployment
name: backend
@ -19,7 +18,7 @@ spec:
namespace: staging
timeout: 2m
---
apiVersion: source.fluxcd.io/v1alpha1
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: webapp-latest

View File

@ -0,0 +1,4 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: status-defaults

View File

@ -1,119 +0,0 @@
/*
Copyright 2020 The Flux CD contributors.
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 controllers
import (
"context"
"strings"
"time"
"github.com/go-logr/logr"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/util/retry"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1alpha1"
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
)
// KustomizationReconciler watches a GitRepository object
type GitRepositoryWatcher struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
}
// +kubebuilder:rbac:groups=source.fluxcd.io,resources=gitrepositories,verbs=get;list;watch
// +kubebuilder:rbac:groups=source.fluxcd.io,resources=gitrepositories/status,verbs=get
func (r *GitRepositoryWatcher) Reconcile(req ctrl.Request) (ctrl.Result, error) {
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
defer cancel()
var repo sourcev1.GitRepository
if err := r.Get(ctx, req.NamespacedName, &repo); err != nil {
return ctrl.Result{}, client.IgnoreNotFound(err)
}
log := r.Log.WithValues(strings.ToLower(repo.Kind), req.NamespacedName)
log.Info("New artifact detected")
// get the list of kustomizations that are using this Git repository
var list kustomizev1.KustomizationList
if err := r.List(ctx, &list, client.InNamespace(req.Namespace),
client.MatchingFields{kustomizev1.SourceIndexKey: req.Name}); err != nil {
log.Error(err, "unable to list kustomizations")
return ctrl.Result{}, err
}
// trigger apply for each kustomization using this Git repository
for _, kustomization := range list.Items {
if err := r.updateKustomization(kustomization); err != nil {
log.Error(err, "unable to annotate kustomization", "kustomization", kustomization.GetName())
}
log.Info("Run kustomization", "kustomization", kustomization.GetName())
}
return ctrl.Result{}, nil
}
func (r *GitRepositoryWatcher) SetupWithManager(mgr ctrl.Manager) error {
// create a kustomization index based on Git repository name
err := mgr.GetFieldIndexer().IndexField(&kustomizev1.Kustomization{}, kustomizev1.SourceIndexKey,
func(rawObj runtime.Object) []string {
k := rawObj.(*kustomizev1.Kustomization)
if k.Spec.SourceRef.Kind == "GitRepository" {
return []string{k.Spec.SourceRef.Name}
}
return nil
},
)
if err != nil {
return err
}
return ctrl.NewControllerManagedBy(mgr).
For(&sourcev1.GitRepository{}).
WithEventFilter(GitRepositoryRevisionChangePredicate{}).
Complete(r)
}
func (r *GitRepositoryWatcher) updateKustomization(kustomization kustomizev1.Kustomization) error {
firstTry := true
return retry.RetryOnConflict(retry.DefaultBackoff, func() (err error) {
if !firstTry {
if err := r.Get(context.TODO(),
types.NamespacedName{Namespace: kustomization.Namespace, Name: kustomization.Name},
&kustomization,
); err != nil {
return err
}
}
firstTry = false
kustomization.Annotations[kustomizev1.SyncAtAnnotation] = metav1.Now().String()
if kustomization.Spec.SourceRef.APIGroup == nil {
emptyAPIGroup := ""
kustomization.Spec.SourceRef.APIGroup = &emptyAPIGroup
}
err = r.Update(context.TODO(), &kustomization)
return
})
}

View File

@ -1,63 +0,0 @@
/*
Copyright 2020 The Flux CD contributors.
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 controllers
import (
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/predicate"
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
)
type GitRepositoryRevisionChangePredicate struct {
predicate.Funcs
}
func (GitRepositoryRevisionChangePredicate) Update(e event.UpdateEvent) bool {
if e.MetaOld == nil || e.MetaNew == nil {
return false
}
oldRepo, ok := e.ObjectOld.(*sourcev1.GitRepository)
if !ok {
return false
}
newRepo, ok := e.ObjectNew.(*sourcev1.GitRepository)
if !ok {
return false
}
if oldRepo.GetArtifact() == nil && newRepo.GetArtifact() != nil {
return true
}
if oldRepo.GetArtifact() != nil && newRepo.GetArtifact() != nil &&
oldRepo.GetArtifact().Revision != newRepo.GetArtifact().Revision {
return true
}
return false
}
func (GitRepositoryRevisionChangePredicate) Create(e event.CreateEvent) bool {
return false
}
func (GitRepositoryRevisionChangePredicate) Delete(e event.DeleteEvent) bool {
return false
}

View File

@ -1,654 +0,0 @@
/*
Copyright 2020 The Flux CD contributors.
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 controllers
import (
"context"
"errors"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"sigs.k8s.io/yaml"
"strings"
"time"
"github.com/go-logr/logr"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
kustypes "sigs.k8s.io/kustomize/api/types"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1alpha1"
"github.com/fluxcd/kustomize-controller/internal/alert"
"github.com/fluxcd/kustomize-controller/internal/lockedfile"
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
)
// KustomizationReconciler reconciles a Kustomization object
type KustomizationReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
}
// +kubebuilder:rbac:groups=kustomize.fluxcd.io,resources=kustomizations,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=kustomize.fluxcd.io,resources=kustomizations/status,verbs=get;update;patch
func (r *KustomizationReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
ctx := context.Background()
syncStart := time.Now()
var kustomization kustomizev1.Kustomization
if err := r.Get(ctx, req.NamespacedName, &kustomization); err != nil {
return ctrl.Result{}, client.IgnoreNotFound(err)
}
log := r.Log.WithValues(strings.ToLower(kustomization.Kind), req.NamespacedName)
kustomization = kustomizev1.KustomizationProgressing(kustomization)
if err := r.Status().Update(ctx, &kustomization); err != nil {
log.Error(err, "unable to update Kustomization status")
return ctrl.Result{Requeue: true}, err
}
if kustomization.Spec.Suspend {
msg := "Kustomization is suspended, skipping execution"
kustomization = kustomizev1.KustomizationNotReady(kustomization, kustomizev1.SuspendedReason, msg)
if err := r.Status().Update(ctx, &kustomization); err != nil {
log.Error(err, "unable to update Kustomization status")
return ctrl.Result{Requeue: true}, err
}
log.Info(msg)
return ctrl.Result{}, nil
}
var source sourcev1.Source
// get artifact source from Git repository
if kustomization.Spec.SourceRef.Kind == "GitRepository" {
var repository sourcev1.GitRepository
repositoryName := types.NamespacedName{
Namespace: kustomization.GetNamespace(),
Name: kustomization.Spec.SourceRef.Name,
}
err := r.Client.Get(ctx, repositoryName, &repository)
if err != nil {
log.Error(err, "GitRepository not found", "gitrepository", repositoryName)
return ctrl.Result{Requeue: true}, err
}
source = &repository
}
if source == nil {
err := fmt.Errorf("source `%s` kind '%s' not supported",
kustomization.Spec.SourceRef.Name, kustomization.Spec.SourceRef.Kind)
return ctrl.Result{}, err
}
// check source readiness
if source.GetArtifact() == nil {
msg := "Source is not ready"
kustomization = kustomizev1.KustomizationNotReady(kustomization, kustomizev1.ArtifactFailedReason, msg)
if err := r.Status().Update(ctx, &kustomization); err != nil {
log.Error(err, "unable to update Kustomization status")
return ctrl.Result{Requeue: true}, err
}
log.Info(msg)
return ctrl.Result{}, nil
}
// check dependencies
if len(kustomization.Spec.DependsOn) > 0 {
if err := r.checkDependencies(kustomization); err != nil {
kustomization = kustomizev1.KustomizationNotReady(kustomization, kustomizev1.DependencyNotReadyReason, err.Error())
if err := r.Status().Update(ctx, &kustomization); err != nil {
log.Error(err, "unable to update Kustomization status")
return ctrl.Result{Requeue: true}, err
}
// we can't rely on exponential backoff because it will prolong the execution too much,
// instead we requeue every half a minute.
requeueAfter := 30 * time.Second
msg := fmt.Sprintf("Dependencies do not meet ready condition, retrying in %s", requeueAfter.String())
log.Error(err, msg)
r.alert(kustomization, msg, "info")
return ctrl.Result{RequeueAfter: requeueAfter}, nil
}
log.Info("All dependencies area ready, proceeding with apply")
}
// try sync
syncedKustomization, err := r.sync(*kustomization.DeepCopy(), source)
if err != nil {
log.Error(err, "Kustomization apply failed", "revision", source.GetArtifact().Revision)
r.alert(kustomization, err.Error(), "error")
}
// update status
if err := r.Status().Update(ctx, &syncedKustomization); err != nil {
log.Error(err, "unable to update Kustomization status after sync")
return ctrl.Result{Requeue: true}, err
}
// log sync duration
log.Info(fmt.Sprintf("Kustomization sync finished in %s, next run in %s",
time.Now().Sub(syncStart).String(),
kustomization.Spec.Interval.Duration.String(),
))
// requeue kustomization
return ctrl.Result{RequeueAfter: kustomization.Spec.Interval.Duration}, nil
}
func (r *KustomizationReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&kustomizev1.Kustomization{}).
WithEventFilter(KustomizationGarbageCollectPredicate{Log: r.Log}).
WithEventFilter(KustomizationSyncAtPredicate{}).
WithOptions(controller.Options{MaxConcurrentReconciles: 4}).
Complete(r)
}
func (r *KustomizationReconciler) sync(
kustomization kustomizev1.Kustomization,
source sourcev1.Source) (kustomizev1.Kustomization, error) {
// acquire lock
unlock, err := r.lock(fmt.Sprintf("%s-%s", kustomization.GetName(), kustomization.GetNamespace()))
if err != nil {
err = fmt.Errorf("tmp dir error: %w", err)
return kustomizev1.KustomizationNotReady(kustomization, sourcev1.StorageOperationFailedReason, err.Error()), err
}
defer unlock()
// create tmp dir
tmpDir, err := ioutil.TempDir("", kustomization.Name)
if err != nil {
err = fmt.Errorf("tmp dir error: %w", err)
return kustomizev1.KustomizationNotReady(kustomization, sourcev1.StorageOperationFailedReason, err.Error()), err
}
defer os.RemoveAll(tmpDir)
// download artifact and extract files
err = r.download(kustomization, source.GetArtifact().URL, tmpDir)
if err != nil {
return kustomizev1.KustomizationNotReady(
kustomization,
kustomizev1.ArtifactFailedReason,
"artifact acquisition failed",
), err
}
dirPath := path.Join(tmpDir, kustomization.Spec.Path)
// check build path exists
if _, err := os.Stat(dirPath); err != nil {
err = fmt.Errorf("kustomization path not found: %w", err)
return kustomizev1.KustomizationNotReady(
kustomization,
kustomizev1.ArtifactFailedReason,
err.Error(),
), err
}
// generate kustomization.yaml
err = r.generate(kustomization, source.GetArtifact().Revision, dirPath)
if err != nil {
return kustomizev1.KustomizationNotReady(
kustomization,
kustomizev1.BuildFailedReason,
"kustomize create failed",
), err
}
// kustomize build
snapshot, err := r.build(kustomization, source.GetArtifact().Revision, dirPath)
if err != nil {
return kustomizev1.KustomizationNotReady(
kustomization,
kustomizev1.BuildFailedReason,
"kustomize build failed",
), err
}
// dry-run apply
err = r.validate(kustomization, dirPath)
if err != nil {
return kustomizev1.KustomizationNotReady(
kustomization,
kustomizev1.ValidationFailedReason,
fmt.Sprintf("%s-side validation failed", kustomization.Spec.Validation),
), err
}
// apply
err = r.apply(kustomization, dirPath)
if err != nil {
return kustomizev1.KustomizationNotReady(
kustomization,
kustomizev1.ApplyFailedReason,
"apply failed",
), err
}
// prune
err = r.prune(kustomization, snapshot)
if err != nil {
return kustomizev1.KustomizationNotReady(
kustomization,
kustomizev1.PruneFailedReason,
err.Error(),
), err
}
// health assessment
err = r.checkHealth(kustomization)
if err != nil {
return kustomizev1.KustomizationNotReadySnapshot(
kustomization,
snapshot,
kustomizev1.HealthCheckFailedReason,
"health check failed",
), err
}
return kustomizev1.KustomizationReady(
kustomization,
snapshot,
source.GetArtifact().Revision,
kustomizev1.ApplySucceedReason,
"kustomization was successfully applied",
), nil
}
func (r *KustomizationReconciler) download(kustomization kustomizev1.Kustomization, url string, tmpDir string) error {
timeout := kustomization.GetTimeout() + (time.Second * 1)
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
cmd := fmt.Sprintf("cd %s && curl -sL %s -o artifact.tar.gz && tar -xzf artifact.tar.gz --strip-components=1 -C .",
tmpDir, url)
command := exec.CommandContext(ctx, "/bin/sh", "-c", cmd)
output, err := command.CombinedOutput()
if err != nil {
if errors.Is(err, context.DeadlineExceeded) {
return err
}
return fmt.Errorf("artifact `%s` download failed: %s", url, string(output))
}
return nil
}
func (r *KustomizationReconciler) generate(kustomization kustomizev1.Kustomization, revision, dirPath string) error {
kfile := filepath.Join(dirPath, kustomizationFileName)
if _, err := os.Stat(kfile); err != nil {
timeout := kustomization.GetTimeout() + (time.Second * 1)
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
cmd := fmt.Sprintf("cd %s && kustomize create --autodetect --recursive", dirPath)
command := exec.CommandContext(ctx, "/bin/sh", "-c", cmd)
output, err := command.CombinedOutput()
if err != nil {
if errors.Is(err, context.DeadlineExceeded) {
return err
}
return fmt.Errorf("kustomize create failed: %s", string(output))
}
}
if err := r.generateLabelTransformer(kustomization, revision, dirPath); err != nil {
return err
}
data, err := ioutil.ReadFile(kfile)
if err != nil {
return err
}
kus := kustypes.Kustomization{
TypeMeta: kustypes.TypeMeta{
APIVersion: kustypes.KustomizationVersion,
Kind: kustypes.KustomizationKind,
},
}
if err := yaml.Unmarshal(data, &kus); err != nil {
return err
}
if len(kus.Transformers) == 0 {
kus.Transformers = []string{transformerFileName}
} else {
var exists bool
for _, transformer := range kus.Transformers {
if transformer == transformerFileName {
exists = true
break
}
}
if !exists {
kus.Transformers = append(kus.Transformers, transformerFileName)
}
}
kd, err := yaml.Marshal(kus)
if err != nil {
return err
}
return ioutil.WriteFile(kfile, kd, os.ModePerm)
}
func (r *KustomizationReconciler) generateLabelTransformer(kustomization kustomizev1.Kustomization, revision, dirPath string) error {
var lt = struct {
ApiVersion string `json:"apiVersion" yaml:"apiVersion"`
Kind string `json:"kind" yaml:"kind"`
Metadata struct {
Name string `json:"name" yaml:"name"`
} `json:"metadata" yaml:"metadata"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
FieldSpecs []kustypes.FieldSpec `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"`
}{
ApiVersion: "builtin",
Kind: "LabelTransformer",
Metadata: struct {
Name string `json:"name" yaml:"name"`
}{
Name: kustomization.GetName(),
},
Labels: gcLabels(kustomization.GetName(), kustomization.GetNamespace(), revision),
FieldSpecs: []kustypes.FieldSpec{
{Path: "metadata/labels", CreateIfNotPresent: true},
},
}
data, err := yaml.Marshal(lt)
if err != nil {
return err
}
labelsFile := filepath.Join(dirPath, transformerFileName)
if err := ioutil.WriteFile(labelsFile, data, os.ModePerm); err != nil {
return err
}
return nil
}
func (r *KustomizationReconciler) build(kustomization kustomizev1.Kustomization, revision, dirPath string) (*kustomizev1.Snapshot, error) {
timeout := kustomization.GetTimeout() + (time.Second * 1)
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
cmd := fmt.Sprintf("cd %s && kustomize build . > %s.yaml",
dirPath, kustomization.GetUID())
command := exec.CommandContext(ctx, "/bin/sh", "-c", cmd)
output, err := command.CombinedOutput()
if err != nil {
if errors.Is(err, context.DeadlineExceeded) {
return nil, err
}
return nil, fmt.Errorf("kustomize build failed: %s", string(output))
}
manifestsFile := filepath.Join(dirPath, fmt.Sprintf("%s.yaml", kustomization.GetUID()))
data, err := ioutil.ReadFile(manifestsFile)
if err != nil {
return nil, err
}
return kustomizev1.NewSnapshot(data, revision)
}
func (r *KustomizationReconciler) validate(kustomization kustomizev1.Kustomization, dirPath string) error {
if kustomization.Spec.Validation == "" {
return nil
}
timeout := kustomization.GetTimeout() + (time.Second * 1)
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
cmd := fmt.Sprintf("cd %s && kubectl apply -f %s.yaml --timeout=%s --dry-run=%s",
dirPath, kustomization.GetUID(), kustomization.GetTimeout().String(), kustomization.Spec.Validation)
command := exec.CommandContext(ctx, "/bin/sh", "-c", cmd)
output, err := command.CombinedOutput()
if err != nil {
if errors.Is(err, context.DeadlineExceeded) {
return fmt.Errorf("validation timeout: %w", err)
}
return fmt.Errorf("validation failed: %s", string(output))
}
return nil
}
func (r *KustomizationReconciler) apply(kustomization kustomizev1.Kustomization, dirPath string) error {
start := time.Now()
timeout := kustomization.GetTimeout() + (time.Second * 1)
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
cmd := fmt.Sprintf("cd %s && kubectl apply -f %s.yaml --timeout=%s",
dirPath, kustomization.GetUID(), kustomization.Spec.Interval.Duration.String())
// impersonate SA
if sa := kustomization.Spec.ServiceAccount; sa != nil {
cmd = fmt.Sprintf("%s --as system:serviceaccount:%s:%s", cmd, sa.Namespace, sa.Name)
}
command := exec.CommandContext(ctx, "/bin/sh", "-c", cmd)
output, err := command.CombinedOutput()
if err != nil {
if errors.Is(err, context.DeadlineExceeded) {
return fmt.Errorf("apply timeout: %w", err)
}
return fmt.Errorf("apply failed: %s", string(output))
}
resources := r.parseApplyOutput(output)
r.Log.WithValues(
strings.ToLower(kustomization.Kind),
fmt.Sprintf("%s/%s", kustomization.GetNamespace(), kustomization.GetName()),
).Info(
fmt.Sprintf("Kustomization applied in %s",
time.Now().Sub(start).String()),
"output", resources,
)
var diff bool
for _, action := range resources {
if action != "unchanged" {
diff = true
break
}
}
if diff {
r.alert(kustomization, string(output), "info")
}
return nil
}
func (r *KustomizationReconciler) prune(kustomization kustomizev1.Kustomization, snapshot *kustomizev1.Snapshot) error {
if kustomization.Status.Snapshot == nil || snapshot == nil {
return nil
}
if kustomization.Status.Snapshot.Revision == snapshot.Revision {
return nil
}
if !prune(kustomization.GetTimeout(),
kustomization.GetName(),
kustomization.GetNamespace(),
kustomization.Status.Snapshot,
r.Log,
) {
return fmt.Errorf("pruning failed")
}
return nil
}
func (r *KustomizationReconciler) checkHealth(kustomization kustomizev1.Kustomization) error {
timeout := kustomization.GetTimeout() + (time.Second * 1)
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
var alerts string
for _, check := range kustomization.Spec.HealthChecks {
cmd := fmt.Sprintf("kubectl -n %s rollout status %s %s --timeout=%s",
check.Namespace, check.Kind, check.Name, kustomization.GetTimeout())
command := exec.CommandContext(ctx, "/bin/sh", "-c", cmd)
output, err := command.CombinedOutput()
if err != nil {
if errors.Is(err, context.DeadlineExceeded) {
return fmt.Errorf("health check timeout for %s '%s/%s': %w",
check.Kind, check.Namespace, check.Name, err)
}
return fmt.Errorf("health check failed for %s '%s/%s': %s",
check.Kind, check.Namespace, check.Name, string(output))
} else {
msg := fmt.Sprintf("Health check passed for %s '%s/%s'",
check.Kind, check.Namespace, check.Name)
r.Log.WithValues(
strings.ToLower(kustomization.Kind),
fmt.Sprintf("%s/%s", kustomization.GetNamespace(), kustomization.GetName()),
).Info(msg)
alerts += msg + "\n"
}
}
if alerts != "" {
r.alert(kustomization, alerts, "info")
}
return nil
}
func (r *KustomizationReconciler) lock(name string) (unlock func(), err error) {
lockFile := path.Join(os.TempDir(), name+".lock")
mutex := lockedfile.MutexAt(lockFile)
return mutex.Lock()
}
func (r *KustomizationReconciler) parseApplyOutput(in []byte) map[string]string {
result := make(map[string]string)
input := strings.Split(string(in), "\n")
if len(input) == 0 {
return result
}
var parts []string
for _, str := range input {
if str != "" {
parts = append(parts, str)
}
}
for _, str := range parts {
kv := strings.Split(str, " ")
if len(kv) > 1 {
result[kv[0]] = kv[1]
}
}
return result
}
func (r *KustomizationReconciler) checkDependencies(kustomization kustomizev1.Kustomization) error {
for _, dep := range kustomization.Spec.DependsOn {
depName := types.NamespacedName{
Namespace: kustomization.GetNamespace(),
Name: dep,
}
var k kustomizev1.Kustomization
err := r.Get(context.Background(), depName, &k)
if err != nil {
return fmt.Errorf("unable to get '%s' dependency: %w", depName, err)
}
if len(k.Status.Conditions) == 0 {
return fmt.Errorf("dependency '%s' is not ready", depName)
}
for _, condition := range k.Status.Conditions {
if condition.Type == kustomizev1.ReadyCondition && condition.Status != corev1.ConditionTrue {
return fmt.Errorf("dependency '%s' is not ready", depName)
}
}
}
return nil
}
func (r *KustomizationReconciler) getProfiles(kustomization kustomizev1.Kustomization) ([]kustomizev1.Profile, error) {
list := make([]kustomizev1.Profile, 0)
var profiles kustomizev1.ProfileList
err := r.List(context.TODO(), &profiles, client.InNamespace(kustomization.GetNamespace()))
if err != nil {
return list, err
}
// filter profiles that match this kustomization taking into account '*' wildcard
for _, profile := range profiles.Items {
for _, name := range profile.Spec.Kustomizations {
if name == kustomization.GetName() || name == "*" {
list = append(list, profile)
break
}
}
}
return list, nil
}
func (r *KustomizationReconciler) alert(kustomization kustomizev1.Kustomization, msg string, verbosity string) {
profiles, err := r.getProfiles(kustomization)
if err != nil {
r.Log.WithValues(
strings.ToLower(kustomization.Kind),
fmt.Sprintf("%s/%s", kustomization.GetNamespace(), kustomization.GetName()),
).Error(err, "unable to list profiles")
return
}
for _, profile := range profiles {
if settings := profile.Spec.Alert; settings != nil {
provider, err := alert.NewProvider(settings.Type, settings.Address, settings.Username, settings.Channel)
if err != nil {
r.Log.WithValues(
strings.ToLower(kustomization.Kind),
fmt.Sprintf("%s/%s", kustomization.GetNamespace(), kustomization.GetName()),
).Error(err, "unable to configure alert provider")
continue
}
if settings.Verbosity == verbosity || verbosity == "error" {
err = provider.Post(kustomization.GetName(), kustomization.GetNamespace(), msg, verbosity)
if err != nil {
r.Log.WithValues(
strings.ToLower(kustomization.Kind),
fmt.Sprintf("%s/%s", kustomization.GetNamespace(), kustomization.GetName()),
).Error(err, "unable to send alert")
}
}
}
}
}
var (
kustomizationFileName = "kustomization.yaml"
transformerFileName = "kustomization-gc-labels.yaml"
)

View File

@ -1,157 +0,0 @@
/*
Copyright 2020 The Flux CD contributors.
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 controllers
import (
"context"
"crypto/sha1"
"fmt"
"os/exec"
"strings"
"time"
"github.com/go-logr/logr"
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/predicate"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1alpha1"
)
type KustomizationSyncAtPredicate struct {
predicate.Funcs
}
func (KustomizationSyncAtPredicate) Update(e event.UpdateEvent) bool {
if e.MetaOld == nil || e.MetaNew == nil {
// ignore objects without metadata
return false
}
if e.MetaNew.GetGeneration() != e.MetaOld.GetGeneration() {
// reconcile on spec changes
return true
}
// handle syncAt annotation
if val, ok := e.MetaNew.GetAnnotations()[kustomizev1.SyncAtAnnotation]; ok {
if valOld, okOld := e.MetaOld.GetAnnotations()[kustomizev1.SyncAtAnnotation]; okOld {
if val != valOld {
return true
}
} else {
return true
}
}
return false
}
type KustomizationGarbageCollectPredicate struct {
predicate.Funcs
Log logr.Logger
}
// Delete removes all Kubernetes objects based on the prune label selector.
func (gc KustomizationGarbageCollectPredicate) Delete(e event.DeleteEvent) bool {
if k, ok := e.Object.(*kustomizev1.Kustomization); ok {
if k.Spec.Prune && !k.Spec.Suspend && k.Status.Snapshot != nil {
gc.Log.Info("Garbage collection started",
"kustomization", fmt.Sprintf("%s/%s", k.GetNamespace(), k.GetName()))
prune(k.GetTimeout(), k.GetName(), k.GetNamespace(), k.Status.Snapshot, gc.Log)
}
}
return true
}
func prune(timeout time.Duration, name string, namespace string, snapshot *kustomizev1.Snapshot, log logr.Logger) bool {
selector := gcSelectors(name, namespace, snapshot.Revision)
ok := true
outInfo := ""
outErr := ""
for ns, kinds := range snapshot.NamespacedKinds() {
for _, kind := range kinds {
if output, err := deleteByKind(timeout, kind, ns, selector); err != nil {
outErr += " " + err.Error()
ok = false
} else {
outInfo += " " + output
}
}
}
if outErr == "" {
log.Info("Garbage collection for namespaced objects completed",
"kustomization", fmt.Sprintf("%s/%s", namespace, name),
"output", outInfo)
} else {
log.Error(fmt.Errorf(outErr), "Garbage collection for namespaced objects failed",
"kustomization", fmt.Sprintf("%s/%s", namespace, name))
}
outInfo = ""
outErr = ""
for _, kind := range snapshot.NonNamespacedKinds() {
if output, err := deleteByKind(timeout, kind, "", selector); err != nil {
outErr += " " + err.Error()
ok = false
} else {
outInfo += " " + output
}
}
if outErr == "" {
log.Info("Garbage collection for non-namespaced objects completed",
"kustomization", fmt.Sprintf("%s/%s", namespace, name),
"output", outInfo)
} else {
log.Error(fmt.Errorf(outErr), "Garbage collection for non-namespaced objects failed",
"kustomization", fmt.Sprintf("%s/%s", namespace, name))
}
return ok
}
func deleteByKind(timeout time.Duration, kind, namespace, selector string) (string, error) {
ctx, cancel := context.WithTimeout(context.Background(), timeout+time.Second)
defer cancel()
cmd := fmt.Sprintf("kubectl delete %s -l %s", kind, selector)
if namespace != "" {
cmd = fmt.Sprintf("%s -n=%s", cmd, namespace)
}
command := exec.CommandContext(ctx, "/bin/sh", "-c", cmd)
if output, err := command.CombinedOutput(); err != nil {
return "", fmt.Errorf("%s", string(output))
} else {
return strings.TrimSuffix(string(output), "\n"), nil
}
}
func gcLabels(name, namespace, revision string) map[string]string {
return map[string]string{
"kustomization/name": fmt.Sprintf("%s-%s", name, namespace),
"kustomization/revision": checksum(revision),
}
}
func gcSelectors(name, namespace, revision string) string {
return fmt.Sprintf("kustomization/name=%s-%s,kustomization/revision=%s", name, namespace, checksum(revision))
}
func checksum(in string) string {
return fmt.Sprintf("%x", sha1.Sum([]byte(in)))
}

View File

@ -1,84 +0,0 @@
/*
Copyright 2020 The Flux CD contributors.
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 controllers
import (
"context"
"strings"
"github.com/go-logr/logr"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1alpha1"
)
// ProfileReconciler reconciles a Profile object
type ProfileReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
}
// +kubebuilder:rbac:groups=kustomize.fluxcd.io,resources=profiles,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=kustomize.fluxcd.io,resources=profiles/status,verbs=get;update;patch
func (r *ProfileReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
ctx := context.Background()
var profile kustomizev1.Profile
if err := r.Get(ctx, req.NamespacedName, &profile); err != nil {
return ctrl.Result{}, client.IgnoreNotFound(err)
}
log := r.Log.WithValues(strings.ToLower(profile.Kind), req.NamespacedName)
init := true
for _, condition := range profile.Status.Conditions {
if condition.Type == kustomizev1.ReadyCondition && condition.Status == corev1.ConditionTrue {
init = false
break
}
}
if init {
profile.Status.Conditions = []kustomizev1.Condition{
{
Type: kustomizev1.ReadyCondition,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.Now(),
Reason: kustomizev1.InitializedReason,
Message: kustomizev1.InitializedReason,
},
}
if err := r.Status().Update(ctx, &profile); err != nil {
return ctrl.Result{Requeue: true}, err
}
log.Info("Profile initialised")
}
return ctrl.Result{}, nil
}
func (r *ProfileReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&kustomizev1.Profile{}).
Complete(r)
}

View File

@ -1,81 +0,0 @@
/*
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 controllers
import (
"path/filepath"
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/envtest"
"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
kustomizev1alpha1 "github.com/fluxcd/kustomize-controller/api/v1alpha1"
// +kubebuilder:scaffold:imports
)
// These tests use Ginkgo (BDD-style Go testing framework). Refer to
// http://onsi.github.io/ginkgo/ to learn more about Ginkgo.
var cfg *rest.Config
var k8sClient client.Client
var testEnv *envtest.Environment
func TestAPIs(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecsWithDefaultAndCustomReporters(t,
"Controller Suite",
[]Reporter{printer.NewlineReporter{}})
}
var _ = BeforeSuite(func(done Done) {
logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
}
var err error
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
err = kustomizev1alpha1.AddToScheme(scheme.Scheme)
Expect(err).NotTo(HaveOccurred())
// +kubebuilder:scaffold:scheme
k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme})
Expect(err).ToNot(HaveOccurred())
Expect(k8sClient).ToNot(BeNil())
close(done)
}, 60)
var _ = AfterSuite(func() {
By("tearing down the test environment")
err := testEnv.Stop()
Expect(err).ToNot(HaveOccurred())
})

1350
docs/api/v1/kustomize.md Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -2,12 +2,14 @@
To release a new version the following steps should be followed:
1. Create a new branch from `master` i.e. `release-<next semver>`. This
1. Create a `api/<next semver>` tag and push it to remote.
1. Create a new branch from `main` i.e. `release-<next semver>`. This
will function as your release preparation branch.
1. Update the `github.com/fluxcd/kustomize-controller/api` version in `go.mod`
1. Add an entry to the `CHANGELOG.md` for the new release and change the
`newTag` value in ` config/manager/kustomization.yaml` to that of the
semver release you are going to make. Commit and push your changes.
1. Create a PR for your release branch and get it merged into `master`.
1. Create a `<next semver>` tag for the merge commit in `master` and
1. Create a PR for your release branch and get it merged into `main`.
1. Create a `<next semver>` tag for the merge commit in `main` and
push it to remote.
1. Confirm CI builds and releases the newly tagged version.

View File

@ -1,206 +1,7 @@
# Kustomize Controller
The Kustomize Controller is a Kubernetes operator, specialized in running
continuous delivery pipelines for infrastructure and workloads
defined with Kubernetes manifests and assembled with Kustomize.
## Motivation
The main goal is to provide an automated operator that can
bootstrap and continuously reconcile the cluster state
from multiple sources (e.g. infrastructure and application repositories).
When provisioning a new cluster, one may wish to install workloads in a specific order,
for example a validation controller such as OPA Gatekeeper should be up and running before
applying other manifests on the cluster. Another example is a service mesh admission controller,
the proxy injector must be functional before deploying applications into the mesh.
When operating a cluster, different teams may wish to receive notification about the status
of their CD pipelines. For example, the on-call team would receive alerts about all
failures in the prod namespace, while the frontend team may wish to be alerted when a new version
of the frontend app was deployed and if the deployment is healthy, no matter the namespace.
When dealing with an incident, one may wish to suspend the reconciliation of some workloads and
pin the reconciliation of others to a specific Git revision, without having to stop the reconciler
and affect the whole cluster.
## Design
The reconciliation process can be defined with a Kubernetes custom resource
that describes a pipeline such as:
- **check** if depends-on conditions are meet
- **fetch** manifests from Git repository X
- **generate** a kustomization if needed
- **build** the manifest using kustomization X
- **validate** the resulting objects
- **apply** the objects
- **prune** the objects removed from source
- **verify** the deployment status
- **alert** if something went wrong
- **notify** if the cluster state changed
The controller that runs these pipelines relies on
[source-controller](https://github.com/fluxcd/source-controller)
for providing the raw manifests from Git repositories or any
other source that source-controller could support in the future.
If a Git repository contains no Kustomize manifests, the controller can
generate the `kustomization.yaml` file automatically and label
the objects for garbage collection (GC).
A pipeline runs on-a-schedule and ca be triggered manually by a
cluster admin or automatically by a source event such as a Git revision change.
When a pipeline is removed from the cluster, the controller's GC terminates
all the objects previously created by that pipeline.
A pipeline can be suspended, while in suspension the controller
stops the scheduler and ignores any source events.
Deleting a suspended pipeline does not trigger garbage collection.
Alerting can be configured with a Kubernetes custom resource
that specifies a webhook address, and a group of pipelines to be monitored.
The API design of the controller can be found at [kustomize.fluxcd.io/v1alpha1](v1alpha1/README.md).
## Backward compatibility
| Feature | Kustomize Controller | Flux |
| -------------------------------------------- | ----------------------- | ------------------ |
| Plain Kubernetes manifests sync | :heavy_check_mark: | :heavy_check_mark: |
| Kustomize build sync | :heavy_check_mark: | :heavy_check_mark: |
| Garbage collection | :heavy_check_mark: | :heavy_check_mark: |
| Container image updates | :x: | :heavy_check_mark: |
| Generate manifests with shell scripts | :x: | :heavy_check_mark: |
Syncing will not support the `.flux.yaml` mechanism as running shell scripts and binaries to
generate manifests is not in the scope of Kustomize controller.
Container registry scanning and automated image updates is not in the scope of Kustomize controller,
could be implemented by a dedicated controller.
## Example
After installing kustomize-controller and its companion source-controller, we
can create a series of pipelines for deploying Istio, and an application made of
multiple services.
Create a source that points to where the Istio control plane manifests are,
and a kustomization for installing/upgrading Istio:
```yaml
apiVersion: source.fluxcd.io/v1alpha1
kind: GitRepository
metadata:
name: istio
namespace: kustomize-system
spec:
interval: 5m
url: https://github.com/stefanprodan/gitops-istio
ref:
branch: master
---
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: istio
namespace: kustomize-system
spec:
interval: 10m
path: "./istio/"
sourceRef:
kind: GitRepository
name: istio
healthChecks:
- kind: Deployment
name: istiod
namespace: istio-system
timeout: 2m
```
Create a source for the app repo, a kustomization for each service defining depends-on relationships:
```yaml
apiVersion: source.fluxcd.io/v1alpha1
kind: GitRepository
metadata:
name: webapp
namespace: kustomize-system
spec:
interval: 1m
url: https://github.com/stefanprodan/podinfo-deploy
ref:
branch: master
---
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: webapp-common
namespace: kustomize-system
spec:
dependsOn:
- istio
interval: 5m
path: "./webapp/common/"
prune: true
sourceRef:
kind: GitRepository
name: webapp
validate: client
---
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: webapp-backend
namespace: kustomize-system
spec:
dependsOn:
- webapp-common
interval: 5m
path: "./webapp/backend/"
prune: true
sourceRef:
kind: GitRepository
name: webapp
validate: server
healthChecks:
- kind: Deployment
name: backend
namespace: webapp
---
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: webapp-frontend
namespace: kustomize-system
spec:
dependsOn:
- webapp-backend
interval: 5m
path: "./webapp/frontend/"
prune: true
sourceRef:
kind: GitRepository
name: webapp
validate: server
```
Configure alerting for all pipelines in the `kustomize-system` namespace:
```yaml
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Profile
metadata:
name: default
namespace: kustomize-system
spec:
alert:
type: slack
verbosity: info
address: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
username: kustomize-controller
channel: general
kustomizations:
- '*'
```
## API Specification
[v1beta1](v1beta2/README.md).
[v1beta2](v1beta2/README.md).
[v1](v1/README.md).

17
docs/spec/v1/README.md Normal file
View File

@ -0,0 +1,17 @@
# kustomize.toolkit.fluxcd.io/v1
This is the v1 API specification for defining continuous delivery pipelines
of Kubernetes objects generated with Kustomize.
## Specification
- [Kustomization CRD](kustomizations.md)
+ [Example](kustomizations.md#example)
+ [Writing a Kustomization spec](kustomizations.md#writing-a-kustomization-spec)
+ [Working with Kustomizations](kustomizations.md#working-with-kustomizations)
* [Recommended settings](kustomizations.md#recommended-settings)
+ [Kustomization Status](kustomizations.md#kustomization-status)
## Implementation
* [kustomize-controller](https://github.com/fluxcd/kustomize-controller/)

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,20 @@
# kustomize.fluxcd.io/v1alpha1
# kustomize.toolkit.fluxcd.io/v1alpha1
This is the v1alpha1 API specification for defining continuous delivery pipelines
of Kubernetes objects generated with Kustomize.
## Specification
- [Kustomization CRD](kustomization.md)
+ [Source reference](kustomization.md#source-reference)
+ [Generate kustomization.yaml](kustomization.md#generate-kustomizationyaml)
+ [Reconciliation](kustomization.md#reconciliation)
+ [Garbage collection](kustomization.md#garbage-collection)
+ [Health assessment](kustomization.md#health-assessment)
+ [Kustomization dependencies](kustomization.md#kustomization-dependencies)
+ [Role-based access control](kustomization.md#role-based-access-control)
+ [Status](kustomization.md#status)
- [Profile CRD](profile.md)
+ [Alerting configuration](profile.md#alerting)
- [Kustomization CRD](kustomizations.md)
+ [Source reference](kustomizations.md#source-reference)
+ [Generate kustomization.yaml](kustomizations.md#generate-kustomizationyaml)
+ [Reconciliation](kustomizations.md#reconciliation)
+ [Garbage collection](kustomizations.md#garbage-collection)
+ [Health assessment](kustomizations.md#health-assessment)
+ [Kustomization dependencies](kustomizations.md#kustomization-dependencies)
+ [Role-based access control](kustomizations.md#role-based-access-control)
+ [Secrets decryption](kustomizations.md#secrets-decryption)
+ [Status](kustomizations.md#status)
## Implementation

View File

@ -1,27 +1,35 @@
# Kustomization
The `Kustomization` API defines a pipeline for fetching, building, testing and applying Kubernetes manifests.
The `Kustomization` API defines a pipeline for fetching, decrypting, building, validating and applying Kubernetes manifests.
## Specification
A **kustomization** object defines the source of Kubernetes manifests by referencing an object
A **Kustomization** object defines the source of Kubernetes manifests by referencing an object
managed by [source-controller](https://github.com/fluxcd/source-controller),
the path to the kustomization file within that source,
and the interval at which the kustomize build output is applied on the cluster.
```go
type KustomizationSpec struct {
// A list of kustomization that must be ready before this
// kustomization can be applied.
// DependsOn may contain a dependency.CrossNamespaceDependencyReference slice
// with references to Kustomization resources that must be ready before this
// Kustomization can be reconciled.
// +optional
DependsOn []string `json:"dependsOn,omitempty"`
DependsOn []dependency.CrossNamespaceDependencyReference `json:"dependsOn,omitempty"`
// Decrypt Kubernetes secrets before applying them on the cluster.
// +optional
Decryption *Decryption `json:"decryption,omitempty"`
// The interval at which to apply the kustomization.
// +required
Interval metav1.Duration `json:"interval"`
// The KubeConfig for reconciling the Kustomization on a remote cluster.
// +optional
KubeConfig *KubeConfig `json:"kubeConfig,omitempty"`
// Path to the directory containing the kustomization file.
// +kubebuilder:validation:Pattern="^\\./"
// +required
Path string `json:"path"`
@ -29,10 +37,9 @@ type KustomizationSpec struct {
// +required
Prune bool `json:"prune"`
// A list of workloads (Deployments, DaemonSets and StatefulSets)
// to be included in the health assessment.
// A list of resources to be included in the health assessment.
// +optional
HealthChecks []WorkloadReference `json:"healthChecks,omitempty"`
HealthChecks []CrossNamespaceObjectReference `json:"healthChecks,omitempty"`
// The Kubernetes service account used for applying the kustomization.
// +optional
@ -40,13 +47,18 @@ type KustomizationSpec struct {
// Reference of the source where the kustomization file is.
// +required
SourceRef corev1.TypedLocalObjectReference `json:"sourceRef"`
SourceRef CrossNamespaceSourceReference `json:"sourceRef"`
// This flag tells the controller to suspend subsequent kustomize executions,
// it does not apply to already started executions. Defaults to false.
// +optional
Suspend bool `json:"suspend,omitempty"`
// TargetNamespace sets or overrides the namespace in the
// kustomization.yaml file.
// +optional
TargetNamespace string `json:"targetNamespace,omitempty"`
// Timeout for validation, apply and health checking operations.
// Defaults to 'Interval' duration.
// +optional
@ -60,18 +72,57 @@ type KustomizationSpec struct {
}
```
The status sub-resource describes the result of the last kustomization execution:
The decryption section defines how decryption is handled for Kubernetes manifests:
```go
type Decryption struct {
// Provider is the name of the decryption engine.
// +kubebuilder:validation:Enum=sops
// +required
Provider string `json:"provider"`
// The secret name containing the private OpenPGP keys used for decryption.
// +optional
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
}
```
KubeConfig references a Kubernetes secret generated by CAPI:
```go
type KubeConfig struct {
// The secret name containing a 'value' key with the kubeconfig file as the value.
// Ref: https://github.com/kubernetes-sigs/cluster-api/blob/release-0.3/util/secret/consts.go#L24
// +required
SecretRef corev1.LocalObjectReference `json:"secretRef,omitempty"`
}
```
The status sub-resource records the result of the last reconciliation:
```go
type KustomizationStatus struct {
// ObservedGeneration is the last reconciled generation.
// +optional
Conditions []Condition `json:"conditions,omitempty"`
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// The last successfully applied revision.
// The revision format for Git sources is <branch|tag>/<commit-sha>.
// +optional
LastAppliedRevision string `json:"lastAppliedRevision,omitempty"`
// LastAttemptedRevision is the revision of the last reconciliation attempt.
// +optional
LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"`
// LastHandledReconcileAt is the last manual reconciliation request (by
// annotating the Kustomization) handled by the reconciler.
// +optional
LastHandledReconcileAt string `json:"lastHandledReconcileAt,omitempty"`
// The last successfully applied revision metadata.
// +optional
Snapshot *Snapshot `json:"snapshot"`
@ -82,8 +133,8 @@ Status condition types:
```go
const (
// ReadyCondition represents the fact that a given kustomization has passed
// validation and was successfully applied on the cluster.
// ReadyCondition is the name of the condition that
// records the readiness status of a Kustomization.
ReadyCondition string = "Ready"
)
```
@ -92,38 +143,44 @@ Status condition reasons:
```go
const (
// ApplySucceedReason represents the fact that the kustomization apply succeed.
ApplySucceedReason string = "ApplySucceed"
// ReconciliationSucceededReason represents the fact that the
// reconciliation of the Kustomization has succeeded.
ReconciliationSucceededReason string = "ReconciliationSucceeded"
// ApplyFailedReason represents the fact that the kustomization apply failed.
ApplyFailedReason string = "ApplyFailed"
// ReconciliationFailedReason represents the fact that the
// reconciliation of the Kustomization has failed.
ReconciliationFailedReason string = "ReconciliationFailed"
// ArtifactFailedReason represents the fact that the artifact download failed.
ArtifactFailedReason string = "ArtifactFailed"
// BuildFailedReason represents the fact that the kustomize build command failed.
BuildFailedReason string = "BuildFailed"
// DependencyNotReady represents the fact that the one of the dependencies is not ready.
DependencyNotReadyReason string = "DependencyNotReady"
// HealthCheckFailedReason represents the fact that the one of the health check failed.
HealthCheckFailedReason string = "HealthCheckFailed"
// InitializedReason represents the fact that a given resource has been initialized.
InitializedReason string = "Initialized"
// ProgressingReason represents the fact that a kustomization reconciliation
// is underway.
// ProgressingReason represents the fact that the
// reconciliation of the Kustomization is underway.
ProgressingReason string = "Progressing"
// PruneFailedReason represents the fact that the kustomization pruning failed.
PruneFailedReason string = "PruneFailed"
// SuspendedReason represents the fact that the kustomization execution is suspended.
// SuspendedReason represents the fact that the
// reconciliation of the Kustomization has been suspended.
SuspendedReason string = "Suspended"
// ValidationFailedReason represents the fact that the dry-run apply failed.
// DependencyNotReady represents the fact that
// one of the dependencies of the Kustomization is not ready.
DependencyNotReadyReason string = "DependencyNotReady"
// PruneFailedReason represents the fact that the
// pruning of the Kustomization failed.
PruneFailedReason string = "PruneFailed"
// ArtifactFailedReason represents the fact that the
// artifact download of the kustomization failed.
ArtifactFailedReason string = "ArtifactFailed"
// BuildFailedReason represents the fact that the
// kustomize build of the Kustomization failed.
BuildFailedReason string = "BuildFailed"
// HealthCheckFailedReason represents the fact that
// one of the health checks of the Kustomization failed.
HealthCheckFailedReason string = "HealthCheckFailed"
// ValidationFailedReason represents the fact that the
// validation of the Kustomization manifests has failed.
ValidationFailedReason string = "ValidationFailed"
)
```
@ -138,10 +195,12 @@ changes, it generates a Kubernetes event that triggers a kustomize build and app
Source supported types:
* [GitRepository](https://github.com/fluxcd/source-controller/blob/master/docs/spec/v1alpha1/gitrepositories.md)
* [Bucket](https://github.com/fluxcd/source-controller/blob/master/docs/spec/v1alpha1/buckets.md)
> **Note** that the source should contain the kustomization.yaml and all the
> Kubernetes manifests and configuration files referenced in the kustomization.yaml.
> If your repository contains only plain manifests, then you should enable kustomization.yaml generation.
> If your Git repository or S3 bucket contains only plain manifests,
> then a kustomization.yaml will be automatically generated.
## Generate kustomization.yaml
@ -160,21 +219,21 @@ The interval time units are `s`, `m` and `h` e.g. `interval: 5m`, the minimum va
The kustomization execution can be suspended by setting `spec.susped` to `true`.
The controller can be told to execute the kustomization outside of the specified interval
The controller can be told to reconcile the kustomization outside of the specified interval
by annotating the kustomization object with:
```go
const (
// SyncAtAnnotation is the annotation used for triggering a
// sync outside of the specified schedule.
SyncAtAnnotation string = "kustomize.fluxcd.io/syncAt"
// ReconcileAtAnnotation is the annotation used for triggering a
// reconciliation outside of the defined schedule.
ReconcileAtAnnotation string = "fluxcd.io/reconcileAt"
)
```
On-demand execution example:
```bash
kubectl annotate --overwrite kustomization/podinfo kustomize.fluxcd.io/syncAt="$(date +%s)"
kubectl annotate --overwrite kustomization/podinfo fluxcd.io/reconcileAt="$(date +%s)"
```
## Garbage collection
@ -190,14 +249,19 @@ triggering a removal of all Kubernetes objects previously applied on the cluster
A kustomization can contain a series of health checks used to determine the
[rollout status](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#deployment-status)
of the deployed workloads. A health check entry can reference one of the following Kubernetes types:
Deployment, DaemonSet or StatefulSet.
of the deployed workloads and the ready status of custom resources.
A health check entry can reference one of the following types:
* Kubernetes builtin kinds: Deployment, DaemonSet, StatefulSet, PersistentVolumeClaim, Pod, PodDisruptionBudget, Job, CronJob, Service, Secret, ConfigMap, CustomResourceDefinition
* Toolkit kinds: HelmRelease, HelmRepository, GitRepository, etc
* Custom resources that are compatible with [kstatus](https://github.com/kubernetes-sigs/cli-utils/tree/master/pkg/kstatus)
Assuming the kustomization source contains a Kubernetes Deployment named `backend`,
a health check can be defined as follows:
```yaml
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: backend
@ -209,7 +273,8 @@ spec:
kind: GitRepository
name: webapp
healthChecks:
- kind: Deployment
- apiVersion: apps/v1
kind: Deployment
name: backend
namespace: dev
timeout: 2m
@ -221,6 +286,35 @@ if the rollout failed, or if it takes more than the specified timeout to complet
kustomization ready condition is set to `false`. If the deployment becomes healthy on the next
execution, then the kustomization is marked as ready.
When a Kustomization contains HelmRelease objects, instead of checking the underling Deployments, you can
define a health check that waits for the HelmReleases to be reconciled with:
```yaml
apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: webapp
spec:
interval: 15m
path: "./releases/"
prune: true
sourceRef:
kind: GitRepository
name: webapp
healthChecks:
- apiVersion: helm.toolkit.fluxcd.io/v1alpha1
kind: HelmRelease
name: frontend
namespace: dev
- apiVersion: helm.toolkit.fluxcd.io/v1alpha1
kind: HelmRelease
name: backend
namespace: dev
timeout: 5m
```
If all the HelmRelease objects are successfully installed or upgraded, then the Kustomization will be marked as ready.
## Kustomization dependencies
When applying a kustomization, you may need to make sure other resources exist before the
@ -239,7 +333,7 @@ Assuming two kustomizations:
You can instruct the controller to apply the `common` kustomization before `backend`:
```yaml
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: common
@ -251,13 +345,13 @@ spec:
kind: GitRepository
name: webapp
---
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: backend
spec:
dependsOn:
- common
- name: common
interval: 5m
path: "./webapp/backend/"
prune: true
@ -270,10 +364,11 @@ When combined with health assessment, a kustomization will run after all its dep
For example, a service mesh proxy injector should be running before deploying applications inside the mesh.
```yaml
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: istio
namespace: istio-system
spec:
interval: 5m
path: "./profiles/default/"
@ -286,14 +381,15 @@ spec:
namespace: istio-system
timeout: 2m
---
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: backend
spec:
dependsOn:
- common
- istio
- name: common
- name: istio
namespace: istio-system
interval: 5m
path: "./webapp/backend/"
prune: true
@ -360,13 +456,13 @@ subjects:
Create a kustomization that prevents altering the cluster state outside of the `webapp` namespace:
```yaml
apiVersion: kustomize.fluxcd.io/v1alpha1
apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: backend
spec:
dependsOn:
- common
- name: common
serviceAccount:
name: webapp-reconciler
namespace: webapp
@ -383,6 +479,52 @@ account. If the kustomization contains cluster level objects like CRDs or object
namespace, the reconciliation will fail since the account it runs under has no permissions to alter objects
outside of the `webapp` namespace.
## Secrets decryption
In order to store secrets safely in a public or private Git repository,
you can use [Mozilla SOPS](https://github.com/mozilla/sops)
and encrypt your Kubernetes Secrets data with OpenPGP keys.
Generate a GPG key **without passphrase** using [gnupg](https://www.gnupg.org/)
then use sops to encrypt a Kubernetes secret:
```sh
sops --pgp=FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4 \
--encrypt --encrypted-regex '^(data|stringData)$' --in-place my-secret.yaml
```
Commit and push the encrypted file to Git.
> **Note** that you should encrypt only the `data` section, encrypting the Kubernetes secret
> metadata, kind or apiVersion is not supported by kustomize-controller.
Create a secret in the `gitops-system` namespace with the OpenPGP private key:
```sh
gpg --export-secret-keys --armor FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4 |
kubectl -n gitops-system create secret generic sops-gpg \
--from-file=sops.asc=/dev/stdin
```
Configure decryption by referring the private key secret:
```yaml
apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1
kind: Kustomization
metadata:
name: my-secrets
spec:
interval: 5m
path: "./"
sourceRef:
kind: GitRepository
name: my-secrets
decryption:
provider: sops
secretRef:
name: sops-pgp
```
## Status
When the controller completes a kustomization apply, reports the result in the `status` sub-resource.
@ -392,12 +534,13 @@ A successful reconciliation sets the ready condition to `true` and updates the r
```yaml
status:
conditions:
- lastTransitionTime: "2020-04-23T19:28:48Z"
message: kustomization was successfully applied
reason: ApplySucceed
- lastTransitionTime: "2020-09-17T19:28:48Z"
message: "Applied revision: master/a1afe267b54f38b46b487f6e938a6fd508278c07"
reason: ReconciliationSucceeded
status: "True"
type: Ready
lastAppliedRevision: master/a1afe267b54f38b46b487f6e938a6fd508278c07
lastAttemptedRevision: master/a1afe267b54f38b46b487f6e938a6fd508278c07
```
You can wait for the kustomize controller to complete a reconciliation with:
@ -411,7 +554,7 @@ The controller logs the Kubernetes objects:
```json
{
"level": "info",
"ts": 1587195448.071468,
"ts": "2020-09-17T07:27:11.921Z",
"logger": "controllers.Kustomization",
"msg": "Kustomization applied in 1.436096591s",
"kustomization": "default/backend",
@ -428,24 +571,24 @@ A failed reconciliation sets the ready condition to `false`:
```yaml
status:
conditions:
- lastTransitionTime: "2020-04-23T19:29:48Z"
message: 'server-side validation failed'
- lastTransitionTime: "2020-09-17T07:26:48Z"
message: "The Service 'backend' is invalid: spec.type: Unsupported value: 'Ingress'"
reason: ValidationFailed
status: "False"
type: Ready
lastAppliedRevision: master/a1afe267b54f38b46b487f6e938a6fd508278c07
lastAttemptedRevision: master/7c500d302e38e7e4a3f327343a8a5c21acaaeb87
```
> **Note** that the last applied revision is updated only on a successful reconciliation.
When a reconciliation fails, the controller logs the error:
When a reconciliation fails, the controller logs the error and issues a Kubernetes event:
```json
{
"level": "error",
"ts": 1587195448.071468,
"ts": "2020-09-17T07:27:11.921Z",
"logger": "controllers.Kustomization",
"msg": "server-side validation failed",
"kustomization": "default/backend",
"error": "The Service 'backend' is invalid: spec.type: Unsupported value: 'Ingress'"
}

View File

@ -1,97 +0,0 @@
# Profile
The `Profile` API defines a common behavior for a group of [Kustomization](kustomization.md) objects.
## Specification
```go
type ProfileSpec struct {
// Alerting configuration of the kustomizations targeted by this profile.
// +optional
Alert *AlertProvider `json:"alert"`
// The list of kustomizations that this profile applies to.
// +required
Kustomizations []string `json:"kustomizations"`
}
```
Alerting configuration:
```go
type AlertProvider struct {
// HTTP(S) webhook address of this provider
// +required
Address string `json:"address"`
// Alert channel for this provider
// +required
Channel string `json:"channel"`
// Bot username for this provider
// +required
Username string `json:"username"`
// Filter alerts based on verbosity level, defaults to ('error').
// +kubebuilder:validation:Enum=info;error
// +optional
Verbosity string `json:"verbosity,omitempty"`
// Type of provider
// +kubebuilder:validation:Enum=slack;discord
// +required
Type string `json:"type"`
}
```
Status condition types:
```go
const (
// ReadyCondition represents the fact that a given Profile has been
// processed by the controller.
ReadyCondition string = "Ready"
)
```
Status condition reasons:
```go
const (
// InitializedReason represents the fact that a given resource has been initialized.
InitializedReason string = "Initialized"
)
```
## Alerting
Alerting can be configured by creating a profile that contains an alert definition:
```yaml
apiVersion: kustomize.fluxcd.io/v1alpha1
kind: Profile
metadata:
name: default
spec:
alert:
type: slack
verbosity: info
address: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
username: kustomize-controller
channel: general
kustomizations:
- '*'
```
The alert provider type can be: `slack` or `discord` and the verbosity can be set to `info` or `error`.
The `*` wildcard tells the controller to use this profile for all kustomizations that are present
in the same namespace as the profile.
Multiple profiles can be used to send alerts to different channels or Slack organizations.
When the verbosity is set to `error`, the controller will alert on any error encountered during the
reconciliation process. This includes kustomize build and validation errors, apply errors and
health check failures.
When the verbosity is set to `info`, the controller will alert whenever a kustomization status changes.

View File

@ -0,0 +1,24 @@
# kustomize.toolkit.fluxcd.io/v1beta1
This is the v1beta1 API specification for defining continuous delivery pipelines
of Kubernetes objects generated with Kustomize.
## Specification
- [Kustomization CRD](kustomizations.md)
+ [Source reference](kustomizations.md#source-reference)
+ [Generate kustomization.yaml](kustomizations.md#generate-kustomizationyaml)
+ [Reconciliation](kustomizations.md#reconciliation)
+ [Garbage collection](kustomizations.md#garbage-collection)
+ [Health assessment](kustomizations.md#health-assessment)
+ [Kustomization dependencies](kustomizations.md#kustomization-dependencies)
+ [Role-based access control](kustomizations.md#role-based-access-control)
+ [Override kustomize config](kustomizations.md#override-kustomize-config)
+ [Variable substitution](kustomizations.md#variable-substitution)
+ [Targeting remote clusters](kustomizations.md#remote-clusters--cluster-api)
+ [Secrets decryption](kustomizations.md#secrets-decryption)
+ [Status](kustomizations.md#status)
## Implementation
* [kustomize-controller](https://github.com/fluxcd/kustomize-controller/)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
# kustomize.toolkit.fluxcd.io/v1beta2
This is the v1beta2 API specification for defining continuous delivery pipelines
of Kubernetes objects generated with Kustomize.
## Specification
- [Kustomization CRD](kustomizations.md)
+ [Example](kustomizations.md#example)
+ [Recommended settings](kustomizations.md#recommended-settings)
+ [Source reference](kustomizations.md#source-reference)
+ [Generate kustomization.yaml](kustomizations.md#generate-kustomizationyaml)
+ [Reconciliation](kustomizations.md#reconciliation)
+ [Garbage collection](kustomizations.md#garbage-collection)
+ [Health assessment](kustomizations.md#health-assessment)
+ [Kustomization dependencies](kustomizations.md#kustomization-dependencies)
+ [Role-based access control](kustomizations.md#role-based-access-control)
+ [Override kustomize config](kustomizations.md#override-kustomize-config)
+ [Variable substitution](kustomizations.md#variable-substitution)
+ [Targeting remote clusters](kustomizations.md#remote-clusters--cluster-api)
+ [Secrets decryption](kustomizations.md#secrets-decryption)
+ [Status](kustomizations.md#status)
## Implementation
* [kustomize-controller](https://github.com/fluxcd/kustomize-controller/)

File diff suppressed because it is too large Load Diff

271
go.mod
View File

@ -1,16 +1,265 @@
module github.com/fluxcd/kustomize-controller
go 1.13
go 1.24.0
replace github.com/fluxcd/kustomize-controller/api => ./api
// 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
require (
github.com/fluxcd/source-controller v0.0.1-alpha.3
github.com/go-logr/logr v0.1.0
github.com/onsi/ginkgo v1.11.0
github.com/onsi/gomega v1.8.1
k8s.io/api v0.17.2
k8s.io/apimachinery v0.17.2
k8s.io/client-go v0.17.2
sigs.k8s.io/controller-runtime v0.5.0
sigs.k8s.io/kustomize/api v0.3.2
sigs.k8s.io/yaml v1.1.0
cloud.google.com/go/kms v1.22.0
filippo.io/age v1.2.1
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.1
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1
github.com/aws/aws-sdk-go-v2 v1.36.5
github.com/aws/aws-sdk-go-v2/credentials v1.17.70
github.com/cyphar/filepath-securejoin v0.4.1
github.com/dimchansky/utfbom v1.1.1
github.com/fluxcd/cli-utils v0.36.0-flux.14
github.com/fluxcd/kustomize-controller/api v1.6.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.23.0
github.com/fluxcd/pkg/cache v0.10.0
github.com/fluxcd/pkg/http/fetch v0.17.0
github.com/fluxcd/pkg/kustomize v1.19.0
github.com/fluxcd/pkg/runtime v0.72.0
github.com/fluxcd/pkg/ssa v0.51.0
github.com/fluxcd/pkg/tar v0.13.0
github.com/fluxcd/pkg/testserver v0.11.0
github.com/fluxcd/source-controller/api v1.6.0
github.com/getsops/sops/v3 v3.10.2
github.com/google/cel-go v0.23.2
github.com/hashicorp/vault/api v1.20.0
github.com/onsi/gomega v1.37.0
github.com/opencontainers/go-digest v1.0.0
github.com/ory/dockertest/v3 v3.12.0
github.com/spf13/pflag v1.0.6
golang.org/x/net v0.42.0
golang.org/x/oauth2 v0.30.0
k8s.io/api v0.33.2
k8s.io/apimachinery v0.33.2
k8s.io/client-go 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/yaml v1.5.0
)
// Pin kustomize to v5.7.0
replace (
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
)
// Fix CVE-2022-28948
replace gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1
require (
cel.dev/expr v0.23.0 // indirect
cloud.google.com/go v0.120.1 // 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
cloud.google.com/go/iam v1.5.2 // indirect
cloud.google.com/go/longrunning v0.6.7 // indirect
cloud.google.com/go/monitoring v1.24.2 // indirect
cloud.google.com/go/storage v1.51.0 // indirect
dario.cat/mergo v1.0.1 // indirect
filippo.io/edwards25519 v1.1.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/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.3.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.1.1 // 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/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/ProtonMail/go-crypto v1.2.0 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.17 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.72 // 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/internal/v4a v1.3.34 // 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/checksum v1.7.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 // indirect
github.com/aws/aws-sdk-go-v2/service/kms v1.38.3 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.79.2 // 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/blang/semver v3.5.1+incompatible // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/carapace-sh/carapace-shlex v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chai2010/gettext-go v1.0.3 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/cncf/xds/go v0.0.0-20250326154945-ae57f3c0d45f // indirect
github.com/containerd/continuity v0.4.5 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.7 // 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 v28.2.2+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // 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.18.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fluxcd/pkg/envsubst v1.4.0 // indirect
github.com/fluxcd/pkg/sourceignore v0.13.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
github.com/getsops/gopgagent v0.0.0-20241224165529-7044f28e491e // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.6.2 // indirect
github.com/go-git/go-git/v5 v5.16.2 // indirect
github.com/go-jose/go-jose/v4 v4.1.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // 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/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/gogo/protobuf v1.3.2 // 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-cmp 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/shlex v0.0.0-20191202100458-e7afc7fbc510 // 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/goware/prefixer v0.0.0-20160118172347-395022866408 // 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/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.9.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/moby/sys/user v0.4.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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/opencontainers/go-digest/blake3 v0.0.0-20250116041648-1e56c6daea3b // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/opencontainers/runc v1.2.6 // 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/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // 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/russross/blackfriday/v2 v2.1.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cobra v1.9.1 // indirect
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/urfave/cli v1.22.16 // 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.2.0 // indirect
github.com/zeebo/blake3 v0.2.4 // indirect
github.com/zeebo/errs v1.4.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.35.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.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/sdk v1.36.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.36.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.40.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // 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/text v0.27.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 v0.0.0-20250505200425-f936aa4a68b2 // 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/ini.v1 v1.67.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.33.2 // indirect
k8s.io/cli-runtime 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
k8s.io/kubectl v0.33.2 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/kustomize/kyaml v0.20.0 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
)

1309
go.sum

File diff suppressed because it is too large Load Diff

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