Skip to content

Commit

Permalink
fix(node-analyzer): allow custom annotations on node analyzer daemons…
Browse files Browse the repository at this point in the history
…et (#1097)

Co-authored-by: Marco Vito Moscaritolo <[email protected]>
  • Loading branch information
aroberts87 and mavimo authored May 17, 2023
1 parent ce6e35d commit fd461c1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/node-analyzer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: node-analyzer
description: Sysdig Node Analyzer

# currently matching Sysdig's appVersion 1.14.34
version: 1.8.51
version: 1.8.52
appVersion: 12.6.0
keywords:
- monitoring
Expand Down
1 change: 1 addition & 0 deletions charts/node-analyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ The following table lists the configurable parameters of the Sysdig Node Analyze
| `sysdig.existingAccessKeySecret` | Alternatively, specify the name of a Kubernetes secret containing an 'access-key' entry | ` ` Either accessKey or existingAccessKeySecret is required |
| `secure.enabled` | Enable Sysdig Secure | `true` |
| `secure.vulnerabilityManagement.newEngineOnly` | Enable only the new vulnerability management engine | `false` |
| `daemonset.annotations` | Custom annotations for the daemonset | `{}' |
| `daemonset.labels` | NodeAnalyzer specific labels (as a multi-line templated string map or as YAML) | `{}`
| `daemonset.updateStrategy.type` | The updateStrategy for updating the daemonset | RollingUpdate
| `daemonset.updateStrategy.rollingUpdate.maxUnavailable` | The maximum number of pods that can be unavailable during the update process | 1
Expand Down
4 changes: 4 additions & 0 deletions charts/node-analyzer/templates/daemonset-node-analyzer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ spec:
app.kubernetes.io/name: {{ include "nodeAnalyzer.name" . }}
{{ include "daemonset.labels" . | indent 8 }}
{{ include "nodeAnalyzer.labels" . | indent 8 }}
{{- if .Values.daemonset.annotations }}
annotations:
{{ toYaml .Values.daemonset.annotations | nindent 8 }}
{{- end }}
spec:
volumes:
{{- if include "nodeAnalyzer.deployBenchmarkRunner" . }}
Expand Down
18 changes: 18 additions & 0 deletions charts/node-analyzer/tests/annotations_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
suite: Test specifying annotations to the Node Analyzer DaemonSet
templates:
- templates/daemonset-node-analyzer.yaml
tests:
- it: Test no annotations by default
asserts:
- isNull:
path: template.metadata.annotations

- it: Test annotations are added as expected
set:
daemonset:
annotations:
super: annotation
asserts:
- equal:
path: spec.template.metadata.annotations['super']
value: annotation
2 changes: 2 additions & 0 deletions charts/node-analyzer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ gke:
autopilot: false

daemonset:
# Specify custom annotations for the DaemonSet
annotations: {}
# Allow the DaemonSet to set labels
labels: {}
# Perform rolling updates by default in the DaemonSet agent
Expand Down

0 comments on commit fd461c1

Please sign in to comment.