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

Create a policy to automatically import discovered ROSA clusters #470

Merged

Conversation

gparvin
Copy link
Member

@gparvin gparvin commented Apr 25, 2024

This policy monitors DiscoveredCluster resources for ROSA clusters and configures matching discovered clusters to be automatically imported. Status is shown for any that have been configured to be automatically imported. Filtering by the discovered cluster display name can be updated in the policy by editing the ConfigMap.

Refs:

JustinKuli
JustinKuli previously approved these changes Apr 25, 2024
Copy link
Member

@JustinKuli JustinKuli left a comment

Choose a reason for hiding this comment

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

This is cool!

@openshift-ci openshift-ci bot added the lgtm label Apr 25, 2024
@openshift-ci openshift-ci bot removed the lgtm label Apr 26, 2024
@gparvin gparvin changed the title [WIP] Create a policy to automatically import discovered ROSA clusters Create a policy to automatically import discovered ROSA clusters Apr 26, 2024
@gparvin
Copy link
Member Author

gparvin commented Apr 26, 2024

I added the filtering for the annotation that indicates when an import has already been attempted and therefore should now be skipped.

name: discovery-config
namespace: open-cluster-management-global-set
data:
rosa-filter: "bennett"
Copy link
Member

Choose a reason for hiding this comment

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

What is this?

Copy link
Member Author

Choose a reason for hiding this comment

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

That was part of a demo -- thanks for catching that.

status:
conditions:
- type: ManagedClusterAvailable
status: "True"
Copy link
Member

Choose a reason for hiding this comment

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

Rather than skip if discovery.open-cluster-management.io/previously-auto-imported is set, it might be cool to just make the clusterset annotation conditional on this so that the policy can still report on the status after it's been imported but still allow the user to change the clusterset.

Copy link
Member Author

Choose a reason for hiding this comment

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

The ManagedCluster resource won't exist, it will have been deleted after being detached.

This policy monitors DiscoveredCluster resources for ROSA clusters and
configures matching discovered clusters to be automatically imported.
Status is shown for any that have been configured to be automatically
imported.  Filtering by the discovered cluster display name can be
updated in the policy by editing the ConfigMap.

Refs:
 - https://issues.redhat.com/browse/ACM-10304

Signed-off-by: Gus Parvin <[email protected]>
@gparvin
Copy link
Member Author

gparvin commented Apr 29, 2024

The related jira work item: https://issues.redhat.com/browse/ACM-11385

@gparvin
Copy link
Member Author

gparvin commented May 1, 2024

Putting a hold to get this approved now, but will keep it in progress until we get closer to releasing the implementation used by the policy.
/hold

@openshift-ci openshift-ci bot added the lgtm label May 8, 2024
Copy link

openshift-ci bot commented May 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gparvin, JustinKuli

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

@gparvin
Copy link
Member Author

gparvin commented May 17, 2024

/unhold
Making this available for QE testing.

@openshift-merge-bot openshift-merge-bot bot merged commit f3de3d9 into open-cluster-management-io:main May 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants