Commit Graph

229 Commits

Author SHA1 Message Date
Derek Nola
1e0507c6c0 [Release-1.21] Delay service readiness until after startuphooks have finished (#5725)
* 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 12:36:12 -07:00
Brad Davidson
a8b9e7ef45 Fix initial start of etcd only nodes (#3748)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
(cherry picked from commit 2069cdf4ee)
2022-04-15 16:52:42 -07:00
Michal Rostecki
06fad1b0b7 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:41 -07:00
Roberto Bonafiglia
f37bb416fe Fixed flannel backend helper text
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-04-14 10:43:57 +02:00
Roberto Bonafiglia
5d2469f28e Updated wireguard-native options and added log message
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-04-11 12:24:52 +02:00
Brad Davidson
4ca1f94786 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 15:08:58 -07:00
Brad Davidson
e032704684 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:09:26 -07:00
Brad Davidson
e078a2902f 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:09:26 -07:00
Brad Davidson
198057ac05 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:09:26 -07:00
Brad Davidson
5a7f5fc951 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:09:26 -07:00
Brad Davidson
3f6b5c19d4 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:09:26 -07:00
Derek Nola
0ec1c41cd5 Add --json flag for k3s secrets-encrypt status (#5127) (#5197)
* Add json flag for secrets-encrypt status

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-03-03 10:25:29 -08:00
Brian Downs
1232cbcc3a add ability to specify etcd snapshot list output format (#5132) (#5178) 2022-02-26 12:28:46 -07:00
Derek Nola
42bc5612ff [Release-1.21] Add --server flag to k3s secrets-encrypt (#5054)
* Add server flag to access nonlocal/nondefault k3s server (#5016)

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

* Update gitignore

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-02-01 10:45:00 -08:00
Roberto Bonafiglia
dc970d27ca Merge pull request #4982 from rbrtbnfgl/ipv6-nat_release-1.21
[Release 1.21] Add IPv6 NAT
2022-01-19 08:45:33 +01:00
Brad Davidson
683efbb737 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 17:12:11 -08:00
Brian Downs
900e5ff519 [Release-1.21] Adds the ability to compress etcd snapshots (#4866) (#4959) 2022-01-18 11:08:46 -07:00
Roberto Bonafiglia
bb3fe9b185 Added flannel-ipv6-masq flag to enable IPv6 nat
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@gmail.com>
2022-01-18 16:30:04 +01:00
Brad Davidson
6644357d0e Skip CGroup v2 evac when agent is disabled
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-14 13:25:41 -08:00
Derek Nola
f11f0748e9 Enable logging on all subcommands (#4921) (#4932)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-01-14 09:21:22 -08:00
Brad Davidson
be3c430985 Move ClusterResetRestore handling ControlConfig setup
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-12 12:09:55 -08:00
Brad Davidson
4b3f5be45d Fix use of agent creds for secrets-encrypt and config validate
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-06 14:17:27 -08:00
Hussein Galal
7e9ac115f4 [Release-1.21] Close agentReady channel only in k3s (#4794)
* 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:09 +02:00
Hussein Galal
0d065c8491 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:13:59 -07:00
Hussein Galal
3024462196 Add validation to certificate rotation (#4697)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-12-09 02:45:45 +02:00
Derek Nola
1055837e4f Backport secrets-encrypte command (#4658)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-07 17:21:10 -08:00
Hussein Galal
7b62900836 [Release-1.21] Add cert rotation command (#4632)
* Add cert rotation command (#4495)

* 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>

* Upgrade dynamic listener

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

* go mod tidy

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

Co-authored-by: Brian Downs <brian.downs@gmail.com>
2021-12-06 19:45:21 +02:00
Chris Kim
a622dd57f3 [release-1.21] etcd snapshot functionality enhancements (#4606)
* etcd snapshot functionality enhancements (#4453)

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

* feat: add option to disable s3 over https

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

* Prevent snapshot commands from creating empty snapshot directory (#3783)

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

Co-authored-by: Devin Buhl <devin.kray@gmail.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
2021-11-29 13:30:00 -08:00
Hussein Galal
1847a711e7 Fix regression with cluster reset (#4524)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-11-18 19:21:52 +02:00
Manuel Buil
fd71ed9f4a Allow svclb pod to enable ipv6 forwarding
Signed-off-by: Manuel Buil <mbuil@suse.com>
2021-11-17 19:50:00 +01:00
Manuel Buil
6854470a14 Merge pull request #4503 from manuelbuil/fix_dualStack_bug
[Release 1.21] Fix bug in dual-stack
2021-11-16 10:30:04 +01:00
Manuel Buil
7de34a0059 Fix bug in dual-stack
We forgot to remove the check to allow dual-stack and flannel

Signed-off-by: Manuel Buil <mbuil@suse.com>
2021-11-16 09:11:56 +01:00
Derek Nola
119b1aeb25 [Release-1.21] etcd-snapshot loading config fails with "flag provided but not defined" (#4482)
* Match to last After keyword for parser (#4383)
* Fix to allow etcd-snapshot to use config file with flags that are only used with k3s server. (#4464)

Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-11-12 11:10:37 -08:00
Chris Kim
334eae119a [release-1.21] Add etcd extra args support for K3s (#4471)
* Export cli server flags and etcd restoration functions (#3527)

* Export cli server flags and etfd restoration functions

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

* export S3

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

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

* Add etcd extra args support for K3s

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

* Remove integration test

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

Co-authored-by: Hussein Galal <galal-hussein@users.noreply.github.com>
2021-11-11 20:36:17 -08:00
Brian Downs
864e800896 [Release-1.21] All bootstrap backport (#4452)
Add ability to reconcile bootstrap data between datastore and disk (#3398)
2021-11-10 16:20:46 -07:00
Brad Davidson
df033fa248 Fix log/reap reexec
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-11-01 14:59:08 -07:00
Brad Davidson
bb50c45a6f Revert "Backport bootstrap release 1.21 (#4313)"
This reverts commit
f0ea0a0946

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-10-27 14:17:22 -07:00
Brian Downs
f0ea0a0946 Backport bootstrap release 1.21 (#4313) 2021-10-25 13:03:21 -07:00
Derek Nola
50fb1ce065 Added configuration input to etcd-snapshot (#4280) (#4282)
Signed-off-by: dereknola <derek.nola@suse.com>
2021-10-22 13:08:22 -07:00
Brad Davidson
a18c2efb4c Refactor log and reaper exec to omit MAINPID
Using MAINPID breaks systemd's exit detection, as it stops watching the
original pid, but is unable to watch the new pid as it is not a child
of systemd itself. The best we can do is just notify when execing the child
process.

We also need to consolidate forking into a sigle place so that we don't
end up with multiple levels of child processes if both redirecting log
output and reaping child processes.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit dc18ef2e51)
2021-10-20 14:36:54 -07:00
Brad Davidson
504e249a5e Add containerd ready channel to delay etcd node join
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 88178ae65e)
2021-10-20 11:06:12 -07:00
Brian Downs
4aa9553978 [Release-1.21] - Add etcd s3 timeout (#4207) (#4228) 2021-10-18 10:45:38 -07:00
Hussein Galal
22f7f1c41a Make sure there are no duplicates in etcd member list (#4025) (#4213)
* Make sure there are no duplicates in etcd member list

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

* fix node names with hyphens

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

* use full server name for etcd node name

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-10-14 23:39:24 +02:00
Derek Nola
3ee5098225 Add "etcd-" prefix to etcd-snapshot commands as aliases (#4161) (#4171)
* Add "etcd-" prefix to etcd-snapshot commands as alias

Signed-off-by: dereknola <derek.nola@suse.com>
2021-10-07 12:26:36 -07:00
Brad Davidson
69a9f46bce Don't evacuate the root cgroup when rootless
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-10-01 16:19:07 -07:00
Brad Davidson
38ddda587a Properly handle operation as init process
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-09-28 11:33:45 -07:00
dereknola
8c2f7ac41c Remove experimental from cluster commands
Signed-off-by: dereknola <derek.nola@suse.com>
2021-09-17 15:37:45 -07:00
Brad Davidson
a8a6edfb0d Add missing node name entry to apiserver SAN list
Also honor node-ip when adding the node address to the SAN list, instead
of hardcoding the autodetected IP address.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-09-01 13:22:50 -07:00
Hussein Galal
656c190629 Reset load balancer state during restoraion (#3878)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

Reset load balancer state during restoraion

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-08-18 18:59:03 +02:00
Hussein Galal
cc694b1f09 Notify systemd for etcd only node (#3733)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-30 00:41:52 +02:00