Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ks-core helm chart #383

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.21
version: 0.6.22

# 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
10 changes: 10 additions & 0 deletions src/test/ks-core/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Please be patient and wait for several seconds for the KubeSphere deployment to

kubectl get pods -n {{ .Release.Namespace }}

{{- if or (eq .Values.role "") (eq .Values.role "host") }}
2. Access the KubeSphere Console

Once the deployment is complete, you can access the KubeSphere console using the following URL: {{"\n"}}
Expand All @@ -25,5 +26,14 @@ Please be patient and wait for several seconds for the KubeSphere deployment to
Password: {{ include "printOrDefaultPass" . }}

NOTE: It is highly recommended to change the default password immediately after the first login.
{{- else }}

Cluster Member Installed Successfully!

Congratulations! The cluster member has been successfully installed.

You can view the information of the member cluster by accessing the ks-console of the host cluster.

Happy deploying!
{{- end }}
For additional information and details, please visit https://kubesphere.io.
7 changes: 7 additions & 0 deletions src/test/ks-core/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ Create the name of the service account to use
{{- default "kubesphere" .Values.serviceAccount.name }}
{{- end }}

{{/*
Create the name of the secret of sa token.
*/}}
{{- define "ks-core.serviceAccountTokenName" -}}
{{- printf "%s-%s" ( include "ks-core.serviceAccountName" . ) "sa-token" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{- define "portal.host" -}}
{{- if and .Values.portal.https (.Values.portal.https).port }}
{{- if eq (int .Values.portal.https.port) 443 }}
Expand Down
1 change: 1 addition & 0 deletions src/test/ks-core/templates/kubesphere-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ data:
helmExecutor:
image: {{ template "helm.image" . }}
timout: {{ .Values.helmExecutor.timeout }}
historyMax: {{ .Values.helmExecutor.historyMax }}
extension:
imageRegistry: {{ default .Values.extension.imageRegistry "" | quote }}
{{- if .Values.extension.nodeSelector }}
Expand Down
22 changes: 22 additions & 0 deletions src/test/ks-core/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -11,6 +12,27 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}

{{- if semverCompare ">=1.24.0-0" .Capabilities.KubeVersion.GitVersion -}}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "ks-core.serviceAccountTokenName" . }}
labels:
{{- include "ks-core.labels" . | nindent 4 }}
{{- if .Values.serviceAccount.annotations }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
kubernetes.io/service-account.name: {{ include "ks-core.serviceAccountName" . }}
{{- end }}
{{- else }}
annotations:
kubernetes.io/service-account.name: {{ include "ks-core.serviceAccountName" . }}
{{- end }}
type: kubernetes.io/service-account-token
{{- end }}

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
39 changes: 39 additions & 0 deletions src/test/ks-core/templates/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,45 @@ webhooks:
sideEffects: None
timeoutSeconds: 30

---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: defaulter.installplan.kubesphere.io
webhooks:
- admissionReviewVersions:
- v1
clientConfig:
caBundle: {{ b64enc $ca.Cert | quote }}
service:
name: ks-controller-manager
namespace: kubesphere-system
path: /mutate-kubesphere-io-v1alpha1-installplan
port: 443
failurePolicy: Fail
matchPolicy: Exact
name: installplans.kubesphere.io
namespaceSelector: {}
objectSelector:
matchExpressions:
- key: app.kubernetes.io/managed-by
operator: NotIn
values:
- Helm
rules:
- apiGroups:
- kubesphere.io
apiVersions:
- 'v1alpha1'
operations:
- CREATE
- UPDATE
resources:
- installplans
scope: '*'
sideEffects: None
timeoutSeconds: 30

---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand Down
2 changes: 1 addition & 1 deletion src/test/ks-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ agent:

helmExecutor:
timeout: 5m
historyMax: 5
historyMax: 2
image:
registry: ""
repository: kubesphereio/kubectl
Expand Down
Loading