Skip to content

Commit

Permalink
Merge pull request #155 from jpinsonneau/435
Browse files Browse the repository at this point in the history
NETOBSERV-435 - Set default req/limits resources for eBPF agent
  • Loading branch information
jpinsonneau committed Sep 7, 2022
2 parents 534b7b7 + 7b706ad commit cc44eeb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/v1alpha1/flowcollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ type FlowCollectorEBPF struct {
// ImagePullPolicy is the Kubernetes pull policy for the image defined above
ImagePullPolicy string `json:"imagePullPolicy,omitempty"`

//+kubebuilder:default:={requests:{memory:"50Mi",cpu:"100m"},limits:{memory:"100Mi"}}
// Compute Resources required by this container.
// Cannot be updated.
// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down
6 changes: 6 additions & 0 deletions config/crd/bases/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ spec:
PERFMON, NET_ADMIN, SYS_RESOURCE.'
type: boolean
resources:
default:
limits:
memory: 100Mi
requests:
cpu: 100m
memory: 50Mi
description: 'Compute Resources required by this container.
Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
properties:
Expand Down
2 changes: 2 additions & 0 deletions docs/FlowCollector.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ Settings related to eBPF-based flow reporter when the "agent.type" property is s
<td>object</td>
<td>
Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/<br/>
<br/>
<i>Default</i>: map[limits:map[memory:100Mi] requests:map[cpu:100m memory:50Mi]]<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down

0 comments on commit cc44eeb

Please sign in to comment.