Skip to content

Iterating all clusters to create global resources #577

Discussion options

You must be logged in to vote

Thank you. This is an excellent use case. It can be achieved using templating and event framework.

Sveltos templating lets you define add-ons as templates and fill in their values at deployment time using resources within the management cluster.

So we need a resource in the management cluster containing list of managed clusters. Event framework can help us here.

Identifying Managed Clusters

In this example, the management cluster has a label type:mgmt. We can leverage Sveltos' event framework to dynamically identify all managed clusters (of type SveltosCluster) that are different from the management cluster (only cluster with label type:mgmt):

apiVersion: lib.projectsveltos.io/v1alpha1
kind

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gianlucam76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants