Using API toolkit to list flux custom resources .. #4650
-
Hi all .. I am bit new to fluxcd and go-lang in general . I am using go-lang dynamic client with helmchart api ( Source-controller ) using unstructured method. I want to get similar output as ( kubectl get helmcharts.source.toolkit.fluxcd.io -A , required fields NAMESPACE NAME CHART VERSION SOURCE KIND SOURCE NAME AGE READY STATUS
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Please see here the docs on how to use the Flux APIs in Go https://fluxcd.io/flux/gitops-toolkit/packages/ |
Beta Was this translation helpful? Give feedback.
That's for selecting a single object, there is a List type you can use, the namespace would be string empty to list all. Example here https://github.com/fluxcd/notification-controller/blob/e73db32382a1f60646d2540e8525eaa55ec66f5c/internal/server/event_handlers.go#L94-L98