Skip to content

Commit ba24008

Browse files
Fix restarts in controller/nodeServer pod + sync manifests(#115)
* Bug fixes + sync sc
1 parent 3ea1ecc commit ba24008

23 files changed

+490
-118
lines changed

deploy/kubernetes/driver/kubernetes/manifests/controller-server.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ metadata:
77
labels:
88
app.kubernetes.io/name: ibm-vpc-file-csi-driver
99
spec:
10-
replicas: 1
10+
replicas: 2
1111
selector:
1212
matchLabels:
1313
app: ibm-vpc-file-csi-controller
1414
app.kubernetes.io/name: ibm-vpc-file-csi-driver
15+
strategy:
16+
rollingUpdate:
17+
maxSurge: 25%
18+
maxUnavailable: 25%
19+
type: RollingUpdate
1520
template:
1621
metadata:
1722
annotations:
@@ -40,6 +45,9 @@ spec:
4045
- "--csi-address=$(CSI_ADDRESS)"
4146
- "--timeout=600s"
4247
- "--feature-gates=Topology=true"
48+
- "--leader-election=true"
49+
- "--kube-api-qps=15"
50+
- "--kube-api-burst=20"
4351
env:
4452
- name: CSI_ADDRESS
4553
valueFrom:
@@ -67,6 +75,9 @@ spec:
6775
- "--csi-address=$(ADDRESS)"
6876
- "--timeout=600s"
6977
- "--handle-volume-inuse-error=false"
78+
- "--leader-election=true"
79+
- "--kube-api-qps=15"
80+
- "--kube-api-burst=20"
7081
env:
7182
- name: ADDRESS
7283
value: /csi/csi-vpc-file.sock
@@ -200,11 +211,11 @@ spec:
200211
key: SIDECAR_ENDPOINT
201212
resources:
202213
limits:
203-
cpu: 12m
204-
memory: 20Mi
214+
cpu: 60m
215+
memory: 80Mi
205216
requests:
206-
cpu: 3m
207-
memory: 5Mi
217+
cpu: 15m
218+
memory: 20Mi
208219
volumeMounts:
209220
- mountPath: /sidecardir
210221
name: socket-dir

deploy/kubernetes/driver/kubernetes/manifests/csidriver.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ metadata:
77
spec:
88
attachRequired: false
99
podInfoOnMount: true
10+
fsGroupPolicy: ReadWriteOnceWithFSType
1011
volumeLifecycleModes:
1112
- Persistent

deploy/kubernetes/driver/kubernetes/manifests/node-server.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ spec:
3939
- "--v=5"
4040
- "--csi-address=$(CSI_ADDRESS)"
4141
- "--kubelet-registration-path=$(DRIVER_REGISTRATION_SOCK)"
42+
livenessProbe: # GoodToHave check https://github.com/kubernetes-csi/node-driver-registrar?tab=readme-ov-file#health-check-with-the-http-server
43+
exec:
44+
command:
45+
- /csi-node-driver-registrar
46+
- --kubelet-registration-path=$(DRIVER_REGISTRATION_SOCK)
47+
- --mode=kubelet-registration-probe
48+
initialDelaySeconds: 30
49+
timeoutSeconds: 15
4250
env:
4351
- name: CSI_ADDRESS
4452
valueFrom:
@@ -190,6 +198,13 @@ spec:
190198
configMapKeyRef:
191199
name: ibm-vpc-file-csi-configmap
192200
key: SIDECAR_ENDPOINT
201+
resources:
202+
limits:
203+
cpu: 60m
204+
memory: 80Mi
205+
requests:
206+
cpu: 15m
207+
memory: 20Mi
193208
volumeMounts:
194209
- mountPath: /sidecardir
195210
name: secret-sidecar-sock-dir
@@ -249,3 +264,4 @@ spec:
249264
- name: mh-logs
250265
hostPath:
251266
path: /opt/ibm/mount-ibmshare/
267+
type: DirectoryOrCreate
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: storage.k8s.io/v1
2+
kind: StorageClass
3+
metadata:
4+
name: ibmc-vpc-file-1000-iops
5+
labels:
6+
app.kubernetes.io/name: ibm-vpc-file-csi-driver
7+
provisioner: vpc.file.csi.ibm.io
8+
mountOptions:
9+
- hard
10+
- nfsvers=4.1
11+
- sec=sys
12+
parameters:
13+
profile: "dp2" #The VPC Storage profile used. https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles
14+
iops: "1000" # All PVC will get this fixed iops provisioned by using this storageclass.
15+
billingType: "hourly" # The default billing policy used. The uer can override this default.
16+
encrypted: "false" # By default, encryption is managed by cloud provider. User can override this default.
17+
encryptionKey: "" # If encrypted is true, then a user must specify the CRK-CRN.
18+
resourceGroup: "" # By default resource group will be used from storage-secrete-store secret, User can override.
19+
isENIEnabled: "true" # VPC File Share ENI/VNI feature will be used by all PVCs created with this storage class.
20+
securityGroupIDs: "" # By default cluster security group i.e kube-<clusterID> will be used. User can provide their own command separated SGs.
21+
subnetID: "" # User can provide subnetID in which the ENI/VNI will be created. Zone and region are mandatory for this. If not provided CSI driver will use the subnetID available in the cluster' VPC zone.
22+
region: "" # By VPC CSI driver will select a region from cluster node's topology. The user can override this default.
23+
zone: "" # By VPC CSI driver will select a region from cluster node's topology. The user can override this default.
24+
primaryIPID: "" # Existing ID of reserved IP from the same subnet as the file share zone. Zone and region are mandatory for this. SubnetID is not mandatory for this.
25+
primaryIPAddress: "" # IPAddress for ENI/VNI to be created in the respective subnet of the zone. Zone, region and subnetID are mandatory for this.
26+
tags: "" # User can add a list of tags "a, b, c" that will be used at the time of provisioning file share, by default CSI driver has its own tags.
27+
uid: "0" # The initial user identifier for the file share, by default its root.
28+
gid: "0" # The initial group identifier for the file share, by default its root.
29+
classVersion: "1"
30+
reclaimPolicy: "Delete"
31+
allowVolumeExpansion: true
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: storage.k8s.io/v1
2+
kind: StorageClass
3+
metadata:
4+
name: ibmc-vpc-file-3000-iops
5+
labels:
6+
app.kubernetes.io/name: ibm-vpc-file-csi-driver
7+
provisioner: vpc.file.csi.ibm.io
8+
mountOptions:
9+
- hard
10+
- nfsvers=4.1
11+
- sec=sys
12+
parameters:
13+
profile: "dp2" #The VPC Storage profile used. https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles
14+
iops: "3000" # All PVC will get this fixed iops provisioned by using this storageclass.
15+
billingType: "hourly" # The default billing policy used. The uer can override this default.
16+
encrypted: "false" # By default, encryption is managed by cloud provider. User can override this default.
17+
encryptionKey: "" # If encrypted is true, then a user must specify the CRK-CRN.
18+
resourceGroup: "" # By default resource group will be used from storage-secrete-store secret, User can override.
19+
isENIEnabled: "true" # VPC File Share ENI/VNI feature will be used by all PVCs created with this storage class.
20+
securityGroupIDs: "" # By default cluster security group i.e kube-<clusterID> will be used. User can provide their own command separated SGs.
21+
subnetID: "" # User can provide subnetID in which the ENI/VNI will be created. Zone and region are mandatory for this. If not provided CSI driver will use the subnetID available in the cluster' VPC zone.
22+
region: "" # By VPC CSI driver will select a region from cluster node's topology. The user can override this default.
23+
zone: "" # By VPC CSI driver will select a region from cluster node's topology. The user can override this default.
24+
primaryIPID: "" # Existing ID of reserved IP from the same subnet as the file share zone. Zone and region are mandatory for this. SubnetID is not mandatory for this.
25+
primaryIPAddress: "" # IPAddress for ENI/VNI to be created in the respective subnet of the zone. Zone, region and subnetID are mandatory for this.
26+
tags: "" # User can add a list of tags "a, b, c" that will be used at the time of provisioning file share, by default CSI driver has its own tags.
27+
uid: "0" # The initial user identifier for the file share, by default its root.
28+
gid: "0" # The initial group identifier for the file share, by default its root.
29+
classVersion: "1"
30+
reclaimPolicy: "Delete"
31+
allowVolumeExpansion: true
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: storage.k8s.io/v1
2+
kind: StorageClass
3+
metadata:
4+
name: ibmc-vpc-file-500-iops
5+
labels:
6+
app.kubernetes.io/name: ibm-vpc-file-csi-driver
7+
provisioner: vpc.file.csi.ibm.io
8+
mountOptions:
9+
- hard
10+
- nfsvers=4.1
11+
- sec=sys
12+
parameters:
13+
profile: "dp2" #The VPC Storage profile used. https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles
14+
iops: "500" # All PVC will get this fixed iops provisioned by using this storageclass.
15+
billingType: "hourly" # The default billing policy used. The uer can override this default.
16+
encrypted: "false" # By default, encryption is managed by cloud provider. User can override this default.
17+
encryptionKey: "" # If encrypted is true, then a user must specify the CRK-CRN.
18+
resourceGroup: "" # By default resource group will be used from storage-secrete-store secret, User can override.
19+
isENIEnabled: "true" # VPC File Share ENI/VNI feature will be used by all PVCs created with this storage class.
20+
securityGroupIDs: "" # By default cluster security group i.e kube-<clusterID> will be used. User can provide their own command separated SGs.
21+
subnetID: "" # User can provide subnetID in which the ENI/VNI will be created. Zone and region are mandatory for this. If not provided CSI driver will use the subnetID available in the cluster' VPC zone.
22+
region: "" # By VPC CSI driver will select a region from cluster node's topology. The user can override this default.
23+
zone: "" # By VPC CSI driver will select a region from cluster node's topology. The user can override this default.
24+
primaryIPID: "" # Existing ID of reserved IP from the same subnet as the file share zone. Zone and region are mandatory for this. SubnetID is not mandatory for this.
25+
primaryIPAddress: "" # IPAddress for ENI/VNI to be created in the respective subnet of the zone. Zone, region and subnetID are mandatory for this.
26+
tags: "" # User can add a list of tags "a, b, c" that will be used at the time of provisioning file share, by default CSI driver has its own tags.
27+
uid: "0" # The initial user identifier for the file share, by default its root.
28+
gid: "0" # The initial group identifier for the file share, by default its root.
29+
classVersion: "1"
30+
reclaimPolicy: "Delete"
31+
allowVolumeExpansion: true

deploy/kubernetes/storageclass/ibmc-vpc-file-dp2-StorageClass.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

deploy/kubernetes/storageclass/ibmc-vpc-file-eit-StorageClass.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

deploy/kubernetes/storageclass/ibmc-vpc-file-eit-retain-StorageClass.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: storage.k8s.io/v1
2+
kind: StorageClass
3+
metadata:
4+
name: ibmc-vpc-file-eit
5+
labels:
6+
app.kubernetes.io/name: ibm-vpc-file-csi-driver
7+
provisioner: vpc.file.csi.ibm.io
8+
parameters:
9+
profile: "dp2" # The VPC Storage profile used. https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles.
10+
billingType: "hourly" # The default billing policy used. The uer can override this default.
11+
iops: "1000" # All PVC will get this fixed iops provisioned by using this storageclass.
12+
encrypted: "false" # By default, encryption is managed by cloud provider. User can override this default.
13+
encryptionKey: "" # If encrypted is true, then a user must specify the CRK-CRN.
14+
resourceGroup: "" # By default resource group will be used from storage-secrete-store secret, User can override.
15+
isENIEnabled: "true" # VPC File Share ENI/VNI feature will be used by all PVCs created with this storage class.
16+
isEITEnabled: "true" # VPC File Share will have EIT enabled.
17+
securityGroupIDs: "" # By default cluster security group i.e kube-<clusterID> will be used. User can provide their own command separated SGs.
18+
subnetID: "" # User can provide subnetID in which the ENI/VNI will be created. Zone and region are mandatory for this. If not provided CSI driver will use the subnetID available in the cluster' VPC zone.
19+
region: "" # By VPC CSI driver will select a region from cluster node's topology. The user can override this default.
20+
zone: "" # By VPC CSI driver will select a region from cluster node's topology. The user can override this default.
21+
primaryIPID: "" # Existing ID of reserved IP from the same subnet as the file share zone. Zone and region are mandatory for this. SubnetID is not mandatory for this.
22+
primaryIPAddress: "" # IPAddress for ENI/VNI to be created in the respective subnet of the zone. Zone, region and subnetID are mandatory for this.
23+
tags: "" # User can add a list of tags "a, b, c" that will be used at the time of provisioning file share, by default CSI driver has its own tags.
24+
uid: "0" # The initial user identifier for the file share, by default its root.
25+
gid: "0" # The initial group identifier for the file share, by default its root.
26+
classVersion: "1"
27+
reclaimPolicy: "Delete"
28+
allowVolumeExpansion: true

0 commit comments

Comments
 (0)