DependencyTrack / helm-charts

Helm Charts for Dependency-Track
https://dependencytrack.org
Apache License 2.0
13 stars 15 forks source link

Allow nodeSelector to helm chart #40

Closed jazark closed 2 months ago

jazark commented 2 months ago

Hi,

We're currently using this helm chart and will be deploying a productionized version. I'm requesting the nodeSelector be added to the values.yaml, api statefulset, and frontend api deployment spec. I've ran a helm template and have verified this works as intended and is a non breaking change. Simply add the following:

  1. Add nodeSelector: {} to values.yaml: https://github.com/DependencyTrack/helm-charts/blob/main/charts/dependency-track/values.yaml#L66 https://github.com/DependencyTrack/helm-charts/blob/main/charts/dependency-track/values.yaml#L134

  2. Add the following conditional to frontend deployment

  {{- if .Values.frontend.nodeSelector }}
  nodeSelector:
  {{- toYaml .Values.frontend.nodeSelector | nindent 8 }}
  {{- end }}

https://github.com/DependencyTrack/helm-charts/blob/main/charts/dependency-track/templates/frontend/deployment.yaml#L93

  1. Add the following conditional to api stateful-set
  {{- if .Values.apiServer.nodeSelector }}
  nodeSelector:
  {{- toYaml .Values.apiServer.nodeSelector | nindent 8 }}
  {{- end }}

https://github.com/DependencyTrack/helm-charts/blob/main/charts/dependency-track/templates/api-server/statefulset.yaml#L108

Thanks and let me know if any questions!