Skip to content
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
6 changes: 5 additions & 1 deletion charts/runtime-enforcer/templates/debugger/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ spec:
value: {{ include "runtime-enforcer.grpc.certDir" . | quote }}
{{- with .Values.debugger.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
- name: grpc-certs
mountPath: {{ include "runtime-enforcer.grpc.certDir" . }}
readOnly: true
securityContext: {{- toYaml .Values.debugger.containerSecurityContext | nindent 10 }}
{{- with .Values.debugger.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: grpc-certs
csi:
Expand Down
27 changes: 27 additions & 0 deletions charts/runtime-enforcer/tests/deployment_debugger_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
suite: "Debugger Deployment Tests"
templates:
- "templates/debugger/deployment.yaml"

tests:
- it: "should set nodeSelector"
set:
debugger:
enabled: true
nodeSelector:
kubernetes.io/os: linux
node-role: control-plane
asserts:
- equal:
path: spec.template.spec.nodeSelector["kubernetes.io/os"]
value: linux
- equal:
path: spec.template.spec.nodeSelector["node-role"]
value: control-plane

- it: "should not render nodeSelector when empty"
set:
debugger:
nodeSelector: {}
asserts:
- notExists:
path: spec.template.spec.nodeSelector
4 changes: 4 additions & 0 deletions charts/runtime-enforcer/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@
"interval": {
"type": "string"
},
"nodeSelector": {
"type": "object",
"additionalProperties": true
},
"resources": {
"type": "object",
"properties": {
Expand Down
3 changes: 3 additions & 0 deletions charts/runtime-enforcer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ debugger:
requests:
cpu: 500m
memory: 256Mi
# debugger.nodeSelector -- Node selector for the debugger pods.
# @schema additionalProperties:true
nodeSelector: {}

# Learning mode configuration
learning:
Expand Down
Loading