diff --git a/charms/aodh-k8s/config.yaml b/charms/aodh-k8s/config.yaml index 0e415f66..654ce012 100644 --- a/charms/aodh-k8s/config.yaml +++ b/charms/aodh-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: glance.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the glance image provider. - type: string - os-internal-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string - os-public-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/ceilometer-k8s/config.yaml b/charms/ceilometer-k8s/config.yaml index d2af4fa8..45e55dcc 100644 --- a/charms/ceilometer-k8s/config.yaml +++ b/charms/ceilometer-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: glance.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the glance image provider. - type: string - os-internal-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string - os-public-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/cinder-k8s/config.yaml b/charms/cinder-k8s/config.yaml index 5cfb7c65..45e55dcc 100644 --- a/charms/cinder-k8s/config.yaml +++ b/charms/cinder-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: cinder.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the cinder volume provider. - type: string - os-internal-hostname: - default: cinder.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the cinder volume provider. - type: string - os-public-hostname: - default: cinder.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the cinder volume provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/cinder-k8s/tests/unit/test_cinder_charm.py b/charms/cinder-k8s/tests/unit/test_cinder_charm.py index 4ff7d581..159addfe 100644 --- a/charms/cinder-k8s/tests/unit/test_cinder_charm.py +++ b/charms/cinder-k8s/tests/unit/test_cinder_charm.py @@ -42,6 +42,10 @@ class _CinderOperatorCharm(charm.CinderOperatorCharm): super().configure_charm(event) self._log_event(event) + @property + def public_ingress_address(self): + return "cinder.juju" + class TestCinderOperatorCharm(test_utils.CharmTestCase): """Unit tests for Cinder Operator.""" diff --git a/charms/designate-k8s/config.yaml b/charms/designate-k8s/config.yaml index e6101265..1f4a51fe 100644 --- a/charms/designate-k8s/config.yaml +++ b/charms/designate-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: designate.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the designate image provider. - type: string - os-internal-hostname: - default: designate.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the designate image provider. - type: string - os-public-hostname: - default: designate.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the designate image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/glance-k8s/config.yaml b/charms/glance-k8s/config.yaml index b7540811..3c00ecec 100644 --- a/charms/glance-k8s/config.yaml +++ b/charms/glance-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: - description: | - The hostname or address of the admin endpoints that should be advertised - in the glance image provider. - type: string - os-internal-hostname: - default: - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string - os-public-hostname: - default: - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/gnocchi-k8s/config.yaml b/charms/gnocchi-k8s/config.yaml index 953f6bfe..df480b17 100644 --- a/charms/gnocchi-k8s/config.yaml +++ b/charms/gnocchi-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: glance.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the glance image provider. - type: string - os-internal-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string - os-public-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/heat-k8s/config.yaml b/charms/heat-k8s/config.yaml index 4628d8e8..45e55dcc 100644 --- a/charms/heat-k8s/config.yaml +++ b/charms/heat-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: heat.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the glance image provider. - type: string - os-internal-hostname: - default: heat.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string - os-public-hostname: - default: heat.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/horizon-k8s/config.yaml b/charms/horizon-k8s/config.yaml index 0a8780b9..76445775 100644 --- a/charms/horizon-k8s/config.yaml +++ b/charms/horizon-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: glance.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the glance image provider. - type: string - os-internal-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string - os-public-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string session-timeout: type: int default: 3600 diff --git a/charms/keystone-k8s/config.yaml b/charms/keystone-k8s/config.yaml index e581da4d..1bd3bdd1 100644 --- a/charms/keystone-k8s/config.yaml +++ b/charms/keystone-k8s/config.yaml @@ -24,24 +24,6 @@ options: description: Name of tenant to associate with service credentials type: string - os-admin-hostname: - default: - description: | - The hostname or address of the admin endpoints that should be advertised - in the keystone identity provider. - type: string - os-internal-hostname: - default: - description: | - The hostname or address of the internal endpoints that should be advertised - in the keystone identity provider. - type: string - os-public-hostname: - default: - description: | - The hostname or address of the internal endpoints that should be advertised - in the keystone identity provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/keystone-k8s/src/charm.py b/charms/keystone-k8s/src/charm.py index ad1250e0..d93c309e 100755 --- a/charms/keystone-k8s/src/charm.py +++ b/charms/keystone-k8s/src/charm.py @@ -1392,11 +1392,9 @@ export OS_AUTH_VERSION=3 @property def admin_endpoint(self): """Admin endpoint for keystone api.""" - admin_hostname = self.model.config.get("os-admin-hostname") - if not admin_hostname: - admin_hostname = self.model.get_binding( - self.IDSVC_RELATION_NAME - ).network.ingress_address + admin_hostname = self.model.get_binding( + self.IDSVC_RELATION_NAME + ).network.ingress_address return f"http://{admin_hostname}:{self.service_port}/v3" @property @@ -1405,11 +1403,9 @@ export OS_AUTH_VERSION=3 if self.ingress_internal and self.ingress_internal.url: return self.ingress_internal.url + "/v3" - internal_hostname = self.model.config.get("os-internal-hostname") - if not internal_hostname: - internal_hostname = self.model.get_binding( - self.IDSVC_RELATION_NAME - ).network.ingress_address + internal_hostname = self.model.get_binding( + self.IDSVC_RELATION_NAME + ).network.ingress_address return f"http://{internal_hostname}:{self.service_port}/v3" @property diff --git a/charms/magnum-k8s/config.yaml b/charms/magnum-k8s/config.yaml index 6b3748d7..d45fe862 100644 --- a/charms/magnum-k8s/config.yaml +++ b/charms/magnum-k8s/config.yaml @@ -13,24 +13,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: magnum.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the glance image provider. - type: string - os-internal-hostname: - default: magnum.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string - os-public-hostname: - default: magnum.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/neutron-k8s/config.yaml b/charms/neutron-k8s/config.yaml index f237b22d..b57f2d89 100644 --- a/charms/neutron-k8s/config.yaml +++ b/charms/neutron-k8s/config.yaml @@ -12,24 +12,6 @@ options: will not enable internal cloud dns resolution. This value should end with a '.', e.g. 'cloud.example.org.'. type: string - os-admin-hostname: - default: - description: | - The hostname or address of the admin endpoints that should be advertised - in the neutron image provider. - type: string - os-internal-hostname: - default: - description: | - The hostname or address of the internal endpoints that should be advertised - in the neutron image provider. - type: string - os-public-hostname: - default: - description: | - The hostname or address of the internal endpoints that should be advertised - in the neutron image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/nova-k8s/config.yaml b/charms/nova-k8s/config.yaml index 2845c2d8..45e55dcc 100644 --- a/charms/nova-k8s/config.yaml +++ b/charms/nova-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: - description: | - The hostname or address of the admin endpoints that should be advertised - in the nova image provider. - type: string - os-internal-hostname: - default: - description: | - The hostname or address of the internal endpoints that should be advertised - in the nova image provider. - type: string - os-public-hostname: - default: - description: | - The hostname or address of the internal endpoints that should be advertised - in the nova image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/octavia-k8s/config.yaml b/charms/octavia-k8s/config.yaml index 6b298087..45e55dcc 100644 --- a/charms/octavia-k8s/config.yaml +++ b/charms/octavia-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: octavia.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the loadbalancer provider. - type: string - os-internal-hostname: - default: octavia.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the loadbalancer provider. - type: string - os-public-hostname: - default: octavia.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the loadbalancer provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/openstack-images-sync-k8s/charmcraft.yaml b/charms/openstack-images-sync-k8s/charmcraft.yaml index 04f9d24d..84fc8b24 100644 --- a/charms/openstack-images-sync-k8s/charmcraft.yaml +++ b/charms/openstack-images-sync-k8s/charmcraft.yaml @@ -48,24 +48,6 @@ config: description: | The maximum number of images to keep in sync per version. type: int - os-admin-hostname: - default: openstack-images-sync.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the openstack image sync. - type: string - os-internal-hostname: - default: openstack-images-sync.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the openstack image sync. - type: string - os-public-hostname: - default: openstack-images-sync.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the openstack image sync. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/charms/ovn-relay-k8s/config.yaml b/charms/ovn-relay-k8s/config.yaml deleted file mode 100644 index 592df270..00000000 --- a/charms/ovn-relay-k8s/config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2022 Canonical Ltd. -# See LICENSE file for licensing details. -# - -options: - os-public-hostname: - default: ovn-relay.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the neutron image provider. - type: string diff --git a/charms/placement-k8s/config.yaml b/charms/placement-k8s/config.yaml index 627768c8..45e55dcc 100644 --- a/charms/placement-k8s/config.yaml +++ b/charms/placement-k8s/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: - description: | - The hostname or address of the admin endpoints that should be advertised - in the placement image provider. - type: string - os-internal-hostname: - default: - description: | - The hostname or address of the internal endpoints that should be advertised - in the placement image provider. - type: string - os-public-hostname: - default: - description: | - The hostname or address of the public endpoints that should be advertised - in the placement image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/ops-sunbeam/doc/bundles/full.yaml b/ops-sunbeam/doc/bundles/full.yaml index cba32d0c..ac31d914 100644 --- a/ops-sunbeam/doc/bundles/full.yaml +++ b/ops-sunbeam/doc/bundles/full.yaml @@ -54,8 +54,6 @@ applications: channel: edge scale: 1 trust: true - options: - os-public-hostname: ovn-central: charm: ch:ovn-central-k8s channel: edge diff --git a/ops-sunbeam/doc/bundles/minimal.yaml b/ops-sunbeam/doc/bundles/minimal.yaml index ee8e6eec..ed7b96d7 100644 --- a/ops-sunbeam/doc/bundles/minimal.yaml +++ b/ops-sunbeam/doc/bundles/minimal.yaml @@ -55,8 +55,6 @@ applications: channel: edge scale: 1 trust: true - options: - os-public-hostname: ovn-central: charm: ch:ovn-central-k8s channel: edge diff --git a/ops-sunbeam/ops_sunbeam/charm.py b/ops-sunbeam/ops_sunbeam/charm.py index 990af251..11f6921d 100644 --- a/ops-sunbeam/ops_sunbeam/charm.py +++ b/ops-sunbeam/ops_sunbeam/charm.py @@ -229,12 +229,7 @@ class OSBaseOperatorCharm(ops.charm.CharmBase): def get_domain_name_sans(self) -> List[str]: """Get Domain names for service.""" - domain_name_sans = [] - for binding_config in ["admin", "internal", "public"]: - hostname = self.config.get(f"os-{binding_config}-hostname") - if hostname: - domain_name_sans.append(hostname) - return domain_name_sans + return [] def check_leader_ready(self): """Check the leader is reporting as ready.""" @@ -798,10 +793,6 @@ class OSBaseOperatorAPICharm(OSBaseOperatorCharmK8S): @property def public_ingress_address(self) -> str: """IP address or hostname for access to this service.""" - svc_hostname = self.model.config.get("os-public-hostname") - if svc_hostname: - return svc_hostname - client = Client() charm_service = client.get( Service, name=self.app.name, namespace=self.model.name diff --git a/ops-sunbeam/shared_code/config-api.yaml b/ops-sunbeam/shared_code/config-api.yaml index 49049838..ef178bd7 100644 --- a/ops-sunbeam/shared_code/config-api.yaml +++ b/ops-sunbeam/shared_code/config-api.yaml @@ -2,24 +2,6 @@ default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: glance.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the glance image provider. - type: string - os-internal-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string - os-public-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string region: default: RegionOne description: Name of the OpenStack region diff --git a/ops-sunbeam/shared_code/sunbeam_charm/{{cookiecutter.service_name}}/config.yaml b/ops-sunbeam/shared_code/sunbeam_charm/{{cookiecutter.service_name}}/config.yaml index d2af4fa8..45e55dcc 100644 --- a/ops-sunbeam/shared_code/sunbeam_charm/{{cookiecutter.service_name}}/config.yaml +++ b/ops-sunbeam/shared_code/sunbeam_charm/{{cookiecutter.service_name}}/config.yaml @@ -3,24 +3,6 @@ options: default: False description: Enable debug logging. type: boolean - os-admin-hostname: - default: glance.juju - description: | - The hostname or address of the admin endpoints that should be advertised - in the glance image provider. - type: string - os-internal-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string - os-public-hostname: - default: glance.juju - description: | - The hostname or address of the internal endpoints that should be advertised - in the glance image provider. - type: string region: default: RegionOne description: Name of the OpenStack region