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

Upstream initial fixes #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions certs/kubernetes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let
# Alternative names remain, as they might be useful for debugging purposes
getAltNames "controlplane" ++
getAltNames "loadbalancer" ++
lib.singleton "10.32.0.1" ++
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nixpkgs standard library doesn't contain any functions for manipulating IPv4/6 addresses and CIDRs so I thing this being hardcoded is acceptable until a better solution can be found or such functions are added.

[ "kubernetes" "kubernetes.default" "kubernetes.default.svc" "kubernetes.default.svc.cluster" "kubernetes.svc.cluster.local" ];
};

Expand Down
2 changes: 2 additions & 0 deletions modules/controlplane/apiserver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ in
authorizationMode = [ "RBAC" "Node" "ABAC" ];
authorizationPolicy = corednsPolicies;

allowPrivileged = true;

etcd = {
servers = etcdServers;
caFile = "/var/lib/secrets/kubernetes/apiserver/etcd-ca.pem";
Expand Down
5 changes: 5 additions & 0 deletions modules/controlplane/controller-manager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ in

services.kubernetes.controllerManager = {
enable = true;

# TODO: separate from server keys
serviceAccountKeyFile = "/var/lib/secrets/kubernetes/apiserver/server-key.pem";
rootCaFile = "/var/lib/secrets/kubernetes/ca.pem";

kubeconfig = {
caFile = "/var/lib/secrets/kubernetes/ca.pem";
certFile = "/var/lib/secrets/kubernetes/controller-manager.pem";
Expand Down
6 changes: 3 additions & 3 deletions nixpkgs.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
builtins.fetchGit {
name = "nixos-22.05-2022-05-31";
name = "nixos-22.11-2023-01-15";
url = "https://github.com/NixOS/nixpkgs";
ref = "refs/heads/nixos-22.05";
rev = "08950a6e29cf7bddee466592eb790a417550f7f9";
ref = "refs/heads/nixos-22.11";
rev = "2f9fd351ec37f5d479556cd48be4ca340da59b8f";
}
1 change: 1 addition & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pkgs.mkShell {
# software for testing
etcd
kubectl
openssl

# scripts
ci-lint
Expand Down