Skip to content

Commit

Permalink
Merge pull request #346 from kubesphere/sync/ks-core
Browse files Browse the repository at this point in the history
Update ks-core helm chart
  • Loading branch information
wansir authored Jan 11, 2024
2 parents 8ee35f5 + e9bec39 commit f28eacd
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 15 deletions.
6 changes: 4 additions & 2 deletions src/test/ks-core/scripts/post-delete.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env bash

set -x
# set -x

CRD_NAMES=$1

# delete crds
for crd in `kubectl get crds -o jsonpath="{.items[*].metadata.name}"`
do
if [[ $crd == *kubesphere.io ]]; then
if [[ ${CRD_NAMES[@]/${crd}/} != ${CRD_NAMES[@]} ]]; then
scop=$(eval echo $(kubectl get crd ${crd} -o jsonpath="{.spec.scope}"))
if [[ $scop =~ "Namespaced" ]] ; then
kubectl get $crd -A --no-headers | awk '{print $1" "$2" ""'$crd'"}' | xargs -n 3 sh -c 'kubectl patch $2 -n $0 $1 -p "{\"metadata\":{\"finalizers\":null}}" --type=merge 2>/dev/null && kubectl delete $2 -n $0 $1 2>/dev/null'
Expand Down
6 changes: 3 additions & 3 deletions src/test/ks-core/templates/extension-categories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ spec:
apiVersion: kubesphere.io/v1alpha1
kind: Category
metadata:
name: monitoring-logging
name: observability
spec:
displayName:
en: Monitoring and logging
zh: 监控和日志
en: Observability
zh: 可观测性

---
apiVersion: kubesphere.io/v1alpha1
Expand Down
2 changes: 1 addition & 1 deletion src/test/ks-core/templates/globalrolebingings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
iam.kubesphere.io/role-ref: platform-admin
iam.kubesphere.io/user-ref: admin
name: admin-platform-admin
name: admin
roleRef:
apiGroup: iam.kubesphere.io
kind: GlobalRole
Expand Down
19 changes: 16 additions & 3 deletions src/test/ks-core/templates/globalroles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ rules:
- /dist/*
verbs:
- GET
- nonResourceURLs:
- /static/images/*
verbs:
- GET

---
apiVersion: iam.kubesphere.io/v1beta1
kind: GlobalRole
metadata:
labels:
iam.kubesphere.io/auto-aggregate: "true"
annotations:
iam.kubesphere.io/rego-override: |-
package authz
Expand Down Expand Up @@ -39,6 +45,11 @@ metadata:
allowedVerbs[_] == input.Verb
}
name: authenticated
aggregationRoleTemplates:
roleSelector:
matchLabels:
iam.kubesphere.io/aggregate-to-authenticated: ""
iam.kubesphere.io/scope: "global"
rules:
- apiGroups:
- config.kubesphere.io
Expand Down Expand Up @@ -115,6 +126,10 @@ rules:
verbs:
- get
- list
- nonResourceURLs:
- /static/images/*
verbs:
- GET

---
apiVersion: iam.kubesphere.io/v1beta1
Expand Down Expand Up @@ -164,7 +179,7 @@ metadata:
kubesphere.io/description: '{"zh": "被邀请加入企业空间之前无法访问任何资源。", "en": "Cannot access any resources before joining a workspace."}'
kubesphere.io/creator: admin
name: platform-regular
rules: []
rules: [ ]

---
apiVersion: iam.kubesphere.io/v1beta1
Expand All @@ -173,8 +188,6 @@ metadata:
annotations:
kubesphere.io/creator: admin
kubesphere.io/description: '{"zh": "创建企业空间并成为所创建的企业空间的管理员。", "en": "Create workspaces and become an administrator of the created workspaces."}'
labels:
iam.kubesphere.io/auto-aggregate: "true"
name: platform-self-provisioner
aggregationRoleTemplates:
templateNames:
Expand Down
9 changes: 7 additions & 2 deletions src/test/ks-core/templates/kubesphere-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ data:
image: {{ template "kubectl.image" . }}
node:
image: {{ template "nodeShell.image" . }}
helmImage: {{ template "helm.image" . }}
helmExecutor:
image: {{ template "helm.image" . }}
extension:
imageRegistry: {{- .Values.extension.imageRegistry }}
nodeSelector: {{- toYaml .Values.extension.nodeSelector | nindent 8 }}

{{- if .Values.devMode }}
telemetry:
ksCloudUrl: "https://clouddev.kubesphere.io"
ksCloudURL: "https://clouddev.kubesphere.io"
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion src/test/ks-core/templates/oauthclient-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ stringData:
accessTokenInactivityTimeout: 7200
kind: Secret
metadata:
name: kubesphere
name: oauthclient-kubesphere
namespace: kubesphere-system
labels:
config.kubesphere.io/type: oauthclient
Expand Down
7 changes: 7 additions & 0 deletions src/test/ks-core/templates/post-delete-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ subjects:

---

{{- $crdNameList := list }}
{{- range $path, $_ := .Files.Glob "crds/**" }}
{{- $crd := $.Files.Get $path | fromYaml }}
{{- $crdNameList = append $crdNameList $crd.metadata.name }}
{{- end }}

apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -60,6 +66,7 @@ spec:
command:
- /bin/bash
- /scripts/post-delete.sh
- '{{ join " " $crdNameList }}'
volumeMounts:
- mountPath: /scripts
name: scripts
Expand Down
4 changes: 2 additions & 2 deletions src/test/ks-core/templates/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ webhooks:
objectSelector: {}
rules:
- apiGroups:
- '*'
- ''
apiVersions:
- '*'
- v1
operations:
- CREATE
resources:
Expand Down
9 changes: 8 additions & 1 deletion src/test/ks-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,17 @@ nodeShell:
tag: "3.18.4"
pullPolicy: IfNotPresent


extension:
imageRegistry: ""
nodeSelector: {}

upgrade:
disabled: false
image:
registry: ""
repository: kse/ks-upgrade
tag: ""
tag: "latest"
pullPolicy: IfNotPresent
storage:
s3:
Expand All @@ -314,3 +319,5 @@ upgrade:
disabled: false
priority: 11
dynamicOptions: {}


0 comments on commit f28eacd

Please sign in to comment.