Skip to content

Conversation

@kthurman59
Copy link

Summary

Align source.toolkit.fluxcd.io/v1 CRD validation with the existing v1beta2 behavior and documentation.

Changes

HelmRepository

  • Add a default for .spec.timeout ("60s") so the CRD reflects the effective default.
  • Keep .spec.interval and .spec.timeout as string durations with regex validation, matching the existing schema.

GitRepository

  • Add Enum and default for .spec.provider (generic, azure, github) so the CRD matches the actual provider options and default.

HelmChart

  • Add XValidation so .spec.verify is only allowed when .spec.sourceRef.kind is "HelmRepository", consistent with v1beta2 semantics.

No controller logic changes, only schema-level validation so invalid specs fail at admission instead of at reconciliation.

Testing

On an Ubuntu VM:

  • make manifests
  • cd api && go test ./...
  • export KUBEBUILDER_ASSETS=/home/kevin/src/github.com/kthurman59/source-controller/build/testbin/k8s/1.34.1-linux-amd64
  • go test ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant