Skip to content

Commit

Permalink
Set compute resource limits and requests for all Akri components (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-goldenring committed Apr 26, 2021
1 parent 2679410 commit d4ca425
Show file tree
Hide file tree
Showing 34 changed files with 274 additions and 36 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agent/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "agent"
version = "0.6.3"
version = "0.6.4"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>", "<bfjelds@microsoft.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion controller/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "controller"
version = "0.6.3"
version = "0.6.4"
authors = ["<bfjelds@microsoft.com>"]
edition = "2018"

Expand Down
4 changes: 2 additions & 2 deletions deployment/helm/Chart.yaml
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.6.3
version: 0.6.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.6.3
appVersion: 0.6.4
7 changes: 7 additions & 0 deletions deployment/helm/templates/agent.yaml
Expand Up @@ -43,6 +43,13 @@ spec:
{{- with .Values.agent.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
resources:
requests:
memory: {{ .Values.agent.resources.memoryRequest }}
cpu: {{ .Values.agent.resources.cpuRequest }}
limits:
memory: {{ .Values.agent.resources.memoryLimit }}
cpu: {{ .Values.agent.resources.cpuLimit }}
{{- if .Values.agent.securityContext }}
securityContext:
{{- toYaml .Values.agent.securityContext | nindent 10 }}
Expand Down
7 changes: 7 additions & 0 deletions deployment/helm/templates/controller.yaml
Expand Up @@ -34,6 +34,13 @@ spec:
{{- with .Values.controller.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
resources:
requests:
memory: {{ .Values.controller.resources.memoryRequest }}
cpu: {{ .Values.controller.resources.cpuRequest }}
limits:
memory: {{ .Values.controller.resources.memoryLimit }}
cpu: {{ .Values.controller.resources.cpuLimit }}
{{- if .Values.prometheus.enabled }}
ports:
- name: {{ .Values.prometheus.portName | quote }}
Expand Down
6 changes: 6 additions & 0 deletions deployment/helm/templates/custom-configuration.yaml
Expand Up @@ -16,8 +16,14 @@ spec:
imagePullPolicy: {{ . }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.custom.configuration.brokerPod.resources.memoryRequest }}
cpu: {{ .Values.custom.configuration.brokerPod.resources.cpuRequest }}
limits:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.custom.configuration.brokerPod.resources.memoryLimit }}
cpu: {{ .Values.custom.configuration.brokerPod.resources.cpuLimit }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
Expand Down
7 changes: 7 additions & 0 deletions deployment/helm/templates/custom-discovery-handler.yaml
Expand Up @@ -18,6 +18,13 @@ spec:
{{- with .Values.custom.discovery.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end}}
resources:
requests:
memory: {{ .Values.custom.discovery.resources.memoryRequest }}
cpu: {{ .Values.custom.discovery.resources.cpuRequest }}
limits:
memory: {{ .Values.custom.discovery.resources.memoryLimit }}
cpu: {{ .Values.custom.discovery.resources.cpuLimit }}
volumeMounts:
- name: agent-registration
mountPath: /var/lib/akri
Expand Down
8 changes: 7 additions & 1 deletion deployment/helm/templates/debug-echo-configuration.yaml
Expand Up @@ -22,8 +22,14 @@ spec:
imagePullPolicy: {{ . }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.debugEcho.configuration.brokerPod.resources.memoryRequest }}
cpu: {{ .Values.debugEcho.configuration.brokerPod.resources.cpuRequest }}
limits:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.debugEcho.configuration.brokerPod.resources.memoryLimit }}
cpu: {{ .Values.debugEcho.configuration.brokerPod.resources.cpuLimit }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
Expand Down Expand Up @@ -57,5 +63,5 @@ spec:
{{- else }}
brokerProperties: {}
{{- end }}
capacity: {{ .Values.debugEcho.configuration.capacity }}
capacity: 2
{{- end }}
7 changes: 7 additions & 0 deletions deployment/helm/templates/debug-echo-discovery-handler.yaml
Expand Up @@ -30,6 +30,13 @@ spec:
{{- with .Values.debugEcho.discovery.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end}}
resources:
requests:
memory: {{ .Values.debugEcho.discovery.resources.memoryRequest }}
cpu: {{ .Values.debugEcho.discovery.resources.cpuRequest }}
limits:
memory: {{ .Values.debugEcho.discovery.resources.memoryLimit }}
cpu: {{ .Values.debugEcho.discovery.resources.cpuLimit }}
{{- if .Values.debugEcho.discovery.useNetworkConnection }}
ports:
- name: discovery
Expand Down
6 changes: 6 additions & 0 deletions deployment/helm/templates/onvif-configuration.yaml
Expand Up @@ -49,8 +49,14 @@ spec:
{{- end }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.onvif.configuration.brokerPod.resources.memoryRequest }}
cpu: {{ .Values.onvif.configuration.brokerPod.resources.cpuRequest }}
limits:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.onvif.configuration.brokerPod.resources.memoryLimit }}
cpu: {{ .Values.onvif.configuration.brokerPod.resources.cpuLimit }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
Expand Down
9 changes: 8 additions & 1 deletion deployment/helm/templates/onvif-discovery-handler.yaml
Expand Up @@ -32,7 +32,14 @@ spec:
{{- with .Values.onvif.discovery.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end}}
{{- if .Values.debugEcho.discovery.useNetworkConnection }}
resources:
requests:
memory: {{ .Values.onvif.discovery.resources.memoryRequest }}
cpu: {{ .Values.onvif.discovery.resources.cpuRequest }}
limits:
memory: {{ .Values.onvif.discovery.resources.memoryLimit }}
cpu: {{ .Values.onvif.discovery.resources.cpuLimit }}
{{- if .Values.onvif.discovery.useNetworkConnection }}
ports:
- name: discovery
containerPort: {{ .Values.onvif.discovery.port }}
Expand Down
6 changes: 6 additions & 0 deletions deployment/helm/templates/opcua-configuration.yaml
Expand Up @@ -36,8 +36,14 @@ spec:
{{- end }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.opcua.configuration.brokerPod.resources.memoryRequest }}
cpu: {{ .Values.opcua.configuration.brokerPod.resources.cpuRequest }}
limits:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.opcua.configuration.brokerPod.resources.memoryLimit }}
cpu: {{ .Values.opcua.configuration.brokerPod.resources.cpuLimit }}
{{- if .Values.opcua.configuration.mountCertificates}}
volumeMounts:
- name: credentials
Expand Down
7 changes: 7 additions & 0 deletions deployment/helm/templates/opcua-discovery-handler.yaml
Expand Up @@ -30,6 +30,13 @@ spec:
{{- with .Values.opcua.discovery.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end}}
resources:
requests:
memory: {{ .Values.opcua.discovery.resources.memoryRequest }}
cpu: {{ .Values.opcua.discovery.resources.cpuRequest }}
limits:
memory: {{ .Values.opcua.discovery.resources.memoryLimit }}
cpu: {{ .Values.opcua.discovery.resources.cpuLimit }}
{{- if .Values.opcua.discovery.useNetworkConnection }}
ports:
- name: discovery
Expand Down
6 changes: 6 additions & 0 deletions deployment/helm/templates/udev-configuration.yaml
Expand Up @@ -32,8 +32,14 @@ spec:
privileged: true
{{- end}}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.udev.configuration.brokerPod.resources.memoryRequest }}
cpu: {{ .Values.udev.configuration.brokerPod.resources.cpuRequest }}
limits:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.udev.configuration.brokerPod.resources.memoryLimit }}
cpu: {{ .Values.udev.configuration.brokerPod.resources.cpuLimit }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
Expand Down
7 changes: 7 additions & 0 deletions deployment/helm/templates/udev-discovery-handler.yaml
Expand Up @@ -32,6 +32,13 @@ spec:
{{- with .Values.udev.discovery.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end}}
resources:
requests:
memory: {{ .Values.udev.discovery.resources.memoryRequest }}
cpu: {{ .Values.udev.discovery.resources.cpuRequest }}
limits:
memory: {{ .Values.udev.discovery.resources.memoryLimit }}
cpu: {{ .Values.udev.discovery.resources.cpuLimit }}
{{- if .Values.udev.discovery.useNetworkConnection }}
ports:
- name: discovery
Expand Down
7 changes: 7 additions & 0 deletions deployment/helm/templates/webhook-configuration.yaml
Expand Up @@ -64,6 +64,13 @@ items:
{{- end }}
{{- end }}
imagePullPolicy: {{ .Values.webhookConfiguration.image.pullPolicy }}
resources:
requests:
memory: {{ .Values.webhookConfiguration.resources.memoryRequest }}
cpu: {{ .Values.webhookConfiguration.resources.cpuRequest }}
limits:
memory: {{ .Values.webhookConfiguration.resources.memoryLimit }}
cpu: {{ .Values.webhookConfiguration.resources.cpuLimit }}
command:
- /server
args:
Expand Down

0 comments on commit d4ca425

Please sign in to comment.