Although port and manager-port are configured correctly on install, they can't be tweaked by updating the config.
This is due to the fact that KubernetesServicePatch, which we use for patching the underlying K8s Service, does not observe config-changed events by default (only install, upgrade-charm, and update-status).
Solution
- Explicitly add
config-changed to the list of observed events using the refresh_event argument when initialising KubernetesServicePatch (i.e. make sure that config update events are observed and the patch is re-applied as expected).
- Add a test case to make sure that the port can be edited via the config.
Although
portandmanager-portare configured correctly on install, they can't be tweaked by updating theconfig.This is due to the fact that
KubernetesServicePatch, which we use for patching the underlying K8s Service, does not observeconfig-changedevents by default (onlyinstall,upgrade-charm, andupdate-status).Solution
config-changedto the list of observed events using therefresh_eventargument when initialisingKubernetesServicePatch(i.e. make sure that config update events are observed and the patch is re-applied as expected).