Skip to content

Commit

Permalink
use minimal resource requests
Browse files Browse the repository at this point in the history
Save some resources on our limited OKD clusters.

Signed-off-by: Petr Horacek <[email protected]>
  • Loading branch information
phoracek committed Nov 12, 2019
1 parent e9145a0 commit 5847580
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 13 deletions.
7 changes: 7 additions & 0 deletions cluster/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ kubevirtci::install

$(kubevirtci::path)/cluster-up/up.sh

if [[ "$KUBEVIRT_PROVIDER" =~ okd- ]]; then
echo 'Remove components we do not need to save some resources'
./cluster/kubectl.sh delete ns openshift-monitoring --wait=false
./cluster/kubectl.sh delete ns openshift-marketplace --wait=false
./cluster/kubectl.sh delete ns openshift-cluster-samples-operator --wait=false
fi

if [[ "$KUBEVIRT_PROVIDER" =~ k8s- ]]; then
echo 'Install NetworkManager on nodes'
for node in $(./cluster/kubectl.sh get nodes --no-headers | awk '{print $1}'); do
Expand Down
2 changes: 1 addition & 1 deletion data/kubemacpool/003-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
resources:
limits:
cpu: 300m
memory: 600Mi
memory: 300Mi
requests:
cpu: 100m
memory: 300Mi
Expand Down
7 changes: 7 additions & 0 deletions data/linux-bridge/0004-bridge-marker-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ spec:
- name: bridge-marker
image: {{ .LinuxBridgeMarkerImage }}
imagePullPolicy: {{ .ImagePullPolicy }}
resources:
requests:
cpu: "100m"
memory: "40Mi"
limits:
cpu: "100m"
memory: "40Mi"
args:
- -node-name
- $(NODE_NAME)
Expand Down
8 changes: 4 additions & 4 deletions data/linux-bridge/002-linux-bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ spec:
sleep infinity
resources:
requests:
cpu: "100m"
memory: "50Mi"
cpu: "60m"
memory: "30Mi"
limits:
cpu: "100m"
memory: "50Mi"
cpu: "60m"
memory: "30Mi"
securityContext:
privileged: true
volumeMounts:
Expand Down
8 changes: 4 additions & 4 deletions data/multus/002-multus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ spec:
imagePullPolicy: {{ .ImagePullPolicy }}
resources:
requests:
cpu: "100m"
memory: "50Mi"
cpu: "60m"
memory: "30Mi"
limits:
cpu: "100m"
memory: "50Mi"
cpu: "60m"
memory: "30Mi"
securityContext:
privileged: true
volumeMounts:
Expand Down
7 changes: 7 additions & 0 deletions data/nmstate/003-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ spec:
- --v=production
image: {{ .NMStateHandlerImage }}
imagePullPolicy: {{ .ImagePullPolicy }}
resources:
requests:
cpu: "100m"
memory: "60Mi"
limits:
cpu: "100m"
memory: "60Mi"
command:
- kubernetes-nmstate
env:
Expand Down
15 changes: 11 additions & 4 deletions data/ovs/002-ovs-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ spec:
imagePullPolicy: {{ .ImagePullPolicy }}
resources:
requests:
cpu: "100m"
memory: "50Mi"
cpu: "60m"
memory: "30Mi"
limits:
cpu: "100m"
memory: "50Mi"
cpu: "60m"
memory: "30Mi"
securityContext:
privileged: true
volumeMounts:
Expand All @@ -44,6 +44,13 @@ spec:
- name: ovs-cni-marker
image: {{ .OvsMarkerImage }}
imagePullPolicy: {{ .ImagePullPolicy }}
resources:
requests:
cpu: "100m"
memory: "40Mi"
limits:
cpu: "100m"
memory: "40Mi"
securityContext:
privileged: true
args:
Expand Down

0 comments on commit 5847580

Please sign in to comment.