diff --git a/stable/anchore-engine/Chart.yaml b/stable/anchore-engine/Chart.yaml index bb523918dc..51e44fa1a4 100644 --- a/stable/anchore-engine/Chart.yaml +++ b/stable/anchore-engine/Chart.yaml @@ -1,5 +1,5 @@ name: anchore-engine -version: 0.1.3 +version: 0.1.4 appVersion: 0.1.6 description: Anchore container analysis and policy evaluation engine service keywords: diff --git a/stable/anchore-engine/templates/core_deployment.yaml b/stable/anchore-engine/templates/core_deployment.yaml index 9fdd8f3f5d..1f6b2b38c5 100644 --- a/stable/anchore-engine/templates/core_deployment.yaml +++ b/stable/anchore-engine/templates/core_deployment.yaml @@ -98,3 +98,15 @@ spec: failureThreshold: 10 resources: {{ toYaml .Values.coreConfig.resources | indent 10 }} + {{- if .Values.coreConfig.nodeSelector }} + nodeSelector: +{{ toYaml .Values.coreConfig.nodeSelector | indent 8 }} + {{- end }} + {{- with .Values.coreConfig.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.coreConfig.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/stable/anchore-engine/templates/worker_deployment.yaml b/stable/anchore-engine/templates/worker_deployment.yaml index 2bb975e4ab..e7de6ae231 100644 --- a/stable/anchore-engine/templates/worker_deployment.yaml +++ b/stable/anchore-engine/templates/worker_deployment.yaml @@ -85,3 +85,15 @@ spec: {{- end }} - name: analysis-scratch {{ toYaml .Values.workerConfig.analysisScratchVolume.details -}} + {{- if .Values.workerConfig.nodeSelector }} + nodeSelector: +{{ toYaml .Values.workerConfig.nodeSelector | indent 8 }} + {{- end }} + {{- with .Values.workerConfig.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.workerConfig.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/stable/anchore-engine/values.yaml b/stable/anchore-engine/values.yaml index f67942f250..d467f75053 100644 --- a/stable/anchore-engine/values.yaml +++ b/stable/anchore-engine/values.yaml @@ -137,6 +137,15 @@ coreConfig: # cpu: 100m # memory: 4Gi + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + tolerations: [] + + affinity: {} + # Configuration for the worker pods that perform image analysis # There may be many of these workers but best practice is to not have more than one per node since analysis # is very IO intensive. Use of affinity/anti-affinity rules for scheduling the workers is future work. @@ -181,3 +190,12 @@ workerConfig: # requests: # cpu: 100m # memory: 2Gi + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + tolerations: [] + + affinity: {}