Skip to content

Commit

Permalink
outposts: fix version label (goauthentik#12486)
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <[email protected]>
  • Loading branch information
BeryJu authored Dec 25, 2024
1 parent ffd5234 commit 50db804
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion authentik/outposts/controllers/k8s/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion authentik/outposts/controllers/k8s/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions authentik/outposts/controllers/k8s/service_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
from authentik.outposts.controllers.kubernetes import KubernetesController


@dataclass
@dataclass(slots=True)
class PrometheusServiceMonitorSpecEndpoint:
"""Prometheus ServiceMonitor endpoint spec"""

port: str
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"""

Expand All @@ -37,7 +37,7 @@ class PrometheusServiceMonitorSpec:
selector: PrometheusServiceMonitorSpecSelector


@dataclass
@dataclass(slots=True)
class PrometheusServiceMonitorMetadata:
"""Prometheus ServiceMonitor metadata"""

Expand All @@ -46,7 +46,7 @@ class PrometheusServiceMonitorMetadata:
labels: dict = field(default_factory=dict)


@dataclass
@dataclass(slots=True)
class PrometheusServiceMonitor:
"""Prometheus ServiceMonitor"""

Expand Down
8 changes: 4 additions & 4 deletions authentik/providers/proxy/controllers/k8s/traefik_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from authentik.outposts.controllers.kubernetes import KubernetesController


@dataclass
@dataclass(slots=True)
class TraefikMiddlewareSpecForwardAuth:
"""traefik middleware forwardAuth spec"""

Expand All @@ -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"""

Expand All @@ -44,7 +44,7 @@ class TraefikMiddlewareMetadata:
labels: dict = field(default_factory=dict)


@dataclass
@dataclass(slots=True)
class TraefikMiddleware:
"""Traefik Middleware"""

Expand Down

0 comments on commit 50db804

Please sign in to comment.