Skip to content

Commit

Permalink
helm: fix seLinuxMount option for csi driver
Browse files Browse the repository at this point in the history
This commit fixes the typo from `.Values.seLinuxMount` to
`.Values.CSIDriver.seLinuxMount` used in helm charts.

Signed-off-by: Praveen M <[email protected]>
  • Loading branch information
iPraveenParihar authored and mergify[bot] committed Mar 29, 2024
1 parent 3df396e commit 33a888f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/ceph-csi-cephfs/templates/csidriver-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ spec:
attachRequired: false
podInfoOnMount: false
fsGroupPolicy: {{ .Values.CSIDriver.fsGroupPolicy }}
{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.seLinuxMount }}
{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.CSIDriver.seLinuxMount }}
seLinuxMount: true
{{- end }}
2 changes: 1 addition & 1 deletion charts/ceph-csi-rbd/templates/csidriver-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ spec:
attachRequired: true
podInfoOnMount: false
fsGroupPolicy: {{ .Values.CSIDriver.fsGroupPolicy }}
{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.seLinuxMount }}
{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.CSIDriver.seLinuxMount }}
seLinuxMount: true
{{- end }}

5 comments on commit 33a888f

@Bengrunt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, FYI this kubeversion check causes issues on Openshift/OKD clusters because of the way Helm reads the cluster Kubernetes version.

For instance, on our OKD 4.15 clusters, you get the following output with a call to oc version and kubectl version:

$ oc version
Server Version: 4.15.0-0.okd-2024-03-10-010116
Kubernetes Version: v1.28.2-3598+6e2789bbd58938-dirty
$ kubectl version --short
Client Version: v1.27.12
Kustomize Version: v5.0.1
Server Version: v1.28.2-3598+6e2789bbd58938-dirty

This situation results in the cluster being considered as running kubernetes older than 1.25.x (while it runs 1.28.x) and to disable the seLinuxMount option in the rendered templates.

This was not occuring before this release.

I'm not aware of solutions to force .Capabilities.KubeVersion.Version to a specific release manually. Please advise.
Thank you!

@Madhu-1
Copy link
Collaborator

@Madhu-1 Madhu-1 commented on 33a888f Sep 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bengrunt this check will be removed in next release.#4817 here is the PR

@Bengrunt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Madhu-1 OK cool! Is it safe to jump release 3.11 ? we're currently running 3.10 on our clusters and if I read correctly this change is released in 3.12.

@Madhu-1
Copy link
Collaborator

@Madhu-1 Madhu-1 commented on 33a888f Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we support upgrade for +1 version only, you can upgrade from 3.10 to 3.11 and from 3.11 to next version of 3.12 once we have new release

@Bengrunt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK so I have to find a way to overwrite the output of the helm install command for 3.11 in order to prevent the removal of the seLinuxMount: true stanza from the CSI drivers already deployed.
Because I'm afraid, since SELinux is heaviliy used in Openshift/OKD clusters, it may cause disruptions in our clusters.

Anyhow, I strongly believe that such a test may come back in the future for other reasons and that it would be good to have a way to override the Kubernetes cluster version from the helm values.

Please sign in to comment.