Skip to content

Commit 274270a

Browse files
committed
FIx transport endpoint issue for rclone mounter
1 parent 02534c3 commit 274270a

File tree

9 files changed

+348
-8
lines changed

9 files changed

+348
-8
lines changed

api/v1alpha1/ibmobjectcsi_types.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,21 @@ type IBMObjectCSISpec struct {
3535
// +kubebuilder:validation:Optional
3636
ImagePullSecrets []string `json:"imagePullSecrets,omitempty"`
3737

38+
//Resources ResourcesSpec `json:"resources,omitempty"`
39+
3840
HealthPort uint16 `json:"healthPort,omitempty"`
41+
42+
Resources ResourcesSpec `json:"resources,omitempty"`
43+
}
44+
45+
type ResourcesSpec struct {
46+
Limits ReqLimits `json:"limits"`
47+
Requests ReqLimits `json:"requests"`
48+
}
49+
50+
type ReqLimits struct {
51+
Cpu string `json:"cpu"`
52+
Memory string `json:"memory"`
3953
}
4054

4155
// IBMObjectCSINodeSpec defines the desired state of IBMObjectCSINode
@@ -53,6 +67,8 @@ type IBMObjectCSINodeSpec struct {
5367

5468
// +kubebuilder:validation:Optional
5569
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
70+
71+
Resources ResourcesSpec `json:"resources,omitempty"`
5672
}
5773

5874
// IBMObjectCSIControllerSpec defines the desired state of IBMObjectCSIController
@@ -70,6 +86,8 @@ type IBMObjectCSIControllerSpec struct {
7086

7187
// +kubebuilder:validation:Optional
7288
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
89+
90+
Resources ResourcesSpec `json:"resources,omitempty"`
7391
}
7492

7593
// IBMObjectCSIStatus defines the observed state of IBMObjectCSI
@@ -117,6 +135,8 @@ type CSISidecar struct {
117135
// The pullPolicy of the csi sidecar image
118136
// +kubebuilder:validation:Optional
119137
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy"`
138+
139+
Resources ResourcesSpec `json:"resources,omitempty"`
120140
}
121141

122142
func init() {

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/objectdriver.csi.ibm.com_ibmobjectcsis.yaml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,32 @@ spec:
942942
type: string
943943
repository:
944944
type: string
945+
resources:
946+
properties:
947+
limits:
948+
properties:
949+
cpu:
950+
type: string
951+
memory:
952+
type: string
953+
required:
954+
- cpu
955+
- memory
956+
type: object
957+
requests:
958+
properties:
959+
cpu:
960+
type: string
961+
memory:
962+
type: string
963+
required:
964+
- cpu
965+
- memory
966+
type: object
967+
required:
968+
- limits
969+
- requests
970+
type: object
945971
tag:
946972
type: string
947973
tolerations:
@@ -1894,6 +1920,32 @@ spec:
18941920
type: string
18951921
repository:
18961922
type: string
1923+
resources:
1924+
properties:
1925+
limits:
1926+
properties:
1927+
cpu:
1928+
type: string
1929+
memory:
1930+
type: string
1931+
required:
1932+
- cpu
1933+
- memory
1934+
type: object
1935+
requests:
1936+
properties:
1937+
cpu:
1938+
type: string
1939+
memory:
1940+
type: string
1941+
required:
1942+
- cpu
1943+
- memory
1944+
type: object
1945+
required:
1946+
- limits
1947+
- requests
1948+
type: object
18971949
tag:
18981950
type: string
18991951
tolerations:
@@ -1938,6 +1990,32 @@ spec:
19381990
- repository
19391991
- tag
19401992
type: object
1993+
resources:
1994+
properties:
1995+
limits:
1996+
properties:
1997+
cpu:
1998+
type: string
1999+
memory:
2000+
type: string
2001+
required:
2002+
- cpu
2003+
- memory
2004+
type: object
2005+
requests:
2006+
properties:
2007+
cpu:
2008+
type: string
2009+
memory:
2010+
type: string
2011+
required:
2012+
- cpu
2013+
- memory
2014+
type: object
2015+
required:
2016+
- limits
2017+
- requests
2018+
type: object
19412019
sidecars:
19422020
items:
19432021
properties:
@@ -1950,6 +2028,32 @@ spec:
19502028
repository:
19512029
description: The repository of the csi sidecar image
19522030
type: string
2031+
resources:
2032+
properties:
2033+
limits:
2034+
properties:
2035+
cpu:
2036+
type: string
2037+
memory:
2038+
type: string
2039+
required:
2040+
- cpu
2041+
- memory
2042+
type: object
2043+
requests:
2044+
properties:
2045+
cpu:
2046+
type: string
2047+
memory:
2048+
type: string
2049+
required:
2050+
- cpu
2051+
- memory
2052+
type: object
2053+
required:
2054+
- limits
2055+
- requests
2056+
type: object
19532057
tag:
19542058
description: The tag of the csi sidecar image
19552059
type: string

config/manager/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
44
kind: Kustomization
55
images:
66
- name: controller
7-
newName: ashimagarg/csi
8-
newTag: "44"
7+
newName: bhagyak1/ibm-object-csi-driver-operator
8+
newTag: apr801

config/samples/csi_v1alpha1_ibmobjectcsi.yaml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ spec:
1313
# and csi-provisioner, csi-attacher, csi-snapshotter and livenessprobe sidecars.
1414
controller:
1515
repository: icr.io/ibm/ibm-object-csi-driver
16-
tag: "v1.0.1-alpha"
16+
tag: "v1.0.2-alpha"
1717
imagePullPolicy: IfNotPresent
18+
resources:
19+
limits:
20+
cpu: 800m
21+
memory: 400Mi
22+
requests:
23+
cpu: 40m
24+
memory: 40Mi
1825
affinity:
1926
nodeAffinity:
2027
requiredDuringSchedulingIgnoredDuringExecution:
@@ -29,8 +36,15 @@ spec:
2936
# and csi-node-driver-registrar and livenessprobe sidecars.
3037
node:
3138
repository: icr.io/ibm/ibm-object-csi-driver
32-
tag: "v1.0.1-alpha"
39+
tag: "v1.0.2-alpha"
3340
imagePullPolicy: Always
41+
resources:
42+
limits:
43+
cpu: "4"
44+
memory: 800Mi
45+
requests:
46+
cpu: 40m
47+
memory: 40Mi
3448
affinity:
3549
nodeAffinity:
3650
requiredDuringSchedulingIgnoredDuringExecution:
@@ -49,14 +63,35 @@ spec:
4963
repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar
5064
tag: "v2.6.3"
5165
imagePullPolicy: IfNotPresent
66+
resources:
67+
limits:
68+
cpu: 40m
69+
memory: 80Mi
70+
requests:
71+
cpu: 10m
72+
memory: 20Mi
5273
- name: csi-provisioner
5374
repository: k8s.gcr.io/sig-storage/csi-provisioner
5475
tag: "v3.4.1"
5576
imagePullPolicy: IfNotPresent
77+
resources:
78+
limits:
79+
cpu: 80m
80+
memory: 160Mi
81+
requests:
82+
cpu: 20m
83+
memory: 40Mi
5684
- name: livenessprobe
5785
repository: k8s.gcr.io/sig-storage/livenessprobe
5886
tag: "v2.9.0"
5987
imagePullPolicy: IfNotPresent
88+
resources:
89+
limits:
90+
cpu: 20m
91+
memory: 40Mi
92+
requests:
93+
cpu: 10m
94+
memory: 10Mi
6095

6196
# healthPort: 9808
6297
# imagePullSecrets:

controllers/ibmobjectcsi_controller_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ var (
6161
},
6262
}
6363

64+
resources = v1alpha1.ResourcesSpec{
65+
Limits: v1alpha1.ReqLimits{
66+
Cpu: "40Mi",
67+
Memory: "200Mi",
68+
},
69+
Requests: v1alpha1.ReqLimits{
70+
Cpu: "40m",
71+
Memory: "40Mi",
72+
},
73+
}
74+
6475
ibmObjectCSICR = &v1alpha1.IBMObjectCSI{
6576
ObjectMeta: metav1.ObjectMeta{
6677
Name: ibmObjectCSICRName,
@@ -72,6 +83,7 @@ var (
7283
Tag: "v1.0.2-alpha",
7384
ImagePullPolicy: corev1.PullIfNotPresent,
7485
Affinity: affinity,
86+
Resources: resources,
7587
},
7688
Node: v1alpha1.IBMObjectCSINodeSpec{
7789
Repository: "icr.io/ibm/ibm-object-csi-driver",
@@ -83,25 +95,29 @@ var (
8395
Operator: corev1.TolerationOpExists,
8496
},
8597
},
98+
Resources: resources,
8699
},
87100
Sidecars: []v1alpha1.CSISidecar{
88101
{
89102
Name: "csi-node-driver-registrar",
90103
Repository: "k8s.gcr.io/sig-storage/csi-node-driver-registrar",
91104
Tag: "v2.6.3",
92105
ImagePullPolicy: corev1.PullIfNotPresent,
106+
Resources: resources,
93107
},
94108
{
95109
Name: "csi-provisioner",
96110
Repository: "k8s.gcr.io/sig-storage/csi-provisioner",
97111
Tag: "v3.4.1",
98112
ImagePullPolicy: corev1.PullIfNotPresent,
113+
Resources: resources,
99114
},
100115
{
101116
Name: "livenessprobe",
102117
Repository: "k8s.gcr.io/sig-storage/livenessprobe",
103118
Tag: "v2.9.0",
104119
ImagePullPolicy: corev1.PullIfNotPresent,
120+
Resources: resources,
105121
},
106122
},
107123
ImagePullSecrets: []string{"secretName"},

0 commit comments

Comments
 (0)