kcl-lang / flux-kcl-controller

Flux KCL Controller
https://kcl-lang.io
Apache License 2.0
23 stars 7 forks source link

Enable `KCLRun.spec.dependsOn` support for both `kind: KCLRun` and `kind: Kustomization` #129

Open ron1 opened 3 weeks ago

ron1 commented 3 weeks ago

Enhancement

Enable KCLRun.spec.dependsOn support for both kind: KCLRun and kind: Kustomization.

The following property descriptions and test data snippets give the impression that dependsOn currently supports kind: Kustomization only.

https://github.com/kcl-lang/flux-kcl-controller/blob/41d07cdfc4ac394325e9484596271ef7b853617f/config/crd/bases/krm.kcl.dev.fluxcd_kclruns.yaml#L137-L140

https://github.com/kcl-lang/flux-kcl-controller/blob/41d07cdfc4ac394325e9484596271ef7b853617f/api/v1alpha1/kclrun_types_test.go#L30

https://github.com/kcl-lang/flux-kcl-controller/blob/41d07cdfc4ac394325e9484596271ef7b853617f/api/v1alpha1/testdata/kclrun.yaml#L12-L15

But after reviewing the code itself, I believe KCLRun.spec.dependsOn currently only supports kind: KCLRun.

At a minimum, the code comments and crd description links referenced above should be updated accordingly if I am correct. This issue, however, goes beyond simple doc changes and instead requests to support both kinds.