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

Helm Chart Webhook Provider port mismatch #4764

Closed
Skaronator opened this issue Sep 20, 2024 · 2 comments
Closed

Helm Chart Webhook Provider port mismatch #4764

Skaronator opened this issue Sep 20, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Skaronator
Copy link

Skaronator commented Sep 20, 2024

What happened:

External-dns uses a hardcoded port (8888) for Webhook providers:

webhookapi.StartHTTPApi(p, nil, cfg.WebhookProviderReadTimeout, cfg.WebhookProviderWriteTimeout, "127.0.0.1:8888")

However, the Helm chart defines a liveness probe for the webhook provider on port 8080:

This inconsistency results in a CrashLoopBackOff, as the health check is looking for the service on port 8080, while the actual service runs on port 8888.

What you expected to happen:

Both ports are hardcoded and should be aligned to avoid this issue.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

@mloiseleur
Copy link
Contributor

The documentation explain the purpose of those two ports:

The default recommended port is 8888, and should listen only on localhost (ie: only accessible for k8s probes and external-dns).

And

The metrics should listen “:8080” on /metrics following Open Metrics format.

For security reason, only this metrics port is exposed in the Chart. It allows API port to listen only for localhost, so only external-dns can call it. The metrics port is not sensitive, so it can listen more widely without any risk.

ports:
- name: http-webhook
protocol: TCP
containerPort: 8080

The probes are entirely configurable:

livenessProbe:
httpGet:
path: /healthz
port: http-webhook
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 2
successThreshold: 1

So I am not sure to get your issue. There is no mismatch, it's done on purpose, for security reason.

@Skaronator
Copy link
Author

Thanks for the detailed explanation, that makes sense! I raised an issue with the webhook provider I use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants