Commit Graph

234 Commits

Author SHA1 Message Date
Stefan Prodan f85bc174e6
Promote Helm APIs to v1 (GA)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-02 16:04:27 +03:00
Robin Breathe 9b57d3bc52
chore: update tests
Signed-off-by: Robin Breathe <robin@isometry.net>
2024-05-02 08:21:23 +02:00
Robin Breathe 6d96ae1da4
fix: regenerate manifests
Signed-off-by: Robin Breathe <robin@isometry.net>
2024-05-01 12:34:43 +02:00
Paulo Canilho bf97748339
feat: resolved values files are persisted to and retrieved from the [HelmChart.Status.ObservedValuesFiles] field
Signed-off-by: Paulo Canilho <paulo.canilho@nexthink.com>
2024-05-01 08:01:42 +02:00
Robin Breathe b84ab9e698
feat(HelmChartSpec): optionally ignore missing valuesFiles
Signed-off-by: Robin Breathe <robin@isometry.net>
2024-05-01 08:01:41 +02:00
Stefan Prodan e590863286
Update dependencies to Kubernetes 1.30
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-26 11:36:15 +03:00
Stefan Prodan 827f579b14
Update dependencies to Go 1.22 and Kubernetes 1.29.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-02 16:52:10 +03:00
Soule BA 10434e7e1f
Introduce a semver filter in OCIRepository
If implemented a semver filter regex can be declared in conjuction with
a semver range in the OCIRepository `spec.Reference`

Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-03-28 00:09:51 +01:00
JasonTheDeveloper 553945ab8e Add verification support for notation signed artifacts
Introduces a new verification provider `notation` to verify notation signed artifacts. Currently only cosign is supported and that is a problem if the end user utilises notation.

---------

Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: JasonTheDeveloper <jagoodse@microsoft.com>
Signed-off-by: Jagpreet Singh Tamber <jagpreetstamber@gmail.com>
Co-authored-by: souleb <bah.soule@gmail.com>
Co-authored-by: Jagpreet Singh Tamber <jagpreetstamber@gmail.com>
Co-authored-by: Sunny <github@darkowlzz.space>
2024-03-26 21:32:23 +11:00
Soule BA 4163f3f0a1
updating controller-gen to v0.14.0
Signed-off-by: Soule BA <bah.soule@gmail.com>
2024-03-12 14:19:58 +01:00
Georg Molau b2bfba41b9 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 <georg.molau@gmail.com>
2024-02-27 22:24:01 +01:00
Stefan Prodan 2816a3b07e
Update API to Kubernetes v1.28.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-01-29 15:05:25 +02:00
Hidde Beydals c0e39ad348
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 10:15:00 +01:00
Stefan Prodan 6e78779720
Add `.spec.insecure` to `HelmRepository`
Allow connecting to Helm OCI repositories over plain HTTP (non-TLS endpoint).

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-11-23 12:05:37 +05:30
Sunny 3dacb3140e optional interval and default timeout for helmrepo
With static HelmRepository OCI, the interval become optional. Make
interval optional in the API. Introduce getters for interval, in the
form of GetRequeueAfter(), and timeout with internal default values.

HelmRepository will not have interval and timeout fields unless it's
explicitly set.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-11-22 21:05:57 +05:30
Sunny cf3735e2a2 Static helmrepository OCI
Remove the HelmRepositoryOCI reconciler and make HelmRepository of type
OCI static. The existing HelmRepository OCI objects are migrated to
static object by removing their finalizers and status. New
HelmRepository OCI objects go through one time migration to remove the
status. These are not reconciled again, unless the type is changed to
default. On type switching from HelmRepository default to OCI, the
finalizer, status and artifact are removed to make the object static. On
switching from OCI to default, a complete reconciliation of
HelmRepository takes place to build artifact and add status and
finalizer.

The HelmRepository .spec.url has a new validation to check the URL
scheme. This is to add some validation to HelmRepository OCI since it's
not backed by a reconciler for full validation.

Add HelmRepositoryOCIMigrationPredicate predicate to detect and allow
reconciliation of HelmRepository OCI objects that need migration. The
other predicates that filtered the HelmRepository events based on the
type have been removed as all the HelmRepositories will now be
reconciled by a single reconciler. HelmRepositoryOCIMigrationPredicate
readily allows non-OCI objects and only checks if a migration is needed
for OCI type object.

Add controller tests for different migration scenarios.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-11-22 21:05:51 +05:30
Stefan Prodan 58828350d5
Update dependencies to Kubernetes 1.28
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-11-20 16:50:44 +02:00
Sanskar Jaiswal d855805b8f
cosign: allow identity matching for keyless verification
Add `.spec.verify.matchOIDCIdentity` to OCIRepository and HelmChart.
It allows specifying regular expressions to match against the subject and
issuer of the certificate related to the artifact signature. Its used
only if the artifact was signed using Cosign keyless signing.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-10-31 08:04:34 -07:00
Stefan Prodan b655149786
bucket: Add prefix filtering capability
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-10-17 14:13:04 +03:00
dependabot[bot] 5b642b12ac
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:51:46 +00:00
Sunny 5a92e8b215 Return generic error for patch failures
Introduce a new event reason for patch operation failure and update all
the returned errors from serial patcher to be a generic error so that
they are handled like any other error with an associated warning event.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-09-15 17:41:43 +05:30
Sanskar Jaiswal 6fe3c96311
ocirepo: adopt Kubernetes style TLS secrets for .spec.certSecretRef
Adopt Kubernetes TLS secrets API to check for TLS data in the Secret
referred to by `.spec.certSecretRef`, i.e. check for keys `tls.crt` and
`tls.key` for the certificate and private key. Use `ca.crt` for the CA
certificate.
Deprecate the usage of `caFile`, `certFile` and `keyFile` keys.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-08-22 18:23:05 +05:30
Sanskar Jaiswal 4bd6bcc9e9
helmrepo: adopt Kubernetes TLS secrets for `.spec.certSecretRef`
Adopt Kubernetes TLS secrets API to check for TLS data in the Secret
referred to by `.spec.certSecretRef`, i.e. check for keys `tls.crt` and
`tls.key` for the certificate and private key. Use `ca.crt` for the CA
certificate.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-08-22 18:23:04 +05:30
Sanskar Jaiswal 6002ef51a6
gitrepo: add HEAD, Tag, TagAndHEAD as verification modes
Add three new verification modes for `.spec.verify.mode`:
* `HEAD`: Verify the commit that the HEAD of the repo points to after
  checking out to the ref specified in `.spec.ref`. Its the same as
  `head`, which cannot be removed due to backwards compatibility
  reasons and is converted to `HEAD` internally.
* `Tag`: Verify the tag referred to by `.spec.ref.tag`.
* `TagAndHEAD`: Verify the tag referred to by `.spec.ref.tag` and the
  commit that the tag points to.

The default is `HEAD`, to ensure backwards compatibility.

