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 Mar 29, 2024
1 parent 068d9c7 commit f78f62a
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 414 deletions.
2 changes: 1 addition & 1 deletion src/test/ks-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.18
version: 0.6.19

# 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
Expand Down
3 changes: 3 additions & 0 deletions src/test/ks-core/crds/kubesphere.io_repositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
username:
type: string
type: object
caBundle:
description: if the caBundle is empty, use --insecure-skip-tls-verify.
type: string
description:
type: string
image:
Expand Down
7 changes: 0 additions & 7 deletions src/test/ks-core/templates/globalroles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,6 @@ rules:
verbs:
- get
- list
- apiGroups:
- license.kubesphere.io
resources:
- licenses
verbs:
- get
- list
- apiGroups:
- cluster.kubesphere.io
resources:
Expand Down
4 changes: 2 additions & 2 deletions src/test/ks-core/templates/kubesphere-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ data:
accessTokenInactivityTimeout: {{ .Values.authentication.issuer.accessTokenInactivityTimeout }}
{{- if .Values.s3 }}
s3:
endpoint: {{ .Values.s3.endpoint | default "" }}
endpoint: {{ .Values.s3.endpoint | quote }}
region: {{ .Values.s3.region | default "us-east-1" }}
disableSSL: {{ .Values.s3.disableSSL | default true }}
forcePathStyle: {{ .Values.s3.forcePathStyle | default true }}
Expand Down Expand Up @@ -71,4 +71,4 @@ data:
password: KUBESPHERE_CACHE_OPTIONS_PASSWORD
db: 0
{{- end }}
{{- end }}
{{- end }}
16 changes: 10 additions & 6 deletions src/test/ks-core/templates/post-upgrade-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,27 @@ spec:
- ks-upgrade
- post-upgrade
- --logtostderr=true
- --config=/etc/kubesphere/ks-upgrade.yaml
- --config=/etc/kubesphere/config.yaml
{{- if .Values.upgrade.config }}
- --config=/etc/kubesphere/config-patch.yaml
{{- end }}
volumeMounts:
- mountPath: /etc/kubesphere/
{{- if .Values.upgrade.config }}
- mountPath: /etc/kubesphere/config-patch.yaml
name: config
{{- if not .Values.upgrade.storage.s3.endpoint }}
subPath: config-patch.yaml
{{- end }}
- mountPath: /tmp/ks-upgrade
name: data
{{- end }}
resources: {{- toYaml .Values.upgrade.resources | nindent 12 }}
volumes:
{{- if .Values.upgrade.config }}
- name: config
configMap:
name: {{ .Release.Name }}-upgrade-config
defaultMode: 420
{{- if not .Values.upgrade.storage.s3.endpoint }}
{{- end }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.upgrade.persistenceVolume.name }}
{{- end }}
{{- end }}
33 changes: 14 additions & 19 deletions src/test/ks-core/templates/pre-upgrade-job.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if not .Values.upgrade.disabled }}
{{- if .Values.upgrade.config }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -8,20 +9,11 @@ metadata:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "-1"
data:
ks-upgrade.yaml: |
storage:
{{- if .Values.upgrade.storage.s3.endpoint }}
s3: {{- toYaml .Values.upgrade.storage.s3 | nindent 8 }}
{{- else }}
local:
path: {{ .Values.upgrade.storage.local.path }}
{{- end }}
download: {{- toYaml .Values.upgrade.download | nindent 6 }}
skipValidator: {{ .Values.upgrade.skipValidator }}
jobs: {{- toYaml .Values.upgrade.jobs | nindent 6 }}
config-patch.yaml: |
{{- toYaml .Values.upgrade.config | nindent 4 }}
{{- end }}

---
{{- if not .Values.upgrade.storage.s3.endpoint }}
{{- if not (lookup "v1" "PersistentVolumeClaim" .Release.Namespace .Values.upgrade.persistenceVolume.name) }}
kind: PersistentVolumeClaim
apiVersion: v1
Expand All @@ -42,7 +34,6 @@ spec:
storage: {{ .Values.upgrade.persistenceVolume.size | quote }}
storageClassName: {{ .Values.upgrade.persistenceVolume.storageClassName }}
{{- end }}
{{- end }}

---
apiVersion: batch/v1
Expand All @@ -66,23 +57,27 @@ spec:
- ks-upgrade
- pre-upgrade
- --logtostderr=true
- --config=/etc/kubesphere/ks-upgrade.yaml
- --config=/etc/kubesphere/config.yaml
{{- if .Values.upgrade.config }}
- --config=/etc/kubesphere/config-patch.yaml
{{- end }}
volumeMounts:
- mountPath: /etc/kubesphere/
{{- if .Values.upgrade.config }}
- mountPath: /etc/kubesphere/config-patch.yaml
name: config
{{- if not .Values.upgrade.storage.s3.endpoint }}
subPath: config-patch.yaml
{{- end }}
- mountPath: /tmp/ks-upgrade
name: data
{{- end }}
resources: {{- toYaml .Values.upgrade.resources | nindent 12 }}
volumes:
{{- if .Values.upgrade.config }}
- name: config
configMap:
name: {{ .Release.Name }}-upgrade-config
defaultMode: 420
{{- if not .Values.upgrade.storage.s3.endpoint }}
{{- end }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.upgrade.persistenceVolume.name }}
{{- end }}
{{- end }}
27 changes: 14 additions & 13 deletions src/test/ks-core/templates/prepare-upgrade-job.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
{{- if .Values.upgrade.prepare }}
{{- if .Values.upgrade.config }}
apiVersion: v1
kind: ConfigMap
metadata:
name: ks-upgrade-prepare-config
namespace: {{ .Release.Namespace }}
data:
ks-upgrade.yaml: |
storage:
{{- if .Values.upgrade.storage.s3.endpoint }}
s3: {{- toYaml .Values.upgrade.storage.s3 | nindent 8 }}
{{- else }}
local:
path: {{ .Values.upgrade.storage.local.path }}
{{- end }}
download: {{- toYaml .Values.upgrade.download | nindent 6 }}
skipValidator: {{ .Values.upgrade.skipValidator }}
jobs: {{- toYaml .Values.upgrade.jobs | nindent 6 }}
config-patch.yaml: |
{{- toYaml .Values.upgrade.config | nindent 4 }}
{{- end }}

