Commit Graph

257 Commits

Author SHA1 Message Date
Sjoerd Simons
94dbfebfc2 Add ability to pass configuration options to flannel backend
Allow the flannel backend to be specified as
backend=option=val,option2=val2 to select a given backend with extra options.

In particular this adds the following options to wireguard-native
backend:
* Mode - flannel wireguard tunnel mode
* PersistentKeepaliveInterval- wireguard persistent keepalive interval

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2022-06-16 10:02:12 +02:00
Derek Nola
c9a44790e1 Delay service readiness until after startuphooks have finished (#5724)
* Move startup hooks wg into a runtime pointer, check before notifying systemd
* Switch default systemd notification to server
* Add 1 sec delay to allow etcd to write to disk
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-06-15 13:45:26 -07:00
Manuel Buil
bf272ab137 Merge pull request #5684 from manuelbuil/flannelCNIconf122
[Release 1.22] Add FlannelConfCNI flag
2022-06-15 10:18:39 +02:00
Derek Nola
dd3485c202 add support for pprof server (#5527) (#5691)
Signed-off-by: igor <igor@igor.io>
Signed-off-by: Derek Nola <derek.nola@suse.com>

Co-authored-by: Igor <igorwwwwwwwwwwwwwwwwwwww@users.noreply.github.com>
2022-06-14 17:50:21 -07:00
Manuel Buil
05592ad015 Add FlannelConfCNI flag
Signed-off-by: Manuel Buil <mbuil@suse.com>
2022-06-14 10:27:22 +02:00
Brad Davidson
b004f4d578 Set default egress-selector-mode to agent
... until QA flakes can be addressed.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-10 10:14:51 -07:00
Derek Nola
b1a3ad0aa2 Add new k3s completion command for shell completion (#5592)
* Add shell completion CLI
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-05-23 08:36:15 -07:00
Brad Davidson
b330ce340a Add support for configuring the EgressSelector mode
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 9d7230496d)
2022-05-20 16:39:13 -07:00
Brad Davidson
7168f7282c Move IPv4/v6 selection into helpers
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit b12cd62935)
2022-05-20 16:39:13 -07:00
Derek Nola
0663681a3d Replace rancher with k3s-io (#5585)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-05-19 15:54:21 -07:00
Brad Davidson
8b0b50a5e8 [release-1.22] Fix issue with datastore corruption on cluster-reset (#5517)
* Bump etcd to v3.5.4-k3s1
* Fix issue with datastore corruption on cluster-reset
* Disable unnecessary components during cluster reset

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-27 15:11:41 -07:00
Manuel Buil
d1ee2b6f1b Fix default ipv6 cidr (#5469)
Signed-off-by: Manuel Buil <mbuil@suse.com>
2022-04-20 08:41:54 -07:00
Michal Rostecki
33d61bdb26 netpol: Add dual-stack support
This change allows to define two cluster CIDRs for compatibility with
Kubernetes dual-stuck, with an assumption that two CIDRs are usually
IPv4 and IPv6.

It does that by levearaging changes in out kube-router fork, with the
following downstream release:

https://github.com/k3s-io/kube-router/releases/tag/v1.3.2%2Bk3s

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2022-04-15 14:23:28 -07:00
Roberto Bonafiglia
c030917272 Fixed flannel backend helper text
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-04-14 10:44:16 +02:00
Roberto Bonafiglia
d7e7ddf168 Updated wireguard-native options and added log message
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-04-11 09:54:42 +02:00
Roberto Bonafiglia
5df127ec72 Fixed client URL
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-04-05 10:19:21 +02:00
Roberto Bonafiglia
a8fdf93e15 Updated localhost address on IPv6 only setup
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-04-05 10:18:58 +02:00
Brad Davidson
b0d715e03e Fix etcd-only secrets encryption rotation
Improve feedback when running secrets-encrypt commands on etcd-only nodes, and
allow etcd-only nodes to properly restart when effecting rotation.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e811689df9)
2022-03-25 14:38:07 -07:00
Brad Davidson
11ac5a87b7 Bootstrap the executor even when the agent is disabled
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f090bf2d5e)
2022-03-15 18:08:33 -07:00
Brad Davidson
e323a85116 Fix etcd-snapshot commands by making setup more consistent.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit a7878db17f)
2022-03-15 18:08:33 -07:00
Brad Davidson
83d858a169 Move temporary etcd startup into etcd module
Reuse the existing etcd library code to start up the temporary etcd
server for bootstrap reconcile. This allows us to do proper
health-checking of the datastore on startup, including handling of
alarms.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e4846c92b4)
2022-03-15 18:08:33 -07:00
Brad Davidson
5cb6b1ecbc Fix adding etcd-only node to existing cluster
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5014c9e0e8)
2022-03-15 18:08:33 -07:00
Brad Davidson
ce890d626d Remove unnecessary copies of runtime struct
Several types contained redundant references to ControlRuntime data. Switch to consistently accessing this via config.Runtime instead.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 2989b8b2c5)
2022-03-15 18:08:33 -07:00
Roberto Bonafiglia
82d5f52719 Added ipv6 only support with flannel
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-03-14 11:57:49 +01:00
Olli Janatuinen
ec59241777 Add support for IPv6 only mode
Automatically switch to IPv6 only mode if first node-ip is IPv6 address

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-03-14 11:57:48 +01:00
Derek Nola
5b26c2eb4e Add --json flag for k3s secrets-encrypt status (#5127) (#5198)
* Add json flag for secrets-encrypt status

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-03-03 10:25:33 -08:00
Brian Downs
551cdde8cb add ability to specify etcd snapshot list output format (#5132) (#5179) 2022-02-26 12:29:03 -07:00
Derek Nola
b7f065c64b [Release-1.22] Add --server flag to k3s secrets-encrypt (#5053)
* Update gitignore

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add server flag to access nonlocal/nondefault k3s server (#5016)

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-02-01 10:45:12 -08:00
Roberto Bonafiglia
43f130b965 Merge pull request #4983 from rbrtbnfgl/ipv6-nat_release-1.22
[Release 1.22] Add IPv6 NAT
2022-01-19 08:46:15 +01:00
Brad Davidson
01be2bb6fb Update packaged components
Update images and manifests/charts for coredns, local-path-provisioner, traefik, and pause

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-18 16:46:11 -08:00
Brian Downs
354477adbf Adds the ability to compress etcd snapshots (#4866) (#4960)
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2022-01-18 11:08:37 -07:00
Roberto Bonafiglia
f5475bf6a8 Added flannel-ipv6-masq flag to enable IPv6 nat
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@gmail.com>
2022-01-18 13:10:25 +01:00
Brad Davidson
fb6c72ed13 Skip CGroup v2 evac when agent is disabled
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-14 13:25:03 -08:00
Derek Nola
82f1ec314c Enable logging on all subcommands (#4921) (#4931)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-01-14 09:21:02 -08:00
Brad Davidson
f662a7f45b Move ClusterResetRestore handling ControlConfig setup
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-12 10:46:22 -08:00
Brad Davidson
34ba028da5 Fix use of agent creds for secrets-encrypt and config validate
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-06 13:11:25 -08:00
Hussein Galal
05f1bc6e2a [Release-1.22] Close agentReady channel only in k3s (#4793)
* Close agentReady channel only in k3s

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* codespell check

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-12-21 20:29:17 +02:00
Hussein Galal
9400af4004 Fix snapshot restoration on fresh nodes (#4737)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2021-12-13 18:14:18 -07:00
Hussein Galal
b38bc7ddaa Add validation to certificate rotation (#4700)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-12-09 02:46:24 +02:00
Derek Nola
2561285e8e Backport of https://github.com/k3s-io/k3s/pull/4372 (#4654)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-07 15:29:31 -08:00
Hussein Galal
2dc4e2c3a0 Add cert rotation command (#4495) (#4635)
* Add cert rotation command

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* add function to check for dynamic listener file

Signed-off-by: Brian Downs <brian.downs@gmail.com>

* Add dynamiclistener cert rotation support

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes to the cert rotation

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fix ci tests

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes to certificate rotation command

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* more fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

Co-authored-by: Brian Downs <brian.downs@gmail.com>

Co-authored-by: Brian Downs <brian.downs@gmail.com>
2021-12-06 20:53:29 +02:00
Chris Kim
fdb335d7d8 etcd snapshot functionality enhancements (#4453) (#4605)
Signed-off-by: Chris Kim <oats87g@gmail.com>
2021-11-29 13:29:51 -08:00
Hussein Galal
058f30de03 Fix regression with cluster reset (#4523)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-11-18 02:15:08 +02:00
Manuel Buil
c974abd780 Allow svclb pod to enable ipv6 forwarding
Signed-off-by: Manuel Buil <mbuil@suse.com>
2021-11-17 19:35:37 +01:00
Chris Kim
a1f490df9c [release-1.22] Add etcd extra args support for K3s (#4469)
* Add etcd extra args support for K3s

Signed-off-by: Chris Kim <oats87g@gmail.com>

* Add etcd custom argument integration test

Signed-off-by: Chris Kim <oats87g@gmail.com>
2021-11-11 20:22:12 -08:00
Derek Nola
b0cd1f6eb1 [Release-1.22] Parser improvements, allow config values to be used with etcd-snapshot (#4475)
* Match to last After keyword for parser (#4383)
* Enabled skipping of unknown flags from config in parser
* Added new unit test, expanded existing

Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-11-11 18:47:19 -08:00
Brian Downs
97f494a24d [Release-1.22] All bootstrap backport (#4448)
Add ability to reconcile bootstrap data between datastore and disk (#3398)
2021-11-10 16:20:20 -07:00
Luther Monson
cb0918ae3c [release-1.22] updating to new signals package in wrangler (#4422)
* updating to new signals package in wrangler

Signed-off-by: Luther Monson <luther.monson@gmail.com>
2021-11-08 11:52:54 -07:00
Brad Davidson
5eb13b6ba6 Fix log/reap reexec
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-11-01 14:58:46 -07:00
Brad Davidson
46eea2f10a Revert "Add ability to reconcile bootstrap data between datastore and disk (#3398)"
This reverts commits
9a4ca5978b
c9f6fa0be0
07f844cf95
48355dce10

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-10-27 14:17:12 -07:00