canonical/seldon-core-operator

Remove redundant configmaps and document which one we choose/how to update

ca-scribner opened this issue · 1 comments

Seldon allows for several ways to pass default configuration values. We use a few of them simultaneously, which results in unexpected behaviour.

On deploy, our charm creates:

  • configmap {CHARM_NAME}-operator-resources-config, which is mounted into the seldon-core manager pod as /tmp/operator-resources
  • configmap seldon-config
    Both have the same or similar content (I only checked quickly - I see some charm config values used to override some settings so maybe this is only done in one of these cm but can be confirmed)

Seldon preferentially uses:

  1. configmap seldon-config (from the same namespace as the seldon core manager is deployed
  2. /tmp/operator-resources
    So since we deploy both, the /tmp/operator-resources is ignored (or at least ignored whenever there's a value in both. Not sure if it it is merging these sources or just taking the first it sees). This means changing values in the {CHARM_NAME}-operator-resources-config will have no effect.

We should remove the redundancy (or at minimum clearly document it in the code and readme). There are pros and cons to both:

  • seldon-config: changes to this file will live update the defaults without having to restart the manager pod which is good, but since the name is hard coded deploying two seldon charms to the same will cause conflicts (I dont think there's a good use case for multiple seldon deployments in the same model, though)
  • /tmp/operator-resources: is uniquely named and used by the seldon it is deployed for, so wont have conflicts if multiple seldons are deployed. But, changes to source configmap do not automatically propagate to the pod (the pod must be restarted after the configmap is changed in order to load that new data)

Seldon was re-designed using sidecar pattern.
#42

Only seldon-config ConfigMap is used and no other way of configuration is implemented. Previously all YAML resources were mounted under /tmp/operator-resouces for Seldon to deploy, not they all deployed via sidecar charm.

This issue can be closed.