Skip to content

Commit

Permalink
Use port names in Helm chart (#9190)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastien-prudhomme committed Dec 22, 2023
1 parent fbb904a commit 55cdcbd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 7 additions & 3 deletions helm/defectdojo/templates/django-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ spec:
image: {{ .Values.monitoring.prometheus.image }}
imagePullPolicy: {{ .Values.monitoring.prometheus.imagePullPolicy }}
command: [ '/usr/bin/nginx-prometheus-exporter', '-nginx.scrape-uri', 'http://127.0.0.1:8080/nginx_status']
ports:
- name: http-metrics
protocol: TCP
containerPort: 9113
livenessProbe:
httpGet:
path: /metrics
port: 9113
port: http-metrics
periodSeconds: 20
initialDelaySeconds: 15
timeoutSeconds: 5
Expand Down Expand Up @@ -144,7 +148,7 @@ spec:
mountPath: {{.Values.extraConfigs.DD_MEDIA_ROOT | default "/app/media" | quote }}
{{- end }}
ports:
- name: http
- name: http-uwsgi
protocol: TCP
containerPort: 8081
{{- if .Values.django.uwsgi.enable_debug }}
Expand Down Expand Up @@ -207,7 +211,7 @@ spec:
livenessProbe:
httpGet:
path: /login?force_login_form&next=/
port: http
port: http-uwsgi
httpHeaders:
- name: Host
value: {{ .Values.host }}
Expand Down
9 changes: 7 additions & 2 deletions helm/defectdojo/templates/django-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ spec:
protocol: TCP
{{- if .Values.django.nginx.tls.enabled }}
port: 443
targetPort: 8443
{{- else }}
port: 80
targetPort: 8080
{{- end }}
targetPort: http
{{- if and .Values.monitoring.enabled .Values.monitoring.prometheus.enabled }}
- name: http-metrics
protocol: TCP
port: 9113
targetPort: http-metrics
{{- end }}
{{- if .Values.django.serviceType }}
type: {{ .Values.django.serviceType }}
Expand Down

0 comments on commit 55cdcbd

Please sign in to comment.