The k8s charm I’m writing is for an application that needs to know its URL. If I could access juju-external-hostname from the charm code, I would not need to add a charm setting.
However, application-config items don’t show up in config-get on Juju 2.8-rc2.
The application settings were done to nominally to inform Juju of how to provision resources rather than things the charm needed to know. In the case of expose in particular, the Juju model is quite limited - a charm can only ask to open ports to the whole world and for all endpoints. We are looking to enhance the expose model to allow ports to be restricted to certain subnet ranges or particular endpoints. This perhaps sort of falls into that rework, ie it could be considered a charm config that is passed to juju as part of the enhanced expose model.
Since Juju unfortunately doesn’t support configuring TLS ingress, I’ve ended up changing my approach to use a site_url setting on the application. It’s a pity, because the only thing I’m adding to the ingress over what Juju already provides is the “tls” dict.