Commit Graph

2727 Commits

Author SHA1 Message Date
Stefan Prodan 18badd7849
Build with Go 1.25
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-31 10:29:43 +03:00
Stefan Prodan 321957c8c6
Regenerate CRDs with controller-gen v0.19
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-31 10:29:36 +03:00
Stefan Prodan 3749be4d26
Migrate tests from gotest to gomega
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-31 10:29:36 +03:00
Stefan Prodan 1a244f7c30
Update dependencies to Kubernetes v1.34.0 and Helm v3.18.6
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-30 22:48:10 +03:00
Stefan Prodan 12b5f6f0c5
Merge pull request #1874 from fluxcd/dependabot/go_modules/github.com/go-viper/mapstructure/v2-2.4.0
build(deps): bump github.com/go-viper/mapstructure/v2 from 2.3.0 to 2.4.0
2025-08-22 12:28:14 +03:00
dependabot[bot] 1bb3050fd9
build(deps): bump github.com/go-viper/mapstructure/v2
Bumps [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/go-viper/mapstructure/releases)
- [Changelog](https://github.com/go-viper/mapstructure/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-viper/mapstructure/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: github.com/go-viper/mapstructure/v2
  dependency-version: 2.4.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-21 15:24:04 +00:00
Matheus Pimenta e5189f6791
Merge pull request #1872 from cappyzawa/feat/default-service-account-flag
[RFC-0010] Add default-service-account for lockdown
2025-08-17 17:49:20 +01:00
cappyzawa dc3eba62b0
[RFC-0010] Add default-service-account for lockdown
Add --default-service-account flag for multi-tenant workload identity
lockdown support. This flag sets the default service account name to
be used when .spec.serviceAccountName is not specified in resources.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-08-18 01:32:07 +09:00
Matheus Pimenta 24412ed278
Merge pull request #1871 from dipti-pai/azure-obj-level-gitrepo
[RFC-0010] Add multi-tenant workload identity support for Azure GitRepository
2025-08-15 18:33:32 +01:00
Dipti Pai 4fe3434ee8 [RFC-0010] Add multi-tenant workload identity support for Azure GitRepository
Signed-off-by: Dipti Pai <diptipai89@outlook.com>
2025-08-15 10:10:00 -07:00
Matheus Pimenta 5f9702bb01
Merge pull request #1868 from cappyzawa/feat/bucket-workload-identity-aws
[RFC-0010] Add multi-tenant workload identity support for AWS Bucket
2025-08-14 18:50:35 +01:00
cappyzawa 041aa6c993
[RFC-0010] Add multi-tenant workload identity support for AWS Bucket
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-08-15 02:36:04 +09:00
Matheus Pimenta 48da00dba2
Merge pull request #1870 from cappyzawa/remove-tlsconfig-servername-pinning
Remove ServerName pinning from TLS config
2025-08-14 15:21:35 +01:00
cappyzawa 683719d33c
Remove ServerName pinning from TLS config
Remove ServerName pinning functionality that can cause TLS
verification failures in production environments with redirects,
proxies, and multi-host scenarios.

The Go standard library automatically handles SNI and hostname
verification based on the actual connection target, providing
better compatibility and security than fixed ServerName values.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-08-14 22:52:50 +09:00
Stefan Prodan cd5eebfb32
Merge pull request #1860 from abhijith-darshan/feat/gh_app_tls
Add support for mTLS to GitHub App transport
2025-08-14 10:22:23 +03:00
abhijith-darshan 46522f9815
(chore): adds tls config for GitHub App auth
this commit ensures that if ca.crt or caFile is available in the github app secret, a tls config with user provided certs is appended to system cert pool and passed to the underlying http transport

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): update target URL for TLSConfigFromSecret

this commit ensures that the target URL for runtime/secrets.TLSConfigFromSecret has the scheme and host

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): adds test scenarios

this commit adds test scenarios for mTLS GitHub app in reconcile source auth strategy

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): use runtime/secrets authMethods

this commit ensures that GitHubApp secret resolution happens via pkg/runtime/secrets

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): update docs

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): adds github app data check

this commit ensures that when provider is github and no github app data is present in the secret, it will error out with invalid configuration

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): removes getProxyOpts helper func

this commit removes the helper method getProxyOpts and uses the standardized pkg/runtime/secrets APIs to get proxy options.

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): removes getProxyOpts test

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): improves test coverage

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): do not stall on missing github app data

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>

(chore): adds a note on mTLS configuration in docs

This commit mentions in the docs that if tls.crt and tls.key is part of the secret then mutual TLS configuration will be automatically enabled and should be used optionally.

Signed-off-by: abhijith-darshan <abhijith.darshan@hotmail.com>
2025-08-12 23:32:12 +02:00
Matheus Pimenta bd6d090ef0
Merge pull request #1865 from fluxcd/fix-stalled-errors
Fix GitRepository controller stalling when it shouldn't
2025-08-12 14:53:01 +01:00
Matheus Pimenta 1f4fc2fe87
Fix GitRepository controller stalling when it shouldn't
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-08-12 14:34:12 +01:00
Stefan Prodan a84403c95b
Merge pull request #1864 from fluxcd/refactor-pkg
Refactor pkg structure
2025-08-12 15:31:30 +03:00
Stefan Prodan 9e789f6d9a
Extract storage operations to a dedicated package
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-12 14:57:15 +03:00
Stefan Prodan ac8ec2e32a
Refactor bucket pkg structure
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-12 14:43:17 +03:00
Matheus Pimenta d69d743e75
Merge pull request #1862 from cappyzawa/feat/bucket-workload-identity-gcp
[RFC-0010] Add multi-tenant workload identity support for GCP Bucket
2025-08-12 08:37:42 +01:00
cappyzawa 3733163358
[RFC-0010] Add multi-tenant workload identity support for GCP Bucket
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-08-12 07:58:39 +09:00
Stefan Prodan 1469073055
Merge pull request #1861 from fluxcd/remove-v1beta1-api
Remove deprecated APIs in group `source.toolkit.fluxcd.io/v1beta1`
2025-08-11 17:54:32 +03:00
Stefan Prodan ca43631480
Remove deprecated APIs in group `source.toolkit.fluxcd.io/v1beta1`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-08 15:09:11 +03:00
Stefan Prodan c2b572bae0
Merge pull request #1852 from cappyzawa/feat/bucket-controller-runtime-secrets-migration
Migrate Bucket controller to runtime/secrets
2025-07-31 18:58:56 +03:00
cappyzawa 9463bcf0ee
Fix missing namespace in Helm Repository Controller secret error
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-31 22:05:37 +09:00
cappyzawa 4b18040e22
Fix missing namespace in OCI Repository Controller secret error
Include namespace in secret error message for better debugging context.
The secret name was already present in the error, but namespace information
was missing, making it harder to identify which secret in which namespace
was not found.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-31 22:05:37 +09:00
cappyzawa 3caf8f1db9
Migrate Bucket controller to runtime/secrets
Replaces internal credential management with runtime/secrets package
to standardize authentication, proxy configuration, and TLS handling
across controllers. This migration eliminates code duplication by
leveraging shared utilities and improves maintainability through
consistent error handling patterns.

The refactoring splits the large reconcileSource method into focused
helper functions for better separation of concerns.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-31 22:05:37 +09:00
Matheus Pimenta 44098cfd2f
Merge pull request #1857 from cappyzawa/docs/mtls-documentation-unification
docs: unify mTLS authentication section titles
2025-07-31 14:02:27 +01:00
cappyzawa a65166578d
docs: unify mTLS authentication section titles
Update HelmRepository, OCIRepository, and Bucket documentation to use
"Mutual TLS Authentication" section titles instead of "Cert secret
reference". This improves discoverability of mTLS capabilities and
follows GitRepository's established pattern.

The previous generic titles obscured mutual TLS functionality, causing
users to miss this important security feature. Updated descriptions
explicitly mention mutual TLS authentication while maintaining all
existing YAML examples and technical accuracy.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-30 23:03:51 +09:00
Matheus Pimenta 93b9048706
Merge pull request #1856 from cappyzawa/feat/helm-oci-controllers-runtime-secrets-v078
Add WithSystemCertPool for CA compatibility
2025-07-30 04:37:55 +01:00
cappyzawa ba14962c1f
Add WithSystemCertPool for CA compatibility
Update pkg/runtime dependency from v0.76.0 to v0.78.0 and add
WithSystemCertPool() options to maintain backward compatibility
with the existing extend approach (system CAs + user CA).

This ensures source-controller continues to work with both system
and user-provided CA certificates, maintaining the same behavior
as before the pkg/runtime/secrets API changes.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-30 11:39:11 +09:00
Matheus Pimenta c43a3393a0
Merge pull request #1855 from cappyzawa/feat/helm-oci-controllers-runtime-secrets-v076
Enforce TLS certificate verification in Helm/OCI Repository controllers
2025-07-29 14:41:06 +01:00
cappyzawa 4b1ace618a
Enforce TLS certificate verification in Helm/OCI Repository controllers
Remove the insecure parameter from TLS configuration function calls to prevent
InsecureSkipVerify from being set when using certificate-based authentication.
This ensures TLS certificate verification is always performed when certificates
are provided, aligning with our security policy.

