Commit Graph

43 Commits

Author SHA1 Message Date
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 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
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 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 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
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
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
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 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 eccdbad35a
Add OCI revision to events
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-01-22 08:03:14 +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
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
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
Sunny 3d87349536 Update Bucket API to v1
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-27 13:29:44 +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 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
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
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 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 4f471c7dab
Add `StrictPostBuildSubstitutions` feature flag
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-08 19:08:33 +03: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
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 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
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 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
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
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
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 77cf93394c
misc: address theoretical nil pointer dereference
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-12 12:34:23 +02: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
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
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 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 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
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
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 ede27ccf61
Rename `controllers` to `controller`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-07-04 11:35:55 +03: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 e8f4808ea2
Rename controllers to controller
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-24 12:27:27 +03:00