Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE-572] ability to set mem/cpu for csi containers #82

Merged
merged 31 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d6bc6a8
add resource for controller
yurkov-anton Oct 11, 2021
5e3edf4
drop value of mem/cpu limits
yurkov-anton Oct 12, 2021
8e74b9e
fix point error
yurkov-anton Oct 12, 2021
67b2ab1
debug
yurkov-anton Oct 12, 2021
f11b93c
add debug logs
yurkov-anton Oct 12, 2021
1684649
add debug logs
yurkov-anton Oct 12, 2021
a1e87d3
add resources to all containers
yurkov-anton Oct 13, 2021
167e83b
refactoring
yurkov-anton Oct 13, 2021
e458584
remove debug logs
yurkov-anton Oct 13, 2021
764394e
add resources to deployment
yurkov-anton Oct 13, 2021
337e146
fix requests to limits
yurkov-anton Oct 13, 2021
630342b
add values for operator
yurkov-anton Oct 13, 2021
3f66472
Merge branch 'master' into feature-issue-572-mem-cpu-chart-values
yurkov-anton Oct 14, 2021
37f24ee
update crd
yurkov-anton Oct 14, 2021
fbc8312
refactoring
yurkov-anton Oct 14, 2021
5e49346
refactoring
yurkov-anton Oct 14, 2021
d9b2de0
add custom ResourceRequirements
yurkov-anton Oct 18, 2021
d5d6081
tags resource
yurkov-anton Oct 18, 2021
ef8e70b
tags resource
yurkov-anton Oct 18, 2021
e2f8f52
tags resource
yurkov-anton Oct 21, 2021
a95ae92
tags resource
yurkov-anton Oct 21, 2021
6770b8f
omitempty
yurkov-anton Oct 22, 2021
e4d7a7a
experiment
yurkov-anton Oct 22, 2021
82c87b1
experiment
yurkov-anton Oct 22, 2021
425816d
final
yurkov-anton Oct 25, 2021
f62b247
typo
yurkov-anton Oct 25, 2021
019c8f4
merge master
yurkov-anton Oct 25, 2021
3f5b034
add setResource
yurkov-anton Oct 28, 2021
d74b2d2
Merge branch 'master' into feature-issue-572-mem-cpu-chart-values
yurkov-anton Oct 29, 2021
c5391d2
add new line
yurkov-anton Oct 29, 2021
4b7c5c3
add construct resource requirements
yurkov-anton Oct 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions api/v1/components/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ limitations under the License.

package components

import (
corev1 "k8s.io/api/core/v1"
)

// Controller encapsulates logic for CSI controller component
type Controller struct {
Image *Image `json:"image,omitempty"`
Log *Log `json:"log,omitempty"`
Sidecars map[string]*Sidecar `json:"sidecars,omitempty"`
Image *Image `json:"image,omitempty"`
Log *Log `json:"log,omitempty"`
Sidecars map[string]*Sidecar `json:"sidecars,omitempty"`
Resources *corev1.ResourceRequirements `json:"resources"`
mishoyama marked this conversation as resolved.
Show resolved Hide resolved
}
9 changes: 7 additions & 2 deletions api/v1/components/drivemgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ limitations under the License.

package components

import (
corev1 "k8s.io/api/core/v1"
)

// DriveMgr represents drive manager node component
type DriveMgr struct {
Image *Image `json:"image,omitempty"`
Endpoint string `json:"endpoint"`
Image *Image `json:"image,omitempty"`
Endpoint string `json:"endpoint"`
Resources *corev1.ResourceRequirements `json:"resources"`
}
13 changes: 9 additions & 4 deletions api/v1/components/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ limitations under the License.

package components

import (
corev1 "k8s.io/api/core/v1"
)

// Node encapsulates information for CSI node components
type Node struct {
DriveMgr *DriveMgr `json:"driveMgr,omitempty"`
Image *Image `json:"image,omitempty"`
Log *Log `json:"log,omitempty"`
Sidecars map[string]*Sidecar `json:"sidecars,omitempty"`
DriveMgr *DriveMgr `json:"driveMgr,omitempty"`
Image *Image `json:"image,omitempty"`
Log *Log `json:"log,omitempty"`
Sidecars map[string]*Sidecar `json:"sidecars,omitempty"`
Resources *corev1.ResourceRequirements `json:"resources"`
}
11 changes: 8 additions & 3 deletions api/v1/components/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ limitations under the License.

package components

import (
corev1 "k8s.io/api/core/v1"
)

// NodeController represent operator for CSI bare-metal nodes
type NodeController struct {
Enable bool `json:"enable"`
Image *Image `json:"image,omitempty"`
Log *Log `json:"log,omitempty"`
Enable bool `json:"enable"`
Image *Image `json:"image,omitempty"`
Log *Log `json:"log,omitempty"`
Resources *corev1.ResourceRequirements `json:"resources"`
}
17 changes: 11 additions & 6 deletions api/v1/components/patcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ limitations under the License.

package components

import (
corev1 "k8s.io/api/core/v1"
)

// Patcher represents scheduler patcher container, which tries to patch Kubernetes scheduler
type Patcher struct {
Enable bool `json:"enable"`
Image *Image `json:"image,omitempty"`
Interval int `json:"interval,omitempty"`
RestoreOnShutdown bool `json:"restoreOnShutdown,omitempty"`
ConfigMapName string `json:"configMapName,omitempty"`
ReadinessTimeout int `json:"readinessTimeout,omitempty"`
Enable bool `json:"enable"`
Image *Image `json:"image,omitempty"`
Interval int `json:"interval,omitempty"`
RestoreOnShutdown bool `json:"restoreOnShutdown,omitempty"`
ConfigMapName string `json:"configMapName,omitempty"`
ReadinessTimeout int `json:"readinessTimeout,omitempty"`
Resources *corev1.ResourceRequirements `json:"resources"`
}
19 changes: 12 additions & 7 deletions api/v1/components/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@ limitations under the License.

package components

import (
corev1 "k8s.io/api/core/v1"
)

// Scheduler encapsulates information to deploy CSI scheduler
type Scheduler struct {
Enable bool `json:"enable"`
Image *Image `json:"image,omitempty"`
Log *Log `json:"log,omitempty"`
Metrics *Metrics `json:"metrics,omitempty"`
Patcher *Patcher `json:"patcher,omitempty"`
ExtenderPort string `json:"extenderPort,omitempty"`
StorageProvisioner string `json:"storageProvisioner"`
Enable bool `json:"enable"`
Image *Image `json:"image,omitempty"`
Log *Log `json:"log,omitempty"`
Metrics *Metrics `json:"metrics,omitempty"`
Patcher *Patcher `json:"patcher,omitempty"`
ExtenderPort string `json:"extenderPort,omitempty"`
StorageProvisioner string `json:"storageProvisioner"`
Resources *corev1.ResourceRequirements `json:"resources"`
}
7 changes: 6 additions & 1 deletion api/v1/components/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ limitations under the License.

package components

import (
corev1 "k8s.io/api/core/v1"
)

// Sidecar represent CSI sidecar containers
type Sidecar struct {
Image *Image `json:"image,omitempty"`
Image *Image `json:"image,omitempty"`
Resources *corev1.ResourceRequirements `json:"resources"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ spec:
image:
rkiselenko marked this conversation as resolved.
Show resolved Hide resolved
name: csi-baremetal-controller
tag: {{ .Values.driver.controller.image.tag | default .Values.image.tag }}
resources:
requests:
memory: {{ .Values.driver.controller.resources.requests.memory }}
cpu: {{ .Values.driver.controller.resources.requests.cpu }}
limits:
memory: {{ .Values.driver.controller.resources.limits.memory }}
cpu: {{ .Values.driver.controller.resources.limits.cpu }}
log:
format: {{ .Values.driver.log.format }}
level: {{ .Values.driver.log.level }}
Expand All @@ -32,23 +39,59 @@ spec:
image:
name: livenessprobe
tag: {{ .Values.driver.livenessProbe.image.tag }}
resources:
requests:
memory: {{ .Values.driver.livenessProbe.resources.requests.memory }}
cpu: {{ .Values.driver.livenessProbe.resources.requests.cpu }}
limits:
memory: {{ .Values.driver.livenessProbe.resources.limits.memory }}
cpu: {{ .Values.driver.livenessProbe.resources.limits.cpu }}

csi-provisioner:
image:
name: csi-provisioner
tag: {{ .Values.driver.provisioner.image.tag }}
resources:
requests:
memory: {{ .Values.driver.provisioner.resources.requests.memory }}
cpu: {{ .Values.driver.provisioner.resources.requests.cpu }}
limits:
memory: {{ .Values.driver.provisioner.resources.limits.memory }}
cpu: {{ .Values.driver.provisioner.resources.limits.cpu }}
csi-resizer:
image:
name: csi-resizer
tag: {{ .Values.driver.resizer.image.tag }}
resources:
requests:
memory: {{ .Values.driver.resizer.resources.requests.memory }}
cpu: {{ .Values.driver.resizer.resources.requests.cpu }}
limits:
memory: {{ .Values.driver.resizer.resources.limits.memory }}
cpu: {{ .Values.driver.resizer.resources.limits.cpu }}
node:
driveMgr:
image:
name: csi-baremetal-{{ .Values.driver.drivemgr.type }}
tag: {{ .Values.driver.drivemgr.image.tag | default .Values.image.tag }}
resources:
requests:
memory: {{ .Values.driver.drivemgr.resources.requests.memory }}
cpu: {{ .Values.driver.drivemgr.resources.requests.cpu }}
limits:
memory: {{ .Values.driver.drivemgr.resources.limits.memory }}
cpu: {{ .Values.driver.drivemgr.resources.limits.cpu }}
endpoint: {{ .Values.driver.drivemgr.grpc.server.endpoint }}
image:
name: csi-baremetal-node
tag: {{ .Values.driver.node.image.tag | default .Values.image.tag }}
resources:
requests:
memory: {{ .Values.driver.node.resources.requests.memory }}
cpu: {{ .Values.driver.node.resources.requests.cpu }}
limits:
memory: {{ .Values.driver.node.resources.limits.memory }}
cpu: {{ .Values.driver.node.resources.limits.cpu }}
log:
format: {{ .Values.driver.log.format }}
level: {{ .Values.driver.log.level }}
Expand All @@ -57,10 +100,24 @@ spec:
image:
name: csi-node-driver-registrar
tag: {{ .Values.driver.nodeDriverRegistrar.image.tag }}
resources:
requests:
memory: {{ .Values.driver.nodeDriverRegistrar.resources.requests.memory }}
cpu: {{ .Values.driver.nodeDriverRegistrar.resources.requests.cpu }}
limits:
memory: {{ .Values.driver.nodeDriverRegistrar.resources.limits.memory }}
cpu: {{ .Values.driver.nodeDriverRegistrar.resources.limits.cpu }}
livenessprobe:
image:
name: livenessprobe
tag: {{ .Values.driver.livenessProbe.image.tag }}
resources:
requests:
memory: {{ .Values.driver.livenessProbe.resources.requests.memory }}
cpu: {{ .Values.driver.livenessProbe.resources.requests.cpu }}
limits:
memory: {{ .Values.driver.livenessProbe.resources.limits.memory }}
cpu: {{ .Values.driver.livenessProbe.resources.limits.cpu }}
metrics:
path: {{ .Values.driver.metrics.path }}
port: {{ .Values.driver.metrics.port }}
Expand All @@ -74,6 +131,13 @@ spec:
image:
name: csi-baremetal-scheduler-extender
tag: {{ .Values.scheduler.image.tag | default .Values.image.tag }}
resources:
requests:
memory: {{ .Values.scheduler.resources.requests.memory }}
cpu: {{ .Values.scheduler.resources.requests.cpu }}
limits:
memory: {{ .Values.scheduler.resources.limits.memory }}
cpu: {{ .Values.scheduler.resources.limits.cpu }}
log:
format: {{ .Values.scheduler.log.format }}
level: {{ .Values.scheduler.log.level }}
Expand All @@ -86,6 +150,13 @@ spec:
image:
name: csi-baremetal-scheduler-patcher
tag: {{ .Values.scheduler.patcher.image.tag | default .Values.image.tag }}
resources:
requests:
memory: {{ .Values.scheduler.patcher.resources.requests.memory }}
cpu: {{ .Values.scheduler.patcher.resources.requests.cpu }}
limits:
memory: {{ .Values.scheduler.patcher.resources.limits.memory }}
cpu: {{ .Values.scheduler.patcher.resources.limits.cpu }}
interval: {{ .Values.scheduler.patcher.interval }}
restoreOnShutdown: {{ .Values.scheduler.patcher.restore_on_shutdown }}
configMapName: {{ .Values.scheduler.patcher.config_map_name }}
Expand All @@ -96,6 +167,13 @@ spec:
image:
name: csi-baremetal-node-controller
tag: {{ .Values.nodeController.image.tag | default .Values.image.tag }}
resources:
requests:
memory: {{ .Values.nodeController.resources.requests.memory }}
cpu: {{ .Values.nodeController.resources.requests.cpu }}
limits:
memory: {{ .Values.nodeController.resources.limits.memory }}
cpu: {{ .Values.nodeController.resources.limits.cpu }}
log:
format: {{ .Values.nodeController.log.format }}
level: {{ .Values.nodeController.log.level }}
Loading