Skip to content

Commit

Permalink
Merge pull request #403 from kubesphere/sync/ks-core
Browse files Browse the repository at this point in the history
Update ks-core helm chart
  • Loading branch information
ks-ci-bot authored Sep 6, 2024
2 parents 9a6acb0 + ece61fd commit 8b26cbf
Show file tree
Hide file tree
Showing 75 changed files with 412 additions and 910 deletions.
109 changes: 0 additions & 109 deletions src/test/ks-core/CHANGELOG_zh.md

This file was deleted.

7 changes: 5 additions & 2 deletions src/test/ks-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ 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: 1.0.0
version: 1.1.0

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "v4.1.0"
appVersion: "v4.1.1"

dependencies:
- name: redis-ha
version: 4.26.1
alias: redisHA
condition: redisHA.enabled
- name: ks-crds
version: 1.0.0
alias: ksCRDs
23 changes: 23 additions & 0 deletions src/test/ks-core/charts/ks-crds/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions src/test/ks-core/charts/ks-crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: ks-crds
description: A Helm chart for KS's CustomResourceDefinition

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
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: 1.0.0

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v4.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -531,4 +531,4 @@ status:
kind: ""
plural: ""
conditions: []
storedVersions: []
storedVersions: []
9 changes: 9 additions & 0 deletions src/test/ks-core/charts/ks-crds/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

CRDS_PATH=$1
echo "ks-crds pre upgrade..."
# shellcheck disable=SC1060
for crd in `ls $CRDS_PATH|grep \.yaml$`; do
echo $crd
kubectl apply -f $CRDS_PATH/$crd
done
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ .Release.Name }}-pre-delete-scripts"
name: "{{ .Release.Name }}-ks-crds-pre-upgrade-scripts"
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "-1"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
data:
{{ (.Files.Glob "scripts/pre-delete.sh").AsConfig | indent 2 }}
{{ (.Files.Glob "scripts/install.sh").AsConfig | indent 2 }}
{{ (.Files.Glob "crds/*").AsConfig | indent 2 }}

---

apiVersion: batch/v1
kind: Job
metadata:
name: "{{ .Release.Name }}-pre-delete"
name: "{{ .Release.Name }}-ks-crds-pre-upgrade"
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-weight": "0"
"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "10"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
spec:
template:
spec:
restartPolicy: Never
serviceAccountName: {{ include "ks-core.serviceAccountName" . }}
containers:
- name: pre-delete-job
image: {{ template "kubectl.image" . }}
- name: crd-install
image: {{ template "preUpgrade.image" . }}
command:
- /bin/bash
- /scripts/pre-delete.sh
- /scripts/install.sh
- /scripts
volumeMounts:
- mountPath: /scripts
name: scripts
resources: {{- toYaml .Values.upgrade.resources | nindent 12 }}
resources: {{- toYaml .Values.preUpgrade.resources | nindent 12 }}
volumes:
- name: scripts
configMap:
name: "{{ .Release.Name }}-pre-delete-scripts"
name: "{{ .Release.Name }}-ks-crds-pre-upgrade-scripts"
defaultMode: 420
17 changes: 17 additions & 0 deletions src/test/ks-core/charts/ks-crds/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Default values for ks-crds.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

preUpgrade:
image:
registry: ""
repository: kubesphereio/kubectl
tag: "v1.27.12"
pullPolicy: IfNotPresent
resources:
limits:
cpu: 1
memory: 1024Mi
requests:
cpu: 20m
memory: 100Mi
89 changes: 0 additions & 89 deletions src/test/ks-core/crds/marketplace.kubesphere.io_subscriptions.yaml

This file was deleted.

Loading

0 comments on commit 8b26cbf

Please sign in to comment.