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 the cluster namespace when a hub is imported by a global hub #104

Merged

Conversation

mprahl
Copy link
Member

@mprahl mprahl commented Sep 26, 2023

When syncPoliciesOnMulticlusterHub is true, it's indicating that the hub is imported by a global hub. The namespace must be created on the hub to sync policies from the global hub. The namespace also needs to be cleaned up when uninstalled, so the clean up pod is now enabled in this scenario too.

Relates:
https://issues.redhat.com/browse/ACM-7655

@mprahl
Copy link
Member Author

mprahl commented Sep 26, 2023

@yiraeChristineKim and @dhaiducek and @gparvin this is ready for review now.

@yiraeChristineKim
Copy link
Contributor

yiraeChristineKim commented Sep 27, 2023

What is global hub?

@mprahl
Copy link
Member Author

mprahl commented Sep 27, 2023

What is global hub?

The global hub concept allows a hub to manage other hubs called regional hubs. The regional hubs manage the non-hub managed clusters.

The concept came because the architecture on etcd doesn't scale after a certain point.

When syncPoliciesOnMulticlusterHub is true, it's indicating that the hub
is imported by a global hub. The namespace must be created on the hub to
sync policies from the global hub. The namespace also needs to be
cleaned up when uninstalled, so the clean up pod is now enabled in this
scenario too.

Relates:
https://issues.redhat.com/browse/ACM-7655

Signed-off-by: mprahl <[email protected]>
"policy.open-cluster-management.io/sync-policies-on-multicluster-hub-",
)

Kubectl("annotate", "-n", cluster.clusterName, "-f", case1ManagedClusterAddOnCR, "policy-addon-pause-")
Copy link
Contributor

Choose a reason for hiding this comment

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

Annotations are usually key and value aren't they?

Copy link
Member Author

Choose a reason for hiding this comment

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

This syntax removes the annotation.

By(logPrefix + "deleting the managedclusteraddon")
Kubectl("delete", "-n", cluster.clusterName, "-f", case1ManagedClusterAddOnCR, "--timeout=90s")
deploy = GetWithTimeout(
cluster.clusterClient, gvrDeployment, case1DeploymentName, addonNamespace, false, 30,
Copy link
Contributor

Choose a reason for hiding this comment

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

I doubt about 30 secs.. Would you test several times more?

Copy link
Member Author

Choose a reason for hiding this comment

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

I just triggered a rerun.

@openshift-ci
Copy link

openshift-ci bot commented Sep 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mprahl, yiraeChristineKim

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:
  • OWNERS [mprahl,yiraeChristineKim]

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

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