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

disable the ACM Hub installing on agent by managedcluster label #346

Merged
merged 3 commits into from
Mar 16, 2023

Conversation

yanmxa
Copy link
Member

@yanmxa yanmxa commented Mar 15, 2023

Signed-off-by: myan myan@redhat.com

Signed-off-by: myan <myan@redhat.com>
@yanmxa
Copy link
Member Author

yanmxa commented Mar 15, 2023

/cc @zhiweiyin318

@yanmxa
Copy link
Member Author

yanmxa commented Mar 15, 2023

/retest

Copy link
Contributor

@morvencao morvencao left a comment

Choose a reason for hiding this comment

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

will we support to dynamically change the label value, for example from enabled to disabled, and then uninstall the hub?

@yanmxa
Copy link
Member Author

yanmxa commented Mar 15, 2023

will we support to dynamically change the label value, for example from enabled to disabled, and then uninstall the hub?

@morvencao It supports dynamically updating the label value. When the value changed from enabled to disabled, it won't uninstall the hub.

@@ -7,6 +7,7 @@ Label | Description
global-hub.open-cluster-management.io/managed-by=`global-hub-operator\|global-hub\|global-hub-agent` | If the value is `global-hub-operator`, it means the resources are created by the global hub operator. The global hub operator watches the resources based on this label.
global-hub.open-cluster-management.io/local-resource= | This label is added during creating some resources. It is used to identify the resource is only applied to global hub cluster. It won't be transfered to the regional hub clusters.
global-hub.open-cluster-management.io/agent-deploy-mode = `Hosted\| Default\| None` | This label is used on ManagedCluster.<br>`Hosted` means the HoH agent will be deployed on Hosting cluster.<br>`Default` means the HoH agent will be deployed on managed cluster.<br>`None` means the HoH agent should not be installed.
global-hub.open-cluster-management.io/hub-cluster-install = `Enabled\| Disabled` | This label is used on ManagedCluster.<br>`Enable` means the Global Hub addon will install ACM Hub on the agent cluster if there isn't found a hub.<br>`Disabled` means the Global Hub won't install ACM Hub on the agent and also as the default value for the label.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would expect if this label exists, then install ACM in the managed cluster. if without this label, then skip the installation. I do not care about the value.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@clyang82
Copy link
Contributor

Can you help to update hub.open-cluster-management.io with correct value? Thanks.

@zhiweiyin318
Copy link
Contributor

will we support to dynamically change the label value, for example from enabled to disabled, and then uninstall the hub?

@morvencao It supports dynamically updating the label value. When the value changed from enabled to disabled, it won't uninstall the hub.

it looks weird if the label is disable but the hub has been installed and will not be removed. maybe it is better to only use the label without value?

Signed-off-by: myan <myan@redhat.com>
@yanmxa
Copy link
Member Author

yanmxa commented Mar 16, 2023

will we support to dynamically change the label value, for example from enabled to disabled, and then uninstall the hub?

@morvencao It supports dynamically updating the label value. When the value changed from enabled to disabled, it won't uninstall the hub.

it looks weird if the label is disable but the hub has been installed and will not be removed. maybe it is better to only use the label without value?

Yes, I removed the value.

@clyang82
Copy link
Contributor

/lgtm
/approve

@openshift-ci
Copy link

openshift-ci bot commented Mar 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clyang82, yanmxa

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

@sonarcloud
Copy link

sonarcloud bot commented Mar 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@openshift-merge-robot openshift-merge-robot merged commit dbe8c8b into stolostron:main Mar 16, 2023
@yanmxa yanmxa deleted the br_acm_hub branch March 30, 2023 05:06
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.

None yet

5 participants