Commit Graph

166 Commits

Author SHA1 Message Date
Christina Sørensen
26036ecf31
kubelet: Set Kubelet Parameters Via A intermediate Configuration File
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2024-02-23 08:55:02 +01:00
Joris Bolsens
81391bd22f nixos/kubernetes: set k8 home permissions correctly 2024-02-15 23:11:59 -08:00
Joris Bolsens
6a11b7a777
nixos/kubernetes: don't delete the apitoken after its created
This was breaking the nixos-kubernetes-node-join script
the token gets copied, and then immediately overridden with /dev/null when certmgr restarts.
2024-02-12 22:50:27 -08:00
Joris Bolsens
1856e7e4b1 nixos/kubernetes: use correct -o option with bash install when copying certs in cfssl prestart script 2024-02-10 01:46:00 -08:00
Sarah Brofeldt
cd5c10f696
Merge pull request #275896 from hoppla20/master
nixos/kubernetes: fix pki's mkSpec function
2024-02-07 18:44:35 +01:00
Felix Buehler
ffadbb6788 kubernetes: prefer 'install' over 'mkdir/chmod/chown' 2024-02-03 11:16:23 +01:00
vincent.cui
9c870ac78f nixos/kubernetes: fix pki's mkSpec function
The `authority.file.path` field of a cert spec is
[defined as follows]
(https://github.com/cloudflare/certmgr/tree/v3.0.3#pki-specs):

> if this is included, the CA certificate will be saved here.
It follows the same file specification format above. Use this
if you want to save your CA cert to disk.

So certmgr fails, because each certmgr spec (apiserver,
addonManager, ...) wants to manage the file at the `cert.caCert`
location. However, the `authority.file.path` field is not needed
for generating a certificate, as the certificate is generated by
the CA, which is reachable at `authority.remote` (e.g.
https://localhost:8888 with `easyCerts = true`). The
`authority.file.path` field just saves the certificate of the CA
to disk.
2023-12-21 22:08:31 +01:00
nicoo
fb85785231 nixos/kubernetes: certmgr-selfsigned is now an alias 2023-12-12 21:17:24 +00:00
Alexandru Scvortov
f9123510db kubernetes: don't always open flannel fw ports 2023-12-02 10:50:56 +00:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
figsoda
701bcdbead nixos: fix typos 2023-05-19 22:31:04 -04:00
Johan Thomsen
0b57240111 nixos/kubernetes: kubelet --container-runtime flag has been removed 2023-04-13 07:21:56 +10:00
Bernardo Meurer
6e55733359
Merge pull request #219747 from Stunkymonkey/deprecate-isNull 2023-03-16 11:10:22 -03:00
Thomas Dy
fbb554fa58 nixos/kubernetes: update coredns 1.7.1 -> 1.10.1 2023-03-14 22:15:43 +10:00
Felix Buehler
d10e69c86b treewide: deprecate isNull
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
2023-03-06 22:40:04 +01:00
pennae
bf4c0c1900 nixos/*: remove trailing period in mkEnableOptions
those are added by mkEnableOption, and .. is replaced to … by markdown
processing.
2023-02-08 15:23:34 +01:00
figsoda
6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Daniel Nagy
ad866e565d
treewide: switch to port type for nixos modules 2022-12-08 00:00:00 +01:00
Daniel Nagy
b4674b39c1
treewide: use mkEnableOption in nixos modules 2022-11-10 09:30:00 +01:00
Robert Hensing
93a905ec4f
Merge pull request #194759 from hercules-ci/fqdn-or-hostname
nixos: Add `networking.fqdnOrHostName`
2022-11-09 13:53:57 +01:00
zowoq
6f983050bb nixos/kubernetes: use package from config 2022-10-16 12:38:50 +10:00
Johan Thomsen
ae712870af nixos/kubernetes: drop obsolete options/cmdline flags 2022-10-16 10:13:05 +10:00
Robert Hensing
fec3f62d38 nixos/kubelet: Refactor to use config.networking.fqdnOrHostName 2022-10-06 16:24:31 +02:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
pennae
51a11254a7 nixos/*: literalDocBook -> literalMD
no change to rendered output
2022-08-27 19:18:29 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
zowoq
e2659eea36 nixos/kubernetes: use copyToRoot instead of deprecated contents 2022-07-15 10:23:06 +10:00
zowoq
ec2028eb3c nixos/kubernetes: use kubectl from kubernetes
- also clarify kubectl wrapper naming
2022-02-25 19:22:30 +10:00
Sarah Brofeldt
152dd4c81d 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.
2022-02-15 08:31:49 +01:00
Thomas Dy
97864e984d nixos/kubernetes: actually set containerd to use systemd cgroups
The correct configuration is listed in the kubernetes documentation
https://kubernetes.io/docs/setup/production-environment/container-runtimes/#containerd-systemd

The correct option can also be seen in `containerd config default`
2022-01-08 17:29:32 +10:00
pennae
2d356a1969 nixos/kubernetes: move all k8s docs out of the sandbox
otherwise the manual won't build.

ideally they'll move back into the sandbox at some point, but we're
obviously not qualified to put them there.
2022-01-08 17:13:27 +10:00
pennae
635376d3af Revert "nixos/kubernetes: make lib option internal and readonly"
This reverts commit 7e28421e17.
2022-01-08 17:13:27 +10:00
Robert Hensing
70d27303da
Merge pull request #149532 from pennae/split-docs-build
nixos/*: split docs build
2022-01-04 22:33:23 +01:00
zowoq
45dbb95515 nixos/kubernetes: remove dashboard 2021-12-30 18:51:03 +10:00
pennae
7e28421e17 nixos/kubernetes: make lib option internal and readonly
this set almost certainly shouldn't be touched by users, nor listed in
the manual. make it internal and use it only through the option path to
make clear that this should not be modified.
2021-12-29 20:12:02 +01:00
pennae
abef4b10b6 nixos/kubernetes: add missing defaultText to expression default 2021-12-29 19:57:55 +01:00
Graham Christensen
06edb74413
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
2021-12-17 11:14:08 -05:00
pennae
2d564521c0 treewide: add literalDocBook text to options with complex defaults
some options have default that are best described in prose, such as
defaults that depend on the system stateVersion, defaults that are
derivations specific to the surrounding context, or those where the
expression is much longer and harder to understand than a simple text
snippet.
2021-12-09 01:38:24 +01:00
pennae
ed673a69db treewide: add defaultText for options with simple cfg.* expression defaults
adds defaultText for options with defaults that use only literals, full config.*
paths, and the cfg shortcut binding.
2021-12-09 01:14:16 +01:00
pennae
f6d0b014fe nixos/kubernetes: add defaultText for addons options using top.*
the kubernetes modules cross-reference their config using an additional shortcut
binding `top = config.services.kubernetes`, expand those to defaultText like
`cfg` previously.
2021-12-09 01:13:12 +01:00
pennae
e24a8775a8 treewide: set defaultText for options using simple path defaults
adds defaultText for all options that set their default to a path expression
using the ubiquitous `cfg` shortcut bindings.
2021-12-09 01:12:13 +01:00
pennae
2512455639 nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
Sandro
95382df163
Merge pull request #138125 from juselius/unified-cgroup-fix 2021-11-13 21:21:28 +01:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
rnhmjoj
6de529c64a
nixos/kubernetes: fix containerd settings
mkDefault must be applied to each setting individually, otherwise a
single change to `containerd.settings` replaces the whole attribute set.
2021-09-23 00:21:40 +02:00
rnhmjoj
5abd562a18
nixos/kubernetes: fix deprecation warning
The option `containerd.configFile` has been replaced by an equivalent
`settings` attribute set.
2021-09-22 16:11:49 +02:00
Jonas Juselius
e922fad914 kubelet: Disable cgroupsv2 for kubelet hosts 2021-09-16 13:05:01 +02:00
zowoq
07109dd495 nixos/kubernetes: add cni-plugin-flannel to kubelet.cni.packages
the flannel plugin was removed from `cni-plugins` in ee8ed2cd8d
2021-09-12 12:47:45 +10:00
Alexandru Scvortov
8afd31c625 kubernetes: fix flaky test and run tests as group 2021-08-16 14:59:58 +01:00
Alexandru Scvortov
6c38bb6d5d kubernetes: fix breakage introduced by upgrade to 1.22 2021-08-13 17:55:03 +01:00