From 47c97051ac1dc82b92020b84a49b5de92bff9782 Mon Sep 17 00:00:00 2001 From: ci-bot Date: Sat, 9 Mar 2024 08:23:53 +0000 Subject: [PATCH] update ks-core helm chart --- src/test/ks-core/Chart.yaml | 2 +- .../files/extensions.customresourcefilters.rego | 8 +++++++- .../ks-core/templates/customresourcefilters.yaml | 2 +- .../ks-core/templates/kubesphere-config.yaml | 16 +++++++++++----- src/test/ks-core/values.yaml | 4 ++-- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/test/ks-core/Chart.yaml b/src/test/ks-core/Chart.yaml index 22dc57cd..4378bb5a 100644 --- a/src/test/ks-core/Chart.yaml +++ b/src/test/ks-core/Chart.yaml @@ -7,7 +7,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.6.9 +version: 0.6.10 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/src/test/ks-core/files/extensions.customresourcefilters.rego b/src/test/ks-core/files/extensions.customresourcefilters.rego index 08e1be86..20841d4b 100644 --- a/src/test/ks-core/files/extensions.customresourcefilters.rego +++ b/src/test/ks-core/files/extensions.customresourcefilters.rego @@ -78,5 +78,11 @@ installedStatusMatch if { } enabledStatusMatch if { - input.filter.value == "true" == input.object.status.enabled + input.filter.value == "true" + input.object.status.state == "Enabled" +} + +enabledStatusMatch if { + input.filter.value == "false" + input.object.status.state == "Disabled" } diff --git a/src/test/ks-core/templates/customresourcefilters.yaml b/src/test/ks-core/templates/customresourcefilters.yaml index 00015698..49cfa46a 100644 --- a/src/test/ks-core/templates/customresourcefilters.yaml +++ b/src/test/ks-core/templates/customresourcefilters.yaml @@ -9,6 +9,6 @@ stringData: {{ .Files.Get "files/extensions.customresourcefilters.rego" | indent 6 }} kind: Secret metadata: - name: extensions.customresourcefilters.kubesphere + name: extensions.customresourcefilters namespace: kubesphere-system type: config.kubesphere.io/custom-resource-filter \ No newline at end of file diff --git a/src/test/ks-core/templates/kubesphere-config.yaml b/src/test/ks-core/templates/kubesphere-config.yaml index bed89a25..de02155b 100644 --- a/src/test/ks-core/templates/kubesphere-config.yaml +++ b/src/test/ks-core/templates/kubesphere-config.yaml @@ -36,9 +36,15 @@ data: {{- end }} kubesphere: tls: {{ .Values.internalTLS }} - {{- if .Values.devMode }} + {{- if .Values.cloud.enabled }} telemetry: + {{- if eq .Values.cloud.env "clouddev.kubesphere.io" }} ksCloudURL: "https://clouddev.kubesphere.io" + {{- else if eq .Values.cloud.env "kubesphere.cloud" }} + ksCloudURL: "https://kubesphere.cloud" + {{- else if and .Values.cloud.customEnv .Values.cloud.customEnv.url }} + ksCloudURL: {{ $.Values.cloud.customEnv.url | quote }} + {{- end }} {{- end }} {{- if .Values.ha.enabled -}} {{- if .Values.ha.cache }} @@ -47,10 +53,10 @@ data: cache: type: redis options: - host: redis.kubesphere-system.svc - port: 6379 - password: KUBESPHERE_CACHE_OPTIONS_PASSWORD - db: 0 + host: redis.kubesphere-system.svc + port: 6379 + password: KUBESPHERE_CACHE_OPTIONS_PASSWORD + db: 0 {{- end }} {{- end }} composedApp: diff --git a/src/test/ks-core/values.yaml b/src/test/ks-core/values.yaml index f2852a20..824dc119 100644 --- a/src/test/ks-core/values.yaml +++ b/src/test/ks-core/values.yaml @@ -289,9 +289,9 @@ nodeShell: cloud: enabled: true - ## kubesphere.cloud or clouddev.kubesphere.io + ## kubesphere.cloud clouddev.kubesphere.io or custom env: "kubesphere.cloud" - customEnv: + customEnv: {} # url: https://kubesphere.cloud # subscription: # syncPeriod: 60m