From 0f9628f49d2bedce0e81313c18c64363a0370fd5 Mon Sep 17 00:00:00 2001 From: ci-bot Date: Fri, 1 Mar 2024 02:05:30 +0000 Subject: [PATCH] update ks-core helm chart --- src/test/ks-core/templates/_helpers.tpl | 2 +- src/test/ks-core/templates/globalroles.yaml | 7 +++++++ src/test/ks-core/templates/kubesphere-config.yaml | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/test/ks-core/templates/_helpers.tpl b/src/test/ks-core/templates/_helpers.tpl index 3bc005ae..66a8cf11 100644 --- a/src/test/ks-core/templates/_helpers.tpl +++ b/src/test/ks-core/templates/_helpers.tpl @@ -75,7 +75,7 @@ Create the name of the service account to use {{- end }} {{- define "jwtSecret" -}} -{{- if eq .Values.role "host" }} +{{- if eq .Values.authentication.issuer.jwtSecret "" }} {{- with lookup "v1" "ConfigMap" (printf "%s" .Release.Namespace) "kubesphere-config" }} {{- with (fromYaml (index .data "kubesphere.yaml")) }} {{- if and .authentication (.authentication).jwtSecret }} diff --git a/src/test/ks-core/templates/globalroles.yaml b/src/test/ks-core/templates/globalroles.yaml index 1180a065..8b064670 100644 --- a/src/test/ks-core/templates/globalroles.yaml +++ b/src/test/ks-core/templates/globalroles.yaml @@ -129,6 +129,13 @@ rules: verbs: - get - list + - apiGroups: + - cluster.kubesphere.io + resources: + - 'labels' + verbs: + - get + - list - nonResourceURLs: - '/static/images/*' verbs: diff --git a/src/test/ks-core/templates/kubesphere-config.yaml b/src/test/ks-core/templates/kubesphere-config.yaml index bc99f060..bed89a25 100644 --- a/src/test/ks-core/templates/kubesphere-config.yaml +++ b/src/test/ks-core/templates/kubesphere-config.yaml @@ -14,11 +14,11 @@ data: jwtSecret: {{ include "jwtSecret" . | quote }} maximumClockSkew: {{ .Values.authentication.issuer.maximumClockSkew | default "10s" }} {{- if eq .Values.role "member" }} - accessTokenMaxAge: 0 + accessTokenMaxAge: 0s {{- else }} - accessTokenMaxAge: {{ .Values.authentication.issuer.accessTokenMaxAge }} + accessTokenMaxAge: {{ .Values.authentication.issuer.accessTokenMaxAge }} {{- end }} - accessTokenInactivityTimeout: {{ .Values.authentication.issuer.accessTokenInactivityTimeout }} + accessTokenInactivityTimeout: {{ .Values.authentication.issuer.accessTokenInactivityTimeout }} multicluster: clusterRole: {{ .Values.role }} terminal: