csi: add a parameter to modify the maxUnavailable value of rbd daemonset
The default value of maxUnavailable of daemonset is 1.
Sometimes the upgrade can be slow due to this setting.
So I add a parameter to change the value for rbd daemonset.
Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
Co-authored-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
Co-authored-by: Yuji Ito <llamerada.jp@gmail.com>
(cherry picked from commit ac4b47d71a)
# Conflicts:
# Documentation/Helm-Charts/operator-chart.md
This commit is contained in:
1 parent
552eab3ea7
commit
c424b3c42e
8 files changed
+167
-45
No files matched your search
@@ -41,6 +41,7 @@ For example settings, see the next section or [values.yaml](https://github.com/r
|
||||
|
||||
The following tables lists the configurable parameters of the rook-operator chart and their default values.
|
||||
|
||||
<<<<<<< HEAD
|
||||
| Parameter | Description | Default |
|
||||
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `image.repository` | Image | `rook/ceph` |
|
||||
@@ -139,6 +140,107 @@ The following tables lists the configurable parameters of the rook-operator char
|
||||
| `csi.csiRBDPluginVolumeMount` | The volume mounts of the CephCSI RBD plugin DaemonSet | `<none>` |
|
||||
| `csi.csiCephFSPluginVolume` | The volume of the CephCSI CephFS plugin DaemonSet | `<none>` |
|
||||
| `csi.csiCephFSPluginVolumeMount` | The volume mounts of the CephCSI CephFS plugin DaemonSet | `<none>` |
|
||||
=======
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `image.repository` | Image | `rook/ceph` |
|
||||
| `image.tag` | Image tag | `master` |
|
||||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `crds.enabled` | If true, the helm chart will create the Rook CRDs. Do NOT change to `false` in a running cluster or CRs will be deleted! | `true` |
|
||||
| `rbacEnable` | If true, create & use RBAC resources | `true` |
|
||||
| `pspEnable` | If true, create & use PSP resources | `false` |
|
||||
| `resources` | Pod resource requests & limits | `{}` |
|
||||
| `annotations` | Pod annotations | `{}` |
|
||||
| `logLevel` | Global log level | `INFO` |
|
||||
| `nodeSelector` | Kubernetes `nodeSelector` to add to the Deployment. | `<none>` |
|
||||
| `tolerations` | List of Kubernetes `tolerations` to add to the Deployment. | `[]` |
|
||||
| `unreachableNodeTolerationSeconds` | Delay to use for the node.kubernetes.io/unreachable pod failure toleration to override the Kubernetes default of 5 minutes | `5s` |
|
||||
| `currentNamespaceOnly` | Whether the operator should watch cluster CRD in its own namespace or not | `false` |
|
||||
| `hostpathRequiresPrivileged` | Runs Ceph Pods as privileged to be able to write to `hostPath`s in OpenShift with SELinux restrictions. | `false` |
|
||||
| `allowLoopDevices` | If true, loop devices are allowed to be used for osds in test clusters | `false` |
|
||||
| `discover.priorityClassName` | The priority class name to add to the discover pods | `<none>` |
|
||||
| `discover.toleration` | Toleration for the discover pods | `<none>` |
|
||||
| `discover.tolerationKey` | The specific key of the taint to tolerate | `<none>` |
|
||||
| `discover.tolerations` | Array of tolerations in YAML format which will be added to discover deployment | `<none>` |
|
||||
| `discover.nodeAffinity` | The node labels for affinity of `discover-agent` [^1] | `<none>` |
|
||||
| `discover.podLabels` | Labels to add to the discover pods. | `<none>` |
|
||||
| `discover.resources` | Add resources to discover daemon pods. | `<none>` |
|
||||
| `csi.enableRbdDriver` | Enable Ceph CSI RBD driver. | `true` |
|
||||
| `csi.enableCephfsDriver` | Enable Ceph CSI CephFS driver. | `true` |
|
||||
| `csi.enableCephfsSnapshotter` | Enable Snapshotter in CephFS provisioner pod. | `true` |
|
||||
| `csi.enableNFSSnapshotter` | Enable Snapshotter in NFS provisioner pod. | `true` |
|
||||
| `csi.enableRBDSnapshotter` | Enable Snapshotter in RBD provisioner pod. | `true` |
|
||||
| `csi.pluginPriorityClassName` | PriorityClassName to be set on csi driver plugin pods. | `<none>` |
|
||||
| `csi.provisionerPriorityClassName` | PriorityClassName to be set on csi driver provisioner pods. | `<none>` |
|
||||
| `csi.enableOMAPGenerator` | EnableOMAP generator deploys omap sidecar in CSI provisioner pod, to enable it set it to true | `false` |
|
||||
| `csi.rbdFSGroupPolicy` | Policy for modifying a volume's ownership or permissions when the RBD PVC is being mounted | `ReadWriteOnceWithFSType` |
|
||||
| `csi.cephFSFSGroupPolicy` | Policy for modifying a volume's ownership or permissions when the CephFS PVC is being mounted | `ReadWriteOnceWithFSType` |
|
||||
| `csi.nfsFSGroupPolicy` | Policy for modifying a volume's ownership or permissions when the NFS PVC is being mounted | `ReadWriteOnceWithFSType` |
|
||||
| `csi.enableMetadata` | Set volume metadata on the CephFS subvolumes and RBD images. | `false` |
|
||||
| `csi.clusterName` | Cluster name identifier to set as metadata on the CephFS subvolumes and RBD images. | `<none>` |
|
||||
| `csi.logLevel` | Set logging level for cephCSI containers maintained by the cephCSI. Supported values from 0 to 5. 0 for general useful logs, 5 for trace level verbosity. | `0` |
|
||||
| `csi.sidecarLogLevel` | Set logging level for cephCSI sidecar containers. Supported values from 0 to 5. 0 for general useful logs (the default), 5 for trace level verbosity. | `0` |
|
||||
| `csi.grpcTimeoutInSeconds` | Set GRPC timeout for csi containers. | `150` |
|
||||
| `csi.provisionerReplicas` | Set replicas for csi provisioner deployment. | `2` |
|
||||
| `csi.enableGrpcMetrics` | Enable Ceph CSI GRPC Metrics. | `false` |
|
||||
| `csi.enableCSIHostNetwork` | Enable Host Networking for Ceph CSI nodeplugins. | `false` |
|
||||
| `csi.enablePluginSelinuxHostMount` | Enable Host mount for /etc/selinux directory for Ceph CSI nodeplugins. | `false` |
|
||||
| `csi.enableCSIEncryption` | Enable Ceph CSI PVC encryption support. | `false` |
|
||||
| `csi.provisionerTolerations` | Array of tolerations in YAML format which will be added to CSI provisioner deployment. | `<none>` |
|
||||
| `csi.provisionerNodeAffinity` | The node labels for affinity of the CSI provisioner deployment [^1] | `<none>` |
|
||||
| `csi.pluginTolerations` | Array of tolerations in YAML format which will be added to CephCSI plugin DaemonSet | `<none>` |
|
||||
| `csi.pluginNodeAffinity` | The node labels for affinity of the CephCSI plugin DaemonSet [^1] | `<none>` |
|
||||
| `csi.rbdProvisionerTolerations` | Array of tolerations in YAML format which will be added to CephCSI RBD provisioner deployment. | `<none>` |
|
||||
| `csi.rbdProvisionerNodeAffinity` | The node labels for affinity of the CephCSI RBD provisioner deployment [^1] | `<none>` |
|
||||
| `csi.rbdPluginTolerations` | Array of tolerations in YAML format which will be added to CephCSI RBD plugin DaemonSet | `<none>` |
|
||||
| `csi.rbdPluginNodeAffinity` | The node labels for affinity of the CephCSI RBD plugin DaemonSet [^1] | `<none>` |
|
||||
| `csi.cephFSProvisionerTolerations` | Array of tolerations in YAML format which will be added to CephCSI CephFS provisioner deployment. | `<none>` |
|
||||
| `csi.cephFSProvisionerNodeAffinity` | The node labels for affinity of the CephCSI CephFS provisioner deployment [^1] | `<none>` |
|
||||
| `csi.cephFSPluginTolerations` | Array of tolerations in YAML format which will be added to CephCSI CephFS plugin DaemonSet | `<none>` |
|
||||
| `csi.cephFSPluginNodeAffinity` | The node labels for affinity of the CephCSI CephFS plugin DaemonSet [^1] | `<none>` |
|
||||
| `csi.nfsProvisionerTolerations` | Array of tolerations in YAML format which will be added to CephCSI NFS provisioner deployment. | `<none>` |
|
||||
| `csi.nfsProvisionerNodeAffinity` | The node labels for affinity of the CephCSI NFS provisioner deployment [^1] | `<none>` |
|
||||
| `csi.nfsPluginTolerations` | Array of tolerations in YAML format which will be added to CephCSI NFS plugin DaemonSet | `<none>` |
|
||||
| `csi.nfsPluginNodeAffinity` | The node labels for affinity of the CephCSI NFS plugin DaemonSet [^1] | `<none>` |
|
||||
| `csi.csiRBDProvisionerResource` | CEPH CSI RBD provisioner resource requirement list. | `<none>` |
|
||||
| `csi.csiRBDPluginResource` | CEPH CSI RBD plugin resource requirement list. | `<none>` |
|
||||
| `csi.csiCephFSProvisionerResource` | CEPH CSI CephFS provisioner resource requirement list. | `<none>` |
|
||||
| `csi.csiCephFSPluginResource` | CEPH CSI CephFS plugin resource requirement list. | `<none>` |
|
||||
| `csi.csiNFSProvisionerResource` | CEPH CSI NFS provisioner resource requirement list. | `<none>` |
|
||||
| `csi.csiNFSPluginResource` | CEPH CSI NFS plugin resource requirement list. | `<none>` |
|
||||
| `csi.cephfsGrpcMetricsPort` | CSI CephFS driver GRPC metrics port. | `9091` |
|
||||
| `csi.cephfsLivenessMetricsPort` | CSI CephFS driver metrics port. | `9081` |
|
||||
| `csi.rbdGrpcMetricsPort` | Ceph CSI RBD driver GRPC metrics port. | `9090` |
|
||||
| `csi.csiAddonsPort` | CSI Addons server port. | `9070` |
|
||||
| `csi.rbdLivenessMetricsPort` | Ceph CSI RBD driver metrics port. | `8080` |
|
||||
| `csi.enableLiveness` | Enable Ceph CSI Liveness sidecar deployment. | `false` |
|
||||
| `csi.forceCephFSKernelClient` | Enable Ceph Kernel clients on kernel < 4.17 which support quotas for Cephfs. | `true` |
|
||||
| `csi.kubeletDirPath` | Kubelet root directory path (if the Kubelet uses a different path for the `--root-dir` flag) | `/var/lib/kubelet` |
|
||||
| `csi.cephcsi.image` | Ceph CSI image. | `quay.io/cephcsi/cephcsi:v3.7.2` |
|
||||
| `csi.rbdPluginUpdateStrategy` | CSI Rbd plugin daemonset update strategy, supported values are OnDelete and RollingUpdate. | `RollingUpdate` |
|
||||
| `csi.rbdPluginUpdateStrategyMaxUnavailable` | A maxUnavailable parameter of CSI RBD plugin daemonset update strategy. | `1` |
|
||||
| `csi.cephFSPluginUpdateStrategy` | CSI CephFS plugin daemonset update strategy, supported values are OnDelete and RollingUpdate. | `RollingUpdate` |
|
||||
| `csi.nfsPluginUpdateStrategy` | CSI NFS plugin daemonset update strategy, supported values are OnDelete and RollingUpdate. | `RollingUpdate` |
|
||||
| `csi.registrar.image` | Kubernetes CSI registrar image. | `registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1` |
|
||||
| `csi.resizer.image` | Kubernetes CSI resizer image. | `registry.k8s.io/sig-storage/csi-resizer:v1.6.0` |
|
||||
| `csi.provisioner.image` | Kubernetes CSI provisioner image. | `registry.k8s.io/sig-storage/csi-provisioner:v3.3.0` |
|
||||
| `csi.snapshotter.image` | Kubernetes CSI snapshotter image. | `registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0` |
|
||||
| `csi.attacher.image` | Kubernetes CSI Attacher image. | `registry.k8s.io/sig-storage/csi-attacher:v4.0.0` |
|
||||
| `csi.cephfsPodLabels` | Labels to add to the CSI CephFS Pods. | `<none>` |
|
||||
| `csi.rbdPodLabels` | Labels to add to the CSI RBD Pods. | `<none>` |
|
||||
| `csi.csiAddons.enabled` | Enable CSIAddons | `false` |
|
||||
| `csi.csiAddons.image` | CSIAddons Sidecar image. | `quay.io/csiaddons/k8s-sidecar:v0.5.0` |
|
||||
| `csi.topology.enabled` | Enable topology based provisioning. | `false` |
|
||||
| `csi.topology.domainLabels` | domainLabels define which node labels to use as domains for CSI nodeplugins to advertise their domains. | `<none>` |
|
||||
| `csi.nfs.enabled` | Enable nfs driver. | `false` |
|
||||
| `admissionController.tolerations` | Array of tolerations in YAML format which will be added to admission controller deployment. | `<none>` |
|
||||
| `admissionController.nodeAffinity` | The node labels for affinity of the admission controller deployment [^1] | `<none>` |
|
||||
| `monitoring.enabled` | Create necessary RBAC rules for Rook to integrate with Prometheus monitoring in the operator namespace. Requires Prometheus to be pre-installed. | `false` |
|
||||
| `csi.csiRBDPluginVolume` | The volume of the CephCSI RBD plugin DaemonSet | `<none>` |
|
||||
| `csi.csiRBDPluginVolumeMount` | The volume mounts of the CephCSI RBD plugin DaemonSet | `<none>` |
|
||||
| `csi.csiCephFSPluginVolume` | The volume of the CephCSI CephFS plugin DaemonSet | `<none>` |
|
||||
| `csi.csiCephFSPluginVolumeMount` | The volume mounts of the CephCSI CephFS plugin DaemonSet | `<none>` |
|
||||
>>>>>>> ac4b47d71 (csi: add a parameter to modify the maxUnavailable value of rbd daemonset)
|
||||
|
||||
[^1]: `nodeAffinity` and `*NodeAffinity` options should have the format `"role=storage,rook; storage=ceph"` or `storage=;role=rook-example` or `storage=;` (_checks only for presence of key_)
|
||||
|
||||
|
||||
@@ -44,6 +44,9 @@ data:
|
||||
{{- if .Values.csi.rbdPluginUpdateStrategy }}
|
||||
CSI_RBD_PLUGIN_UPDATE_STRATEGY: {{ .Values.csi.rbdPluginUpdateStrategy | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.csi.rbdPluginUpdateStrategyMaxUnavailable }}
|
||||
CSI_RBD_PLUGIN_UPDATE_STRATEGY_MAX_UNAVAILABLE: {{ .Values.csi.rbdPluginUpdateStrategyMaxUnavailable | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.csi.kubeletDirPath }}
|
||||
ROOK_CSI_KUBELET_DIR_PATH: {{ .Values.csi.kubeletDirPath | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -123,6 +123,9 @@ csi:
|
||||
# CSI RBD plugin daemonset update strategy, supported values are OnDelete and RollingUpdate.
|
||||
# Default value is RollingUpdate.
|
||||
#rbdPluginUpdateStrategy: OnDelete
|
||||
# A maxUnavailable parameter of CSI RBD plugin daemonset update strategy.
|
||||
# Default value is 1.
|
||||
#rbdPluginUpdateStrategyMaxUnavailable: "1"
|
||||
# CSI CephFS plugin daemonset update strategy, supported values are OnDelete and RollingUpdate.
|
||||
# Default value is RollingUpdate.
|
||||
#cephFSPluginUpdateStrategy: OnDelete
|
||||
|
||||
@@ -209,6 +209,9 @@ data:
|
||||
# CSI RBD plugin daemonset update strategy, supported values are OnDelete and RollingUpdate.
|
||||
# Default value is RollingUpdate.
|
||||
# CSI_RBD_PLUGIN_UPDATE_STRATEGY: "OnDelete"
|
||||
# A maxUnavailable parameter of CSI RBD plugin daemonset update strategy.
|
||||
# Default value is 1.
|
||||
# CSI_RBD_PLUGIN_UPDATE_STRATEGY_MAX_UNAVAILABLE: "1"
|
||||
|
||||
# CSI NFS plugin daemonset update strategy, supported values are OnDelete and RollingUpdate.
|
||||
# Default value is RollingUpdate.
|
||||
|
||||
@@ -129,6 +129,9 @@ data:
|
||||
# CSI RBD plugin daemonset update strategy, supported values are OnDelete and RollingUpdate.
|
||||
# Default value is RollingUpdate.
|
||||
# CSI_RBD_PLUGIN_UPDATE_STRATEGY: "OnDelete"
|
||||
# A maxUnavailable parameter of CSI RBD plugin daemonset update strategy.
|
||||
# Default value is 1.
|
||||
# CSI_RBD_PLUGIN_UPDATE_STRATEGY_MAX_UNAVAILABLE: "1"
|
||||
|
||||
# CSI NFS plugin daemonset update strategy, supported values are OnDelete and RollingUpdate.
|
||||
# Default value is RollingUpdate.
|
||||
|
||||
@@ -201,10 +201,13 @@ func (r *ReconcileCSI) setParams(ver *version.Info) error {
|
||||
CSIParam.NFSPluginUpdateStrategy = rollingUpdate
|
||||
}
|
||||
|
||||
// Default values are based on Kubernetes official documentation.
|
||||
// https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy
|
||||
if strings.EqualFold(k8sutil.GetValue(r.opConfig.Parameters, "CSI_RBD_PLUGIN_UPDATE_STRATEGY", rollingUpdate), onDelete) {
|
||||
CSIParam.RBDPluginUpdateStrategy = onDelete
|
||||
} else {
|
||||
CSIParam.RBDPluginUpdateStrategy = rollingUpdate
|
||||
CSIParam.RBDPluginUpdateStrategyMaxUnavailable = k8sutil.GetValue(r.opConfig.Parameters, "CSI_RBD_PLUGIN_UPDATE_STRATEGY_MAX_UNAVAILABLE", "1")
|
||||
}
|
||||
|
||||
CSIParam.EnablePluginSelinuxHostMount = false
|
||||
|
||||
@@ -40,51 +40,52 @@ import (
|
||||
)
|
||||
|
||||
type Param struct {
|
||||
CSIPluginImage string
|
||||
RegistrarImage string
|
||||
ProvisionerImage string
|
||||
AttacherImage string
|
||||
SnapshotterImage string
|
||||
ResizerImage string
|
||||
DriverNamePrefix string
|
||||
EnableCSIGRPCMetrics string
|
||||
KubeletDirPath string
|
||||
ForceCephFSKernelClient string
|
||||
CephFSPluginUpdateStrategy string
|
||||
NFSPluginUpdateStrategy string
|
||||
RBDPluginUpdateStrategy string
|
||||
PluginPriorityClassName string
|
||||
ProvisionerPriorityClassName string
|
||||
VolumeReplicationImage string
|
||||
CSIAddonsImage string
|
||||
ImagePullPolicy string
|
||||
CSIClusterName string
|
||||
CSIDomainLabels string
|
||||
GRPCTimeout time.Duration
|
||||
CSIEnableMetadata bool
|
||||
EnablePluginSelinuxHostMount bool
|
||||
EnableCSIHostNetwork bool
|
||||
EnableOMAPGenerator bool
|
||||
EnableRBDSnapshotter bool
|
||||
EnableCephFSSnapshotter bool
|
||||
EnableNFSSnapshotter bool
|
||||
EnableCSIAddonsSideCar bool
|
||||
MountCustomCephConf bool
|
||||
EnableOIDCTokenProjection bool
|
||||
EnableCSIEncryption bool
|
||||
EnableCSITopology bool
|
||||
EnableLiveness bool
|
||||
LogLevel uint8
|
||||
SidecarLogLevel uint8
|
||||
CephFSGRPCMetricsPort uint16
|
||||
CephFSLivenessMetricsPort uint16
|
||||
RBDGRPCMetricsPort uint16
|
||||
CSIAddonsPort uint16
|
||||
RBDLivenessMetricsPort uint16
|
||||
ProvisionerReplicas int32
|
||||
CSICephFSPodLabels map[string]string
|
||||
CSINFSPodLabels map[string]string
|
||||
CSIRBDPodLabels map[string]string
|
||||
CSIPluginImage string
|
||||
RegistrarImage string
|
||||
ProvisionerImage string
|
||||
AttacherImage string
|
||||
SnapshotterImage string
|
||||
ResizerImage string
|
||||
DriverNamePrefix string
|
||||
EnableCSIGRPCMetrics string
|
||||
KubeletDirPath string
|
||||
ForceCephFSKernelClient string
|
||||
CephFSPluginUpdateStrategy string
|
||||
NFSPluginUpdateStrategy string
|
||||
RBDPluginUpdateStrategy string
|
||||
RBDPluginUpdateStrategyMaxUnavailable string
|
||||
PluginPriorityClassName string
|
||||
ProvisionerPriorityClassName string
|
||||
VolumeReplicationImage string
|
||||
CSIAddonsImage string
|
||||
ImagePullPolicy string
|
||||
CSIClusterName string
|
||||
CSIDomainLabels string
|
||||
GRPCTimeout time.Duration
|
||||
CSIEnableMetadata bool
|
||||
EnablePluginSelinuxHostMount bool
|
||||
EnableCSIHostNetwork bool
|
||||
EnableOMAPGenerator bool
|
||||
EnableRBDSnapshotter bool
|
||||
EnableCephFSSnapshotter bool
|
||||
EnableNFSSnapshotter bool
|
||||
EnableCSIAddonsSideCar bool
|
||||
MountCustomCephConf bool
|
||||
EnableOIDCTokenProjection bool
|
||||
EnableCSIEncryption bool
|
||||
EnableCSITopology bool
|
||||
EnableLiveness bool
|
||||
LogLevel uint8
|
||||
SidecarLogLevel uint8
|
||||
CephFSGRPCMetricsPort uint16
|
||||
CephFSLivenessMetricsPort uint16
|
||||
RBDGRPCMetricsPort uint16
|
||||
CSIAddonsPort uint16
|
||||
RBDLivenessMetricsPort uint16
|
||||
ProvisionerReplicas int32
|
||||
CSICephFSPodLabels map[string]string
|
||||
CSINFSPodLabels map[string]string
|
||||
CSIRBDPodLabels map[string]string
|
||||
}
|
||||
|
||||
type templateParam struct {
|
||||
|
||||
@@ -9,6 +9,10 @@ spec:
|
||||
app: csi-rbdplugin
|
||||
updateStrategy:
|
||||
type: {{ .RBDPluginUpdateStrategy }}
|
||||
{{ if eq .RBDPluginUpdateStrategy "RollingUpdate" }}
|
||||
rollingUpdate:
|
||||
maxUnavailable: {{ .RBDPluginUpdateStrategyMaxUnavailable }}
|
||||
{{ end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
||||
Reference in new issue
Block a user