Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configure external databases instead of using internal microservice #111

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/dependency-track/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Dependency-Track is an intelligent Software Supply Chain Component Analysis plat
| frontend | object | `{"affinity":{},"emptyDir":{"sizeLimit":"8Gi"},"enabled":true,"env":[{"name":"API_BASE_URL","value":""}],"fullnameOverride":"","image":{"pullPolicy":"IfNotPresent","repository":"dependencytrack/frontend","tag":"4.3.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 |
| global | object | `{"imageRegistry":"docker.io"}` | 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 |
| postgresql | object | `{"enabled":true,"postgresqlDatabase":"deptrack","postgresqlPassword":"deptrack","postgresqlUsername":"deptrack","postgresqlHost":"<optional>" }` | configuration of postgres |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
19 changes: 19 additions & 0 deletions charts/dependency-track/templates/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ spec:
- name: ALPINE_DATA_DIRECTORY
value: "/data"
{{- if .Values.postgresql.enabled }}
{{- if not .Values.postgresqlHost }}
- name: ALPINE_DATABASE_MODE
value: "external"
- name: ALPINE_DATABASE_DRIVER
Expand All @@ -49,6 +50,24 @@ spec:
- name: ALPINE_DATABASE_USERNAME
value: {{ .Values.postgresql.postgresqlUsername }}
{{- end }}
{{- end }}
{{- if not .Values.postgresql.enabled }}
{{- if .Values.postgresql.postgresqlHost }}
- name: ALPINE_DATABASE_MODE
value: "external"
- name: ALPINE_DATABASE_DRIVER
value: "org.postgresql.Driver"
- name: ALPINE_DATABASE_URL
value: jdbc:postgresql://{{ .Values.postgresql.postgresqlHost}}/{{ .Values.postgresql.postgresqlDatabase }}
- name: ALPINE_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-postgresql
key: postgresql-password
- name: ALPINE_DATABASE_USERNAME
value: {{ .Values.postgresql.postgresqlUsername }}
{{- end }}
{{- end }}
{{- with .Values.apiserver.env }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions charts/dependency-track/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,4 @@ postgresql:
postgresqlUsername: deptrack
postgresqlPassword: deptrack
postgresqlDatabase: deptrack
# postgresqlHost: # configure for external postgresql database. Set enabled to false.