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

Get values for CRD's additionalPrinterColumns from annotations and labels instead of machine provider config #360

Conversation

ingvagabund
Copy link
Member

@ingvagabund ingvagabund commented Jul 23, 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.

@ingvagabund ingvagabund added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 23, 2019
@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 23, 2019
@Fedosin
Copy link
Contributor

Fedosin commented Jul 25, 2019

@ingvagabund could you also add OpenStack to the list of platforms in the PR description?

@ingvagabund ingvagabund force-pushed the get-machine-additional-columns-from-annotations-and-labels branch from 76cc5e3 to 4fe59fe Compare July 29, 2019 11:01
@ingvagabund
Copy link
Member Author

@Fedosin thanks for the review. Once Azure PR is merged (where we are deciding which annotations/labels we want to use), we can distribute the same change to other actuators.

@ingvagabund
Copy link
Member Author

Updating machine and machineset types in openshift/cluster-api first: openshift/cluster-api#55

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.
@ingvagabund ingvagabund force-pushed the get-machine-additional-columns-from-annotations-and-labels branch from 4fe59fe to 4542417 Compare August 5, 2019 11:47
@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
Copy link
Member Author

/retest

@enxebre
Copy link
Member

enxebre commented Aug 7, 2019

/approve

@openshift-ci-robot
Copy link
Contributor

[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 7, 2019
@spangenberg
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 8, 2019
@ingvagabund
Copy link
Member Author

ingvagabund commented Aug 8, 2019

/hold cancel

Just validated OpenShift in both AWS and Azure properly display all relevant columns when running oc get machines -n openshift-machine-api.

@ingvagabund ingvagabund removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 8, 2019
name: Node
priority: 1
type: string
- JSONPath: .spec.providerID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be from the status??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProviderID is spec field and there was a long discussion which of spec or status is the right place to put it. Spec won.

@openshift-merge-robot openshift-merge-robot merged commit 8c38a49 into openshift:master Aug 8, 2019
@ingvagabund ingvagabund deleted the get-machine-additional-columns-from-annotations-and-labels branch August 8, 2019 14:39
@Fedosin
Copy link
Contributor

Fedosin commented Aug 16, 2019

@ingvagabund hi! add the OpenStack PR please openshift/cluster-api-provider-openstack#55

@ingvagabund
Copy link
Member Author

ingvagabund commented Aug 16, 2019

@Fedosin there is no need to update machine CRD anymore. The CRD expects certain annotations and labels to be present in machine CR. If they are not, corresponding column is just empty. So, the only step needed to is update an actuator to set the requires annotations/labels.

@Fedosin
Copy link
Contributor

Fedosin commented Aug 16, 2019

@ingvagabund correct. that's what I did in openshift/cluster-api-provider-openstack#55

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.

7 participants