---
apiVersion: batch/v1
Expand All @@ -36,14 +29,22 @@ spec:
- ks-upgrade
- prepare-upgrade
- --logtostderr=true
- --config=/etc/kubesphere/ks-upgrade.yaml
- --config=/etc/kubesphere/config.yaml
{{- if .Values.upgrade.config }}
- --config=/etc/kubesphere/config-patch.yaml
{{- end }}
{{- if .Values.upgrade.config }}
volumeMounts:
- mountPath: /etc/kubesphere/
- mountPath: /etc/kubesphere/config-patch.yaml
name: config
subPath: config-patch.yaml
{{- end }}
resources: {{- toYaml .Values.upgrade.resources | nindent 12 }}
{{- if .Values.upgrade.config }}
volumes:
- name: config
configMap:
name: ks-upgrade-prepare-config
defaultMode: 420
{{- end }}
{{- end }}
35 changes: 0 additions & 35 deletions src/test/ks-core/templates/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -327,41 +327,6 @@ webhooks:

---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: license.kubesphere.io
webhooks:
- admissionReviewVersions:
- v1
clientConfig:
caBundle: {{ b64enc $ca.Cert | quote }}
service:
name: ks-controller-manager
namespace: kubesphere-system
path: /license-cluster-checker
port: 443
name: license-cluster-checker.kubesphere.io
failurePolicy: Ignore
matchPolicy: Exact
namespaceSelector: {}
objectSelector:
matchExpressions:
- key: cluster-role.kubesphere.io/host
operator: DoesNotExist
rules:
- apiGroups:
- cluster.kubesphere.io
apiVersions:
- v1alpha1
operations:
- CREATE
resources:
- clusters
scope: '*'
sideEffects: None
timeoutSeconds: 30
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: defaulter.config.kubesphere.io
Expand Down
Loading

0 comments on commit f78f62a

Please sign in to comment.