Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Add some useful columns to 'kubectl get' #54

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

sreyasn
Copy link
Contributor

@sreyasn sreyasn commented Jan 22, 2021

  • Adding powerState on default and class, image on -o wide for virtualmachine
  • Adding serviceType to virtualmachineservice
  • Adding cpu & memory to virtualmachineclass
  • Adding Age columns to crds with additional columns since they are omitted
    from default when columns are mentioned explicitly for a crd.

Testing Done:

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -A
NAMESPACE    NAME                          POWERSTATE   AGE
test-ns   jenkins-workload-1611253951   poweredOn    25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -o wide -A
NAMESPACE    NAME                          POWERSTATE   CLASS                IMAGE                       AGE
test-ns   jenkins-workload-1611253951   poweredOn    best-effort-xsmall   bitnami-jenkins-2.222.3-1   25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmservice -A
NAMESPACE    NAME                          TYPE           AGE
test-ns   jenkins-workload-1611253951   LoadBalancer   26h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get virtualmachineclasses -A
NAME                  CPU   MEMORY   AGE
best-effort-2xlarge   8     64Gi     8d
best-effort-4xlarge   16    128Gi    8d
best-effort-8xlarge   32    128Gi    8d

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmimage -A
NAME                        VERSION   OSTYPE              FORMAT   AGE
bitnami-jenkins-2.222.3-1             otherLinux64Guest   ovf      7d21h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmclassbinding -A
NAMESPACE    NAME                 VIRTUALMACHINECLASS   AGE
test-ns   best-effort-xsmall   best-effort-xsmall    42h

- Adding powerState on default and class, image on -o wide for virtualmachine
- Adding serviceType to virtualmachineservice
- Adding cpu and memeory to virtualmachineclass

Adding Age columns to crds with additional columns since they omitted
from default when columns are mentioned explicitly for a crd.

Testing Done:
root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -A
NAMESPACE    NAME                          POWERSTATE   AGE
test-ns   jenkins-workload-1611253951   poweredOn    25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -o wide -A
NAMESPACE    NAME                          POWERSTATE   CLASS                IMAGE                       AGE
test-ns   jenkins-workload-1611253951   poweredOn    best-effort-xsmall   bitnami-jenkins-2.222.3-1   25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmservice -A
NAMESPACE    NAME                          TYPE           AGE
test-ns   jenkins-workload-1611253951   LoadBalancer   26h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get virtualmachineclasses -A
NAME                  CPU   MEMORY   AGE
best-effort-2xlarge   8     64Gi     8d
best-effort-4xlarge   16    128Gi    8d
best-effort-8xlarge   32    128Gi    8d

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmimage -A
NAME                        VERSION   OSTYPE              FORMAT   AGE
bitnami-jenkins-2.222.3-1             otherLinux64Guest   ovf      7d21h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmclassbinding -A
NAMESPACE    NAME                 VIRTUALMACHINECLASS   AGE
test-ns   best-effort-xsmall   best-effort-xsmall    42h
@sreyasn sreyasn merged commit 739fd43 into vmware-archive:master Jan 25, 2021
akutz pushed a commit to vmware-tanzu/vm-operator that referenced this pull request Jun 3, 2021
- Adds columns to ''kubectl get' of crds; virtualmachine,
virtualmachineclasses, virtualmachineimages, virtualmachineservice,
virtualmachineclassbindings
vmware-archive/vm-operator-api#54

Testing Done:
root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -A
NAMESPACE    NAME                          POWERSTATE   AGE
test-ns   jenkins-workload-1611253951   poweredOn    25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -o wide -A
NAMESPACE    NAME                          POWERSTATE   CLASS                IMAGE                       AGE
test-ns   jenkins-workload-1611253951   poweredOn    best-effort-xsmall   bitnami-jenkins-2.222.3-1   25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmservice -A
NAMESPACE    NAME                          TYPE           AGE
test-ns   jenkins-workload-1611253951   LoadBalancer   26h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get virtualmachineclasses -A
NAME                  CPU   MEMORY   AGE
best-effort-2xlarge   8     64Gi     8d
best-effort-4xlarge   16    128Gi    8d
best-effort-8xlarge   32    128Gi    8d

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmimage -A
NAME                        VERSION   OSTYPE              FORMAT   AGE
bitnami-jenkins-2.222.3-1             otherLinux64Guest   ovf      7d21h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmclassbinding -A
NAMESPACE    NAME                 VIRTUALMACHINECLASS   AGE
test-ns   best-effort-xsmall   best-effort-xsmall    42h
akutz pushed a commit to vmware-tanzu/vm-operator that referenced this pull request Jun 3, 2021
- Adds columns to ''kubectl get' of crds; virtualmachine,
virtualmachineclasses, virtualmachineimages, virtualmachineservice,
virtualmachineclassbindings
vmware-archive/vm-operator-api#54

