Commit Graph

220 Commits

Author SHA1 Message Date
Stefan Prodan 751d48a2e0
Update dependencies to Helm v3.17.0 and Kustomize v5.6.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-01-31 15:22:00 +02:00
Kumar Mallikarjuna 53578dd43f Update API docs and descriptions
Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna.work@gmail.com>
2025-01-10 16:21:57 +05:30
Kumar Mallikarjuna 98622cd087 Add `disableTakeOwnership` to Helm install/upgrade actions
This change adds a new field called `disableTakeOwnership` to `.spec.install` and `.spec.upgrade`. The flag allows users to disable ignoring helm annotations and labels before taking ownership of existing resources during install and upgrade.

Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna.work@gmail.com>
2025-01-08 23:26:05 +05:30
Stefan Prodan e1f1022e2e
Update dependencies to Kubernetes 1.32.0 and Go 1.23.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-12 19:13:31 +02:00
Stefan Prodan af516b84b0
Make `ValuesReference` an alias for backwards compat
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-12 16:27:54 +02:00
Stefan Prodan 9c58e02b62
Refactor values composition to use `pkg/chartutil`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-10 12:04:54 +02:00
Stefan Prodan 1c9a8b14f2
Update Kustomize packages to v5.5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-06 17:34:58 +02:00
Sunny 701ea28bc9 Update flux deps and k8s deps to 1.31.1
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-25 21:18:33 +00:00
Stefan Prodan 54f0b42b34
Add `disableSchemaValidation` to Helm install/upgrade actions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-20 22:28:51 +03:00
Stefan Prodan e53d5c036b
Update dependencies to Kubernetes v1.31.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-15 11:15:19 +03:00
Stefan Prodan d909c31b5e
Fix: Allow upgrading from v2beta1 to v2 (GA)
Add `.spec.chartRef` placeholder to v2beta1 to allow upgrading to v2 GA.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-10 16:27:15 +03:00
Soule BA 16b61c6f8a
Make chartTemplate a pointer in .spec.chart
If implemented, this will omit empty `.spec.chart` in rendered yamls.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-05-10 12:45:33 +02:00
Soule BA 4b6febf48c
Add test cases for Summarize() and DetermineReleaseState()
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-05-07 23:13:47 +02:00
Soule BA 4069ad47e9
A better implementation for observing Postrenderers
This implementation update `.status.ObervedPostRenderersDigest` after a
successful reconciliation if `spec.postRenderers` is not nil.

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

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-05-07 14:17:17 +02:00
Soule BA aa70ac2b31
fix: detect changes in spec.postRenderers
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-05-07 11:57:52 +02:00
Stefan Prodan 863d3115f3
Add app version to CRD manifests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-07 12:18:20 +03:00
Stefan Prodan 7f78cdc368
Add the chart app version to events metadata
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-07 00:14:55 +03:00
Stefan Prodan 42fe4a39c1
Remove deprecated `patchesStrategicMerge` and `patchesJson6902` from v2 API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-04 12:41:24 +03:00
Stefan Prodan dfee7b086d
Set group version for GA API to v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-04 12:24:33 +03:00
Stefan Prodan 64d1236c17
Remove deprecated `.status.lastAppliedRevision` from v2 API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-04 12:24:33 +03:00
Stefan Prodan 2cbd2bd944
Remove deprecated `.spec.valuesFile` from v2 API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-04 12:24:32 +03:00
Stefan Prodan 23f2ebe86d
Update copyright year (GA API)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-03 17:35:01 +03:00
Stefan Prodan 00785fbfa3
Promote `HelmRelease` API to v2 (GA)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-03 16:25:14 +03:00
Robin Breathe bca7983d77
feat(HelmChartTemplateSpec): optionally ignore missing valuesFiles
Signed-off-by: Robin Breathe <robin@isometry.net>
2024-05-03 14:01:20 +02:00
Stefan Prodan d0900635cf
Update `HelmChart` API to v1 (GA)
Bump source-controller to v1.3.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-03 13:43:51 +03:00
Stefan Prodan ab237a97aa
Update dependencies to Kubernetes 1.30
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-26 12:24:28 +03:00
Soule BA 3bb715ad97
Enable HelmChart ChartRef
If implemented, user will be able to share an existing HelmChart custom
resource between HelmReleases.

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

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

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:41 +02:00
Soule BA 686fe58f6e
address review comments
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:07:40 +02:00
souleb 350accfba9
Update api/v2beta2/helmrelease_types.go
Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com>
Signed-off-by: souleb <bah.soule@gmail.com>
2024-04-18 13:07:08 +02:00
Soule BA 20e14fe304
This commit enable reusing an existing OCIRepo as chartRef.
It takes into account switching from a chart
template to a referenced source (garbage collection).

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-04-18 13:05:04 +02:00
Stefan Prodan 6bbdf4707e
Add notation verification provider to API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-02 21:03:27 +03:00
Stefan Prodan 40ff025ff2
Update `fluxcd/pkg` dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-02 13:49:47 +03:00
Soule BA 9e881d5210
updating controller-gen to v0.14.0
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-03-12 12:23:45 +01:00
Georg Molau ae301aa0ab Remove `genclient:Namespaced` tag
This tag isn't used by controller-tools, only `nonNamespaced` is.

Context: https://cloud-native.slack.com/archives/CLAJ40HV3/p1708794732147909
Signed-off-by: Georg Molau <georg.molau@gmail.com>
2024-02-27 22:23:27 +01:00
Stefan Prodan 951accaba0
Update API to Kubernetes v1.28.6
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-01-29 17:30:39 +02:00
Hidde Beydals 09366330f4
api: ensure backwards compatibility v2beta1
As we are (still) not making use of conversion webhooks, new fields can
only be introduced by including them in all served API versions. As
otherwise conversion will fail.

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

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-12-11 09:57:25 +01:00
Hidde Beydals 35e914d159
api: deprecate stragic merge and JSON 6902 patches
They have been deprecated for a long time, and should be scheduled for
removal to ensure they can be removed in the final `v2` release.

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

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

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

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

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-30 10:22:48 +01:00
Stefan Prodan 92a535f6cd
Add deprecation warning to v2beta1 API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-11-27 16:41:50 +02:00
Hidde Beydals a5db99a88c
api: allow configuration of drift detection
This adds the option to enable drift detection for a specific
`HelmRelease` instance using `.spec.driftDetection.mode`.

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:53 +01:00