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

Offer a general purpose ReplicatedResource for clusterset #307

Closed
tamalsaha opened this issue Nov 6, 2023 · 4 comments
Closed

Offer a general purpose ReplicatedResource for clusterset #307

tamalsaha opened this issue Nov 6, 2023 · 4 comments
Labels
enhancement New feature or request Stale

Comments

@tamalsaha
Copy link
Contributor

Describe the enhancement
Currently there are case-by-case resources to replicate Resources in the Hub cluster to spoke cluster namespaces. Examples are:

Will it make sense to support one general purpose ManagedResourceSet that will take a Placement and resourceTemplate and replicate that into the cluster namespaces according to placement logic. This can handle all the above cases as far as I can understand ( i have not thought through it deeply).

I am curious if this something like this was considered? If not, is this an option?

Thanks.

@tamalsaha tamalsaha added the enhancement New feature or request label Nov 6, 2023
@mikeshng
Copy link
Member

mikeshng commented Nov 6, 2023

Hi @tamalsaha

I will let other maintainers chime in on your suggestion.

But just FYI I had a similar requirement and @JustinKuli was able provide me with a clever solution here: https://gist.github.com/JustinKuli/b66d1096e1262a0bc51f8ff8f29169f8 using ocm policy addon.

The idea is to use a Placement and a Policy to distribute a resource to managed cluster namespaces on a hub cluster, not to the actual managed clusters.

Let me know if you have any questions.

@qiujian16
Copy link
Member

qiujian16 commented Nov 6, 2023

ManifestWorkResplicaSet and ClusterAddonManager has different purposes and different persona involved.

ManifestWorkResplicaSet is for the purpose of user can "replicate manifests to multiple clusters".
ClusterAddonManager is for the addon developer to develop an addon, then user can choose to enable the addon cluster by cluster, or by a certain strategy.
ManagedSeviceAccount seems to be also different, it meant to ask each spoke cluster provide some credential to access them.

The ManagedResourceSet seems to be quite similar as what ManifestWorkResplicaSet did?

@tamalsaha
Copy link
Contributor Author

I was referring to the part where the controller for ManifestWorkResplicaSet, ClusterAddonManager, higher-level-of-ManagedSeviceAccount are all performing one general operation: create the individual ManifestWork, ManagedClusterAddon, ManagedServiceAccount object by copying the the parent object into the cluster namespaces. This general part can be offered a single resource. The template for the parent object can have the full underlying object spec (like PodTemplate).

apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetResource
metadata:
  name: <name>
  namespace: <ns>
spec:
  placementRefs:
    - name: placement-byname # Name of a created Placement
  template:
    apiVersion:
    kind: 
    metadata:
      ...
   spec:
      ...

spec.template.apiVersion and spec.template.kind can dictate whether the underlying object is a ManfestWork / ManagedClusterAddon / ManagedServiceAccount .

Copy link

github-actions bot commented Mar 6, 2024

This issue is stale because it has been open for 120 days with no activity. After 14 days of inactivity, it will be closed. Remove the stable label to prevent this issue from being closed.

@github-actions github-actions bot added the Stale label Mar 6, 2024
mprahl pushed a commit to mprahl/OCM that referenced this issue Mar 14, 2024
…nt-io#307)

Signed-off-by: xuezhaojun <zxue@redhat.com>

Signed-off-by: xuezhaojun <zxue@redhat.com>
mprahl pushed a commit to mprahl/OCM that referenced this issue Mar 14, 2024
Signed-off-by: Wei Liu <liuweixa@redhat.com>
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

3 participants