[FEATURE] Containers mounting Secrets(internal_users.yml, etc) using subPath
for securityconfig does not receive automated Secret updates
#941
Labels
wontfix
This will not be worked on
Is your feature request related to a problem?
When developers edit securityconfig-secret (K8s Secret of each OpenSearchCluster CR) for changing internal_users.yml or roles.yml, securityconfig-update (K8s Job) starts and soon finishes its Pod.
Since the Pod newly created by securityconfig reconciler of operator always have the recently edited data from securityconfig-secret, there's no problem to run the below arguments which are defined in the securityconfig-update Job:
After the command executed successfully,
However, if you try to look manifests from other Pods (i.e. OpenSearch Nodes such as data-1, master-0, etc), they don't have the exact data you've already made when editing securityconfig-secret. It's because Kubernetes has the limit of auto-updating by "eventually-consistent" way.
What alternatives have you considered?
If OpenSearch Cluster itself has a goal of updating data of securityconfig like internal_users.yml synchronously/eventually, one of the simplest way is restarting entire Pods (i.e. Nodes). Of course it can be dangerous and not discouraged just only for having newly updated securityconfig. Another way is using ConfigMap instead of Security but it may lead security risks. So the only alternative I've considered is separating the
securityconfig-secret
manifest into multiple Secrets, one for each subPath.Do you have any additional context?
I think the maintainers of the
opensearch-k8s-operator
may have already discussed or gotten stuck in this point. Is there any room for consideration of my idea or have it been already considered? (Or the above issue may be resolved in the next major version : opensearch-project/security#1755 )The text was updated successfully, but these errors were encountered: