-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
nixos/kubernetes: allow configuring cfssl API server SANs #74094
Conversation
Friendly ping @calbrecht @globin |
Hey @jonringer, pinging you on this one for a review, feel free to ignore if it's too out of your depth. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, mostly out of my league
@@ -20,6 +20,7 @@ let | |||
size = 2048; | |||
}; | |||
CN = top.masterAddress; | |||
hosts = cfg.cfsslAPIExtraSANs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to have a tests which demonstrates that this gets correctly used
also, i think the commit/PR name should be:
|
description = '' | ||
Extra x509 Subject Alternative Names to be added to the cfssl API webserver TLS cert. | ||
''; | ||
default = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An example would be nice
Thanks for the initial review. I did the following things:
I can look into adding a test next, but it might take me a while to do that. |
please squash commits |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to correspond with official documentation https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/#create-a-certificate-signing-request
LGTM
@GrahamcOfBorg test kubernetes.dns |
Motivation for this change
services.kubernetes.easyCerts
is really useful to bootstrap a Kubernetes cluster. A common use case in Kubernetes clusters is to have a DNS entry for the master so that nodes can connect to a master that may change address (e.g. in an autoscaling group).Right now this is not easily possible because the master also runs the cfssl API server but doesn't allow registering Subject Alternative Names in its TLS cert.
This PR proposes allowing configuring the extra SANs in this certificate similarly to what's available in the API server:
nixpkgs/nixos/modules/services/cluster/kubernetes/apiserver.nix
Lines 139 to 143 in a3465d9
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @johanot @calbrecht (apologies if spammy, this is my first contribution to nixpkgs and you both were listed as the top committers in
pki.nix
)