From 6480b1117ee7fb454d7e7e0c5c5d4551d0b31745 Mon Sep 17 00:00:00 2001 From: Pablo Acevedo Montserrat Date: Wed, 13 Mar 2024 09:43:43 +0100 Subject: [PATCH] USHIFT-2459: Add docs to namespaceOwnership --- cmd/generate-config/config/config-openapi-spec.json | 1 + packaging/microshift/config.yaml | 5 +++++ pkg/config/ingress.go | 10 ++++++++++ 3 files changed, 16 insertions(+) diff --git a/cmd/generate-config/config/config-openapi-spec.json b/cmd/generate-config/config/config-openapi-spec.json index 20402f46490..74b31c1663f 100755 --- a/cmd/generate-config/config/config-openapi-spec.json +++ b/cmd/generate-config/config/config-openapi-spec.json @@ -83,6 +83,7 @@ ], "properties": { "namespaceOwnership": { + "description": "Describes how host name claims across namespaces should be handled. \n Value must be one of: \n - Strict: Do not allow routes in different namespaces to claim the same host. \n - InterNamespaceAllowed: Allow routes to claim different paths of the same host name across namespaces. \n If empty, the default is InterNamespaceAllowed.", "type": "string", "default": "InterNamespaceAllowed" } diff --git a/packaging/microshift/config.yaml b/packaging/microshift/config.yaml index a862f47cb1d..d46a3414531 100644 --- a/packaging/microshift/config.yaml +++ b/packaging/microshift/config.yaml @@ -19,6 +19,11 @@ etcd: memoryLimitMB: 0 ingress: routeAdmissionPolicy: + # Describes how host name claims across namespaces should be handled. + # Value must be one of: + # - Strict: Do not allow routes in different namespaces to claim the same host. + # - InterNamespaceAllowed: Allow routes to claim different paths of the same host name across namespaces. + # If empty, the default is InterNamespaceAllowed. namespaceOwnership: InterNamespaceAllowed manifests: # The locations on the filesystem to scan for kustomization files to use to load manifests. Set to a list of paths to scan only those paths. Set to an empty list to disable loading manifests. The entries in the list can be glob patterns to match multiple subdirectories. diff --git a/pkg/config/ingress.go b/pkg/config/ingress.go index 3f57f9e8b40..c2bd8539391 100644 --- a/pkg/config/ingress.go +++ b/pkg/config/ingress.go @@ -14,6 +14,16 @@ type IngressConfig struct { } type RouteAdmissionPolicy struct { + // Describes how host name claims across namespaces should be handled. + // + // Value must be one of: + // + // - Strict: Do not allow routes in different namespaces to claim the same host. + // + // - InterNamespaceAllowed: Allow routes to claim different paths of the same + // host name across namespaces. + // + // If empty, the default is InterNamespaceAllowed. // +kubebuilder:default="InterNamespaceAllowed" NamespaceOwnership NamespaceOwnershipEnum `json:"namespaceOwnership"` }