File: tree.md

package info (click to toggle)
golang-k8s-sigs-kustomize-cmd-config 0.20.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 996 kB
  • sloc: makefile: 198; sh: 50
file content (54 lines) | stat: -rw-r--r-- 2,006 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
## tree

[Alpha] Display Resource structure from a directory or stdin.

### Synopsis

[Alpha] Display Resource structure from a directory or stdin.

kustomize cfg tree may be used to print Resources in a directory or cluster, preserving structure

Args:

  DIR:
    Path to local directory directory.

Resource fields may be printed as part of the Resources by specifying the fields as flags.

kustomize cfg tree has build-in support for printing common fields, such as replicas, container images,
container names, etc.

kustomize cfg tree supports printing arbitrary fields using the '--field' flag.

By default, kustomize cfg 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.

### Examples

    # print Resources using directory structure
    kustomize cfg tree my-dir/

    # print replicas, container name, and container image and fields for Resources
    kustomize cfg tree my-dir --replicas --image --name

    # print all common Resource fields
    kustomize cfg tree my-dir/ --all

    # print the "foo"" annotation
    kustomize cfg tree my-dir/ --field "metadata.annotations.foo"

    # print the "foo"" annotation
    kubectl get all -o yaml | kustomize cfg tree \
      --field="status.conditions[type=Completed].status"

    # print live Resources from a cluster using owners for graph structure
    kubectl get all -o yaml | kustomize cfg tree --replicas --name --image

    # print live Resources with status condition fields
    kubectl get all -o yaml | kustomize cfg tree \
      --name --image --replicas \
      --field="status.conditions[type=Completed].status" \
      --field="status.conditions[type=Complete].status" \
      --field="status.conditions[type=Ready].status" \
      --field="status.conditions[type=ContainersReady].status"