From 99550e958e815afb548fdf1596c49d25c4bcd744 Mon Sep 17 00:00:00 2001 From: ci-bot Date: Thu, 21 Mar 2024 22:04:51 +0800 Subject: [PATCH] update ks-core helm chart --- .../extensions.customresourcefilters.rego | 10 ++++++++ src/test/ks-core/templates/globalroles.yaml | 1 + .../templates/ks-controller-manager.yaml | 2 ++ ...job.yaml => post-patch-system-ns-job.yaml} | 6 ++--- .../ks-core/templates/post-upgrade-job.yaml | 2 +- .../ks-core/templates/pre-upgrade-job.yaml | 4 +-- src/test/ks-core/templates/webhook.yaml | 4 +++ src/test/ks-core/values.yaml | 25 +++++++++---------- 8 files changed, 35 insertions(+), 19 deletions(-) rename src/test/ks-core/templates/{post-install-job.yaml => post-patch-system-ns-job.yaml} (86%) diff --git a/src/test/ks-core/files/extensions.customresourcefilters.rego b/src/test/ks-core/files/extensions.customresourcefilters.rego index cdbba35b2..f024565c6 100644 --- a/src/test/ks-core/files/extensions.customresourcefilters.rego +++ b/src/test/ks-core/files/extensions.customresourcefilters.rego @@ -46,6 +46,11 @@ match if { enabledStatusMatch } +match if { + installStatusSearch + notInstalledStatusMatch +} + fuzzySearch if "q" == input.filter.field installStatusSearch if "status" == input.filter.field @@ -88,3 +93,8 @@ enabledStatusMatch if { input.filter.value == "false" not input.object.status.enabled } + +notInstalledStatusMatch if { + input.filter.value == "notInstalled" + not alreadyInstalled +} diff --git a/src/test/ks-core/templates/globalroles.yaml b/src/test/ks-core/templates/globalroles.yaml index 74f1040e4..d20af4eb4 100644 --- a/src/test/ks-core/templates/globalroles.yaml +++ b/src/test/ks-core/templates/globalroles.yaml @@ -125,6 +125,7 @@ rules: - 'apps' - 'categories' - 'apps/versions' + - 'applications' verbs: - get - list diff --git a/src/test/ks-core/templates/ks-controller-manager.yaml b/src/test/ks-core/templates/ks-controller-manager.yaml index f47042205..4f5b21baa 100644 --- a/src/test/ks-core/templates/ks-controller-manager.yaml +++ b/src/test/ks-core/templates/ks-controller-manager.yaml @@ -25,6 +25,8 @@ spec: labels: app: ks-controller-manager tier: backend + annotations: + kubesphere.io/update-time: {{ dateInZone "2006-01-02T15:05:05Z" (now) "UTC"| quote }} spec: serviceAccountName: {{ template "ks-core.serviceAccountName" . }} {{- include "controller.imagePullSecrets" . | nindent 6 }} diff --git a/src/test/ks-core/templates/post-install-job.yaml b/src/test/ks-core/templates/post-patch-system-ns-job.yaml similarity index 86% rename from src/test/ks-core/templates/post-install-job.yaml rename to src/test/ks-core/templates/post-patch-system-ns-job.yaml index 5e82ee7d0..242c26da4 100644 --- a/src/test/ks-core/templates/post-install-job.yaml +++ b/src/test/ks-core/templates/post-patch-system-ns-job.yaml @@ -1,9 +1,9 @@ apiVersion: batch/v1 kind: Job metadata: - name: "{{ .Release.Name }}-post-install" + name: "{{ .Release.Name }}-post-patch-system-ns" annotations: - "helm.sh/hook": post-install + "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-weight": "-5" "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed spec: @@ -12,7 +12,7 @@ spec: restartPolicy: Never serviceAccountName: {{ include "ks-core.serviceAccountName" . }} containers: - - name: post-install-job + - name: post-patch-system-ns image: {{ template "kubectl.image" . }} command: - /bin/bash diff --git a/src/test/ks-core/templates/post-upgrade-job.yaml b/src/test/ks-core/templates/post-upgrade-job.yaml index c8d410f64..b1598875c 100644 --- a/src/test/ks-core/templates/post-upgrade-job.yaml +++ b/src/test/ks-core/templates/post-upgrade-job.yaml @@ -31,7 +31,7 @@ spec: volumes: - name: config configMap: - name: ks-upgrade-config + name: {{ .Release.Name }}-upgrade-config defaultMode: 420 {{- if not .Values.upgrade.storage.s3.endpoint }} - name: data diff --git a/src/test/ks-core/templates/pre-upgrade-job.yaml b/src/test/ks-core/templates/pre-upgrade-job.yaml index 5007ba991..84c76a7c4 100644 --- a/src/test/ks-core/templates/pre-upgrade-job.yaml +++ b/src/test/ks-core/templates/pre-upgrade-job.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: ks-upgrade-config + name: {{ .Release.Name }}-upgrade-config namespace: {{ .Release.Namespace }} annotations: "helm.sh/hook": pre-upgrade @@ -75,7 +75,7 @@ spec: volumes: - name: config configMap: - name: ks-upgrade-config + name: {{ .Release.Name }}-upgrade-config defaultMode: 420 {{- if not .Values.upgrade.storage.s3.endpoint }} - name: data diff --git a/src/test/ks-core/templates/webhook.yaml b/src/test/ks-core/templates/webhook.yaml index 5d7d1cf04..8bd3c340e 100644 --- a/src/test/ks-core/templates/webhook.yaml +++ b/src/test/ks-core/templates/webhook.yaml @@ -95,6 +95,7 @@ kind: ValidatingWebhookConfiguration metadata: name: extensions.kubesphere.io webhooks: + {{- if eq (include "role" .) "host" }} - admissionReviewVersions: - v1 clientConfig: @@ -122,6 +123,7 @@ webhooks: scope: '*' sideEffects: None timeoutSeconds: 30 + {{- end }} - admissionReviewVersions: - v1 clientConfig: @@ -214,6 +216,7 @@ webhooks: sideEffects: None timeoutSeconds: 30 +{{- if eq (include "role" .) "host" }} --- apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration @@ -247,6 +250,7 @@ webhooks: scope: '*' sideEffects: None timeoutSeconds: 30 +{{- end }} --- diff --git a/src/test/ks-core/values.yaml b/src/test/ks-core/values.yaml index a7f1012f8..7bdcee3bc 100644 --- a/src/test/ks-core/values.yaml +++ b/src/test/ks-core/values.yaml @@ -339,6 +339,9 @@ upgrade: accessMode: ReadWriteOnce size: 5Gi jobs: + core: + disabled: false + priority: 10000 network: disabled: false priority: 100 @@ -530,22 +533,15 @@ upgrade: configMapNamespace: "kubesphere-system" chartsPath: "" installationMode: HostOnly - clusterScheduling: - placement: - clusters: - - host - clusterSelector: - matchLabels: - node-role.kubernetes.io/master: "" dmp: disabled: false priority: 100 extensionRef: name: "dmp" - version: "2.0.0" + version: "2.1.0" namespace: "extension-dmp" - configMap: "extension-dmp-2.0.0-chart" + configMap: "extension-dmp-2.1.0-chart" configMapKey: "chart.tgz" configMapNamespace: "kubesphere-system" chartsPath: "" @@ -556,11 +552,14 @@ upgrade: matchLabels: kubesphere.io/managed: "true" config: | + global: + imageRegistry: docker.io + imagePullSecrets: [ ] extension: frontend: image: - repository: registry.cn-beijing.aliyuncs.com/kse/dmp-frontend - tag: "2.0.0" + repository: radondb/dmp-frontend + tag: "2.1.0" resources: limits: cpu: 200m @@ -571,8 +570,8 @@ upgrade: agent: dmp: image: - repository: registry.cn-beijing.aliyuncs.com/kse/dmp - tag: "2.0.0" + repository: radondb/dmp + tag: "2.1.0" resources: limits: cpu: 200m