Skip to content

Commit

Permalink
bug: Support operator resources in helm (Mellanox#724)
Browse files Browse the repository at this point in the history
Add support to configure operator resources in
the Helm templating.

Fixes Mellanox#722
  • Loading branch information
adrianchiris authored Dec 27, 2023
2 parents 49e9bea + 4d4df2a commit c7d9a93
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
9 changes: 3 additions & 6 deletions deployment/network-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,10 @@ spec:
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
{{- with .Values.operator.resources }}
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
{{- toYaml . | nindent 12 }}
{{- end }}
securityContext:
runAsUser: 65532
terminationGracePeriodSeconds: 10
Expand Down
8 changes: 7 additions & 1 deletion deployment/network-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ sriov-network-operator:
# General Operator related values
# The operator element allows to deploy network operator from an alternate location
operator:
resources: {}
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
Expand Down
8 changes: 7 additions & 1 deletion hack/templates/values/values.template
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ sriov-network-operator:
# General Operator related values
# The operator element allows to deploy network operator from an alternate location
operator:
resources: {}
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
Expand Down

0 comments on commit c7d9a93

Please sign in to comment.