From 2fea3f30b571a60f78b2c3fa2aac5c005cf94cf2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 12 Feb 2022 05:44:13 +0000 Subject: [PATCH 1/2] kubernetes: 1.22.6 -> 1.23.3 --- pkgs/applications/networking/cluster/kubernetes/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/kubernetes/default.nix b/pkgs/applications/networking/cluster/kubernetes/default.nix index 069b57a6b5e3..adad3ae679d7 100644 --- a/pkgs/applications/networking/cluster/kubernetes/default.nix +++ b/pkgs/applications/networking/cluster/kubernetes/default.nix @@ -21,13 +21,13 @@ stdenv.mkDerivation rec { pname = "kubernetes"; - version = "1.22.6"; + version = "1.23.3"; src = fetchFromGitHub { owner = "kubernetes"; repo = "kubernetes"; rev = "v${version}"; - sha256 = "sha256-NL00GOdkVLVHTlj1RK1+stssioy+0xbtiKn4FZnCuzs="; + sha256 = "sha256-Ccf+9mwDv1Fs0+xN8yDkUjh4A3aGox7rBGesyYtkUDs="; }; nativeBuildInputs = [ removeReferencesTo makeWrapper which go rsync installShellFiles ]; From 152dd4c81daa1c24d6ff65c3771070e8f4f7f098 Mon Sep 17 00:00:00 2001 From: Sarah Brofeldt Date: Tue, 15 Feb 2022 08:21:09 +0100 Subject: [PATCH 2/2] nixos/kubernetes: Update deprecated scheduler opts --port and --address have both been deprecated and are nonfunctional starting with kubernetes 1.23. Use --secure-port and --bind-address instead. This means that users can no longer rely on the insecure port for anything, so update the release notes accordingly. --- .../manual/from_md/release-notes/rl-2205.section.xml | 11 +++++++++++ nixos/doc/manual/release-notes/rl-2205.section.md | 2 ++ .../modules/services/cluster/kubernetes/scheduler.nix | 4 ++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 50cf06c94eed..7ac06869055b 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -278,6 +278,17 @@ removed due to it being an outdated version. + + + services.kubernetes.scheduler.{port,address} + now set --secure-port and + --bind-address instead of + --port and --address, + since the former have been deprecated and are no longer + functional in kubernetes>=1.23. Ensure that you are not + relying on the insecure behaviour before upgrading. + + The DHCP server (services.dhcpd4, diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 4f8b098958c2..7d6410ca16c2 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -96,6 +96,8 @@ In addition to numerous new and upgraded packages, this release has the followin - `services.kubernetes.addons.dashboard` was removed due to it being an outdated version. +- `services.kubernetes.scheduler.{port,address}` now set `--secure-port` and `--bind-address` instead of `--port` and `--address`, since the former have been deprecated and are no longer functional in kubernetes>=1.23. Ensure that you are not relying on the insecure behaviour before upgrading. + - The DHCP server (`services.dhcpd4`, `services.dhcpd6`) has been hardened. The service is now using the systemd's `DynamicUser` mechanism to run as an unprivileged dynamically-allocated user with limited capabilities. The dhcpd state files are now always stored in `/var/lib/dhcpd{4,6}` and the `services.dhcpd4.stateDir` and `service.dhcpd6.stateDir` options have been removed. diff --git a/nixos/modules/services/cluster/kubernetes/scheduler.nix b/nixos/modules/services/cluster/kubernetes/scheduler.nix index 2a522f1db89c..2d95528a6ead 100644 --- a/nixos/modules/services/cluster/kubernetes/scheduler.nix +++ b/nixos/modules/services/cluster/kubernetes/scheduler.nix @@ -66,12 +66,12 @@ in serviceConfig = { Slice = "kubernetes.slice"; ExecStart = ''${top.package}/bin/kube-scheduler \ - --address=${cfg.address} \ + --bind-address=${cfg.address} \ ${optionalString (cfg.featureGates != []) "--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.featureGates}"} \ --kubeconfig=${top.lib.mkKubeConfig "kube-scheduler" cfg.kubeconfig} \ --leader-elect=${boolToString cfg.leaderElect} \ - --port=${toString cfg.port} \ + --secure-port=${toString cfg.port} \ ${optionalString (cfg.verbosity != null) "--v=${toString cfg.verbosity}"} \ ${cfg.extraOpts} '';