diff --git a/authentik/outposts/controllers/k8s/service.py b/authentik/outposts/controllers/k8s/service.py index d84d64ea6..0d04ffb89 100644 --- a/authentik/outposts/controllers/k8s/service.py +++ b/authentik/outposts/controllers/k8s/service.py @@ -20,7 +20,7 @@ class ServiceReconciler(KubernetesObjectReconciler[V1Service]): self.api = CoreV1Api(controller.client) def reconcile(self, current: V1Service, reference: V1Service): - compare_ports(current.spec, reference.spec) + compare_ports(current.spec.ports, reference.spec.ports) # run the base reconcile last, as that will probably raise NeedsUpdate # after an authentik update. However the ports might have also changed during # the update, so this causes the service to be re-created with higher diff --git a/tests/integration/test_outpost_kubernetes.py b/tests/integration/test_outpost_kubernetes.py index 40d96e833..c9000ede8 100644 --- a/tests/integration/test_outpost_kubernetes.py +++ b/tests/integration/test_outpost_kubernetes.py @@ -5,9 +5,9 @@ from authentik.flows.models import Flow from authentik.lib.config import CONFIG from authentik.outposts.controllers.k8s.deployment import DeploymentReconciler from authentik.outposts.controllers.k8s.triggers import NeedsUpdate -from authentik.outposts.controllers.kubernetes import KubernetesController from authentik.outposts.models import KubernetesServiceConnection, Outpost, OutpostType from authentik.outposts.tasks import outpost_local_connection +from authentik.providers.proxy.controllers.kubernetes import ProxyKubernetesController from authentik.providers.proxy.models import ProxyProvider @@ -35,7 +35,7 @@ class OutpostKubernetesTests(TestCase): def test_deployment_reconciler(self): """test that deployment requires update""" - controller = KubernetesController(self.outpost, self.service_connection) + controller = ProxyKubernetesController(self.outpost, self.service_connection) deployment_reconciler = DeploymentReconciler(controller) self.assertIsNotNone(deployment_reconciler.retrieve())