diff --git a/authentik/outposts/controllers/k8s/base.py b/authentik/outposts/controllers/k8s/base.py index f306369c980c..0602462452c8 100644 --- a/authentik/outposts/controllers/k8s/base.py +++ b/authentik/outposts/controllers/k8s/base.py @@ -207,7 +207,7 @@ def get_object_meta(self, **kwargs) -> V1ObjectMeta: "app.kubernetes.io/instance": slugify(self.controller.outpost.name), "app.kubernetes.io/managed-by": "goauthentik.io", "app.kubernetes.io/name": f"authentik-{self.controller.outpost.type.lower()}", - "app.kubernetes.io/version": get_version(), + "app.kubernetes.io/version": get_version().replace("+", "-"), "goauthentik.io/outpost-name": slugify(self.controller.outpost.name), "goauthentik.io/outpost-type": str(self.controller.outpost.type), "goauthentik.io/outpost-uuid": self.controller.outpost.uuid.hex, diff --git a/authentik/outposts/controllers/k8s/deployment.py b/authentik/outposts/controllers/k8s/deployment.py index fe12a4404efb..83dd4a9e6af0 100644 --- a/authentik/outposts/controllers/k8s/deployment.py +++ b/authentik/outposts/controllers/k8s/deployment.py @@ -94,7 +94,7 @@ def get_reference_object(self) -> V1Deployment: meta = self.get_object_meta(name=self.name) image_name = self.controller.get_container_image() image_pull_secrets = self.outpost.config.kubernetes_image_pull_secrets - version = get_full_version() + version = get_full_version().replace("+", "-") return V1Deployment( metadata=meta, spec=V1DeploymentSpec( diff --git a/authentik/outposts/controllers/k8s/service_monitor.py b/authentik/outposts/controllers/k8s/service_monitor.py index 4e80e23ca3ea..c40bdb3feab3 100644 --- a/authentik/outposts/controllers/k8s/service_monitor.py +++ b/authentik/outposts/controllers/k8s/service_monitor.py @@ -13,7 +13,7 @@ from authentik.outposts.controllers.kubernetes import KubernetesController -@dataclass +@dataclass(slots=True) class PrometheusServiceMonitorSpecEndpoint: """Prometheus ServiceMonitor endpoint spec""" @@ -21,14 +21,14 @@ class PrometheusServiceMonitorSpecEndpoint: path: str = field(default="/metrics") -@dataclass +@dataclass(slots=True) class PrometheusServiceMonitorSpecSelector: """Prometheus ServiceMonitor selector spec""" matchLabels: dict -@dataclass +@dataclass(slots=True) class PrometheusServiceMonitorSpec: """Prometheus ServiceMonitor spec""" @@ -37,7 +37,7 @@ class PrometheusServiceMonitorSpec: selector: PrometheusServiceMonitorSpecSelector -@dataclass +@dataclass(slots=True) class PrometheusServiceMonitorMetadata: """Prometheus ServiceMonitor metadata""" @@ -46,7 +46,7 @@ class PrometheusServiceMonitorMetadata: labels: dict = field(default_factory=dict) -@dataclass +@dataclass(slots=True) class PrometheusServiceMonitor: """Prometheus ServiceMonitor""" diff --git a/authentik/providers/proxy/controllers/k8s/traefik_3.py b/authentik/providers/proxy/controllers/k8s/traefik_3.py index 132f7621e4d9..a15f9caf4eb6 100644 --- a/authentik/providers/proxy/controllers/k8s/traefik_3.py +++ b/authentik/providers/proxy/controllers/k8s/traefik_3.py @@ -15,7 +15,7 @@ from authentik.outposts.controllers.kubernetes import KubernetesController -@dataclass +@dataclass(slots=True) class TraefikMiddlewareSpecForwardAuth: """traefik middleware forwardAuth spec""" @@ -28,14 +28,14 @@ class TraefikMiddlewareSpecForwardAuth: trustForwardHeader: bool = field(default=True) -@dataclass +@dataclass(slots=True) class TraefikMiddlewareSpec: """Traefik middleware spec""" forwardAuth: TraefikMiddlewareSpecForwardAuth -@dataclass +@dataclass(slots=True) class TraefikMiddlewareMetadata: """Traefik Middleware metadata""" @@ -44,7 +44,7 @@ class TraefikMiddlewareMetadata: labels: dict = field(default_factory=dict) -@dataclass +@dataclass(slots=True) class TraefikMiddleware: """Traefik Middleware"""