Updated pkg/runtime to v0.76.0 which no longer accepts the insecure parameter
in TLS configuration functions. For OCIRepository, maintain backward compatibility
by handling the specific case where no certificate is provided and insecure is
explicitly set to true. This is the only allowed exception in Flux controllers.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-29 02:42:22 +09:00
Matheus Pimenta a0b4969dc9
Merge pull request #1851 from cappyzawa/feat/oci-repository-runtime-secrets-migration
Migrate OCIRepository controller to runtime/secrets
2025-07-21 18:58:14 +01:00
cappyzawa b2993a76bc
Fix missing TLS ServerName in HelmRepository
Add ServerName configuration to TLS config in HelmRepository client
options to ensure proper SNI (Server Name Indication) support for
virtual hosting environments. This addresses the regression introduced
when migrating from internal/tls to runtime/secrets, where ServerName
was not being set automatically.

Without ServerName, TLS handshakes fail with certificate mismatch
errors when connecting to Helm repositories using virtual hosting
where multiple repositories are hosted on the same IP address.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-22 00:39:59 +09:00
cappyzawa 74242e5d8a
Migrate OCIRepository controller to runtime/secrets
Migrates the OCIRepository controller's authentication handling from
internal implementations to the unified runtime/secrets API package.

The migration moves TLS configuration from internal/tls to
runtime/secrets.TLSConfigFromSecretRef and ServiceAccount processing
to secrets.PullSecretsFromServiceAccountRef, providing consistent
authentication handling across all source-controller components.

This change eliminates duplicate secret fetching logic and aligns
the OCIRepository controller with the standardized authentication
patterns used by other controllers in the GitOps Toolkit.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-22 00:39:59 +09:00
Matheus Pimenta 173a1cccc5
Merge pull request #1849 from cappyzawa/feat/helm-repository-runtime-secrets-migration
Migrate HelmRepository to runtime/secrets
2025-07-18 13:40:13 +01:00
cappyzawa 9950f56d26
migrate HelmRepository to AuthMethodsFromSecret API
This commit upgrades pkg/runtime to v0.73.0 and adopts the unified
AuthMethodsFromSecret API for HelmRepository authentication handling.
The change replaces complex manual authentication detection with a
single API call and improves error handling consistency.

Breaking Changes:
- TLS certificate validation is now strictly enforced. Invalid CA
  certificates will cause authentication failures even for public
  repositories, where they were previously ignored.
- Empty TLS certificate secrets now trigger validation errors instead
  of being silently ignored. This affects certSecretRef with empty
  Data map - previously ignored, now causes proper error.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-18 21:29:37 +09:00
cappyzawa 274a6699cc
refactor: improve HelmRepository controller test structure for runtime/secrets migration
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-18 03:37:02 +09:00
Stefan Prodan 114a702490
Merge pull request #1844 from fluxcd/dependabot/go_modules/github.com/go-viper/mapstructure/v2-2.3.0
build(deps): bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0
2025-07-15 01:11:39 +03:00
dependabot[bot] 8c951e3019
build(deps): bump github.com/go-viper/mapstructure/v2
Bumps [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/go-viper/mapstructure/releases)
- [Changelog](https://github.com/go-viper/mapstructure/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-viper/mapstructure/compare/v2.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: github.com/go-viper/mapstructure/v2
  dependency-version: 2.3.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-14 21:10:27 +00:00
Stefan Prodan 508f4ff38d
Merge pull request #1850 from fluxcd/upgrade-deps
Upgrade Kubernetes to 1.33.2
2025-07-15 00:08:34 +03:00
Matheus Pimenta e3abd39417
Upgrade Kubernetes to 1.33.2
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-14 18:33:46 +01:00
Stefan Prodan 21e3a02f99
Merge pull request #1848 from cappyzawa/refactor/transport-to-pkg
refactor: replace internal/transport with pkg/http/transport
2025-07-09 14:18:21 +03:00
cappyzawa d5920fee85
refactor: replace internal/transport with pkg/http/transport
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-09 19:28:36 +09:00
Matheus Pimenta 8f77ed4981
Merge pull request #1808 from TerryHowe/harden-blob-test
fix: blob test cores if no error
2025-07-01 14:34:26 +01:00
Terry Howe 9c8d8c95e2
fix: blob test cores if no error
Co-authored-by: Matheus Pimenta <matheuscscp@gmail.com>
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-06-30 05:57:55 -06:00
Matheus Pimenta 32967c32c3
Merge pull request #1843 from fluxcd/pick-changelog-v1.6.2
Add changelog entry for v1.6.2
2025-06-27 11:21:54 +01:00