Skip to content

Commit

Permalink
feat(dependency-track): Allowing user to configure global and per-tie…
Browse files Browse the repository at this point in the history
…r labels

Signed-off-by: Alioune SY <[email protected]>
  • Loading branch information
Alioune SY authored and syalioune committed Nov 4, 2022
1 parent 232b899 commit 44f0309
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/dependency-track/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: |
Dependency-Track is an intelligent Software Supply Chain Component Analysis platform that allows organizations to identify and reduce risk from the use of third-party and open source components. Dependency-Track takes a unique and highly beneficial approach by leveraging the capabilities of Software Bill-of-Materials (SBOM). This approach provides capabilities that traditional Software Composition Analysis (SCA) solutions cannot achieve.
name: dependency-track
home: https://dependencytrack.org/
version: 1.5.4
version: 1.5.5
icon: https://raw.githubusercontent.com/DependencyTrack/branding/master/dt-logo-black-text.svg
keywords:
- security
Expand Down
8 changes: 4 additions & 4 deletions charts/dependency-track/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dependency-track

![Version: 1.5.2](https://img.shields.io/badge/Version-1.5.2-informational?style=flat-square) ![AppVersion: 4.6.2](https://img.shields.io/badge/AppVersion-4.6.2-informational?style=flat-square)
![Version: 1.5.5](https://img.shields.io/badge/Version-1.5.5-informational?style=flat-square) ![AppVersion: 4.6.2](https://img.shields.io/badge/AppVersion-4.6.2-informational?style=flat-square)

Dependency-Track is an intelligent Software Supply Chain Component Analysis platform that allows organizations to identify and reduce risk from the use of third-party and open source components. Dependency-Track takes a unique and highly beneficial approach by leveraging the capabilities of Software Bill-of-Materials (SBOM). This approach provides capabilities that traditional Software Composition Analysis (SCA) solutions cannot achieve.

Expand Down Expand Up @@ -29,10 +29,10 @@ Dependency-Track is an intelligent Software Supply Chain Component Analysis plat

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| apiserver | object | `{"affinity":{},"emptyDir":{"sizeLimit":"8Gi"},"enabled":true,annotations":{},"env":[],"fullnameOverride":"","image":{"pullPolicy":"IfNotPresent","repository":"dependencytrack/apiserver","tag":"4.6.2"},"initContainers":[],"livenessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"path":"/api/version","periodSeconds":10,"successThreshold":1,"timeoutSeconds":2},"nameOverride":"","nodeSelector":{},"persistentVolume":{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":true,"size":"8Gi","storageClass":""},"podSecurityContext":{"fsGroup":1000},"readinessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"path":"/","periodSeconds":10,"successThreshold":1,"timeoutSeconds":2},"replicaCount":1,"resources":{"limits":{"cpu":4,"memory":"16Gi"},"requests":{"cpu":2,"memory":"4608Mi"}},"securityContext":{"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000},"service":{"annotations":{},"port":80,"type":"ClusterIP"},"serviceAccount":{"annotations":{},"create":true,"name":"apiserver-serviceaccount"},"tolerations":[]}` | config of the apiserver |
| frontend | object | `{"affinity":{},"emptyDir":{"sizeLimit":"8Gi"},"enabled":true,annotations":{},"env":[{"name":"API_BASE_URL","value":""}],"fullnameOverride":"","image":{"pullPolicy":"IfNotPresent","repository":"dependencytrack/frontend","tag":"4.6.1"},"initContainers":[],"livenessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"path":"/","periodSeconds":10,"successThreshold":1,"timeoutSeconds":2},"nameOverride":"","nodeSelector":{},"readinessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"path":"/","periodSeconds":10,"successThreshold":1,"timeoutSeconds":2},"replicaCount":2,"resources":{"limits":{"cpu":1,"memory":"512Mi"},"requests":{"cpu":"100m","memory":"128Mi"}},"securityContext":{"allowPrivilegeEscalation":false,"runAsUser":101},"service":{"annotations":{},"port":80,"type":"ClusterIP"},"serviceAccount":{"annotations":{},"create":true,"name":"frontend-serviceaccount"},"tolerations":[]}` | config of the frontend |
| apiserver | object | `{"affinity":{},"emptyDir":{"sizeLimit":"8Gi"},"enabled":true,annotations":{},"labels": {"app.kubernetes.io/component": "backend"},"env":[],"fullnameOverride":"","image":{"pullPolicy":"IfNotPresent","repository":"dependencytrack/apiserver","tag":"4.6.2"},"initContainers":[],"livenessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"path":"/api/version","periodSeconds":10,"successThreshold":1,"timeoutSeconds":2},"nameOverride":"","nodeSelector":{},"persistentVolume":{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":true,"size":"8Gi","storageClass":""},"podSecurityContext":{"fsGroup":1000},"readinessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"path":"/","periodSeconds":10,"successThreshold":1,"timeoutSeconds":2},"replicaCount":1,"resources":{"limits":{"cpu":4,"memory":"16Gi"},"requests":{"cpu":2,"memory":"4608Mi"}},"securityContext":{"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000},"service":{"annotations":{},"port":80,"type":"ClusterIP"},"serviceAccount":{"annotations":{},"create":true,"name":"apiserver-serviceaccount"},"tolerations":[]}` | config of the apiserver |
| frontend | object | `{"affinity":{},"emptyDir":{"sizeLimit":"8Gi"},"enabled":true,annotations":{},"labels": {"app.kubernetes.io/component": "frontend"},"env":[{"name":"API_BASE_URL","value":""}],"fullnameOverride":"","image":{"pullPolicy":"IfNotPresent","repository":"dependencytrack/frontend","tag":"4.6.1"},"initContainers":[],"livenessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"path":"/","periodSeconds":10,"successThreshold":1,"timeoutSeconds":2},"nameOverride":"","nodeSelector":{},"readinessProbe":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"path":"/","periodSeconds":10,"successThreshold":1,"timeoutSeconds":2},"replicaCount":2,"resources":{"limits":{"cpu":1,"memory":"512Mi"},"requests":{"cpu":"100m","memory":"128Mi"}},"securityContext":{"allowPrivilegeEscalation":false,"runAsUser":101},"service":{"annotations":{},"port":80,"type":"ClusterIP"},"serviceAccount":{"annotations":{},"create":true,"name":"frontend-serviceaccount"},"tolerations":[]}` | config of the frontend |
| frontend.env | list | `[{"name":"API_BASE_URL","value":""}]` | See https://docs.dependencytrack.org/getting-started/configuration/ for frontend ENV variables. |
| global | object | `{"imageRegistry":"docker.io"}` | global configuration |
| global | object | `{"imageRegistry":"docker.io", "labels": {}}` | global configuration |
| ingress | object | `{"annotations":{},"enabled":false,"host":"chart-example.local","tls":{"enabled":false,"secretName":""}}` | configuration of ingress |
| postgresql | object | `{"enabled":true,"postgresqlDatabase":"deptrack","postgresqlPassword":"deptrack","postgresqlUsername":"deptrack"}` | configuration of postgres |

Expand Down
26 changes: 22 additions & 4 deletions charts/dependency-track/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,40 @@
{{- include "common.images.image" ( dict "imageRoot" .Values.frontend.image "global" .Values.global ) -}}
{{- end -}}

{{- define "frontend.labels.user" -}}
{{ if .Values.frontend.labels }}
{{- .Values.frontend.labels | toYaml | indent 0 }}
{{- end }}
{{- if .Values.global.labels }}
{{- .Values.global.labels | toYaml | nindent 0 }}
{{- end }}
{{- end -}}

{{- define "frontend.labels.standard" -}}
{{ include "common.labels.standard" . }}
app.kubernetes.io/component: frontend
{{ include "frontend.labels.user" . }}
{{- end -}}

{{- define "frontend.labels.matchLabels" -}}
{{ include "common.labels.matchLabels" . }}
app.kubernetes.io/component: frontend
{{ include "frontend.labels.user" . }}
{{- end -}}

{{- define "backend.labels.user" -}}
{{ if .Values.apiserver.labels }}
{{- .Values.apiserver.labels | toYaml | indent 0 }}
{{- end }}
{{- if .Values.global.labels }}
{{- .Values.global.labels | toYaml | nindent 0 }}
{{- end }}
{{- end -}}

{{- define "backend.labels.standard" -}}
{{ include "common.labels.standard" . }}
app.kubernetes.io/component: backend
{{ include "backend.labels.user" . }}
{{- end -}}

{{- define "backend.labels.matchLabels" -}}
{{ include "common.labels.matchLabels" . }}
app.kubernetes.io/component: backend
{{ include "backend.labels.user" . }}
{{- end -}}
5 changes: 5 additions & 0 deletions charts/dependency-track/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ global:
imageRegistry: docker.io
# imagePullSecrets:
# - name: "myRegistryKeySecretName"
labels: {}

# -- config of the frontend
frontend:
enabled: true
annotations: {}
replicaCount: 2
labels:
app.kubernetes.io/component: frontend
image:
repository: dependencytrack/frontend
tag: 4.6.1
Expand Down Expand Up @@ -93,6 +96,8 @@ apiserver:
annotations: {}
# Max: 1 - DT is not designed for HA
replicaCount: 1
labels:
app.kubernetes.io/component: backend
image:
repository: dependencytrack/apiserver
tag: 4.6.2
Expand Down

0 comments on commit 44f0309

Please sign in to comment.