Skip to content

Commit

Permalink
feat: add configurations for kubeconfig files in kusion
Browse files Browse the repository at this point in the history
  • Loading branch information
liu-hm19 committed Jan 14, 2025
1 parent fd25665 commit d944bc7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
20 changes: 19 additions & 1 deletion charts/kusion/templates/kusion-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,22 @@ spec:
key: mysql-password
{{- end }}
resources:
{{- toYaml .Values.server.resources | nindent 12 }}
{{- toYaml .Values.server.resources | nindent 12 }}
volumeMounts:
- name: kubeconfig-volume
mountPath: {{ .Values.kubeConfigVolumeMountPath }}
volumes:
- name: kubeconfig-volume
secret:
secretName: {{ .Values.server.name }}-kubeconfigs
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.server.name }}-kubeconfigs
namespace: {{ .Values.namespace }}
type: Opaque
data:
{{- range .Values.secrets.kubeConfigs }}
{{ .key }}: {{ .value | b64enc | quote }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/kusion/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,13 @@ mysql:
# -- Access modes for MySQL PVC
accessModes:
- ReadWriteOnce

# -- Volume mount path for KubeConfig files
kubeConfigVolumeMountPath: /var/run/secrets/kubernetes.io/kubeconfigs/

# KubeConfig configuration
secrets:

Check failure on line 121 in charts/kusion/values.yaml

View workflow job for this annotation

GitHub Actions / chart-test

121:9 [trailing-spaces] trailing spaces
kubeConfigs:

Check failure on line 122 in charts/kusion/values.yaml

View workflow job for this annotation

GitHub Actions / chart-test

122:15 [trailing-spaces] trailing spaces
- key: "kubeconfig-0"
value: |
Please fill in your KubeConfig contents here.

Check failure on line 125 in charts/kusion/values.yaml

View workflow job for this annotation

GitHub Actions / chart-test

125:54 [trailing-spaces] trailing spaces

0 comments on commit d944bc7

Please sign in to comment.