Furthermore, add `.status.sourceVerificationMode` to record the last
successful verification mode used.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-08-21 21:33:15 +05:30
Hidde Beydals 2ae4602886
api: update controller-runtime to v0.15.1
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-11 13:12:11 +02:00
Hidde Beydals e391c2fb88
api: document jitter effect on interval fields
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-07 16:23:27 +02:00
Hidde Beydals d1eac92a7f
api: update dependencies
- github.com/fluxcd/pkg/apis/meta to v1.1.2
- k8s.io/apimachinery to v0.27.4

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-07 12:26:41 +02:00
Sanskar Jaiswal 9986d9918e
helmrepo: add `.spec.certSecretRef` for specifying TLS auth data
Add `.spec.certSecretRef` to HelmRepository for specifying TLS auth data
in a secret using the `certFile`, `caFile` and `keyFile` keys. Mark
support for these keys in the secret specified in `.spec.secretRef` as
deprecated.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-07-31 13:29:17 +05:30
Sanskar Jaiswal 944f4cfa10
gitrepo: Add support for specifying proxy per `GitRepository`
Add `.spec.proxySecretRef.name` to the `GitRepository` API to allow
referencing a secret containing the proxy settings to be used for all
remote Git operations for the particular `GitRepository` object.
It takes precedence over any proxy configured through enviornment
variables.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-07-24 16:29:57 +05:30
Stefan Prodan 2928480a9a
Align go.mod version with Kubernetes
Bump Go to 1.20 in go.mod

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-26 16:22:06 +03:00
Stefan Prodan 18980f6e7e
Update dependencies
- github.com/fluxcd/pkg/apis/event v0.5.1
- github.com/fluxcd/pkg/apis/meta v1.1.1
- github.com/fluxcd/pkg/git v0.12.3
- github.com/fluxcd/pkg/ssh v0.8.0
- github.com/fluxcd/pkg/oci v0.28.0
- github.com/fluxcd/pkg/runtime v0.39.0
- k8s.io/* v0.27.3
- helm.sh/helm/v3 v3.12.1
- golang.org/x/crypto v0.10.0
- golang.org/x/sync v0.3.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-23 20:05:18 +03:00
Hidde Beydals fc0df4dfa3
api: update dependencies
- github.com/fluxcd/pkg/apis/meta to v1.1.0
- k8s.io/apimachinery to v0.27.2
- sigs.k8s.io/controller-runtime to v0.15.0

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-05-23 23:49:58 +02:00
Hidde Beydals f8496b1dc4
api: update dependencies
- sigs.k8s.io/controller-runtime to v0.14.6

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 16:47:48 +02:00
Hidde Beydals f65e26173e
api: improve validation rules and omitempty nits
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 00:00:06 +02:00
Hidde Beydals 4ab3c21dd8
Delete `Status.URL` field from `GitRepository` v1
Usage of this field has not been recommended for a long time as it was
best-effort based.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-28 16:57:48 +02:00
Hidde Beydals 19ba61a5f7
Remove `TransformLegacyRevision` from v1
Consumers still relying on this should make use of `v1beta2` to
facilitate any transition.

In addition, remove the `*Implementation` constants for now removed
Git implemenations.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-28 13:45:45 +02:00
Hidde Beydals 861343d18e
Put back deprecated types and hint to v1
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-28 13:45:45 +02:00
Stefan Prodan e9de3a7c4c
Update `fluxcd/pkg/apis/meta` to v1.0.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-27 18:41:49 +03:00
Hidde Beydals 97a2cdd883
api/v1: Remove deprecated `GitImplementation`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-24 11:56:26 +01:00
Hidde Beydals 462178e017
api/v1: Remove deprecated `ContentConfigChecksum`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-24 11:56:19 +01:00
Hidde Beydals b2da6f0647
api: Remove deprecated `Checksum` from `Artifact`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-24 11:56:12 +01:00
Stefan Prodan 9c80a66273
Mark GitRepository v1beta1 and v1beta2 as deprecated
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-23 23:33:53 +02:00
Stefan Prodan ef8804c9fa
Promote GitRepository API to v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-23 23:17:23 +02:00
Hidde Beydals b16bc1deaf
api: update dependencies
- github.com/fluxcd/pkg/apis/meta to v0.19.1
- 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-02 17:22:30 +01:00
Hidde Beydals ba91b6ddf8 api: update dependencies
- golang.org/x/next to v0.7.0
- golang.org/x/text to v0.7.0

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-23 12:24:00 +01:00
Hidde Beydals 440f1d599c api: omit empty Digest in Artifact
While we initially decided against it, this otherwise causes the regexp
validator to error on an empty field when it goes through a YAML -> JSON
encode loop (even when marked with `+optional`).

This is not actually a viable path the controller could take, as the
controller trying to update the Artifact with an older version of the
API package would omit the `Digest` field (because it does not exist
in that version), while a newer version of the controller would always
include the field (because we produce it for all kinds). While in cases
where the controller would be backed by a Persistent Volume (and a
partial status update is made), the validation rule would not be
triggered because the field is not part of the patch.

However, for sake of correctness, we still issue a patch.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-16 21:57:03 +01:00
Sanskar Jaiswal c3511cc834 add support for checking out to Git refs
Add a new field `.spec.ref.name` which points to a Git reference which
enables checking out to a particular commit pointed to by the specified
reference.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-02-16 17:33:11 +05:30
Hidde Beydals c4d6b70ccd api: update dependencies
- sigs.k8s.io/controller-runtime to v0.14.4
- Unpin golang.org/x/text from v0.4.0

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 16:04:44 +01:00
Hidde Beydals eaa4a4ff31 api: introduce TransformLegacyRevision helper
This allows consumers to better handle the transition to the new
RFC-0005 format ("/" -> "@" separation).

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals 964b2d3f00 api: introduce `Digest` field to `Artifact`
As discussed in RFC-0005, this introduces a `Digest` field to the
`Artifact` in favor of the now deprecated `Checksum`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-10 20:30:59 +01:00