Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPSTREAM: <carry>: openshift: Read machine additional printer columns from annotations/labels #55

Conversation

ingvagabund
Copy link
Member

@ingvagabund ingvagabund commented Jul 29, 2019

Given we already support AWS, Azure and GCP instalations of OpenShift,
reading values from machine provider config is no longer an option.
Instead, let's read all needed values from machine annotations and labels.
Each actuator will be then responsible for making sure every machine
has all the annotations and labels that are needed to properly display
additional machine columns set.

Also, print provider ID and linked node only with '-o wide` option since they are secondary to displaying current state of a machine.

$ oc get machines -n openshift-machine-api
NAME                                     STATE     TYPE              REGION      ZONE      AGE
jchaloup-x8pdp-master-0                  Running   Standard_D4s_v3   centralus   3         44m
jchaloup-x8pdp-master-1                  Running   Standard_D4s_v3   centralus   1         44m
jchaloup-x8pdp-master-2                  Running   Standard_D4s_v3   centralus   2         44m
jchaloup-x8pdp-worker-centralus1-b97mk   Running   Standard_D2s_v3   centralus   1         43m
jchaloup-x8pdp-worker-centralus2-8tz8d   Running   Standard_D2s_v3   centralus   2         43m
jchaloup-x8pdp-worker-centralus3-22zf5   Running   Standard_D2s_v3   centralus   3         43m
$ oc get machines -n openshift-machine-api -o wide
NAME                                     STATE     TYPE              REGION      ZONE      AGE       NODE                                     PROVIDERID
jchaloup-x8pdp-master-0                  Running   Standard_D4s_v3   centralus   3         47m       jchaloup-x8pdp-master-0                  azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-master-0
jchaloup-x8pdp-master-1                  Running   Standard_D4s_v3   centralus   1         47m       jchaloup-x8pdp-master-1                  azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-master-1
jchaloup-x8pdp-master-2                  Running   Standard_D4s_v3   centralus   2         47m       jchaloup-x8pdp-master-2                  azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-master-2
jchaloup-x8pdp-worker-centralus1-b97mk   Running   Standard_D2s_v3   centralus   1         46m       jchaloup-x8pdp-worker-centralus1-b97mk   azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-worker-centralus1-b97mk
jchaloup-x8pdp-worker-centralus2-8tz8d   Running   Standard_D2s_v3   centralus   2         46m       jchaloup-x8pdp-worker-centralus2-8tz8d   azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-worker-centralus2-8tz8d
jchaloup-x8pdp-worker-centralus3-22zf5   Running   Standard_D2s_v3   centralus   3         46m       jchaloup-x8pdp-worker-centralus3-22zf5   azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-worker-centralus3-22zf5

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


@enxebre
Copy link
Member

enxebre commented Aug 5, 2019

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2019
@ingvagabund
Copy link
Member Author

/hold

node and providerID bits are still missing

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 5, 2019
… from annotations/labels

Given we already support AWS, Azure and GCP instalations of OpenShift,
reading values from machine provider config is no longer an option.
Instead, let's read all needed values from machine annotations and labels.
Each actuator will be then responsible for making sure every machine
has all the annotations and labels that are needed to properly display
additional machine columns set.

Also, print provider ID and linked node only with '-o wide` option since
they are secondary to displaying current state of a machine.

$ oc get machines -n openshift-machine-api
NAME                                     STATE     TYPE              REGION      ZONE      AGE
jchaloup-x8pdp-master-0                  Running   Standard_D4s_v3   centralus   3         44m
jchaloup-x8pdp-master-1                  Running   Standard_D4s_v3   centralus   1         44m
jchaloup-x8pdp-master-2                  Running   Standard_D4s_v3   centralus   2         44m
jchaloup-x8pdp-worker-centralus1-b97mk   Running   Standard_D2s_v3   centralus   1         43m
jchaloup-x8pdp-worker-centralus2-8tz8d   Running   Standard_D2s_v3   centralus   2         43m
jchaloup-x8pdp-worker-centralus3-22zf5   Running   Standard_D2s_v3   centralus   3         43m

$ oc get machines -n openshift-machine-api -o wide
NAME                                     STATE     TYPE              REGION      ZONE      AGE       NODE                                     PROVIDERID
jchaloup-x8pdp-master-0                  Running   Standard_D4s_v3   centralus   3         47m       jchaloup-x8pdp-master-0                  azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-master-0
jchaloup-x8pdp-master-1                  Running   Standard_D4s_v3   centralus   1         47m       jchaloup-x8pdp-master-1                  azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-master-1
jchaloup-x8pdp-master-2                  Running   Standard_D4s_v3   centralus   2         47m       jchaloup-x8pdp-master-2                  azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-master-2
jchaloup-x8pdp-worker-centralus1-b97mk   Running   Standard_D2s_v3   centralus   1         46m       jchaloup-x8pdp-worker-centralus1-b97mk   azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-worker-centralus1-b97mk
jchaloup-x8pdp-worker-centralus2-8tz8d   Running   Standard_D2s_v3   centralus   2         46m       jchaloup-x8pdp-worker-centralus2-8tz8d   azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-worker-centralus2-8tz8d
jchaloup-x8pdp-worker-centralus3-22zf5   Running   Standard_D2s_v3   centralus   3         46m       jchaloup-x8pdp-worker-centralus3-22zf5   azure:///subscriptions/6648228a-736c-4a4e-9a14-92a7e5190f4a/resourceGroups/jchaloup-x8pdp-rg/providers/Microsoft.Compute/virtualMachines/jchaloup-x8pdp-worker-centralus3-22zf5
@ingvagabund ingvagabund force-pushed the update-crd-additionalPrinterColumns branch from e2e211b to fbb0a42 Compare August 5, 2019 11:29
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 5, 2019
@ingvagabund ingvagabund changed the title UPSTREAM: <carry>: openshift: revert and read machine additional printer columns from annotations/labels UPSTREAM: <carry>: openshift: Read machine additional printer columns from annotations/labels Aug 5, 2019
@ingvagabund
Copy link
Member Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 5, 2019
@frobware
Copy link

frobware commented Aug 5, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2019
@openshift-merge-robot openshift-merge-robot merged commit f8de78a into openshift:openshift-4.2-cluster-api-0.1.0 Aug 5, 2019
@ingvagabund ingvagabund deleted the update-crd-additionalPrinterColumns branch August 5, 2019 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants