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

feat: Configure container resources in the helm chart #717

Merged
merged 4 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
210 changes: 120 additions & 90 deletions deployment/network-operator/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
name: {{ .Values.ofedDriver.repoConfig.name }}
{{- end }}
imagePullSecrets: {{ include "network-operator.ofed.imagePullSecrets" . }}
{{- if .Values.ofedDriver.containerResources }}
containerResources: {{ toYaml .Values.ofedDriver.containerResources | nindent 6 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.ofedDriver.terminationGracePeriodSeconds }}
startupProbe:
initialDelaySeconds: {{ .Values.ofedDriver.startupProbe.initialDelaySeconds }}
Expand Down Expand Up @@ -106,6 +109,9 @@ spec:
{{- end }}
]
}
{{- if .Values.rdmaSharedDevicePlugin.containerResources }}
containerResources: {{ toYaml .Values.rdmaSharedDevicePlugin.containerResources | nindent 6 }}
{{- end }}
{{- end }}
{{- if .Values.sriovDevicePlugin.deploy }}
sriovDevicePlugin:
Expand Down Expand Up @@ -138,13 +144,19 @@ spec:
{{- end }}
]
}
{{- if .Values.sriovDevicePlugin.containerResources }}
containerResources: {{ toYaml .Values.sriovDevicePlugin.containerResources | nindent 6 }}
{{- end }}
{{- end }}
{{- if .Values.ibKubernetes.deploy }}
ibKubernetes:
image: {{ .Values.ibKubernetes.image }}
repository: {{ .Values.ibKubernetes.repository }}
version: {{ .Values.ibKubernetes.version }}
imagePullSecrets: {{ include "network-operator.ibKubernetes.imagePullSecrets" . }}
{{- if .Values.ibKubernetes.containerResources }}
containerResources: {{ toYaml .Values.ibKubernetes.containerResources | nindent 6 }}
{{- end }}
pKeyGUIDPoolRangeStart: {{ .Values.ibKubernetes.pKeyGUIDPoolRangeStart }}
pKeyGUIDPoolRangeEnd: {{ .Values.ibKubernetes.pKeyGUIDPoolRangeEnd }}
ufmSecret: {{ .Values.ibKubernetes.ufmSecret | quote }}
Expand All @@ -157,13 +169,19 @@ spec:
repository: {{ .Values.secondaryNetwork.cniPlugins.repository }}
version: {{ .Values.secondaryNetwork.cniPlugins.version }}
imagePullSecrets: {{ include "network-operator.secondaryNetwork.cniPlugins.imagePullSecrets" . }}
{{- if .Values.secondaryNetwork.cniPlugins.containerResources }}
containerResources: {{ toYaml .Values.secondaryNetwork.cniPlugins.containerResources | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.secondaryNetwork.multus.deploy }}
multus:
image: {{ .Values.secondaryNetwork.multus.image }}
repository: {{ .Values.secondaryNetwork.multus.repository }}
version: {{ .Values.secondaryNetwork.multus.version }}
imagePullSecrets: {{ include "network-operator.secondaryNetwork.multus.imagePullSecrets" . }}
{{- if .Values.secondaryNetwork.multus.containerResources }}
containerResources: {{ toYaml .Values.secondaryNetwork.multus.containerResources | nindent 8 }}
{{- end }}
{{- if .Values.secondaryNetwork.multus.config | empty | not }}
config: {{ .Values.secondaryNetwork.multus.config | quote }}
{{- end }}
Expand All @@ -173,13 +191,19 @@ spec:
image: {{ .Values.secondaryNetwork.ipoib.image }}
repository: {{ .Values.secondaryNetwork.ipoib.repository }}
version: {{ .Values.secondaryNetwork.ipoib.version }}
{{- if .Values.secondaryNetwork.ipoib.containerResources }}
containerResources: {{ toYaml .Values.secondaryNetwork.ipoib.containerResources | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.secondaryNetwork.ipamPlugin.deploy }}
ipamPlugin:
image: {{ .Values.secondaryNetwork.ipamPlugin.image }}
repository: {{ .Values.secondaryNetwork.ipamPlugin.repository }}
version: {{ .Values.secondaryNetwork.ipamPlugin.version }}
imagePullSecrets: {{ include "network-operator.secondaryNetwork.ipamPlugin.imagePullSecrets" . }}
{{- if .Values.secondaryNetwork.ipamPlugin.containerResources }}
containerResources: {{ toYaml .Values.secondaryNetwork.ipamPlugin.containerResources | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.nvIpam.deploy }}
Expand All @@ -188,6 +212,9 @@ spec:
repository: {{ .Values.nvIpam.repository }}
version: {{ .Values.nvIpam.version }}
imagePullSecrets: {{ include "network-operator.nvIpam.imagePullSecrets" . }}
{{- if .Values.nvIpam.containerResources }}
containerResources: {{ toYaml .Values.nvIpam.containerResources | nindent 6 }}
{{- end }}
enableWebhook: {{ .Values.nvIpam.enableWebhook }}
{{- end }}
{{- if .Values.nicFeatureDiscovery.deploy }}
Expand All @@ -196,5 +223,8 @@ spec:
repository: {{ .Values.nicFeatureDiscovery.repository }}
version: {{ .Values.nicFeatureDiscovery.version }}
imagePullSecrets: {{ include "network-operator.nicFeatureDiscovery.imagePullSecrets" . }}
{{- if .Values.nicFeatureDiscovery.containerResources }}
containerResources: {{ toYaml .Values.nicFeatureDiscovery.containerResources | nindent 6 }}
{{- end }}
{{- end }}
{{ end }}
88 changes: 88 additions & 0 deletions deployment/network-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ sriov-network-operator:
# General Operator related values
# The operator element allows to deploy network operator from an alternate location
operator:
resources: {}
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
Expand Down Expand Up @@ -176,6 +177,14 @@ ofedDriver:
# env:
# - name: EXAMPLE_ENV_VAR
# value: example_env_var_value
# containerResources:
# - name: "mofed-container"
# requests:
# cpu: "200m"
# memory: "150Mi"
# limits:
# cpu: "300m"
# memory: "300Mi"
terminationGracePeriodSeconds: 300
# Private mirror repository configuration
repoConfig:
Expand Down Expand Up @@ -225,6 +234,14 @@ rdmaSharedDevicePlugin:
version: sha-fe7f371c7e1b8315bf900f71cd25cfc1251dc775
useCdi: false
# imagePullSecrets: []
# containerResources:
# - name: "rdma-shared-dp"
# requests:
# cpu: "100m"
# memory: "50Mi"
# limits:
# cpu: "150m"
# memory: "100Mi"
# The following defines the RDMA resources in the cluster
# it must be provided by the user when deploying the chart
# each entry in the resources element will create a resource with the provided <name> and list of devices
Expand All @@ -241,6 +258,14 @@ sriovDevicePlugin:
version: 2cc723dcbc712290055b763dc9d3c090ba41e929
useCdi: false
# imagePullSecrets: []
# containerResources:
# - name: "kube-sriovdp"
# requests:
# cpu: "100m"
# memory: "50Mi"
# limits:
# cpu: "150m"
# memory: "100Mi"
resources:
- name: hostdev
vendors: [15b3]
Expand All @@ -251,6 +276,14 @@ ibKubernetes:
repository: ghcr.io/mellanox
version: v1.0.2
# imagePullSecrets: []
# containerResources:
# - name: "ib-kubernetes"
# requests:
# cpu: "100m"
# memory: "300Mi"
# limits:
# cpu: "100m"
# memory: "300Mi"
periodicUpdateSeconds: 5
pKeyGUIDPoolRangeStart: "02:00:00:00:00:00:00:00"
pKeyGUIDPoolRangeEnd: "02:FF:FF:FF:FF:FF:FF:FF"
Expand All @@ -263,6 +296,21 @@ nvIpam:
version: v0.1.1
enableWebhook: false
# imagePullSecrets: []
# containerResources:
# - name: "nv-ipam-node"
# requests:
# cpu: "150m"
# memory: "50Mi"
# limits:
# cpu: "300m"
# memory: "300Mi"
# - name: "nv-ipam-controller"
# requests:
# cpu: "150m"
# memory: "50Mi"
# limits:
# cpu: "300m"
# memory: "300Mi"

secondaryNetwork:
deploy: true
Expand All @@ -272,32 +320,72 @@ secondaryNetwork:
repository: ghcr.io/k8snetworkplumbingwg
version: v1.2.0-amd64
# imagePullSecrets: []
# containerResources:
# - name: "cni-plugins"
# requests:
# cpu: "100m"
# memory: "50Mi"
# limits:
# cpu: "100m"
# memory: "50Mi"
multus:
deploy: true
image: multus-cni
repository: ghcr.io/k8snetworkplumbingwg
version: v3.9.3
# imagePullSecrets: []
# config: ''
# containerResources:
# - name: "kube-multus"
# requests:
# cpu: "100m"
# memory: "50Mi"
# limits:
# cpu: "100m"
# memory: "50Mi"
ipoib:
deploy: false
image: ipoib-cni
repository: nvcr.io/nvidia/cloud-native
version: v1.1.0
# imagePullSecrets: []
# containerResources:
# - name: "ipoib-cni"
# requests:
# cpu: "100m"
# memory: "50Mi"
# limits:
# cpu: "100m"
# memory: "50Mi"
ipamPlugin:
deploy: true
image: whereabouts
repository: ghcr.io/k8snetworkplumbingwg
version: v0.6.1-amd64
# imagePullSecrets: []
# containerResources:
# - name: "whereabouts"
# requests:
# cpu: "100m"
# memory: "100Mi"
# limits:
# cpu: "100m"
# memory: "200Mi"

nicFeatureDiscovery:
deploy: false
image: nic-feature-discovery
repository: ghcr.io/mellanox
version: v0.0.1
# imagePullSecrets: []
# containerResources:
# - name: "nic-feature-discovery"
# requests:
# cpu: "100m"
# memory: "50Mi"
# limits:
# cpu: "300m"
# memory: "150Mi"

# Can be set to nicclusterpolicy and override other ds node affinity,
# e.g. https://github.com/Mellanox/network-operator/blob/master/manifests/state-multus-cni/0050-multus-ds.yml#L26-L36
Expand Down
Loading
Loading