From f600d33b37b1a3b6846b6e33b79e25544613f763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9stor=20Salceda?= Date: Tue, 28 Apr 2020 10:36:05 +0200 Subject: [PATCH] [stable/sysdig] Add affinity instructions to schedule on amd64 and linux (#22150) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [stable/sysdig] Add affinity instructions to schedule on amd64 and linux Signed-off-by: Néstor Salceda * [stable/sysdig] Add support for custom annotations Signed-off-by: Néstor Salceda --- stable/sysdig/CHANGELOG.md | 7 +++++++ stable/sysdig/Chart.yaml | 2 +- stable/sysdig/README.md | 4 ++-- stable/sysdig/templates/daemonset.yaml | 6 ++++-- stable/sysdig/values.yaml | 18 +++++++++++++++--- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/stable/sysdig/CHANGELOG.md b/stable/sysdig/CHANGELOG.md index ac9f6a299f..d293602dbe 100644 --- a/stable/sysdig/CHANGELOG.md +++ b/stable/sysdig/CHANGELOG.md @@ -3,6 +3,13 @@ This file documents all notable changes to Sysdig Helm Chart. The release numbering uses [semantic versioning](http://semver.org). +## v1.7.13 + +### Minor changes + +* Implement scheduling with affinity and not with nodeSelector on amd64 & linux nodes. +* Add support for custom annotations on daemonSet. + ## v1.7.12 ### Minor changes diff --git a/stable/sysdig/Chart.yaml b/stable/sysdig/Chart.yaml index e596bd0252..b7a06a31c5 100755 --- a/stable/sysdig/Chart.yaml +++ b/stable/sysdig/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: sysdig -version: 1.7.12 +version: 1.7.13 appVersion: 9.9.1 description: Sysdig Monitor and Secure agent keywords: diff --git a/stable/sysdig/README.md b/stable/sysdig/README.md index 7531d1a0df..655b31cc87 100644 --- a/stable/sysdig/README.md +++ b/stable/sysdig/README.md @@ -52,8 +52,8 @@ The following table lists the configurable parameters of the Sysdig chart and th | `serviceAccount.create` | Create serviceAccount | `true` | | `serviceAccount.name` | Use this value as serviceAccountName | ` ` | | `daemonset.updateStrategy.type` | The updateStrategy for updating the daemonset | `RollingUpdate` | -| `daemonset.affinity` | Node affinities | `nil` | -| `daemonset.nodeSelector` | Node selector | `kubernetes.io/arch:amd64` | +| `daemonset.affinity` | Node affinities | `schedule on amd64 and linux` | +| `daemonset.annotations` | Custom annotations for daemonset | `{}` | | `slim.enabled` | Use the slim based Sysdig Agent image | `false` | | `slim.kmoduleImage.repository` | The kernel module image builder repository to pull from | `sysdig/agent-kmodule` | | `slim.resources.requests.cpu` | CPU requested for building the kernel module | `1000m` | diff --git a/stable/sysdig/templates/daemonset.yaml b/stable/sysdig/templates/daemonset.yaml index 2af0507811..cc827283ff 100644 --- a/stable/sysdig/templates/daemonset.yaml +++ b/stable/sysdig/templates/daemonset.yaml @@ -15,6 +15,10 @@ spec: name: {{ template "sysdig.fullname" .}} labels: {{ include "sysdig.labels" . | indent 8 }} + {{- if .Values.daemonset.annotations }} + annotations: +{{ toYaml .Values.daemonset.annotations | indent 8 }} + {{- end }} spec: serviceAccountName: {{ template "sysdig.serviceAccountName" .}} {{- if .Values.priorityClassName }} @@ -34,8 +38,6 @@ spec: imagePullSecrets: {{ toYaml .Values.image.pullSecrets | indent 8 }} {{- end }} - nodeSelector: -{{ toYaml .Values.daemonset.nodeSelector | indent 8 }} {{- if .Values.slim.enabled }} initContainers: - name: sysdig-agent-kmodule diff --git a/stable/sysdig/values.yaml b/stable/sysdig/values.yaml index 4cd5ab7af1..f37ce81798 100644 --- a/stable/sysdig/values.yaml +++ b/stable/sysdig/values.yaml @@ -53,9 +53,21 @@ daemonset: env: {} # Allow the DaemonSet to schedule using affinity rules # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - affinity: {} - nodeSelector: - kubernetes.io/arch: amd64 + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 + - key: kubernetes.io/os + operator: In + values: + - linux + # Allow the DaemonSet to set annotations + annotations: {} # If is behind a proxy you can set the proxy server proxy: