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

Update kubernetes proxy.nix to use fqdn for default hostname #325372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

happyearthbytes
Copy link

@happyearthbytes happyearthbytes commented Jul 7, 2024

Description of changes

  • Fix kubernetes proxy default hostname to use fqdn

This fixes the errors:

  • Failed to retrieve node info" err="nodes \\"<hostname>\\" not found
  • Can't determine this node's IP, assuming loopback
Jul 07 18:20:46 nixos-box kube-proxy[38777]: I0707 18:20:46.553759   38777 server_linux.go:69] "Using iptables proxy"
Jul 07 18:20:47 nixos-box kube-proxy[38777]: E0707 18:20:47.588569   38777 server.go:1051] "Failed to retrieve node info" err="nodes \"nixos-box\" is forbidden: User \"system:kube-proxy\" cannot get resource \"nodes\" in API group \"\" a>
Jul 07 18:20:48 nixos-box kube-proxy[38777]: E0707 18:20:48.615340   38777 server.go:1051] "Failed to retrieve node info" err="nodes \"nixos-box\" not found"
Jul 07 18:20:50 nixos-box kube-proxy[38777]: E0707 18:20:50.880253   38777 server.go:1051] "Failed to retrieve node info" err="nodes \"nixos-box\" not found"
Jul 07 18:20:55 nixos-box kube-proxy[38777]: E0707 18:20:55.396714   38777 server.go:1051] "Failed to retrieve node info" err="nodes \"nixos-box\" not found"
Jul 07 18:21:03 nixos-box kube-proxy[38777]: E0707 18:21:03.691568   38777 server.go:1051] "Failed to retrieve node info" err="nodes \"nixos-box\" not found"
Jul 07 18:21:21 nixos-box kube-proxy[38777]: E0707 18:21:21.946483   38777 server.go:1051] "Failed to retrieve node info" err="nodes \"nixos-box\" not found"
Jul 07 18:21:21 nixos-box kube-proxy[38777]: I0707 18:21:21.946505   38777 server.go:1032] "Can't determine this node's IP, assuming loopback; if this is incorrect, please set the --bind-address flag"
Jul 07 18:21:21 nixos-box kube-proxy[38777]: I0707 18:21:21.951239   38777 conntrack.go:59] "Setting nf_conntrack_max" nfConntrackMax=524288
Jul 07 18:21:21 nixos-box kube-proxy[38777]: I0707 18:21:21.957357   38777 server.go:659] "kube-proxy running in dual-stack mode" primary ipFamily="IPv4"

The correct message is now logged:

  • Successfully retrieved node IP(s)
Jul 07 19:00:10 nixos-box kube-proxy[66174]: I0707 19:00:10.805207   66174 server_linux.go:69] "Using iptables proxy"
Jul 07 19:00:11 nixos-box kube-proxy[66174]: I0707 19:00:11.137930   66174 server.go:1062] "Successfully retrieved node IP(s)" IPs=["192.168.1.180"]
Jul 07 19:00:11 nixos-box kube-proxy[66174]: I0707 19:00:11.142006   66174 conntrack.go:59] "Setting nf_conntrack_max" nfConntrackMax=524288
  • Note the startup time improvement between "Using iptables proxy" and "Setting nf_conntrack_max" nfConntrackMax=524288

BEFORE:

18:20:46.553759 Using iptables proxy 
...
18:21:21.951239 "Setting nf_conntrack_max" nfConntrackMax=524288

AFTER:

19:00:10.805207 Using iptables proxy
...
19:00:11.142006 "Setting nf_conntrack_max" nfConntrackMax=524288

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

kubernetes: Fix proxy default hostname to use fqdn
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jul 7, 2024
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jul 7, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jul 8, 2024
@Aleksanaa Aleksanaa requested a review from a team July 12, 2024 09:55
@srhb
Copy link
Contributor

srhb commented Jul 18, 2024

Does this need a release note?

@FliegendeWurst FliegendeWurst added the awaiting_changes (old Marvin label, do not use) label Dec 2, 2024
@SigmaSquadron SigmaSquadron removed the awaiting_changes (old Marvin label, do not use) label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants