Commit Graph

260 Commits

Author SHA1 Message Date
Stefan Prodan 0e363c9f08
Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-01-31 15:02:27 +02:00
Sunny 1ed845928b gitrepo: Use new reason for provider misconfig
Introduce InvalidProviderConfigurationReason for Git provider github
related misconfiguration.

Add github provider related tests to check the status conditions reason.

Rearrange and modify a test case for getAuthOpts() for provider test
where a referred secret doesn't exist. This scenario is not specific to
any provider.

Signed-off-by: Sunny <github@darkowlzz.space>
2024-12-19 21:01:44 +00:00
Dipti Pai 9556a639c6 [RFC-007] Implement GitHub app authentication for git repositories.
- API change to add new `github` provider field in `GitRepository` spec.
- Controller change to use the GitHub authentication information specified in `.spec.secretRef` to create the auth options to authenticate to git repositories when the `provider` field is set to `github`,
- Tests for new `github` provider field
- Updated docs to use GitHub Apps for authentication in source-controller.

Signed-off-by: Dipti Pai <diptipai89@outlook.com>
2024-12-19 23:28:10 +05:30
Stefan Prodan 6f8f2e0435
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:36:02 +02:00
Stefan Prodan 892e7ccab4
Update Git dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-06 16:51:45 +02:00
Sunny db42b07914 GitRepo: Remove provider default value from API
For backwards compatibility, remove the default value for GitRepository
provider. An empty provider value will still be considered as the
default provider.

Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-26 15:13:29 +00:00
Stefan Prodan 1e6ddbcc3a
Update dependencies to Kubernetes 1.31.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-16 09:49:55 +03:00
Dipti Pai 48417bdc8b Enable Azure OIDC for Azure DevOps Respository
- Add a new provider field to GitRepository API spec which can be set to azure to enable passwordless authentication to Azure DevOps repositories.

- API docs for new provider field and guidance to setup Azure environment with workload identity.

- Controller changes to set the provider options in git authoptions to fetch credential while cloning the repository.

- Add unit tests for testing provider

Signed-off-by: Dipti Pai <diptipai89@outlook.com>
2024-09-13 13:41:18 -07:00
Stefan Prodan 36a4889ea2
Alias Bucket providers from v1beta2 to v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-27 17:16:14 +03:00
Stefan Prodan 2fa8c58d9f
Remove unused `accessFrom` field from Bucket v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-24 11:43:54 +03:00
Stefan Prodan 5be0c53729
Promote Bucket API to v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-23 13:25:57 +03:00
Matheus Pimenta 02d492bc43 Introduce Bucket provider constants with the common part as a prefix
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-08-22 14:48:53 -03:00
Matheus Pimenta 10ac11314d Add LDAP provider for Bucket STS API
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-08-22 08:41:23 -03:00
Matheus Pimenta 03a118a94c Add proxy support for OCIRepository API
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-08-15 10:29:57 -03:00
Stefan Prodan cfccdb5491
Update cosign to v2.4.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-15 11:18:32 +03:00
Stefan Prodan 93ad04b6c8
Update dependencies to Kubernetes v1.31.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-14 21:40:29 +03:00
Matheus Pimenta 625e672c7a Add proxy support for AWS S3 buckets
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-08-09 22:26:53 +01:00
Matheus Pimenta b6bd2abe2d Add proxy support for Azure buckets
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-08-09 22:17:06 +01:00
Matheus Pimenta 31ed900a90 Add proxy support for GCS buckets
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-08-09 19:05:10 +01:00
Matheus Pimenta 7536ab4b02 Add support for AWS STS endpoint in the Bucket API
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-08-08 16:35:01 +01:00
Matheus Pimenta 4d9c87cf3f Add support for .spec.proxySecretRef for generic provider of Bucket API
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-07-03 15:10:47 +01:00
Matheus Pimenta bc16734391 Add .certSecretRef for Bucket API
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-05-15 19:44:05 +01:00
Stefan Prodan 31c4df4a8d
Deprecate v1beta1 APIs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-02 19:40:15 +03:00
Stefan Prodan af6cfc4d61
Remove deprecated `valuesFile` from HelmChart v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-02 16:54:42 +03:00
Stefan Prodan e72a645234
Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-02 16:35:39 +03:00
Stefan Prodan 0a7f66b0e3
docs: Add API spec for Helm v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-02 16:19:48 +03:00
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