Skip to content

Commit

Permalink
Merge pull request #140 from juicedata/fix-cm-update
Browse files Browse the repository at this point in the history
fix juicefs-csi-driver cm update
  • Loading branch information
zwwhdls authored Feb 5, 2025
2 parents 7df4b5a + 16d0591 commit 8a079d1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/juicefs-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: juicefs-csi-driver
description: A Helm chart for JuiceFS CSI Driver
type: application
version: 0.22.4
version: 0.22.5
appVersion: 0.26.3
kubeVersion: ">=1.14.0-0"
home: https://github.com/juicedata/juicefs-csi-driver
Expand Down
2 changes: 1 addition & 1 deletion charts/juicefs-csi-driver/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# juicefs-csi-driver

![Version: 0.22.4](https://img.shields.io/badge/Version-0.22.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.26.3](https://img.shields.io/badge/AppVersion-0.26.3-informational?style=flat-square)
![Version: 0.22.5](https://img.shields.io/badge/Version-0.22.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.26.3](https://img.shields.io/badge/AppVersion-0.26.3-informational?style=flat-square)

A Helm chart for JuiceFS CSI Driver

Expand Down
9 changes: 7 additions & 2 deletions charts/juicefs-csi-driver/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.globalConfig.enabled }}
{{- if or .Values.globalConfig.manageByHelm .Release.IsInstall }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -7,9 +8,13 @@ metadata:
labels:
app.kubernetes.io/component: config
{{- include "juicefs-csi.labels" . | nindent 4 }}
{{- if .Release.IsInstall }}
annotations:
{{- if not .Values.globalConfig.manageByHelm }}
helm.sh/resource-policy: keep
{{- end }}
data:
config.yaml: |-
{{- toYaml .Values.globalConfig | nindent 4 }}
{{- $val := omit .Values.globalConfig "enabled" "manageByHelm" }}
{{- toYaml $val | nindent 4 }}
{{- end }}
{{- end }}
8 changes: 6 additions & 2 deletions charts/juicefs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,16 @@ mountMode: mountpod

# This file contains the configuration options for the JuiceFS CSI driver
# Ref: https://juicefs.com/docs/zh/csi/guide/configurations#configmap
# NOTE: this config only apply in first install
# if you want to update it, you need to edit the configmap directly, or use csi-dashboard to update it
globalConfig:
# Set to false to disable global config
enabled: true

# Set to true to manage global config by Helm
# If set to false:
# 1. the global config will only be applied in the first installation, and will not be updated or deleted by Helm
# 2. if you want to update it, you need to edit the configmap directly, or use csi-dashboard
manageByHelm: false

# Set to true to schedule mount pod to node with via nodeSelector, rather than nodeName
enableNodeSelector: false

Expand Down

0 comments on commit 8a079d1

Please sign in to comment.