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

In eip_controlplane_reconciliation : GET /healthz check unauthenticated OR authenticated #519

Open
hh opened this issue Mar 6, 2024 · 2 comments

Comments

@hh
Copy link

hh commented Mar 6, 2024

Currently we only perform an unauthenticated check here:

req, err := http.NewRequest("GET", healthCheckAddress, nil)

While the default for upstream kubernetes allows anonymous.

See https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/

--anonymous-auth     Default: true
Enables anonymous requests to the secure port of the API server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated.

Talos and possibly other Kubernetes distribution disable unauthenticated access to the Kubernetes API.

I suggest trying an unauthenticated request first, and if that fails, try authenticated with the credentials available to the CCM pod.

@hh
Copy link
Author

hh commented Apr 11, 2024

We fixed this previously by adding the following:

https://github.com/sharingio/infra/blob/main/terraform/equinix-metal-talos-cluster/main.tf#L161-L164

cluster:
    apiServer:
        extraArgs:
            anonymous-auth: true

@hh
Copy link
Author

hh commented Apr 11, 2024

This should probably get documented somewhere in the Equinix + Talos deployment pages, I'll see what I can find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant