Skip to content

Commit 11cfb0e

Browse files
author
rtupakul
committed
CSCwt70014: changes for kube1-35-1
1 parent 2e2347e commit 11cfb0e

8 files changed

Lines changed: 13 additions & 14 deletions

File tree

doc/running-minio.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,15 @@ spec:
104104
# Uncomment and add storageClass specific to your requirements below. Read more https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1
105105
storageClassName: kadalu.replica1
106106
---
107-
apiVersion: extensions/v1beta1
107+
apiVersion: apps/v1
108108
kind: Deployment
109109
metadata:
110110
# This name uniquely identifies the Deployment
111111
name: minio-deployment
112112
spec:
113+
selector:
114+
matchLabels:
115+
app: minio
113116
strategy:
114117
type: Recreate
115118
template:

helm/kadalu/charts/operator/templates/rbac.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ metadata:
66
rules:
77
- apiGroups:
88
- storage.k8s.io
9-
- csi.storage.k8s.io
109
resources:
1110
- csidrivers
1211
- storageclasses

kadalu_operator/main.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -915,9 +915,10 @@ def deploy_csi_pods(core_v1_client):
915915

916916
# Deploy CSI Pods
917917
api_instance = client.VersionApi().get_code()
918+
k8s_major = int(re.sub(r'[^0-9]', '', api_instance.major))
919+
k8s_minor = int(re.sub(r'[^0-9]', '', api_instance.minor))
918920

919-
if api_instance.major > "1" or api_instance.major == "1" and \
920-
api_instance.minor >= "22":
921+
if k8s_major > 1 or (k8s_major == 1 and k8s_minor >= 22):
921922

922923
csi_driver_version = csi_driver_object_api_version()
923924
if csi_driver_version is not None and \
@@ -932,11 +933,11 @@ def deploy_csi_pods(core_v1_client):
932933
template(filename, namespace=NAMESPACE, kadalu_version=VERSION)
933934
lib_execute(KUBECTL_CMD, APPLY_CMD, "-f", filename)
934935

935-
elif api_instance.major > "1" or api_instance.major == "1" and \
936-
api_instance.minor >= "14":
937-
filename = os.path.join(MANIFESTS_DIR, "csi-driver-object.yaml")
938-
template(filename, namespace=NAMESPACE, kadalu_version=VERSION)
939-
lib_execute(KUBECTL_CMD, APPLY_CMD, "-f", filename)
936+
else:
937+
logging.warning(logf(
938+
"Kubernetes version too old, CSIDriver v1 requires >= 1.22",
939+
major=k8s_major, minor=k8s_minor
940+
))
940941

941942
filename = os.path.join(MANIFESTS_DIR, "csi.yaml")
942943
docker_user = os.environ.get("DOCKER_USER", "kadalu")

manifests/kadalu-operator-microk8s.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ metadata:
144144
rules:
145145
- apiGroups:
146146
- storage.k8s.io
147-
- csi.storage.k8s.io
148147
resources:
149148
- csidrivers
150149
- storageclasses

manifests/kadalu-operator-openshift.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ metadata:
144144
rules:
145145
- apiGroups:
146146
- storage.k8s.io
147-
- csi.storage.k8s.io
148147
resources:
149148
- csidrivers
150149
- storageclasses

manifests/kadalu-operator-rke.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ metadata:
144144
rules:
145145
- apiGroups:
146146
- storage.k8s.io
147-
- csi.storage.k8s.io
148147
resources:
149148
- csidrivers
150149
- storageclasses

manifests/kadalu-operator.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ metadata:
144144
rules:
145145
- apiGroups:
146146
- storage.k8s.io
147-
- csi.storage.k8s.io
148147
resources:
149148
- csidrivers
150149
- storageclasses

requirements/operator-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ google-auth==2.36.0
1616
# via kubernetes
1717
idna==3.10
1818
# via requests
19-
kubernetes==29.0.0
19+
kubernetes==31.0.0
2020
# via Kadalu (setup.py)
2121
oauthlib==3.2.2
2222
# via requests-oauthlib

0 commit comments

Comments
 (0)