Skip to content

Commit

Permalink
Merge pull request #379 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 Mar 29, 2024
2 parents 068d9c7 + d49f075 commit edb0ad3
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 372 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
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 }}
Loading

0 comments on commit edb0ad3

Please sign in to comment.