vmware-tanzu/cartographer

Example basic-delivery incorrect guidance on inspecting App resource

Open

#676 opened on Mar 1, 2022

 (1 comment) (0 reactions) (0 assignees)Go (64 forks)auto 404
good first issue

Repository metrics

Stars
 (452 stars)
PR merge metrics
 (PR metrics pending)

Description

Bug description:

Two issues:

  1. The README for the basic-delivery example says to run:
kubectl get app gitops -o yaml | yq -r .status.inspect.stdout

yq -r is not valid syntax (probably left over from a modified jq command?). Instead, this should be:

kubectl get app gitops -o yaml | yq .status.inspect.stdout
  1. The README says the output from this command should show a handful of Knative resources. See here.

This output is actually only accessible through kapp inspect -a gitops-ctrl, but the App resource status only shows 2 resources and it is not entirely clear what they are. Here is the output of both the kbectl/yq command and the kapp command:

$ kubectl get app gitops -o yaml | yq .status.inspect.stdout
Target cluster 'https://10.96.0.1:443'
Resources in app 'gitops-ctrl'
Namespace  Name  Kind     Owner    Conds.  Rs  Ri                Age
default    dev   Service  kapp     1/3 t   ok  -                 40s
^          dev   Service  cluster  -       ok  External service  34s
Rs: Reconcile state
Ri: Reconcile information
2 resources
Succeeded
$ kapp inspect -a gitops-ctrl
Target cluster 'https://127.0.0.1:65360' (nodes: kind-control-plane)

Resources in app 'gitops-ctrl'

Namespace  Name  Kind           Owner    Conds.  Rs  Ri                Age
default    dev   Configuration  cluster  1/1 t   ok  -                 10m
^          dev   Ingress        cluster  -       ok  -                 10m
^          dev   Route          cluster  2/4 t   ok  -                 10m
^          dev   Service        kapp     1/3 t   ok  -                 10m
^          dev   Service        cluster  -       ok  External service  10m

Rs: Reconcile state
Ri: Reconcile information

5 resources

Succeeded

Steps to reproduce:

For issue 1: Follow the instructions for basic-delivery example or use another resource at your disposal to validate that yq does not have a -r flag.

For issue 2: Follow the instructions for basic-delivery example and notice the discrepancy between the guidance in the README and the results of the command.

Expected behavior:

Commands returns proper status information for App resource

Actual behavior:

Issue 1: Command with -r flag returns error and usage instructions:

$ k get app gitops -o yaml | yq -r .status.inspect.stdout
Error: unknown shorthand flag: 'r' in -r
Usage:
  yq [flags]
  yq [command]

...

Issue 2: The output of the command does not match the sample output in the README.

Contributor guide