From 7233a6db9e2418f8b321b31f25be11b5c1d2d416 Mon Sep 17 00:00:00 2001 From: "Homayoon (Hue) Alimohammadi" Date: Fri, 22 Nov 2024 19:33:17 +0400 Subject: [PATCH] Remove defaultTLS option --- charms/worker/k8s/charmcraft.yaml | 9 --------- charms/worker/k8s/src/charm.py | 1 - charms/worker/k8s/tests/unit/test_config_options.py | 3 --- 3 files changed, 13 deletions(-) diff --git a/charms/worker/k8s/charmcraft.yaml b/charms/worker/k8s/charmcraft.yaml index 1adf33a7..525662f2 100644 --- a/charms/worker/k8s/charmcraft.yaml +++ b/charms/worker/k8s/charmcraft.yaml @@ -218,15 +218,6 @@ config: default: false description: | Determines if the ingress feature should be enabled. - ingress-default-tls-secret: - type: string - default: "" - description: | - Sets the name of the kubernetes secret to be used for providing default encryption to - ingresses. - This secret should be in the `kube-system` namespace. - Ingresses can specify another TLS secret in their resource definitions, - in which case the default secret won't be used. ingress-enable-proxy-protocol: type: boolean default: false diff --git a/charms/worker/k8s/src/charm.py b/charms/worker/k8s/src/charm.py index 719f5dce..cfb9b6b6 100755 --- a/charms/worker/k8s/src/charm.py +++ b/charms/worker/k8s/src/charm.py @@ -430,7 +430,6 @@ def _assemble_cluster_config(self) -> UserFacingClusterConfig: ingress = IngressConfig( enabled=self.config.get("ingress-enabled"), - default_tls_secret=self.config.get("ingress-default-tls-secret"), enable_proxy_protocol=self.config.get("ingress-enable-proxy-protocol"), ) diff --git a/charms/worker/k8s/tests/unit/test_config_options.py b/charms/worker/k8s/tests/unit/test_config_options.py index 6470b4b8..7a12be6c 100644 --- a/charms/worker/k8s/tests/unit/test_config_options.py +++ b/charms/worker/k8s/tests/unit/test_config_options.py @@ -65,13 +65,10 @@ def test_configure_ingress_options(harness): enabled = True proxy_protocol_enabled = True - default_tls_secret = "my-secret" harness.update_config({"ingress-enabled": enabled}) harness.update_config({"ingress-enable-proxy-protocol": proxy_protocol_enabled}) - harness.update_config({"ingress-default-tls-secret": default_tls_secret}) ufcg = harness.charm._assemble_cluster_config() assert ufcg.ingress.enabled == enabled assert ufcg.ingress.enable_proxy_protocol == proxy_protocol_enabled - assert ufcg.ingress.default_tls_secret == default_tls_secret