Skip to content

Commit

Permalink
Merge pull request #358 from chrisad2/common-nodeselector
Browse files Browse the repository at this point in the history
Common nodeSelector, affinity, tolerations
  • Loading branch information
HN23 committed Apr 10, 2024
2 parents b97b2d9 + 0681f5a commit 9616e52
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion stable/enterprise/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: enterprise
version: "2.5.0"
version: "2.5.1"
appVersion: "5.4.0"
kubeVersion: 1.23.x - 1.28.x || 1.23.x-x - 1.29.x-x
description: |
Expand Down
6 changes: 3 additions & 3 deletions stable/enterprise/templates/_common.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ serviceAccountName: {{ include "enterprise.serviceAccountName" (merge (dict "com
imagePullSecrets:
- name: {{ . }}
{{- end }}
{{- with (index .Values (print $component)).nodeSelector }}
{{- with (default .Values.nodeSelector (index .Values (print $component)).nodeSelector) }}
nodeSelector: {{- toYaml . | nindent 2 }}
{{- end }}
{{- with (index .Values (print $component)).affinity }}
{{- with (default .Values.affinity (index .Values (print $component)).affinity) }}
affinity: {{- toYaml . | nindent 2 }}
{{- end }}
{{- with (index .Values (print $component)).tolerations }}
{{- with (default .Values.tolerations (index .Values (print $component)).tolerations) }}
tolerations: {{- toYaml . | nindent 2 }}
{{- end }}
{{- end -}}
Expand Down
12 changes: 12 additions & 0 deletions stable/enterprise/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,18 @@ labels: {}
##
annotations: {}

## @param nodeSelector Common nodeSelector set on all Kubernetes pods
##
nodeSelector: {}

## @param tolerations Common tolerations set on all Kubernetes pods
##
tolerations: []

## @param affinity Common affinity set on all Kubernetes pods
##
affinity: {}

## @param scratchVolume.mountPath The mount path of an external volume for scratch space. Used for the following pods: analyzer, policy-engine, catalog, and reports
## @param scratchVolume.fixGroupPermissions Enable an initContainer that will fix the fsGroup permissions on all scratch volumes
## @param scratchVolume.fixerInitContainerImage The image to use for the mode-fixer initContainer
Expand Down
2 changes: 1 addition & 1 deletion stable/feeds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: feeds
type: application
version: "2.4.0"
version: "2.4.1"
appVersion: "5.4.0"
kubeVersion: 1.23.x - 1.27.x || 1.23.x-x - 1.29.x-x
description: Anchore feeds service
Expand Down
6 changes: 3 additions & 3 deletions stable/feeds/templates/hooks/pre-upgrade/upgrade_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ spec:
- name: {{ . }}
{{- end }}
restartPolicy: Never
{{- with .Values.feedsUpgradeJob.nodeSelector }}
{{- with (default .Values.nodeSelector .Values.feedsUpgradeJob.nodeSelector) }}
nodeSelector: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.feedsUpgradeJob.affinity }}
{{- with (default .Values.affinity .Values.feedsUpgradeJob.affinity) }}
affinity: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.feedsUpgradeJob.tolerations }}
{{- with (default .Values.tolerations .Values.feedsUpgradeJob.tolerations) }}
tolerations: {{- toYaml . | nindent 8 }}
{{- end }}
{{- if or .Values.certStoreSecretName .Values.cloudsql.useExistingServiceAcc .Values.extraVolumes }}
Expand Down

0 comments on commit 9616e52

Please sign in to comment.