Skip to content

Commit f82940a

Browse files
committed
fix review comments
1 parent 4ed0d6e commit f82940a

File tree

7 files changed

+1
-60
lines changed

7 files changed

+1
-60
lines changed

api/v1alpha1/ibmobjectcsi_types.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ type IBMObjectCSISpec struct {
3636
ImagePullSecrets []string `json:"imagePullSecrets,omitempty"`
3737

3838
HealthPort uint16 `json:"healthPort,omitempty"`
39-
40-
Resources ResourcesSpec `json:"resources,omitempty"`
4139
}
4240

4341
type ResourcesSpec struct {

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
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: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,32 +1990,6 @@ spec:
19901990
- repository
19911991
- tag
19921992
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
20191993
sidecars:
20201994
items:
20211995
properties:

config/manager/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ kind: Kustomization
55
images:
66
- name: controller
77
newName: bhagyak1/ibm-object-csi-driver-operator
8-
newTag: apr803
8+
newTag: apr1801

controllers/internal/crutils/ibmobjectcsi.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,3 @@ func (c *IBMObjectCSI) GetCSINodeResourceRequests() *objectdriverv1alpha1.Resour
115115
}
116116
return &resources
117117
}
118-
119-
func (c *IBMObjectCSI) GetCSIResource(image string) string {
120-
if c.Spec.Controller.Tag == "" {
121-
return c.Spec.Controller.Repository
122-
}
123-
return c.Spec.Controller.Repository + ":" + c.Spec.Controller.Tag
124-
}

controllers/syncer/csi_controller.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ func (s *csiControllerSyncer) ensureContainersSpec() []corev1.Container {
112112
},
113113
)
114114

115-
//controllerPlugin.Resources = ensureResources("40m", "800m", "40Mi", "400Mi")
116115
controllerPlugin.Resources = getCSIControllerResourceRequests(s.driver)
117116

118117
healthPort := s.driver.Spec.HealthPort
@@ -165,25 +164,6 @@ func (s *csiControllerSyncer) ensureContainersSpec() []corev1.Container {
165164
}
166165
}
167166

168-
func ensureDefaultResources() corev1.ResourceRequirements {
169-
return ensureResources("20m", "200m", "20Mi", "200Mi")
170-
}
171-
172-
func ensureResources(cpuRequests, cpuLimits, memoryRequests, memoryLimits string) corev1.ResourceRequirements {
173-
requests := corev1.ResourceList{
174-
corev1.ResourceCPU: resource.MustParse(cpuRequests),
175-
corev1.ResourceMemory: resource.MustParse(memoryRequests),
176-
}
177-
limits := corev1.ResourceList{
178-
corev1.ResourceCPU: resource.MustParse(cpuLimits),
179-
corev1.ResourceMemory: resource.MustParse(memoryLimits),
180-
}
181-
182-
return corev1.ResourceRequirements{
183-
Limits: limits,
184-
Requests: requests,
185-
}
186-
}
187167
func (s *csiControllerSyncer) ensureContainer(name, image string, args []string) corev1.Container {
188168
sc := &corev1.SecurityContext{AllowPrivilegeEscalation: boolptr.False()}
189169
fillSecurityContextCapabilities(sc)
@@ -195,7 +175,6 @@ func (s *csiControllerSyncer) ensureContainer(name, image string, args []string)
195175
Env: s.getEnvFor(name),
196176
VolumeMounts: s.getVolumeMountsFor(name),
197177
SecurityContext: sc,
198-
//Resources: ensureDefaultResources(),
199178
}
200179
}
201180

controllers/syncer/csi_node.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ func (s *csiNodeSyncer) ensureContainersSpec() []corev1.Container {
111111
},
112112
)
113113

114-
//nodePlugin.Resources = ensureResources("40m", "1000m", "40Mi", "400Mi")
115114
nodePlugin.Resources = getCSINodeResourceRequests(s.driver)
116115

117116
healthPort := s.driver.Spec.HealthPort
@@ -185,7 +184,6 @@ func (s *csiNodeSyncer) ensureContainer(name, image string, args []string) corev
185184
Args: args,
186185
Env: s.getEnvFor(name),
187186
VolumeMounts: s.getVolumeMountsFor(name),
188-
//Resources: ensureDefaultResources(),
189187
}
190188
}
191189

0 commit comments

Comments
 (0)