(feat): Add support for auto-mounting extra configs#42
(feat): Add support for auto-mounting extra configs#42utdrmac wants to merge 7 commits intovalkey-io:mainfrom
Conversation
Signed-off-by: utdrmac <matthew.boehm@percona.com>
Signed-off-by: utdrmac <matthew.boehm@percona.com>
Signed-off-by: utdrmac <matthew.boehm@percona.com>
Signed-off-by: utdrmac <matthew.boehm@percona.com>
Signed-off-by: utdrmac <matthew.boehm@percona.com>
|
@sandeepkunusoth I removed the Volumes member from the Spec |
| // First, look for a Secret named "$clusterName-conf" | ||
| err := c.Get(ctx, userConfigFilter, &corev1.Secret{}) | ||
| if err == nil { | ||
| log.V(1).Info("found user-created secret config") |
There was a problem hiding this comment.
I think we should pass "$clusterName-conf" from the input spec so users can optionally provide any existing ConfigMap if needed. Also, getUserConfigVolume / userConfig should only be used when this new custom field is set in the spec; otherwise, the default behavior should remain not to use any existing resource.
we need to agree on spec changes with others. Please update spec design or feel free to start discussion. not sure if this feature is priority for others.
| // Attach script volume, and config volumes to cluster | ||
| if err := attachVolumesToCluster(ctx, r.Client, cluster); err != nil { | ||
| // Get script volume, default config, and user config volumes | ||
| configVolumes, err := getConfigVolumes(ctx, r.Client, cluster) |
There was a problem hiding this comment.
can we move this getConfigVolumes call to inside createDeployment. this way we dont need to pass it as param?
Signed-off-by: utdrmac <matthew.boehm@percona.com>
|
I'm closing this one for now, in favor of a simplified config option #44 |
This PR adds support for auto-discovery of a user-created Secret, or ConfigMap, that is named
$clusterName-conf, which is then mounted into each pod under/config/valkey.conf.d/The default configmap provided by the operator was modified to include the above directory for additional configs.
This operator design pattern follows a similar one found in Percona's database Operators (MySQL, Mongo, PG) where users can provide additional database configs by creating configMaps with a specific naming convention.