Open jsanda opened 2 years ago
The SecretReplicator can do this easily. It doesn't really have that much "Secret" defined in it, it could just as well be any object it replicates.
True, it could be done with SecretReplicator; however, I think it is worthwhile to take another look at kubefed.
What is missing? The user can set the
cassandraConfigMapRef
property for Stargate to point a to a ConfigMap that contains acassandra.yaml
that Stargate will use. We use this extensively in the e2e tests. Here is an example:With this manifest a Stargate object will be created in both the kind-k8ssandra-0 and kind-k8ssandra-1 clusters. Each will be configured with a volume and volume mount for the ConfigMap.
The ConfigMap needs to be created separately in each target cluster. We do this up front as part of the test setup.
If the ConfigMap reference is defined at the cluster level, then the operator should replicate it. Furthermore, this means that the ConfigMap should be created in the same namespace as the K8ssandraCluster.
This is definitely a post-1.0.0 enhancement and another reason to look into kubefed.
For 1.0.0 though, we should document that that the current design/implementation requires you to create the ConfigMap up front in each of the target clusters.
Why do we need it? It will improve the multi-cluster scenarios and make things less error prone for the user. It will also help prevent configuration drift. For example, I might make an ad hoc change in one k8s cluster and forget or fail to apply it in others. If the change is made in the control plane cluster, then the operator can make sure it is propagated.
Environment
┆Issue is synchronized with this Jira Story by Unito ┆Issue Number: K8OP-124