Commit Graph

919 Commits (k3s-v1.15.3)

Author SHA1 Message Date
Darren Shepherd 8cef2e14c4 kubelet: new feature gate: SupportNoneCgroupDriver
The "none" driver is expected to be used in "rootless" mode until OCI/CRI runtime
get support for cgroup2 (unified) mode with nsdelegate.

Even after cgroup2 gets supported in the ecosystem, the "none" driver will remain
because nested containers might not always get support for cgroup2 (via systemd).

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>

# Conflicts:
#	cmd/kubelet/app/server.go
#	pkg/features/kube_features.go
2019-08-27 09:33:37 -07:00
Lubomir I. Ivanov c36a584d7a kubeadm: apply a number of _test fixes
- common_test.go: use constants.CurrentKubernetesVersion
- diff_test.go: write temporary files instead of using testdata.
this allows us to not have to bump kubernetesVersions in the
testdata files (now removed)
- policy_test.go: apply fixes to tests that were previously passing,
but a bump in constants.go breaks them. these tests now work
for any version.
2019-08-01 05:56:29 +03:00
SataQiu 8f205dbb59 kubeadm: improve kubeadm command output 2019-06-25 22:13:15 +08:00
Kubernetes Prow Robot 4f29960cb2
Merge pull request #78915 from ereslibre/retry-configmap-get-on-unauthorized
kubeadm: Add ability to retry ConfigMap get if certain errors happen
2019-06-12 13:00:19 -07:00
Rafael Fernández López 26c9965a97
kubeadm: Add ability to retry ConfigMap get if certain errors happen
During the control plane joins, sometimes the control plane returns an
expected error when trying to download the `kubeadm-config` ConfigMap.
This is a workaround for this issue until the root cause is completely
identified and fixed.

Ideally, this commit should be reverted in the near future.
2019-06-12 17:49:27 +02:00
Sandeep Rajan 77466d4a65 [kubeadm] Add the upstream option in CoreDNS configmap 2019-06-11 21:19:43 -04:00
Kubernetes Prow Robot 16aeec2485
Merge pull request #78545 from neolit123/kubeadm-revert-coredns-1.3.1
kubeadm: revert CoreDNS to 1.3.1
2019-06-03 14:51:29 -07:00
Ricardo Pchevuzinske Katz 82c42bb6ee Remove deprecated flag --conntrack-max from kube-proxy 2019-06-01 18:10:28 -03:00
Lubomir I. Ivanov a49bc480b9 kubeadm: revert CoreDNS to 1.3.1 2019-05-30 23:31:54 +03:00
fabriziopandini c2faa3bfd1 kubeadm upgrade node 2019-05-29 22:06:42 +02:00
Rostislav M. Georgiev 5671ea9cf1 kubeadm: Remove ClusterConfiguration from InitConfiguration in v1beta2
Ever since v1alpha3, InitConfiguration is containing ClusterConfiguration
embedded in it. This was done to mimic the internal InitConfiguration, which in
turn is used throughout the kubeadm code base as if it is the old
MasterConfiguration of v1alpha2.

This, however, is confusing to users who vendor in kubeadm as the embedded
ClusterConfiguration inside InitConfiguration is not marshalled to YAML.
For this to happen, special care must be taken for the ClusterConfiguration
field to marshalled separately.

Thus, to make things smooth for users and to reduce third party exposure to
technical debt, this change removes ClusterConfiguration embedding from
InitConfiguration.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-05-29 12:13:37 +03:00
Kubernetes Prow Robot 81a61ae0e3
Merge pull request #77863 from fabriziopandini/certs-expiration
Kubeadm: Add check certificate expiration command
2019-05-19 12:47:10 -07:00
fabriziopandini e4d87b0804 autogenerated 2019-05-18 16:28:44 +02:00
fabriziopandini 919826531c certs-expiration 2019-05-18 16:28:33 +02:00
Sandeep Rajan 0b28419412 bump coredns version to 1.5.0 and update manifest 2019-05-17 10:03:02 -04:00
Jordan Liggitt 739a75fc32 Interrupt WaitForCertificate if desired kubelet serving cert changes 2019-05-16 15:14:47 -04:00
Kubernetes Prow Robot e1770e698e
Merge pull request #77780 from fabriziopandini/refactor-renewal-package
Kubeadm: Refactor renewal package
2019-05-16 02:55:46 -07:00
fabriziopandini 1c897874bf autogenerated 2019-05-15 10:26:00 +02:00
fabriziopandini 6db533dd5b refactor certs renewal 2019-05-15 10:25:50 +02:00
Kubernetes Prow Robot f5a1ceb1fc
Merge pull request #77768 from yagonobre/upload-certs
Improve error message when user provide invalid certificate key
2019-05-12 19:24:08 -07:00
Yago Nobre 54a308bdd7
Improve error message when user provide invalid certificate key 2019-05-12 18:26:11 -03:00
SataQiu d46bd0dc7a make KubernetesDir a true constant 2019-05-09 17:16:59 +08:00
Kubernetes Prow Robot eda5a296a8
Merge pull request #77513 from ereslibre/upload-cluster-configuration-after-upgrade
kubeadm: upload the `ClusterConfiguration` during the upgrade
2019-05-08 17:15:13 -07:00
Daniel (Shijun) Qian 5268f69405 fix duplicated imports of k8s code (#77484)
* fix duplicated imports of api/core/v1

* fix duplicated imports of client-go/kubernetes

* fix duplicated imports of rest code

* change import name to more reasonable
2019-05-08 10:12:47 -07:00
Kubernetes Prow Robot f9c9ecdbb6
Merge pull request #77180 from fabriziopandini/renew-embedded-certs
kubeadm: renew certificates embedded in kubeconfig files
2019-05-06 15:30:06 -07:00
Rafael Fernández López b6f4bb349b
kubeadm: upload the `ClusterConfiguration` during the upgrade
During the upgrade process, `kubeadm` will take the current
`ClusterConfiguration`, update the `KubernetesVersion` to the latest
version, and call to `UploadConfiguration`.

This change makes sure that when the mutation happens, not only the
`ClusterStatus` is mutated, but the `ClusterConfiguration` object
inside the `kubeadm-config` ConfigMap as well; it will contain the
new `KubernetesVersion`.
2019-05-06 18:21:55 +02:00
fabriziopandini 3076644f0b autogenerated 2019-05-06 16:48:35 +02:00
fabriziopandini cf7f8acae2 renew-embedded-certs 2019-05-06 16:48:24 +02:00
Kubernetes Prow Robot 7defecbc2c
Merge pull request #76327 from neolit123/kubeproxy-node-selector
kubeadm: disable the kube-proxy DaemonSet on non-Linux nodes
2019-05-03 04:08:18 -07:00
Dmitry Rozhkov a6d7920f44 kubeadm: do unit testing of actual public function
Even though CreateServiceAccountKeyAndPublicKeyFiles() function is
an interface function it's not unittested. Instead it wraps a couple
of internal functions which are used only inside CreateServiceAccountKeyAndPublicKeyFiles()
and those internal functions are tested.

Rewrite the function to do only what it's intended to do and add unit
tests for it.
2019-05-02 10:23:51 +03:00
Àbéjídé Àyodélé a2b0cb62a1 Clean up kubeadm.
These are based on recommendation from
[staticcheck](http://staticcheck.io/).

- Remove unused struct fields
- Remove unused function
- Remove unused variables
- Remove unused constants.
- Miscellaneous cleanups
2019-05-01 22:16:06 +00:00
stgleb 7bf9acd303 Change misleading log message
Secret instead of configmap for
upload certs phase
2019-04-29 03:06:11 +03:00
Kubernetes Prow Robot c88b7cdd58
Merge pull request #76862 from fabriziopandini/fix-upgrade-certs-renew
kubeadm: fix certs renewal during upgrade
2019-04-27 12:30:20 -07:00
Chen Zhiwei 79c436f48f use new method to detect cgroup driver 2019-04-27 08:39:18 +00:00
fabriziopandini 137137cbaa fix-upgrade-certs-renew 2019-04-27 09:58:17 +02:00
Kubernetes Prow Robot 3148eb750d
Merge pull request #76390 from rojkov/ecdsa-v2
kubeadm: add support for ECDSA keys
2019-04-26 19:56:23 -07:00
Rostislav M. Georgiev 9e1ac76c1a kubeadm: Introduce v1beta2 config
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-04-25 17:10:04 +03:00
Dmitry Rozhkov d125f3bddc kubeadm: add support for ECDSA keys
kubeadm still generates RSA keys when deploying a node, but also
accepts ECDSA keys if they already exist pregenerated in the
directory specified in --cert-dir.
2019-04-25 12:52:42 +03:00
Rafael Fernández López bc8bafd825
kubeadm: improve resiliency when conflicts arise when updating the kubeadm-config ConfigMap
Add the functionality to support `CreateOrMutateConfigMap` and `MutateConfigMap`.

* `CreateOrMutateConfigMap` will try to create a given ConfigMap object; if this ConfigMap
  already exists, a new version of the resource will be retrieved from the server and a
  mutator callback will be called on it. Then, an `Update` of the mutated object will be
  performed. If there's a conflict during this `Update` operation, retry until no conflict
  happens. On every retry the object is refreshed from the server to the latest version.

* `MutateConfigMap` will try to get the latest version of the ConfigMap from the server,
  call the mutator callback and then try to `Update` the mutated object. If there's a
  conflict during this `Update` operation, retry until no conflict happens. On every retry
  the object is refreshed from the server to the latest version.

Add unit tests for `MutateConfigMap`

* One test checks that in case of no conflicts, the update of the
  given ConfigMap happens without any issues.

* Another test mimics 5 consecutive CONFLICT responses when updating
  the given ConfigMap, whereas the sixth try it will work.
2019-04-23 15:40:37 +02:00
Kubernetes Prow Robot 888b81b638
Merge pull request #76238 from Dieken/30s-ttl-for-coredns
change default 5s ttl to 30s for coredns to be same with kube-dns/dnsmasq
2019-04-23 06:20:09 -07:00
Kubernetes Prow Robot f9a3a22e35
Merge pull request #76769 from rojkov/kubeadm-drop-NewCACertAndKey
kubeadm: drop duplicate function NewCACertAndKey
2019-04-22 03:21:43 -07:00
fabriziopandini d94c5bac47 kubeadm-cleanup-unused-func 2019-04-19 22:30:44 +02:00
Dmitry Rozhkov 580513ed66 kubeadm: drop duplicate function NewCACertAndKey
The function certs.NewCACertAndKey() is just a wrapper around
pkiutil.NewCertificateAuthority() which doesn't add any
additional functionality.

Instead use pkiutil.NewCertificateAuthority() directly.
2019-04-19 19:17:34 +03:00
Kubernetes Prow Robot cee320a809
Merge pull request #76534 from ping035627/k8s-190413
Expect directory permissions to be 0700
2019-04-18 06:22:09 -07:00
PingWang e3dcd3c0a9 Expect directory permissions to be 0700 or less
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update the permissions to 0660

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

revert to 0750

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update 0750 to 0700

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-04-18 17:31:31 +08:00
Matthew L Daniel b0814869b0
Output missing cert or key name in DownloadCerts
Otherwise the user does not know what key `kubeadm` is expecting, which makes troubleshooting harder
2019-04-16 08:53:48 -07:00
Kubernetes Prow Robot a73730147c
Merge pull request #76564 from tedyu/adm-clean-all
Cleanup as many dirs as possible in CleanupDirs
2019-04-15 08:14:05 -07:00
Ted Yu 185f02dd1a Cleanup as many dirs as possible in CleanupDirs
Signed-off-by: Ted Yu <yute@vmware.com>
2019-04-15 06:10:33 -07:00
Kubernetes Prow Robot f2659bcad8
Merge pull request #76572 from mkumatag/fix_flakey
loop through next entry in stubDomainData if proxyIP == 0
2019-04-15 05:14:05 -07:00
Kubernetes Prow Robot c09cfb7178
Merge pull request #76566 from tedyu/adm-rollback-err
Return aggregate error from rollbackOldManifests
2019-04-15 03:54:23 -07:00