From ddc8ab1a07fde008c7a8a0d2a8c4e8efe150e131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Gustav=20Str=C3=A5b=C3=B8?= Date: Thu, 23 May 2024 10:36:17 +0200 Subject: [PATCH] add pod scheduling properties to chart --- charts/radix-vulnerability-scanner/Chart.yaml | 14 ++++++++++---- .../templates/deployment.yaml | 12 ++++++++++++ charts/radix-vulnerability-scanner/values.yaml | 9 +++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/charts/radix-vulnerability-scanner/Chart.yaml b/charts/radix-vulnerability-scanner/Chart.yaml index 036a659..13156be 100644 --- a/charts/radix-vulnerability-scanner/Chart.yaml +++ b/charts/radix-vulnerability-scanner/Chart.yaml @@ -1,5 +1,11 @@ -apiVersion: v1 -appVersion: 1.1.3 -version: 1.1.3 -description: Scan images in RadixDeployments for vulnerabilities +apiVersion: v2 name: radix-vulnerability-scanner +description: Scan images in RadixDeployments for vulnerabilities +kubeVersion: ">=1.24.0" +appVersion: 1.1.3 +version: 1.2.0 +sources: + - https://github.com/equinor/radix-vulnerability-scanner +maintainers: + - name: Omnia Radix Development Team + email: Radix@StatoilSRM.onmicrosoft.com diff --git a/charts/radix-vulnerability-scanner/templates/deployment.yaml b/charts/radix-vulnerability-scanner/templates/deployment.yaml index 7792244..c3dd544 100644 --- a/charts/radix-vulnerability-scanner/templates/deployment.yaml +++ b/charts/radix-vulnerability-scanner/templates/deployment.yaml @@ -27,6 +27,18 @@ spec: securityContext: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: radix-vulnerability-scanner imagePullPolicy: Always diff --git a/charts/radix-vulnerability-scanner/values.yaml b/charts/radix-vulnerability-scanner/values.yaml index 31e70cf..e9d5cfb 100644 --- a/charts/radix-vulnerability-scanner/values.yaml +++ b/charts/radix-vulnerability-scanner/values.yaml @@ -96,6 +96,15 @@ extraVolumes: [] # Extra volume mounts. Can be used to manually mount the dockerConfigFile extraVolumeMounts: [] +# Affinity for pod scheduling +affinity: {} + +# Node selector for pod scheduling +nodeSelector: {} + +# Tolerations for pod scheduling +tolerations: [] + resources: requests: cpu: 100m