Skip to content

Commit

Permalink
update ks-core helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
ks-ci-bot committed Dec 27, 2023
1 parent d677b6c commit 008cb0e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 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
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

0 comments on commit 008cb0e

Please sign in to comment.