flux2 icon indicating copy to clipboard operation
flux2 copied to clipboard

Show source name with "flux get kustomization"

Open makkes opened this issue 3 years ago • 9 comments
trafficstars

When looking at a cluster with Kustomizations from different sources it would be helpful to print the source's name of each Kustomization when listing them.

makkes avatar Feb 01 '22 15:02 makkes

I would add the source after NAME

stefanprodan avatar Feb 01 '22 15:02 stefanprodan

Would it be better to make the source column namspace/name since the source can be in a different namespace?

somtochiama avatar Feb 01 '22 15:02 somtochiama

Would it be better to make the source column namspace/name since the source can be in a different namespace?

I would have loved to do that, plus the source's kind. But unfortunately the JSONPath you can use with the additionalPrinterColumns field is very simplistic so from what I know it's not possible to aggregate the values of multiple fields into one. 😞

makkes avatar Feb 01 '22 15:02 makkes

Maybe we should leave this as it is and improve flux get where we can do aggregations.

stefanprodan avatar Feb 01 '22 15:02 stefanprodan

How about this?

$ ./bin/flux get ks velero -A --include-source
NAMESPACE       NAME    SOURCE                                  REVISION        SUSPENDED       READY   MESSAGE
kommander       velero  GitRepository/kommander-flux/management main/d8bac31    False           True    Applied revision: main/d8bac31

makkes avatar May 02 '22 09:05 makkes

I just realized I should've created a new issue in flux2 but instead transferred the existing one from kustomize-controller, effectively making the discussion hard to reason about. Sorry for that

makkes avatar May 02 '22 10:05 makkes

Hi @makkes - is this still an open issue? I'd be happy to contribute.

ysg410 avatar Aug 31 '23 19:08 ysg410

I propose we use flux get ks --show-source to follow kubectl conventions.

@ysg410 if you can contribute this feature would be great!

stefanprodan avatar Sep 01 '23 07:09 stefanprodan

/assign

ysg410 avatar Sep 01 '23 07:09 ysg410