From f73424bd0e288bdf2394b21d70e629e45e50c5ec Mon Sep 17 00:00:00 2001 From: devopstales <42894256+devopstales@users.noreply.github.com> Date: Tue, 5 Mar 2024 10:22:05 +0100 Subject: [PATCH] add: kubedash-3.0.1 --- charts/kubedash/Chart.yaml | 6 ++--- charts/kubedash/README.md | 10 +++---- charts/kubedash/templates/07_configmap.yaml | 29 +++++++++++++++++---- charts/kubedash/values.yaml | 8 +++--- 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/charts/kubedash/Chart.yaml b/charts/kubedash/Chart.yaml index ccdcbc2..32297f1 100644 --- a/charts/kubedash/Chart.yaml +++ b/charts/kubedash/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: kubedash description: "KubeDash is a general purpose, web-based UI for Kubernetes clusters." type: application -version: 3.0.0 +version: 3.0.1 appVersion: "2.0.0" kubeVersion: ">=1.19.x-0" keywords: @@ -21,8 +21,8 @@ dependencies: - name: postgresql-ha version: ">=11.9.4" repository: "https://charts.bitnami.com/bitnami" - condition: postgresql-ha.enabled + condition: postgresqlHa.enabled - name: metrics-server version: 3.8.4 repository: https://kubernetes-sigs.github.io/metrics-server/ - condition: metrics-server.enabled + condition: metricsServer.enabled diff --git a/charts/kubedash/README.md b/charts/kubedash/README.md index 900fd61..b41fdce 100644 --- a/charts/kubedash/README.md +++ b/charts/kubedash/README.md @@ -2,7 +2,7 @@ ![Version: 3.0.0](https://img.shields.io/badge/Version-3.0.0-informational?style=for-the-badge) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge) -![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=for-the-badge) +![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=for-the-badge) ![Alpine Linux 3.15.0](https://img.shields.io/badge/alpine_linux_3.15.0-0D597F?style=for-the-badge&logo=alpine-linux&logoColor=white) ![Helm](https://img.shields.io/badge/helm-0F1689?style=for-the-badge&logo=helm&logoColor=white) @@ -30,13 +30,13 @@ The following tables lists configurable parameters of the KubeDash chart and the | cluster.caCert | string | `"-----BEGIN CERTIFICATE-----\ncert data here\n-----END CERTIFICATE-----"` | k8s ca cert | | cluster.name | string | `"k8s-cluster"` | k8s api url | | containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["all"]}}` | list of the container's SecurityContexts | -| externalDatabase | object | `{"database":"kubedash","enabled":false,"host":"","password":"kubedash-pass","port":5432,"secret":{"name":"kubedash-postgresql","useExistingSecret":false},"user":"kubedash-user"}` | enable external postgresql support | +| externalDatabase | object | `{"database":"kubedash","enabled":false,"host":"","password":"kubedash-pass","port":5432,"secret":{"name":"kubedash-postgresql","useExistingSecret":false},"username":"kubedash-user"}` | enable external postgresql support | | externalDatabase.secret.name | string | `"kubedash-postgresql"` | Name of the secret storing EXTERNAL_DATABASE_PASSWORD. | | externalDatabase.secret.useExistingSecret | bool | `false` | Secret must provide the following variables: EXTERNAL_DATABASE_PASSWORD. | | flaskConfig | string | `"production"` | flask environment: production or development | | image.pullPolicy | string | `"Always"` | The docker image pull policy | | image.repository | string | `"devopstales/kubedash"` | The docker image repository to use | -| image.tag | string | `"3.0.0"` | The docker image tag to use | +| image.tag | string | `"2.0.0"` | The docker image tag to use | | imagePullSecrets | list | `[]` | pullsecrets | | ingress.annotations | object | `{"nginx.ingress.kubernetes.io/proxy-body-size":"10m"}` | Extra annotation to the Ingress object | | ingress.className | string | `"nginx"` | Ingress class name | @@ -49,7 +49,7 @@ The following tables lists configurable parameters of the KubeDash chart and the | ingress.whitelist.enabled | bool | `false` | Enable ip blocking on ingress | | ingress.whitelist.ips | list | `[]` | List of ips to allow communication | | logLevel | string | `"INFO"` | Log level | -| metrics-server | object | `{"args":["--kubelet-preferred-address-types=InternalIP","--kubelet-insecure-tls"],"enabled":true}` | enable metrics-server | +| metricsServer | object | `{"args":["--kubelet-preferred-address-types=InternalIP","--kubelet-insecure-tls"],"enabled":false}` | enable metrics-server | | nodeSelector | object | `{}` | Set nodeSelector for the pod | | oidc | object | `{"enabled":false,"provider":{"oidcClientId":"","oidcScopes":"openid email","oidcSecret":"","oidcUrl":"https://sso.mydomain.intra/auth/realms/k8s"},"secret":{"name":"kubedash-oidc","useExistingSecret":false}}` | oidc connection information | | oidc.enabled | bool | `false` | Enable oidc authentication | @@ -67,7 +67,7 @@ The following tables lists configurable parameters of the KubeDash chart and the | plugins.helmDashboard.enabled | bool | `true` | Enable helm dashboard plugin with set PLUGIN_HELM_ENABLED | | plugins.registryUi.enabled | bool | `false` | Enable registry UI plugin with set PLUGIN_REGISTRY_ENABLED | | podSecurityContext | object | `{"fsGroup":10001,"fsGroupChangePolicy":"OnRootMismatch","runAsNonRoot":true,"runAsUser":10001}` | list of the pos's SecurityContexts | -| postgresql-ha | object | `{"enabled":false,"metrics":{"enabled":true,"serviceMonitor":{"enabled":false}},"persistence":{"enabled":true},"pgpool":{"adminPassword":"change-me","replicaCount":2},"postgresql":{"database":"kubedash","password":"kubedash-pass","postgresPassword":"change-me","repmgrPassword":"change-me","username":"kubedash-user"},"rbac":{"create":true}}` | deploy HA postgresql | +| postgresqlHa | object | `{"enabled":false,"metrics":{"enabled":true,"serviceMonitor":{"enabled":false}},"persistence":{"enabled":true},"pgpool":{"adminPassword":"change-me","replicaCount":2},"postgresql":{"database":"kubedash","password":"kubedash-pass","postgresPassword":"change-me","repmgrPassword":"change-me","username":"kubedash-user"},"rbac":{"create":true}}` | deploy HA postgresql | | replicas | int | `1` | replica number - for multiple replicas you need to enable externalDatabase support | | route.annotations | object | `{}` | Extra annotation to the OpenShift Route object | | route.enabled | bool | `false` | Enable OpenShift Route object creation | diff --git a/charts/kubedash/templates/07_configmap.yaml b/charts/kubedash/templates/07_configmap.yaml index a7380a3..a0eb049 100644 --- a/charts/kubedash/templates/07_configmap.yaml +++ b/charts/kubedash/templates/07_configmap.yaml @@ -1,4 +1,3 @@ - apiVersion: v1 kind: ConfigMap metadata: @@ -15,10 +14,17 @@ data: EXTERNAL_DATABASE_HOST: {{ .Values.externalDatabase.host | quote }} EXTERNAL_DATABASE_DB: {{ .Values.externalDatabase.database | quote }} {{ end }} +{{ if .Values.postgresqlHa.enabled }} + EXTERNAL_DATABASE_ENABLED: {{ .Values.postgresqlHa.enabled | quote }} + EXTERNAL_DATABASE_HOST: "{{ .Release.Name }}-pgpool" + EXTERNAL_DATABASE_DB: {{ .Values.postgresqlHa.database | quote }} +{{ end }} {{ if .Values.oidc.enabled }} OIDC_ISSUER_URL: {{ .Values.oidc.provider.oidcUrl | quote}} OIDC_SCOPE: {{ .Values.oidc.provider.oidcScopes | quote}} - OIDC_CALLBACK_URL: {{ .Values.oidc.provider.oidcSecret | quote}} + {{ if .Values.ingress.tls.enabled }} + OIDC_CALLBACK_URL: {{ .Values.ingress.url | quote}} + {{ end }} {{ if not .Values.oidc.secret.useExistingSecret }} --- apiVersion: v1 @@ -32,9 +38,8 @@ data: OIDC_CLIENT_ID: {{ .Values.oidc.provider.oidcClientId | b64enc | quote }} OIDC_SECRET: {{ .Values.oidc.provider.oidcSecret | b64enc | quote }} {{ end }} -{{ if .Values.externalDatabase.enabled }} -{{ end }} {{ end }} +{{ if .Values.externalDatabase.enabled }} {{ if not .Values.externalDatabase.secret.useExistingSecret }} --- apiVersion: v1 @@ -45,6 +50,20 @@ metadata: app: kubedash {{- include "kubedash.labels" . | nindent 4 }} data: - EXTERNAL_DATABASE_USER: {{ .Values.externalDatabase.user | b64enc | quote }} + EXTERNAL_DATABASE_USER: {{ .Values.externalDatabase.username | b64enc | quote }} EXTERNAL_DATABASE_PASSWORD: {{ .Values.externalDatabase.password | b64enc | quote }} +{{ end }} +{{ end }} +{{ if .Values.postgresqlHa.enabled }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.externalDatabase.secret.name }} + labels: + app: kubedash + {{- include "kubedash.labels" . | nindent 4 }} +data: + EXTERNAL_DATABASE_USER: {{ .Values.postgresqlHa.postgresql.username | b64enc | quote }} + EXTERNAL_DATABASE_PASSWORD: {{ .Values.postgresqlHa.postgresql.password | b64enc | quote }} {{ end }} \ No newline at end of file diff --git a/charts/kubedash/values.yaml b/charts/kubedash/values.yaml index 1cda0d5..2d31318 100644 --- a/charts/kubedash/values.yaml +++ b/charts/kubedash/values.yaml @@ -31,7 +31,7 @@ externalDatabase: host: "" port: 5432 database: "kubedash" - user: "kubedash-user" + username: "kubedash-user" password: "kubedash-pass" secret: # -- Name of the secret storing EXTERNAL_DATABASE_PASSWORD. @@ -40,7 +40,7 @@ externalDatabase: useExistingSecret: false # -- deploy HA postgresql -postgresql-ha: +postgresqlHa: enabled: false rbac: create: true @@ -63,8 +63,8 @@ postgresql-ha: # https://artifacthub.io/packages/helm/bitnami/postgresql-ha # -- enable metrics-server -metrics-server: - enabled: true +metricsServer: + enabled: false args: - --kubelet-preferred-address-types=InternalIP - --kubelet-insecure-tls