Skip to content

Commit

Permalink
Webhook provider helm chart fixes
Browse files Browse the repository at this point in the history
- Add webhook metrics port to service
- Correct webhook metric port in servicemonitor
- Use correct imagePullPolicy value for webhook container
  • Loading branch information
kimsondrup committed Aug 15, 2024
1 parent ee76335 commit dadb225
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/external-dns/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ spec:
{{- with .Values.provider.webhook }}
- name: webhook
image: {{ include "external-dns.webhookImage" . }}
imagePullPolicy: {{ $.Values.image.pullPolicy }}
imagePullPolicy: {{ .image.pullPolicy }}
{{- with .env }}
env:
{{- toYaml . | nindent 12 }}
Expand Down
9 changes: 9 additions & 0 deletions charts/external-dns/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $providerName := include "external-dns.providerName" . }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -25,3 +26,11 @@ spec:
port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
{{- if eq $providerName "webhook" }}
{{- with .Values.provider.webhook.service }}
- name: http-webhook
port: {{ .metricsPort }}
targetPort: http-webhook
protocol: TCP
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/external-dns/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
{{- end }}
{{- if eq $providerName "webhook" }}
{{- with .Values.provider.webhook.serviceMonitor }}
- port: webhook-metrics
- port: http-webhook
path: /metrics
{{- with .interval }}
interval: {{ . }}
Expand Down
2 changes: 2 additions & 0 deletions charts/external-dns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ provider:
scrapeTimeout:
metricRelabelings: []
relabelings: []
service:
metricsPort: 8080

# -- Extra arguments to provide to _ExternalDNS_.
extraArgs: []
Expand Down

0 comments on commit dadb225

Please sign in to comment.