Skip to content

Commit

Permalink
fix(base-cluster): fix nodeCollector is not scheduleable (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
tasches authored Jun 13, 2024
1 parent 5797e73 commit c7df73b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions charts/base-cluster/templates/monitoring/security/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ spec:
{{- if .Values.global.imageRegistry }}
image:
registry: {{ $.Values.global.imageRegistry }}
{{- end }}
{{- if or .Values.global.imageRegistry .Values.monitoring.securityScanning.nodeCollector.tolerations }}
nodeCollector:
{{- if .Values.global.imageRegistry }}
registry: {{ $.Values.global.imageRegistry }}
{{- end}}
{{- with .Values.monitoring.securityScanning.nodeCollector.tolerations }}
tolerations: {{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
trivy:
{{- if .Values.global.imageRegistry }}
Expand Down
14 changes: 14 additions & 0 deletions charts/base-cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,17 @@
"properties": {
"enabled": {
"type": "boolean"
},
"nodeCollector": {
"type": "object",
"properties": {
"tolerations": {
"type": "array",
"items": {
"$ref": "#/$defs/tolerations"
}
}
}
}
},
"additionalProperties": false
Expand Down Expand Up @@ -1531,6 +1542,9 @@
"quantity": {
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/_definitions.json#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity"
},
"tolerations": {
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/_definitions.json#/definitions/io.k8s.api.core.v1.Toleration"
},
"image": {
"type": "object",
"properties": {
Expand Down
5 changes: 5 additions & 0 deletions charts/base-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@ monitoring:
enabled: true
securityScanning:
enabled: true
nodeCollector:
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
tracing:
enabled: false
ingester:
Expand Down

0 comments on commit c7df73b

Please sign in to comment.