From fa4f7523dc5af1eed5ab66afeca872c3fa168d7e Mon Sep 17 00:00:00 2001 From: Andres Morey Date: Thu, 16 May 2024 11:31:54 +0300 Subject: [PATCH] allowed-namespaces docs improvements --- README.md | 3 ++- backend/hack/server.yaml | 6 ++---- hack/config.yaml | 32 ++++++++++++++++---------------- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 5622c6a..b061284 100644 --- a/README.md +++ b/README.md @@ -120,9 +120,10 @@ Kubetail can be configured using a configuration file written in YAML, JSON, TOM | ------------------------------------- | -------- | ---------------------------------------------------- | ---------------------- | | addr | string | Host address to bind to | ":4000" | | auth-mode | string | Auth mode (token, cluster, local) | "token" | +| allowed-namespaces | []string | If populated, restricts namespace access | [] | +| base-path | string | URL path prefix | "/" | | gin-mode | string | Gin mode (release, debug) | "release" | | kube-config | string | Kubectl config file path | "${HOME}/.kube/config" | -| base-path | string | URL path prefix | "/" | | csrf.enabled | bool | Enable CSRF protection | true | | csrf.field-name | string | CSRF token name in forms | "csrf_token" | | csrf.secret | string | CSRF hash key | "" | diff --git a/backend/hack/server.yaml b/backend/hack/server.yaml index 72a5ac1..0e99853 100644 --- a/backend/hack/server.yaml +++ b/backend/hack/server.yaml @@ -20,11 +20,9 @@ gin-mode: debug # App options auth-mode: local -kube-config: ${HOME}/.kube/config +allowed-namespaces: [] base-path: / -allowed-namespaces: - - kubernetes-dashboard - - kube-system +kube-config: ${HOME}/.kube/config session: secret: REPLACEME diff --git a/hack/config.yaml b/hack/config.yaml index 01c70ee..2d37390 100644 --- a/hack/config.yaml +++ b/hack/config.yaml @@ -22,6 +22,22 @@ addr: :4000 # auth-mode: token +## allowed-namespaces ## +# +# If non-empty, restricts queries to allowed namespaces +# +# Default value: [] +# +allowed-namespaces: [] + +## base-path ## +# +# Sets the url path prefix (useful for deploying on a sub-path behind a reverse proxy) +# +# Default value: / +# +base-path: / + ## gin-mode ## # # Sets the mode for the Gin framework @@ -42,22 +58,6 @@ gin-mode: release # kube-config: ${HOME}/.kube/config -## base-path ## -# -# Sets the url path prefix (useful for deploying on a sub-path behind a reverse proxy) -# -# Default value: / -# -base-path: / - -## allowed-namespaces ## -# -# If non-empty, restricts queries to allowed namespaces -# -# Default value: [] -# -allowed-namespaces: [] - ## csrf ## # csrf: