diff --git a/code-analysis/Chart.yaml b/code-analysis/Chart.yaml index 2ae34bb..b33bbb1 100644 --- a/code-analysis/Chart.yaml +++ b/code-analysis/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.2 +version: 0.1.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/code-analysis/templates/andromeda.yaml b/code-analysis/templates/andromeda.yaml index 6c50e2a..5a9c097 100644 --- a/code-analysis/templates/andromeda.yaml +++ b/code-analysis/templates/andromeda.yaml @@ -256,20 +256,30 @@ spec: nodeSelector: kubernetes.io/hostname: {{ .Values.andromeda.node.hostname }} {{- end }} - {{- if .Values.andromeda.node.affinity.enable }} + {{- if or .Values.node.affinity.enable .Values.andromeda.node.affinity.enable }} affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: + {{- if .Values.andromeda.node.affinity.enable }} - key: {{ .Values.andromeda.node.affinity.key }} operator: {{ .Values.andromeda.node.affinity.operator }} + {{- else if .Values.node.affinity.enable }} + - key: {{ .Values.node.affinity.key }} + operator: {{ .Values.node.affinity.operator }} + {{- end}} {{- end }} {{- if .Values.andromeda.node.toleration.enable }} tolerations: - key: {{ .Values.andromeda.node.toleration.key }} operator: {{ .Values.andromeda.node.toleration.operator }} effect: {{ .Values.andromeda.node.toleration.effect }} + {{- else if .Values.node.toleration.enable }} + tolerations: + - key: {{ .Values.node.toleration.key }} + operator: {{ .Values.node.toleration.operator }} + effect: {{ .Values.node.toleration.effect }} {{- end }} containers: - name: andromeda diff --git a/code-analysis/templates/bishamonten.yaml b/code-analysis/templates/bishamonten.yaml index db6d9ca..a9b114e 100644 --- a/code-analysis/templates/bishamonten.yaml +++ b/code-analysis/templates/bishamonten.yaml @@ -61,6 +61,21 @@ spec: imagePullSecrets: - name: {{ .Values.base.imagePullSecret }} restartPolicy: {{ .Values.base.podRestartPolicy }} + {{- if .Values.node.affinity.enable }} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: {{ .Values.node.affinity.key }} + operator: {{ .Values.node.affinity.operator }} + {{- end }} + {{- if .Values.node.toleration.enable }} + tolerations: + - key: {{ .Values.node.toleration.key }} + operator: {{ .Values.node.toleration.operator }} + effect: {{ .Values.node.toleration.effect }} + {{- end }} containers: - name: bishamonten image: {{ tpl .Values.bishamonten.image.name . }}:{{ .Values.bishamonten.image.tag }} diff --git a/code-analysis/templates/config.yaml b/code-analysis/templates/config.yaml index cce930d..2695861 100644 --- a/code-analysis/templates/config.yaml +++ b/code-analysis/templates/config.yaml @@ -35,10 +35,14 @@ data: {{- if .Values.andromeda.node.affinity.enable }} K8S_AFFINITY_KEY: {{ .Values.andromeda.node.affinity.key }} + {{- else if .Values.node.affinity.enable }} + K8S_AFFINITY_KEY: {{ .Values.node.affinity.key }} {{- end }} {{- if .Values.andromeda.node.toleration.enable }} K8S_TOLERATION_KEY: {{ .Values.andromeda.node.toleration.key }} + {{- else if .Values.node.toleration.enable }} + K8S_TOLERATION_KEY: {{ .Values.node.toleration.key }} {{- end }} {{- range $key, $val := .Values.config.data }} diff --git a/code-analysis/templates/mastervendor.yaml b/code-analysis/templates/mastervendor.yaml index d32206f..1f7a27e 100644 --- a/code-analysis/templates/mastervendor.yaml +++ b/code-analysis/templates/mastervendor.yaml @@ -27,6 +27,21 @@ spec: imagePullSecrets: - name: {{ .Values.base.imagePullSecret }} restartPolicy: {{ .Values.mastervendor.podRestartPolicy }} + {{- if .Values.node.affinity.enable }} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: {{ .Values.node.affinity.key }} + operator: {{ .Values.node.affinity.operator }} + {{- end }} + {{- if .Values.node.toleration.enable }} + tolerations: + - key: {{ .Values.node.toleration.key }} + operator: {{ .Values.node.toleration.operator }} + effect: {{ .Values.node.toleration.effect }} + {{- end }} containers: - name: mastervendor image: {{ tpl .Values.mastervendor.image.name . }}:{{ .Values.mastervendor.image.tag }} @@ -57,4 +72,4 @@ spec: {{- end }} {{- end}} {{- end}} -{{- end}} \ No newline at end of file +{{- end}} diff --git a/code-analysis/templates/mongo.yaml b/code-analysis/templates/mongo.yaml index 9bbd2f7..3a0e007 100644 --- a/code-analysis/templates/mongo.yaml +++ b/code-analysis/templates/mongo.yaml @@ -85,6 +85,21 @@ spec: spec: restartPolicy: {{ .Values.base.podRestartPolicy }} terminationGracePeriodSeconds: 15 + {{- if .Values.node.affinity.enable }} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: {{ .Values.node.affinity.key }} + operator: {{ .Values.node.affinity.operator }} + {{- end }} + {{- if .Values.node.toleration.enable }} + tolerations: + - key: {{ .Values.node.toleration.key }} + operator: {{ .Values.node.toleration.operator }} + effect: {{ .Values.node.toleration.effect }} + {{- end }} initContainers: - name: init-mongo-encryption image: busybox diff --git a/code-analysis/values.yaml b/code-analysis/values.yaml index 6403410..3810dc6 100644 --- a/code-analysis/values.yaml +++ b/code-analysis/values.yaml @@ -60,6 +60,18 @@ updates: tag: latest +node: + affinity: + enable: false + key: "PRIVADO_ANDROMEDA_NODE_LABEL" + operator: Exists # only Exists supported + toleration: + enable: false + key: "PRIVADO_ANDROMEDA_NODE_TAINT" + operator: Exists # only Exists supported + effect: NoSchedule # only NoSchedule supported + + # specific values related to ingress ingress: name: privado-ingress @@ -145,7 +157,7 @@ andromeda: limits: cpu: memory: - node: + node: # overrides the global node configs hostname: "" # if customer has NFS storage attached then keep this field empty else keep node's "hostname" having larger resources affinity: enable: false