Commit Graph

1768 Commits

Author SHA1 Message Date
galal-hussein
fad2a046c3 update master to 1.20.4
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-02-23 23:31:08 -08:00
David Nuzik
f9fdb94df2
Merge pull request #2972 from galal-hussein/update_stable
mark v1.20.4-k3s1 as stable
2021-02-23 12:44:30 -07:00
galal-hussein
236a2e3abe use v1.20.4-k3s1 as stable
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-02-23 20:24:25 +02:00
Brad Davidson
0f55f167fd Update k3s-root to v0.8.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-18 09:46:15 -08:00
Brad Davidson
88dd601941 Limit zstd decoder memory
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-17 11:48:03 -08:00
Brad Davidson
ae5b93a264 Use HasSuffixI utility function
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-17 11:48:03 -08:00
Brad Davidson
ec661c67d7 Add support for retagging images on load from tarball
Adds support for retagging images to appear to have been sourced from
one or more additional registries as they are imported from the tarball.
This is intended to support RKE2 use cases with system-default-registry
where the images need to appear to have been pulled from a registry
other than docker.io.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-17 11:48:03 -08:00
Hussein Galal
5749f66aa3
Add disable flags for control components (#2900)
* Add disable flags to control components

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

* golint

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

* more fixes

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

* fixes to disable flags

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

* Add comments to functions

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

* Fix joining problem

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

* more fixes

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

* golint

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

* fix ticker

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

* fix role labels

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

* more fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-02-12 17:35:57 +02:00
Brian Downs
21d1690d5d
update usage text (#2926)
update to the --cluster-init usage flag to indicate it's for Etcd
2021-02-10 15:54:04 -07:00
Brad Davidson
6e768c301e Use appropriate response codes for authn/authz failures
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-09 16:28:20 -08:00
Brad Davidson
374271e9a0
Collect IPs from all pods before deciding to use internal or external addresses (#2909)
* Collect IPs from all pods before deciding to use internal or external addresses

@Taloth correctly noted that the code that iterates over ServiceLB pods
to collect IP addresses was failing to add additional internal IPs once
the map contained ANY entry from a previous node. This may date back to
when ServiceLB used a Deployment instead of a DaemonSet, so there was
only ever a single pod.

The new behavior is to collect all internal and external IPs, and then
construct the address list of a single type - external if there are any,
otherwise internal.

https://github.com/k3s-io/k3s/issues/1652#issuecomment-774497788

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Co-authored-by: Brian Downs <brian.downs@gmail.com>
2021-02-09 16:26:57 -08:00
Brad Davidson
e06119729b
Improve handling of comounted cpu,cpuacct controllers (#2911)
* Improve handling of comounted cpu,cpuacct controllers

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-09 16:12:58 -08:00
Erik Wilson
41fd27ab56
Merge pull request #2913 from erikwilson/vagrant-opensuse15
Add opensuse 15 vagrant provision
2021-02-09 13:36:36 -07:00
Erik Wilson
473e340acd
Add opensuse 15 vagrant provision 2021-02-09 13:07:32 -07:00
Brad Davidson
ad5e504cf0
Allow joining clusters when the server CA is trusted by the OS CA bundle (#2743)
* Add tests to clientaccess/token
* Fix issues in clientaccess/token identified by tests
* Update tests to close coverage gaps
* Remove redundant check turned up by code coverage reports
* Add warnings if CA hash will not be validated

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-08 22:28:57 -08:00
Brad Davidson
6c472b5942 Use zstd instead of gzip for embedded tarball
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-08 21:08:35 -08:00
Brad Davidson
1d85a6a30a Bump golang to 1.15.8
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-08 09:52:09 -08:00
Brad Davidson
6108045cb2 Fix multiple issues with CLI wrapper data-dir handling
We also need to be more careful about setting the crictl.yaml path,
as it doesn't have kubectl's nice behavior of checking multiple
locations. It's not safe to assume that it's in the user's home data-dir
just because we're not running as root.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-06 11:53:42 -08:00
Brad Davidson
c5e2676d5c
Update local-path-provisioner and helper busybox (#2885)
* Update local-path-provisioner and helper busybox

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-04 10:49:25 -08:00
Akihiro Suda
732228fd15 systemd unit: make EnvironmentFile optional
Previously, k3s.service was failing when the EnvironmentFile does not exist:
```
Feb 02 17:17:30 suda-ws01 systemd[1]: k3s.service: Failed to load environment files: No such file or directory
Feb 02 17:17:30 suda-ws01 systemd[1]: k3s.service: Failed to run 'start' task: No such file or directory
Feb 02 17:17:30 suda-ws01 systemd[1]: k3s.service: Failed with result 'resources'.
Feb 02 17:17:30 suda-ws01 systemd[1]: Failed to start Lightweight Kubernetes.
```

ref: https://unix.stackexchange.com/questions/404199/documentation-of-equals-minus-in-systemd-unit-files

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-02-03 13:41:23 -08:00
Brad Davidson
65c78cc397 Replace options.KubeRouterConfig with config.Node and remove metrics/waitgroup stuff
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-03 10:41:51 -08:00
Brad Davidson
07256cf7ab Add ServiceIPRange and ServiceNodePortRange to agent config
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-03 10:41:51 -08:00
Brad Davidson
95a1a86847 Spell check upstream code
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-03 10:41:51 -08:00
Brad Davidson
29483d0651 Initial update of netpol and utils from upstream
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-03 10:41:51 -08:00
Brad Davidson
740b654d47 Update containerd to fix AppArmor on SLES
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-29 16:33:33 -08:00
Brad Davidson
2555ffe9f8 Bump k3s-root to v0.8.0
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-26 15:54:48 -08:00
Akihiro Suda
f3c41b7650 fix cgroup2 support
Fix issue 900

cgroup2 support was introduced in PR 2584, but got broken in f3de60ff31

It was failing with "F1210 19:13:37.305388    4955 server.go:181] cannot set feature gate SupportPodPidsLimit to false, feature is locked to true"

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-01-25 22:45:07 -08:00
Brad Davidson
e8e34a549a Update k3s-root to v0.7.3
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-22 21:21:25 -08:00
Akihiro Suda
728ebcc027 rootless: remove rootful /run/{netns,containerd} symlinks
Since a recent commit, rootless mode was failing with the following errors:

```
E0122 22:59:47.615567      21 kuberuntime_manager.go:755] createPodSandbox for pod "helm-install-traefik-wf8lc_kube-system(9de0a1b2-e2a2-4ea5-8fb6-22c9272a182f)" failed: rpc error: code = Unknown desc = failed to create network namespace for sandbox "285ab835609387f82d304bac1fefa5fb2a6c49a542a9921995d0c35d33c683d5": failed to setup netns: open /var/run/netns/cni-c628a228-651e-e03e-d27d-bb5e87281846: permission denied
...
E0122 23:31:34.027814      21 pod_workers.go:191] Error syncing pod 1a77d21f-ff3d-4475-9749-224229ddc31a ("coredns-854c77959c-w4d7g_kube-system(1a77d21f-ff3d-4475-9749-224229ddc31a)"), skipping: failed to "CreatePodSandbox" for "coredns-854c77959c-w4d7g_kube-system(1a77d21f-ff3d-4475-9749-224229ddc31a)" with CreatePodSandboxError: "CreatePodSandbox for pod \"coredns-854c77959c-w4d7g_kube-system(1a77d21f-ff3d-4475-9749-224229ddc31a)\" failed: rpc error: code = Unknown desc = failed to create containerd task: io.containerd.runc.v2: create new shim socket: listen unix /run/containerd/s/8f0e40e11a69738407f1ebaf31ced3f08c29bb62022058813314fb004f93c422: bind: permission denied\n: exit status 1: unknown"
```

Remove symlinks to /run/{netns,containerd} so that rootless mode can create their own /run/{netns,containerd}.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-01-22 19:51:43 -08:00
Brad Davidson
071de833ae Fix typo in field tag
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-22 19:38:37 -08:00
Brad Davidson
8011697175 Only container-runtime-endpoint wants RuntimeSocket path as URI
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-22 18:56:30 -08:00
Yuriy
06fda7accf
Add functionality to bind custom IP address for Etcd metrics endpoint (#2750)
* Add functionality to bind custom IP address for Etcd metrics endpoint

Signed-off-by: yuriydzobak <yurii.dzobak@lotusflare.com>
2021-01-22 17:40:48 -08:00
Brad Davidson
f152f656a0
Replace k3s cloud provider wrangler controller with core node informer (#2843)
* Replace k3s cloud provider wrangler controller with core node informer

Upstream k8s has exposed an interface for cloud providers to access the
cloud controller manager's node cache and shared informer since
Kubernetes 1.9. This is used by all the other in-tree cloud providers;
we should use it too instead of running a dedicated wrangler controller.

Doing so also appears to fix an intermittent issue with the uninitialized
taint not getting cleared on nodes in CI.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-22 16:59:48 -08:00
Brad Davidson
fd991cb964 Improve sonobuoy status output handling
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-22 16:13:36 -08:00
Brad Davidson
97a606bac1 Update sonobuoy version for v1.20.0
Also drop the rancher-mirrored sonobuoy image since CI has a
pull-through image cache now.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-22 16:13:36 -08:00
Brian Downs
13229019f8
Add ability to perform an etcd on-demand snapshot via cli (#2819)
* add ability to perform an etcd on-demand snapshot via cli
2021-01-21 14:09:15 -07:00
David Nuzik
84f6655342
Merge pull request #2821 from MonzElmasry/mark_1.20.2
mark k3s v1.20.2 as stable
2021-01-21 09:18:46 -07:00
Waqar Ahmed
3ea696815b Do not validate snapshotter argument if docker is enabled
Problem:
While using ZFS on debian and K3s with docker, I am unable to get k3s working as the snapshotter value is being validated and the validation fails.

Solution:
We should not validate snapshotter value if we are using docker as it's a no-op in that case.

Signed-off-by: Waqar Ahmed <waqarahmedjoyia@live.com>
2021-01-20 12:25:28 -08:00
Chin-Ya Huang
2cf61689c5 Fix typo
Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
2021-01-20 12:24:31 -08:00
MonzElmasry
4c8ebe2dfb
mark k3s v1.20.02 as stable
Signed-off-by: MonzElmasry <menna.elmasry@rancher.com>
2021-01-15 23:37:18 +02:00
Brad Davidson
1d4adb0301 Update Kubernetes to v1.20.2-k3s1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-13 21:31:53 -08:00
Brad Davidson
26d45287b6
Update helm-controller to v0.8.3 (#2793)
* Update helm-controller to v0.8.3
* Update klipper-helm image

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-11 12:09:39 -08:00
Erik Wilson
c71060f288
Merge pull request #2744 from erikwilson/rke2-node-password-bootstrap
Bootstrap node password with local file
2021-01-11 09:51:30 -07:00
Menna Elmasry
5d6255df61
Merge pull request #2784 from MonzElmasry/etcd-dir
change etcd dir permission if it exists
2021-01-09 00:45:09 +02:00
MonzElmasry
86f68d5d62
change etcd dir permission if it exists
Signed-off-by: MonzElmasry <menna.elmasry@rancher.com>
2021-01-08 23:47:36 +02:00
JenTing Hsiao
3c7fd3d37b Fix normal user with --rootless or --disable-agent have no permission to start
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-01-08 00:47:18 -08:00
Erik Wilson
6dabf7ac61
Merge pull request #2526 from erikwilson/diagnostics-script
Add diagnostics collection
2021-01-05 11:57:53 -07:00
Brad Davidson
1bb026fd1f Add v1.20 channel and mark as stable
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-01-04 16:04:21 -08:00
JenTing Hsiao
578e116e20 Fix typo
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-01-04 11:11:50 -08:00
Erik Wilson
4245fd7b67 Return http.StatusOK instead of 0
Signed-off-by: Erik Wilson <Erik.E.Wilson@gmail.com>
2020-12-23 16:55:47 -07:00