Is your feature request related to a problem? Please describe.
Sveltos has ability to horizontally scale. Documentation https://projectsveltos.io/main/scalability/horizontal_scaling_sharding/
When a new cluster shard is added, shard-controller deploys new resources to handle the new shard:
|
func deployControllers(ctx context.Context, c client.Client, shardKey string, //nolint: funlen // deploying sveltos controllers |
There is currently no way to patch what the shard-controller deploys. Sometimes it is needed to patch those resources (by for instance adding imagePullSecrets or changing resources).
Describe the solution you'd like
Sveltos already supports a patching mechanism for other resources deployed by Sveltos when new clusters are added.
For instance for every new detected cluster Sveltos deploys a sveltos-agent deployment and a drift-detection-manager. Sveltos supports user patching: https://projectsveltos.io/main/getting_started/install/air_gapped_installation/
For instance, classifier when deploying the svetlos-agent component gets the patches (stored in a ConfigMap) and patches the default YAML before deploying it https://github.com/projectsveltos/classifier/blob/eef139ffa2cb6d5a70e2e388f85d1494eb962733/controllers/classifier_deployer.go#L1571
Likewise, addon-controller when deploying the drift-detection-manager component gets the user defined patches(stored in a ConfigMap) and patches the default YAML before deploying it
https://github.com/projectsveltos/addon-controller/blob/f59296975bc194fd7249254bac9ef1d3cd5860b3/controllers/resourcesummary.go#L83
Add a similar approach for shard-controller. Read user defined patches from a ConfigMap and patch the resources before deploying them,
Describe alternatives you've considered
Manually patching the resources after the shard-controller creates them
Is your feature request related to a problem? Please describe.
Sveltos has ability to horizontally scale. Documentation https://projectsveltos.io/main/scalability/horizontal_scaling_sharding/
When a new cluster shard is added, shard-controller deploys new resources to handle the new shard:
shard-controller/internal/controller/utils.go
Line 274 in cea5ff1
There is currently no way to patch what the shard-controller deploys. Sometimes it is needed to patch those resources (by for instance adding imagePullSecrets or changing resources).
Describe the solution you'd like
Sveltos already supports a patching mechanism for other resources deployed by Sveltos when new clusters are added.
For instance for every new detected cluster Sveltos deploys a sveltos-agent deployment and a drift-detection-manager. Sveltos supports user patching: https://projectsveltos.io/main/getting_started/install/air_gapped_installation/
For instance, classifier when deploying the svetlos-agent component gets the patches (stored in a ConfigMap) and patches the default YAML before deploying it https://github.com/projectsveltos/classifier/blob/eef139ffa2cb6d5a70e2e388f85d1494eb962733/controllers/classifier_deployer.go#L1571
Likewise, addon-controller when deploying the drift-detection-manager component gets the user defined patches(stored in a ConfigMap) and patches the default YAML before deploying it
https://github.com/projectsveltos/addon-controller/blob/f59296975bc194fd7249254bac9ef1d3cd5860b3/controllers/resourcesummary.go#L83
Add a similar approach for shard-controller. Read user defined patches from a ConfigMap and patch the resources before deploying them,
Describe alternatives you've considered
Manually patching the resources after the shard-controller creates them