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

Add support for ManagedClusterSet operations #117

Open
4 tasks
gurnben opened this issue Sep 7, 2021 · 3 comments
Open
4 tasks

Add support for ManagedClusterSet operations #117

gurnben opened this issue Sep 7, 2021 · 3 comments

Comments

@gurnben
Copy link
Member

gurnben commented Sep 7, 2021

Summary of Request

Summary of Request

ACM 2.3 adds support for ManagedClusterSets that allow you to federate access to ClusterPools, ClusterDeployments, and ClusterClaims. It also adds admission requirements for non-admin users to place their ClusterPool into a ManagedClusterSet, so its important that we support working with MangedClusterSets.

We should, at minimum, allow the user to:

  • List ManagedClusterSets
  • Create ManagedClusterSets
  • Add ClusterPools, ClusterDeployments, ManagedClusters, etc. to a ManagedClusterSet
  • Remove ClusterPools, ClusterDeployments, ManagedClusters, etc. from a ManagedClusterSet
@itdove
Copy link
Contributor

itdove commented Sep 14, 2021

@gurnben Wouldn't be easier if a cph has a ManagedClusterSets assigned and each time we create or delete a ClusterDeployments, ManagedCluster, ClusterClaims, we add/remove them to/from the ManagedClusterSet because otherwise the end-user will have a multiple of commands to deploy a single cluster and we will lose the benefit of the cm-cli.

@gurnben
Copy link
Member Author

gurnben commented Sep 21, 2021

Sorry - just now seeing this - @itdove in my mind I think we should expose the ability to specify a ManagedClusterSet at create time. Maybe specifying it at the CPH level is a good idea but I can envision that a single user/CPH could want to provide clusters for more than one user-base and as such use multiple ManagedClusterSets.
MangedClusterSets are also meant to remove the namespace restriction around RBAC for clusters namely, so tying ManagedClusterSets to a CPH which is tied to a Namespace would remove that benefit.

We'll address the "add to a ManagedClusterSet at create time" concern in #116, allowing users to still provision with just one command. But with the features in this Issue they could create and manage ManagedClusterSets and also share Clusters with different audiences by adding/removing them to/from ManagedClusterSets. For example if I can use cm add managedclusterset <managed-cluster-set-name> <cc-name> to add my ClusterClaim that's currently only visible to my team to a ManagedClsuterSet that allows you to also view the ManagedClusterSet - I can share that cluster with you easily through the ManagedClusterSet RBAC Model.

@gurnben
Copy link
Member Author

gurnben commented Sep 21, 2021

Also - responding to a question in Slack here on how to create and manage ManagedClusterSets.

Creating a ManagedClusterSet

Documentation

That being said, here's the raw YAML - its a a cluster-scoped resource by the way:

apiVersion: cluster.open-cluster-management.io/v1alpha1
kind: ManagedClusterSet
metadata:
  name: <managed-cluster-set-name>

Deleting a ManagedClusterSet

Deleting a ManagedClusterSet is a simple delete call to the api via a kube client, but will effect RBAC on all clusters in that Set.

Adding Clusters to a ManagedCluterSet

Documentation

To add a ClusterPool, ClusterClaim, ClusterDeployment, or ManagedCluster to a ManagedClusterSet, you simply apply the following label to the object:

cluster.open-cluster-management.io/clusterset=<managed-cluster-set-name>

You can also do this at create time by adding the label to the metadata.labels object in the object's yaml.

Removing Clusters from a ManagedClusterSet

Documentation

To remove a cluster from a ManagedClusterSet - remove the name of the ManagedClusterSet in question from the labels array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants