From d364c8b385e7756cad3cb0786b1c51a254e4b2ed Mon Sep 17 00:00:00 2001 From: Alexandre Peixoto Ferreira Date: Fri, 4 Nov 2022 09:55:56 -0500 Subject: [PATCH] add support for valur for nodeSelector Signed-off-by: Alexandre Peixoto Ferreira --- chart/README.md | 4 ++++ chart/templates/common.yaml | 2 +- chart/values.yaml | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/chart/README.md b/chart/README.md index 2f83b6e..72ce732 100644 --- a/chart/README.md +++ b/chart/README.md @@ -20,6 +20,10 @@ Kubernetes primarily manages CPU, memory, storage, and network, while leaving ot In IoT environments, applications can have direct access to sensors and actuators, either directly by interfacing with a device driver on the kernel (e.g. digital I/O pins, temperature sensors, analog inputs, microphones, audio output, video cameras) or indirectly through hardware interfaces (like serial ports, I2C, SPI, bluetooth, LoRa, USB and others). Controlled access to these devices is essential to enable a container-based IoT solution. Smarter-device-manager allows containers to have direct access to host devices in a secure way. +## Values + +The configuration.nodeSelector value allows the nodeSelector to be changed in a higher level chart simplyfyng deploying multiple services at the same time; CNI, DNS and device-manager with a single label for example. + ## Pre-requisites - k8s > 1.18 (before this the plugin interface used a different directory which requires a different configuration) diff --git a/chart/templates/common.yaml b/chart/templates/common.yaml index a8d5485..bfb4a74 100644 --- a/chart/templates/common.yaml +++ b/chart/templates/common.yaml @@ -20,7 +20,7 @@ spec: node.kubernetes.io/bootstrap-checkpoint: "true" spec: nodeSelector: - smarter-device-manager : enabled + {{- toYaml .Values.configuration.nodeSelector | nindent 8 }} tolerations: - key: "smarter.type" operator: "Equal" diff --git a/chart/values.yaml b/chart/values.yaml index 4017fac..de76238 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -10,6 +10,10 @@ image: tag: "" pullPolicy: IfNotPresent +configuration: + nodeSelector: + smarter-device-manager: enabled + # If a specific configurations is used it can be provided by uncommenting this lines # config: # - devicematch: ^snd$