DependencyTrack / helm-charts

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

Issue with the nodeSelector. #63

Closed numa1985 closed 1 month ago

numa1985 commented 1 month ago

Hi ,

For some reason "nodeSelector: npu2" is not picking up. We need this because, if we don't set the pods are landing on the system node under system node pools in aks rather on user nodepools which is leading to resource issues.

Kubernetes Version : 1.29.2

ubuntu@NARU-Pr5530:~/dtrack$ helm upgrade --install dtrack dependency-track/dependency-track --namespace dtrack --reset-values --values values.yaml Release "dtrack" does not exist. Installing it now. coalesce.go:286: warning: cannot overwrite table with non table for dependency-track.apiServer.nodeSelector (map[]) Error: 1 error occurred:

ubuntu@NARU-Pr5530:~/dtrack$ cat values.yaml apiServer: resources: requests: cpu: "100m" memory: "512Mi" limits: cpu: "1" memory: "512Mi" persistentVolume: enabled: true size: 10Gi nodeSelector: npu2 extraEnv: SYSTEM_REQUIREMENT_CHECK_ENABLED: "false"

Thanks

nscuro commented 1 month ago

As per values.yaml, nodeSelector is an object, but you're supplying a string:

https://github.com/DependencyTrack/helm-charts/blob/15d97536949354f5644fd879a4e51ae1bb83d6d4/charts/dependency-track/values.yaml#L75

This is also what the Kubernetes error tells you:

cannot unmarshal string into Go struct field PodSpec.spec.template.spec.nodeSelector of type map[string]string

See https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/

numa1985 commented 1 month ago

@nscuro : Thanks it worked