config tree defaults to graph structure when ownerRefs available

This commit is contained in:
Katrina Verey
2019-12-23 16:36:25 -05:00
parent 3900166fdf
commit 24cf0c1fdc
5 changed files with 231 additions and 18 deletions

View File

@@ -460,8 +460,9 @@ container names, etc.
kustomize config tree supports printing arbitrary fields using the '--field' flag.
By default, kustomize config tree uses the directory structure for the tree structure, however when printing
from the cluster, the Resource graph structure may be used instead.
By default, kustomize config tree uses Resource graph structure if any relationships between resources (ownerReferences)
are detected, as is typically the case when printing from a cluster. Otherwise, directory graph structure is used. The
graph structure can also be selected explicitly using the '--graph-structure' flag.
`
var TreeExamples = `
# print Resources using directory structure
@@ -481,8 +482,7 @@ var TreeExamples = `
--field="status.conditions[type=Completed].status"
# print live Resources from a cluster using owners for graph structure
kubectl get all -o yaml | kustomize config tree --replicas --name --image \
--graph-structure=owners
kubectl get all -o yaml | kustomize config tree --replicas --name --image
# print live Resources with status condition fields
kubectl get all -o yaml | kustomize config tree \