outposts: make k8s service type configurable
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
9a15a66d85
commit
b266a2cdfb
|
@ -45,7 +45,11 @@ class ServiceReconciler(KubernetesObjectReconciler[V1Service]):
|
|||
selector_labels = DeploymentReconciler(self.controller).get_pod_meta()
|
||||
return V1Service(
|
||||
metadata=meta,
|
||||
spec=V1ServiceSpec(ports=ports, selector=selector_labels, type="ClusterIP"),
|
||||
spec=V1ServiceSpec(
|
||||
ports=ports,
|
||||
selector=selector_labels,
|
||||
type=self.controller.outpost.config.kubernetes_service_type,
|
||||
),
|
||||
)
|
||||
|
||||
def create(self, reference: V1Service):
|
||||
|
|
|
@ -61,6 +61,7 @@ class OutpostConfig:
|
|||
kubernetes_namespace: str = field(default="default")
|
||||
kubernetes_ingress_annotations: dict[str, str] = field(default_factory=dict)
|
||||
kubernetes_ingress_secret_name: str = field(default="authentik-outpost")
|
||||
kubernetes_service_type: str = field(default="ClusterIP")
|
||||
|
||||
|
||||
class OutpostModel(Model):
|
||||
|
|
Reference in New Issue