From: David Garcia Date: Thu, 27 May 2021 14:06:20 +0000 (+0200) Subject: Fix bug 1547: Add ingress.class annotation to OSM charms X-Git-Tag: release-v11.0-start~58 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F10893%2F3;p=osm%2Fdevops.git Fix bug 1547: Add ingress.class annotation to OSM charms Change-Id: I436a536929ec5f511721a77a55ee4bb55892d057 Signed-off-by: David Garcia --- diff --git a/installers/charm/grafana/src/charm.py b/installers/charm/grafana/src/charm.py index bf6fbd9d..a7cc036d 100755 --- a/installers/charm/grafana/src/charm.py +++ b/installers/charm/grafana/src/charm.py @@ -175,6 +175,7 @@ class GrafanaCharm(CharmedOsmBase): if config.max_file_size > 0 else config.max_file_size ), + "kubernetes.io/ingress.class": "public", } ingress_resource_builder = IngressResourceV3Builder( f"{self.app.name}-ingress", annotations diff --git a/installers/charm/kafka-exporter/src/charm.py b/installers/charm/kafka-exporter/src/charm.py index 123fa0b2..3b599a85 100755 --- a/installers/charm/kafka-exporter/src/charm.py +++ b/installers/charm/kafka-exporter/src/charm.py @@ -194,7 +194,7 @@ class KafkaExporterCharm(CharmedOsmBase): # Add ingress resources to PodSpec if site url exists if config.site_url: parsed = urlparse(config.site_url) - annotations = {} + annotations = {"kubernetes.io/ingress.class": "public"} ingress_resource_builder = IngressResourceV3Builder( f"{self.app.name}-ingress", annotations ) diff --git a/installers/charm/keystone/src/charm.py b/installers/charm/keystone/src/charm.py index b5ce0cc6..66930803 100755 --- a/installers/charm/keystone/src/charm.py +++ b/installers/charm/keystone/src/charm.py @@ -365,6 +365,7 @@ class KeystoneCharm(CharmedOsmBase): if config.max_file_size > 0 else config.max_file_size ), + "kubernetes.io/ingress.class": "public", } ingress_resource_builder = IngressResourceV3Builder( f"{self.app.name}-ingress", annotations diff --git a/installers/charm/mongodb-exporter/src/charm.py b/installers/charm/mongodb-exporter/src/charm.py index fd318faf..a2b94719 100755 --- a/installers/charm/mongodb-exporter/src/charm.py +++ b/installers/charm/mongodb-exporter/src/charm.py @@ -214,7 +214,7 @@ class MongodbExporterCharm(CharmedOsmBase): # Add ingress resources to PodSpec if site url exists if config.site_url: parsed = urlparse(config.site_url) - annotations = {} + annotations = {"kubernetes.io/ingress.class": "public"} ingress_resource_builder = IngressResourceV3Builder( f"{self.app.name}-ingress", annotations ) diff --git a/installers/charm/mysqld-exporter/src/charm.py b/installers/charm/mysqld-exporter/src/charm.py index 2ae7d837..85a1e67a 100755 --- a/installers/charm/mysqld-exporter/src/charm.py +++ b/installers/charm/mysqld-exporter/src/charm.py @@ -210,7 +210,7 @@ class MysqlExporterCharm(CharmedOsmBase): # Add ingress resources to PodSpec if site url exists if config.site_url: parsed = urlparse(config.site_url) - annotations = {} + annotations = {"kubernetes.io/ingress.class": "public"} ingress_resource_builder = IngressResourceV3Builder( f"{self.app.name}-ingress", annotations ) diff --git a/installers/charm/nbi/src/charm.py b/installers/charm/nbi/src/charm.py index bbbf5ece..0af41045 100755 --- a/installers/charm/nbi/src/charm.py +++ b/installers/charm/nbi/src/charm.py @@ -249,6 +249,7 @@ class NbiCharm(CharmedOsmBase): else config.max_file_size ), "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS", + "kubernetes.io/ingress.class": "public", } ingress_resource_builder = IngressResourceV3Builder( f"{self.app.name}-ingress", annotations diff --git a/installers/charm/ng-ui/src/charm.py b/installers/charm/ng-ui/src/charm.py index 5efaaaef..1c53163e 100755 --- a/installers/charm/ng-ui/src/charm.py +++ b/installers/charm/ng-ui/src/charm.py @@ -149,6 +149,7 @@ class NgUiCharm(CharmedOsmBase): if config.max_file_size > 0 else config.max_file_size ), + "kubernetes.io/ingress.class": "public", } ingress_resource_builder = IngressResourceV3Builder( f"{self.app.name}-ingress", annotations diff --git a/installers/charm/prometheus/src/charm.py b/installers/charm/prometheus/src/charm.py index 5fdee723..cf4f9566 100755 --- a/installers/charm/prometheus/src/charm.py +++ b/installers/charm/prometheus/src/charm.py @@ -197,6 +197,7 @@ class PrometheusCharm(CharmedOsmBase): if config.max_file_size > 0 else config.max_file_size ), + "kubernetes.io/ingress.class": "public", } ingress_resource_builder = IngressResourceV3Builder( f"{self.app.name}-ingress", annotations