csi: remove k8s version check for oidc token
This commit removes k8s version check for oidc token which required k8s v1.20 or above since minimum k8s version that rook supports now is v1.22. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
1 parent
29ae629c5f
commit
d6b8a8f380
4 files changed
-16
No files matched your search
@@ -155,12 +155,6 @@ func (r *ReconcileCSI) setParams(ver *version.Info) error {
|
||||
CSIParam.EnableOMAPGenerator = true
|
||||
}
|
||||
|
||||
// SA token projection is stable only from kubernetes version 1.20.
|
||||
CSIParam.EnableOIDCTokenProjection = false
|
||||
if ver.Major == kubeMinMajor && ver.Minor >= kubeMinVerForOIDCTokenProjection {
|
||||
CSIParam.EnableOIDCTokenProjection = true
|
||||
}
|
||||
|
||||
// CSIDriver SeLinuxMount option is only available from kubernetes version 1.25.
|
||||
if ver.Major == kubeMinMajor && ver.Minor >= kubeMinVerForCSIDriverSeLinuxMount {
|
||||
CSIParam.EnableCSIDriverSeLinuxMount = true
|
||||
|
||||
@@ -73,7 +73,6 @@ type Param struct {
|
||||
EnableNFSSnapshotter bool
|
||||
EnableCSIAddonsSideCar bool
|
||||
MountCustomCephConf bool
|
||||
EnableOIDCTokenProjection bool
|
||||
EnableCSIDriverSeLinuxMount bool
|
||||
EnableCSIEncryption bool
|
||||
EnableCSITopology bool
|
||||
@@ -180,7 +179,6 @@ var (
|
||||
|
||||
const (
|
||||
kubeMinMajor = "1"
|
||||
kubeMinVerForOIDCTokenProjection = "20"
|
||||
kubeMaxVerForBeta1csiDriver = "21"
|
||||
kubeMinVerForCSIDriverSeLinuxMount = "25"
|
||||
|
||||
|
||||
@@ -232,11 +232,9 @@ spec:
|
||||
mountPath: /etc/ceph/ceph.conf
|
||||
subPath: ceph.conf
|
||||
{{ end }}
|
||||
{{ if .EnableOIDCTokenProjection }}
|
||||
- name: oidc-token
|
||||
mountPath: /run/secrets/tokens
|
||||
readOnly: true
|
||||
{{ end }}
|
||||
{{ if .EnableCSIEncryption }}
|
||||
- name: rook-ceph-csi-kms-config
|
||||
mountPath: /etc/ceph-csi-encryption-kms-config/
|
||||
@@ -304,7 +302,6 @@ spec:
|
||||
emptyDir: {
|
||||
medium: "Memory"
|
||||
}
|
||||
{{ if .EnableOIDCTokenProjection }}
|
||||
- name: oidc-token
|
||||
projected:
|
||||
sources:
|
||||
@@ -312,7 +309,6 @@ spec:
|
||||
path: oidc-token
|
||||
expirationSeconds: 3600
|
||||
audience: ceph-csi-kms
|
||||
{{ end }}
|
||||
{{ if .EnableCSIEncryption }}
|
||||
- name: rook-ceph-csi-kms-config
|
||||
configMap:
|
||||
|
||||
@@ -135,11 +135,9 @@ spec:
|
||||
mountPath: /etc/ceph/ceph.conf
|
||||
subPath: ceph.conf
|
||||
{{ end }}
|
||||
{{ if .EnableOIDCTokenProjection }}
|
||||
- name: oidc-token
|
||||
mountPath: /run/secrets/tokens
|
||||
readOnly: true
|
||||
{{ end }}
|
||||
{{ if .EnableCSIEncryption }}
|
||||
- name: rook-ceph-csi-kms-config
|
||||
mountPath: /etc/ceph-csi-encryption-kms-config/
|
||||
@@ -269,7 +267,6 @@ spec:
|
||||
- key: ceph.conf
|
||||
path: ceph.conf
|
||||
{{ end }}
|
||||
{{ if .EnableOIDCTokenProjection }}
|
||||
- name: oidc-token
|
||||
projected:
|
||||
sources:
|
||||
@@ -277,7 +274,6 @@ spec:
|
||||
path: oidc-token
|
||||
expirationSeconds: 3600
|
||||
audience: ceph-csi-kms
|
||||
{{ end }}
|
||||
{{ if .EnableCSIEncryption }}
|
||||
- name: rook-ceph-csi-kms-config
|
||||
configMap:
|
||||
|
||||
Reference in new issue
Block a user