Testing Done:
root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -A
NAMESPACE    NAME                          POWERSTATE   AGE
test-ns   jenkins-workload-1611253951   poweredOn    25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -o wide -A
NAMESPACE    NAME                          POWERSTATE   CLASS                IMAGE                       AGE
test-ns   jenkins-workload-1611253951   poweredOn    best-effort-xsmall   bitnami-jenkins-2.222.3-1   25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmservice -A
NAMESPACE    NAME                          TYPE           AGE
test-ns   jenkins-workload-1611253951   LoadBalancer   26h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get virtualmachineclasses -A
NAME                  CPU   MEMORY   AGE
best-effort-2xlarge   8     64Gi     8d
best-effort-4xlarge   16    128Gi    8d
best-effort-8xlarge   32    128Gi    8d

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmimage -A
NAME                        VERSION   OSTYPE              FORMAT   AGE
bitnami-jenkins-2.222.3-1             otherLinux64Guest   ovf      7d21h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmclassbinding -A
NAMESPACE    NAME                 VIRTUALMACHINECLASS   AGE
test-ns   best-effort-xsmall   best-effort-xsmall    42h
sreyasn added a commit to sreyasn/vm-operator that referenced this pull request Oct 8, 2021
- Adds columns to ''kubectl get' of crds; virtualmachine,
virtualmachineclasses, virtualmachineimages, virtualmachineservice,
virtualmachineclassbindings
vmware-archive/vm-operator-api#54

Testing Done:
root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -A
NAMESPACE    NAME                          POWERSTATE   AGE
test-ns   jenkins-workload-1611253951   poweredOn    25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -o wide -A
NAMESPACE    NAME                          POWERSTATE   CLASS                IMAGE                       AGE
test-ns   jenkins-workload-1611253951   poweredOn    best-effort-xsmall   bitnami-jenkins-2.222.3-1   25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmservice -A
NAMESPACE    NAME                          TYPE           AGE
test-ns   jenkins-workload-1611253951   LoadBalancer   26h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get virtualmachineclasses -A
NAME                  CPU   MEMORY   AGE
best-effort-2xlarge   8     64Gi     8d
best-effort-4xlarge   16    128Gi    8d
best-effort-8xlarge   32    128Gi    8d

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmimage -A
NAME                        VERSION   OSTYPE              FORMAT   AGE
bitnami-jenkins-2.222.3-1             otherLinux64Guest   ovf      7d21h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmclassbinding -A
NAMESPACE    NAME                 VIRTUALMACHINECLASS   AGE
test-ns   best-effort-xsmall   best-effort-xsmall    42h
akutz pushed a commit to vmware-tanzu/vm-operator that referenced this pull request Sep 21, 2022
- Adds columns to ''kubectl get' of crds; virtualmachine,
virtualmachineclasses, virtualmachineimages, virtualmachineservice,
virtualmachineclassbindings
vmware-archive/vm-operator-api#54

Testing Done:
root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -A
NAMESPACE    NAME                          POWERSTATE   AGE
test-ns   jenkins-workload-1611253951   poweredOn    25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -o wide -A
NAMESPACE    NAME                          POWERSTATE   CLASS                IMAGE                       AGE
test-ns   jenkins-workload-1611253951   poweredOn    best-effort-xsmall   bitnami-jenkins-2.222.3-1   25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmservice -A
NAMESPACE    NAME                          TYPE           AGE
test-ns   jenkins-workload-1611253951   LoadBalancer   26h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get virtualmachineclasses -A
NAME                  CPU   MEMORY   AGE
best-effort-2xlarge   8     64Gi     8d
best-effort-4xlarge   16    128Gi    8d
best-effort-8xlarge   32    128Gi    8d

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmimage -A
NAME                        VERSION   OSTYPE              FORMAT   AGE
bitnami-jenkins-2.222.3-1             otherLinux64Guest   ovf      7d21h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmclassbinding -A
NAMESPACE    NAME                 VIRTUALMACHINECLASS   AGE
test-ns   best-effort-xsmall   best-effort-xsmall    42h
akutz pushed a commit to vmware-tanzu/vm-operator that referenced this pull request Dec 1, 2022
- Adds columns to ''kubectl get' of crds; virtualmachine,
virtualmachineclasses, virtualmachineimages, virtualmachineservice,
virtualmachineclassbindings
vmware-archive/vm-operator-api#54

Testing Done:
root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -A
NAMESPACE    NAME                          POWERSTATE   AGE
test-ns   jenkins-workload-1611253951   poweredOn    25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vm -o wide -A
NAMESPACE    NAME                          POWERSTATE   CLASS                IMAGE                       AGE
test-ns   jenkins-workload-1611253951   poweredOn    best-effort-xsmall   bitnami-jenkins-2.222.3-1   25h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmservice -A
NAMESPACE    NAME                          TYPE           AGE
test-ns   jenkins-workload-1611253951   LoadBalancer   26h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get virtualmachineclasses -A
NAME                  CPU   MEMORY   AGE
best-effort-2xlarge   8     64Gi     8d
best-effort-4xlarge   16    128Gi    8d
best-effort-8xlarge   32    128Gi    8d

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmimage -A
NAME                        VERSION   OSTYPE              FORMAT   AGE
bitnami-jenkins-2.222.3-1             otherLinux64Guest   ovf      7d21h

root@4212e95af1461a21e76bcd525ad63941 [ ~ ]# kubectl get vmclassbinding -A
NAMESPACE    NAME                 VIRTUALMACHINECLASS   AGE
test-ns   best-effort-xsmall   best-effort-xsmall    42h
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants