Commit Graph

9485 Commits

Author SHA1 Message Date
Paulo Gomes
550a67869a
Warn when insecure TLS ciphers are selected. 2020-05-18 13:16:32 +01:00
Kubernetes Prow Robot
ec23b612b8
Merge pull request #91176 from prasadkatti/add_tests_validation
Update kubeadm test TestValidateToken
2020-05-17 18:35:35 -07:00
Kubernetes Prow Robot
c6147e3231
Merge pull request #91170 from prasadkatti/fix_ident
Fix identation in kubeadm api docs
2020-05-17 16:09:36 -07:00
Prasad Katti
124386eaa0 Fix identation in kubeadm api docs 2020-05-17 14:05:34 -07:00
Prasad Katti
89fa53f064 Update kubeadm test TestValidateToken
- Remove some duplicate testcases
- Add token to error message
2020-05-16 23:46:18 -07:00
Kubernetes Prow Robot
5bace30840
Merge pull request #91148 from liggitt/kubelet-client-metric
Add kubelet_certificate_manager_client_ttl_seconds gauge
2020-05-16 19:00:24 -07:00
Kubernetes Prow Robot
b170451caa
Merge pull request #90183 from dims/update-kubernetes-to-klog-v2
Update kubernetes to klog v2
2020-05-16 18:59:51 -07:00
Amim Knabben
8459c9b6f4 Moving enable-server and provider-id 2020-05-16 21:34:13 -04:00
Kubernetes Prow Robot
694a9c242e
Merge pull request #90970 from johscheuer/add-readiness-to-controlplane
kubeadm: use two separate checks on /livez and /readyz for the kube-apiserver
2020-05-16 07:36:49 -07:00
Kubernetes Prow Robot
45bfd14ee3
Merge pull request #90174 from tnqn/certdir-default-value
Delete the wrong comment about CertDirectory of kubelet
2020-05-16 07:36:03 -07:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Jordan Liggitt
950ed38996 Mark experimental-cluster-signing-duration deprecated, add --cluster-signing-duration 2020-05-15 14:09:58 -04:00
Jordan Liggitt
2408d8101f Fix kubelet client certificate gauge 2020-05-15 12:57:34 -04:00
cici37
f52636330a Moving leaderelectionconfig to k8s.io/component-base 2020-05-15 09:08:20 -07:00
xphoniex
64cca18f4f move KubeletStartPhase past config writing phase(s) 2020-05-15 11:06:52 +00:00
Kubernetes Prow Robot
9e88546f30
Merge pull request #91065 from SataQiu/fix-kubeadm-20200513
kubeadm: log more information when missing the necessary config element
2020-05-15 02:49:17 -07:00
Kubernetes Prow Robot
c096a37226
Merge pull request #89158 from alena1108/mar16
Kubelet doc: clarification for api-qps/burst flags
2020-05-14 17:04:58 -07:00
Kubernetes Prow Robot
5bda0c1b3b
Merge pull request #83726 from cofyc/fix56180
scheduler: Move all volume binding code into VolumeBinding plugin
2020-05-14 10:08:23 -07:00
Johannes M. Scheuermann
9a1cbc2711 Use livez and readyz endpoint for API server probes 2020-05-14 17:41:05 +02:00
SataQiu
281f44628f kubeadm: log more information when missing the necessary config element
Signed-off-by: SataQiu <1527062125@qq.com>
2020-05-14 10:07:03 +08:00
Kubernetes Prow Robot
40b0f4f6cb
Merge pull request #90565 from alculquicondor/cleanup-sched-config
Remove wrapper around base LeaderElectionConfiguration
2020-05-13 15:59:05 -07:00
Kubernetes Prow Robot
2ca3347dc0
Merge pull request #90499 from knabben/kubelet-testing-flags
Deprecating Kubelet not used testing flags
2020-05-13 15:58:37 -07:00
Kubernetes Prow Robot
3b024339bd
Merge pull request #90645 from neolit123/1.19-fix-retry-etcd-member-add
kubeadm: fix flakes when performing etcd MemberAdd on slower setups
2020-05-13 06:04:26 -07:00
Paulo Gomes
e7ced21235
Invert error validation 2020-05-13 09:19:17 +01:00
Kubernetes Prow Robot
977aeab3e5
Merge pull request #90987 from andrewsykim/service-controller-fixup
service controller: clean up unit tests
2020-05-13 00:19:13 -07:00
Kubernetes Prow Robot
2f381e06e5
Merge pull request #90872 from mikedanese/integ
fix some fixture path calculations
2020-05-13 00:18:54 -07:00
Mike Danese
bd290e924f fix some fixture path calculations
Current calculations assume that -trimpath is not passed to go tool
compile, which is not the case for test binaries built with bazel. This
causes issues for integration tests right now but is generally not
correct.

The approach taken here is a bit of a hack but it works on the
assumption that if and only if trimpath is passed, we are running under
bazel. I didn't see a good spot for pkgPath(), so I just copied it
around.
2020-05-12 15:34:55 -07:00
Kubernetes Prow Robot
89ba90573f
Merge pull request #90788 from xlgao-zju/delete-prepull-ds
kubeadm: delete pre-pull ds and add pull images check in upgrade apply and upgrade node
2020-05-12 12:08:22 -07:00
Andrew Sy Kim
758c25de2f service controller: store feature gate in local fields for better testability
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-05-12 13:40:54 -04:00
cici37
fd694fa947 Remove CloudControllerManagerPort to k8s.io/cloud_provider 2020-05-12 01:15:16 -07:00
Yecheng Fu
c14b749521 scheduler/volumebinding: move all volume binding logic into VolumeBinding plugin 2020-05-12 10:13:05 +08:00
Kubernetes Prow Robot
b5f67110ed
Merge pull request #87746 from mattjmcnaughton/mattjmcnaughton/poc-compiling-kubelet-wo-docker
Support compiling Kubelet w/o docker/docker
2020-05-09 12:01:51 -07:00
Kubernetes Prow Robot
c0dab07d7e
Merge pull request #90680 from andrewsykim/update-owners
move inactive SIG Cloud Provider approvers to emeritus_approvers
2020-05-09 07:24:04 -07:00
Kubernetes Prow Robot
b8dd18380f
Merge pull request #90733 from cici37/legacyschema
Remove //pkg/api/legacyscheme from CCM and CM
2020-05-09 00:44:19 -07:00
Kubernetes Prow Robot
8d718b1ef5
Merge pull request #90731 from deads2k/csr-separate-signer-flags
refactor the CSR controller into distinct controllers to allow easy
2020-05-09 00:44:05 -07:00
cici37
50ea7a0435 Remove pkg/api/legacyscheme from cmd/controller-manager 2020-05-08 09:49:22 -07:00
Kubernetes Prow Robot
2e4bab8065
Merge pull request #90840 from rosti/kubeadm-move-kubelet-featuregates
kubeadm: Move IPv6DualStack feature gate to component config
2020-05-08 05:24:09 -07:00
Kubernetes Prow Robot
90f7ae54ac
Merge pull request #90657 from alculquicondor/default-plugin-args
Move Plugin Args defaults to versioned packages
2020-05-08 02:03:42 -07:00
Johannes M. Scheuermann
4c5b46d2ae Move validation in own function with tests 2020-05-08 08:52:34 +02:00
Xianglin Gao
a169305207 kubeadm: add pull images check in upgrade apply and upgrade node
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2020-05-08 12:42:54 +08:00
Kubernetes Prow Robot
87e5d4e4de
Merge pull request #90630 from nilo19/cleanup/add-import-restrictions-to-ccm
Add .import-restrictions file to cmd/cloud-controller-manager
2020-05-07 17:19:42 -07:00
cici37
399b6b50f0 Remove //pkg/api/legacyscheme from CCM 2020-05-07 16:36:14 -07:00
mattjmcnaughton
34c8f51dcb
Remove all uses of dockershim from cmd/kubelet
We can remove all uses of `dockershim` from `cmd/kubelet`, by just
passing the docker options to the kubelet in their pure form, instead of
using them to create a `dockerClientConfig` (which is defined in
dockershim). We can then construct the `dockerClientConfig` only when we
actually need it.
2020-05-07 17:18:49 -04:00
mattjmcnaughton
53adde65ce
Remove ExperimentalDockershim from kubelet
Remove one of two uses of Dockershim in `cmd/kubelet`. The other is for
creating a docker client which we pass to the Kubelet... we will handle
that refactor in a separate diff.

I'm fairly confident, though need to double check, that no one is
actually using this experimental dockershim behavior. If they are, I
think we will want to find a new way to support it (that doesn't require
using the Kubelet only to launch Dockershim).
2020-05-07 17:18:48 -04:00
Rostislav M. Georgiev
b46259b7af kubeadm: Move IPv6DualStack feature gate to component config
kubeadm is setting the IPv6DualStack feature gate in the command line of the kubelet.
However, the kubelet is gradually moving away from command line flags towards component config use.
Hence, we should set the IPv6DualStack feature gate in the component config instead.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-05-07 14:28:07 +03:00
Aldo Culquicondor
2935480cc8 Move Plugin Args defaults to versioned packages
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-05-06 18:00:23 -04:00
Xianglin Gao
6c6a702a99 kubeadm: delete prepull ds
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2020-05-06 15:52:19 +08:00
David Eads
83035890ad refactor the CSR controller into distinct controllers to allow easy configuration of multiple signing keys 2020-05-05 10:18:04 -04:00
Kubernetes Prow Robot
dc6c640a12
Merge pull request #90375 from cici37/removeConfigz
move pkg/util/configz to k8s.io/component-base
2020-05-04 13:46:09 -07:00
Brian Pursley
f8cd4a06ef Fixed bug that caused TestKubeletDefault to fail when run on systems that have systemd-resolved active 2020-05-04 11:55:54 -04:00
Andrew Sy Kim
4117d79e7c move inactive SIG Cloud Provider approvers to emeritus_approvers
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-05-01 17:31:17 -04:00
Kubernetes Prow Robot
8caddda753
Merge pull request #90513 from SataQiu/fix-kubeadm-20200427
kubeadm: do not set deprecated '--cgroup-driver' flag in kubeadm-flags.env, it will be set in config.yaml
2020-05-01 00:40:32 -07:00
Amim Knabben
fe9eb1ba46 Migrating Kubelet testing flags to configuration 2020-04-30 22:12:39 -04:00
Lubomir I. Ivanov
1c430ff30f kubeadm: fix flakes when performing etcd MemberAdd on slower setups
In slower setups it can take more time for the existing cluster
to be in a healthy state, so the existing backoff of ~50 seconds
is apparently not sufficient.

The client dial can also fail for similar reasons.

Improve kubeadm's join toleration of adding new etcd members.
Wrap both the client dial and member add in a longer backoff
(up to ~200 seconds).

This particular change should be backported to the support skew.
In a future change for master, all etcd client operations should be
make consistent so that the etcd logic is in a sane state.
2020-04-30 18:53:29 +03:00
Kubernetes Prow Robot
8dd93ca94c
Merge pull request #90309 from alculquicondor/plugin-args-decoding
Use internal config types in scheduling plugin args
2020-04-30 05:32:18 -07:00
Kubernetes Prow Robot
8876563700
Merge pull request #90360 from tnozicka/fix-client-ca-reload
Fix client-ca dynamic reload in apiserver
2020-04-30 01:10:18 -07:00
t-qini
a0a6a7e28c Add .import-restrictions file to cmd/cloud-controller-manager 2020-04-30 15:49:58 +08:00
Aldo Culquicondor
98d1e241f1 Use internal config types in scheduling plugin args
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-04-29 17:07:10 -04:00
cici37
7f4d19167e Move pkg/util/configz to k8s.io/component-base 2020-04-29 12:17:25 -07:00
Kubernetes Prow Robot
a26c34e470
Merge pull request #90381 from cici37/features
Remove CCM's dependency: pkg/features
2020-04-29 11:42:24 -07:00
cici37
722ab792b4 Use IPv6DualStack as const to avoid extra dep. 2020-04-29 09:06:10 -07:00
Tomas Nozicka
b22a170d46 Fix client-ca dynamic reload in apiserver 2020-04-29 16:03:09 +02:00
Kubernetes Prow Robot
0c3c2cd6ac
Merge pull request #89660 from pjferrell/kubectl-jsonpath-nonprimitive-types
client-go/util/jsonpath: resolve #16707 by outputting json for non-primitive types
2020-04-28 22:56:25 -07:00
Aldo Culquicondor
29f5adee7f Remove wrapper around base LeaderElectionConfiguration
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-04-28 15:44:35 -04:00
Aaron Crickenberger
81881e4a12 prune .import-restrictions
specifically:

- cmd/kubeadm/.import-restrictions
  - we don't need to explicitly allow k8s.io repos (external or published)
- rm pkg/controller/.import-restrictions
  - pkg/client/unversioned was removed in 59042
- pkg/kubectl/.import-restrictions
  - pkg/printers is no longer used
  - pkg/api was masking all of the pkg/apis prefixes
- rm staging/src/k8s.io/code-generator/cmd/lister-gen/.import-restrictions
  - noop / empty file
- test/e2e/framework/.import-restrictions
  - we don't need to explicitly allow k8s.io repos (external or published)
2020-04-28 08:41:36 -07:00
Aaron Crickenberger
f306a0dbb4 convert .import-restrictions to yaml
yaml has comments, so we can explain why we have certain rules or
certain prefixes

for those files that weren't already commented yaml, I converted them to
yaml and took a best guess at comments based on the PRs that introduced
or updated them
2020-04-28 08:41:36 -07:00
SataQiu
afb1ea44b9 kubeadm: do not set deprecated '--cgroup-driver' flag in kubeadm-flags.env, this value will be set in config.yaml 2020-04-27 15:32:10 +08:00
Kubernetes Prow Robot
f8297af392
Merge pull request #90284 from wawa0210/kubelet-nodename-clean
Remove duplicate calculation nodename、hostname、hostnameOverridden when kubelet is initialized
2020-04-24 12:15:34 -07:00
Kubernetes Prow Robot
9706b70213
Merge pull request #90411 from johscheuer/improve-error-message
Improve error message when service cidr is to small
2020-04-24 03:16:21 -07:00
Kubernetes Prow Robot
340ac700e5
Merge pull request #90424 from prasadkatti/master
kubeadm: update service check log to include service name
2020-04-23 23:30:44 -07:00
Johannes M. Scheuermann
889648d6e5 Improve the error message for the service cidr check 2020-04-24 07:46:31 +02:00
Kubernetes Prow Robot
30cefca5a6
Merge pull request #89128 from vincent178/move-runonce-kubeletconfiguration
move runonce from flag to config
2020-04-23 17:20:07 -07:00
Prasad Katti
b4e026a1ea kubeadm: update service check log to include service name 2020-04-23 16:51:39 -07:00
wawa0210
40da2c521a
Remove duplicate calculation nodename 、hostname 、hostnameOverridden 2020-04-24 07:49:33 +08:00
Kubernetes Prow Robot
0acf2f0983
Merge pull request #90320 from neolit123/1.19-kubeadm-dont-use-sleep-on-upgrade
kubeadm: do not use /bin/sleep during upgrade pre-pull
2020-04-23 12:32:21 -07:00
Kubernetes Prow Robot
613cd04d8c
Merge pull request #90064 from neolit123/1.19-fix-authz-warning
kubeadm: fix misleading warning for authz modes
2020-04-23 12:32:06 -07:00
Johannes M. Scheuermann
4211c2dccc Improve error message when service cidr is to small 2020-04-23 20:18:13 +02:00
Kubernetes Prow Robot
52243decf1
Merge pull request #90394 from SataQiu/fix-kubeadm-20200422
kubeadm: fix the bug that kubeadm does not really respect resolvConf value set by user if systemd-resolved is active
2020-04-23 08:51:25 -07:00
Kubernetes Prow Robot
95a81f2776
Merge pull request #90328 from SataQiu/fix-kubeadm-20200421
kubeadm: ensure image-pull-timeout flag is respected during upgrade phase
2020-04-23 08:51:11 -07:00
SataQiu
28b9a4e0d6 kubeadm: set resolv-conf via the kubelet config file rather than cli flag 2020-04-23 15:07:48 +08:00
Kubernetes Prow Robot
15ed3b36d1
Merge pull request #90235 from cici37/addflag
Remove CCM dependency pkg/util/flag
2020-04-22 19:22:14 -07:00
Lubomir I. Ivanov
425552f2c9 kubeadm: do not use /bin/sleep during upgrade pre-pull
Use an init container that performs the pre-pull of a component
and then start an instance of "pause" as a regular container to
get the DaemonSet Pod in a Running state.

More details on this change in the code comments.
2020-04-23 04:17:49 +03:00
Kubernetes Prow Robot
43cd2ff239
Merge pull request #89549 from happinesstaker/sa-rotate
Monitoring safe rollout of time-bound service account token.
2020-04-22 17:01:58 -07:00
Kubernetes Prow Robot
791b4bbeea
Merge pull request #85266 from serathius/refactor-show-hidden-metric
Refactor show-hidden-metric-for-version flag
2020-04-22 17:01:44 -07:00
Jiajie Yang
ae0e52d28c Monitoring safe rollout of time-bound service account token. 2020-04-22 11:59:16 -07:00
cici37
15c844031f Remove CCM dependency pkg/util/flag 2020-04-22 10:06:11 -07:00
Jie Shen
363bb39142
Use utils.net to parse ports instead of atoi (#89120) 2020-04-21 20:55:52 -07:00
SataQiu
449b39a450 kubeadm: ensure image-pull-timeout flag is respected during upgrade phase
Signed-off-by: SataQiu <1527062125@qq.com>
2020-04-21 16:35:04 +08:00
tangcong
90481a9596 fix kubeadm staticcheck err 2020-04-21 06:54:42 +08:00
Kubernetes Prow Robot
8b0a7dea1d
Merge pull request #90297 from deads2k/silence-usage
stop printing usage help when the server commands exit
2020-04-20 14:05:49 -07:00
David Eads
871d6dd8bb stop printing usage help when the server commands exit 2020-04-20 08:29:52 -04:00
Kubernetes Prow Robot
b2689edfdd
Merge pull request #88371 from dharmab/scheduler-synopsis
Improve scheduler CLI description
2020-04-17 13:15:36 -07:00
Quan Tian
23e54301ab Delete the wrong comment about CertDirectory of kubelet
The default value of CertDirectory was changed to /var/lib/kubelet/pki.
2020-04-18 00:37:27 +08:00
Kubernetes Prow Robot
b35fdbc037
Merge pull request #89904 from alculquicondor/raw-extension-plugin-args
Use RawExtension and Object for external and internal, respectively, scheduling plugin args
2020-04-15 15:22:59 -07:00
Kubernetes Prow Robot
1df63e7dc7
Merge pull request #88510 from steveazz/steveazz/68026-rlimit
Fix golint issues for `pkg/util/rlimit`
2020-04-15 15:22:45 -07:00
Phil Ferrell
ba386aba4f client-go: change jsonpath output of non-primitive types from Go-syntax to JSON
kubectl: add --output jsonpath-as-json to print a json array of results
kubeadm: fix test case using jsonpath result of non-primitive type
2020-04-15 14:58:20 -07:00
Dharma Bellamkonda
49bcf18cc5 Improve scheduler CLI description 2020-04-15 14:14:45 -06:00
Kubernetes Prow Robot
b30bfa6f76
Merge pull request #90163 from SataQiu/fix-kubeadm-20200415
kubeadm: fix some mistakes about log output
2020-04-15 11:36:33 -07:00
Kubernetes Prow Robot
7f1d09f439
Merge pull request #89593 from neolit123/1.19-skip-kube-proxy-on-upgrade
kubeadm: skip kube-proxy/dns upgrades on missing ConfigMaps
2020-04-15 11:36:00 -07:00
SataQiu
004a61a46c kubeadm: fix some mistakes about log output 2020-04-15 14:32:46 +08:00
Lubomir I. Ivanov
83644dda30 kubeadm: update versions for 1.19 2020-04-14 23:27:35 +03:00
Kubernetes Prow Robot
ea2d784545
Merge pull request #89895 from jingyih/update_etcd_server_3p4p7
Update default etcd server to 3.4.7 in k8s v1.19
2020-04-14 12:34:06 -07:00
Kubernetes Prow Robot
6c499314cd
Merge pull request #88480 from savitharaghunathan/kubelet_flag_migration_1
Kubelet flag migration - Part 1
2020-04-14 12:33:39 -07:00
Steve Azzopardi
4936cd476b
Fix golint issues for pkg/util/rlimit
pkg/util/rlimit/rlimit_linux.go:25:1: exported function RlimitNumFiles should have comment or be unexported
pkg/util/rlimit/rlimit_linux.go:25:6: func name will be used as rlimit.RlimitNumFiles by other packages, and that stutters; consider calling this NumFiles
pkg/util/rlimit/rlimit_unsupported.go:25:1: exported function RlimitNumFiles should have comment or be unexported
pkg/util/rlimit/rlimit_unsupported.go:25:6: func name will be used as rlimit.RlimitNumFiles by other packages, and that stutters; consider calling this NumFiles

Ref: https://github.com/kubernetes/kubernetes/issues/68026
2020-04-14 21:00:41 +02:00
Lubomir I. Ivanov
44638a10e8 kubeadm: remove usage of the "certificates" API for cert renewal
The flag "--use-api" for "alpha certs renew" was deprecated in 1.18.
Remove the flag and related logic that executes certificate renewal
using "api/certificates/v1beta1". kubeadm continues to be able
to create CSR files and renew using the local CA on disk.
2020-04-14 21:57:37 +03:00
Kubernetes Prow Robot
105c0c6951
Merge pull request #88970 from mysunshine92/correct-NodeAllocatableRoot
fix function NodeAllocatableRoot
2020-04-14 11:04:13 -07:00
Aldo Culquicondor
ce05382b58 Use RawExtension and Object for external and internal scheduling plugin args, respectively
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-04-14 13:44:42 -04:00
Kubernetes Prow Robot
250884c9c1
Merge pull request #90127 from needkane/pr
[cmd/kube-apiserver]  "return []error{} -> return nil" and "update annotation"
2020-04-14 07:44:12 -07:00
needkane
97d6f2cfd3 (return []error{} -> return nil) and (update annotation) 2020-04-14 00:05:35 -04:00
vincent178
745b742de5 move runonce from flag to config 2020-04-14 06:00:43 +08:00
jingyih
394df132bd Update default etcd server to 3.4.7 2020-04-13 14:37:56 -07:00
Kubernetes Prow Robot
2624a4ad46
Merge pull request #80943 from obitech/yaml_meta
Add a YAML MetaFactory
2020-04-13 02:05:47 -07:00
Kubernetes Prow Robot
b17ddac4df
Merge pull request #78944 from avorima/golint_fix_job
Fix golint errors in pkg/controller/job
2020-04-12 21:57:47 -07:00
Kubernetes Prow Robot
3641d40a98
Merge pull request #90078 from SataQiu/staging-kubeadm-20200411
kubeadm: remove the dependence on /pkg/features
2020-04-12 12:09:47 -07:00
SataQiu
35f3f82029 kubeadm: remove the dependence on /pkg/features
Signed-off-by: SataQiu <1527062125@qq.com>
2020-04-12 15:05:44 +08:00
Kubernetes Prow Robot
ee6b88ddf9
Merge pull request #90000 from SataQiu/staging-scheduler-20200409
scheduler: remove direct import to pkg/master/ports
2020-04-11 10:46:01 -07:00
Kubernetes Prow Robot
eece89a253
Merge pull request #90031 from thockin/proxy-cleanup
kube-proxy: Startup and updates logging
2020-04-11 06:23:47 -07:00
SataQiu
41d3e44a2f scheduler: remove direct import to pkg/master/ports
Signed-off-by: SataQiu <1527062125@qq.com>
2020-04-11 13:56:53 +08:00
Tim Hockin
9551ecb7c3 Cleanup: Change "Ip" to "IP" in func and var names 2020-04-10 15:29:50 -07:00
Tim Hockin
efb24d44c6 Rename iptables IsIpv6 to IsIPv6 2020-04-10 15:29:50 -07:00
Lubomir I. Ivanov
6cfd772401 kubeadm: fix misleading warning for authz modes
kubeadm init prints:
  W0410 23:02:10.119723   13040 manifests.go:225] the default kube-apiserver
  authorization-mode is "Node,RBAC"; using "Node,RBAC"

Add a new function compareAuthzModes() and a unit test for it.
Make sure the warning is printed only if the user modes don't match
the defaults.
2020-04-10 23:45:40 +03:00
Lubomir I. Ivanov
83a59c02f9 kubeadm: switch control-plane static Pods to "system-node-critical"
Use the priority class "system-node-critical" to ensure
the control-plane static Pods have the highest possible priority.
2020-04-10 23:05:33 +03:00
Kubernetes Prow Robot
2da163bcf5
Merge pull request #89588 from rosti/kubeadm-etcd-upgrade
kubeadm: Use image tag as version of stacked etcd
2020-04-09 18:08:03 -07:00
Kubernetes Prow Robot
e322da5ddc
Merge pull request #88585 from pancernik/plugin-args-api-config
Add types for Scheduler plugin args to kube-scheduler.config.k8s.io
2020-04-09 09:19:44 -07:00
Kubernetes Prow Robot
1634d9c120
Merge pull request #89982 from neolit123/1.19-fix-kubeadm-integration-tests
cleanup the kubeadm integration tests and related scripts
2020-04-09 04:55:44 -07:00
Kubernetes Prow Robot
d58224e4bc
Merge pull request #89929 from deads2k/flag-check
add flag check to ensure that flowcontrol API is present
2020-04-08 22:13:43 -07:00
Kubernetes Prow Robot
9d74a1e3db
Merge pull request #89724 from zhouya0/add_missing_build_info_metric
Add missing kube build version info metrics
2020-04-08 20:11:44 -07:00
Lubomir I. Ivanov
a18502615e kubeadm-init: allow overriding the dry-run temp directory
Allow overriding the dry-run temporary directory with
an env. variable (KUBEADM_INIT_DRYRUN_DIR).

Use the same variable in test/cmd/init_test.go.
This allows running integration tests as non-root.
2020-04-09 01:20:24 +03:00
Lubomir I. Ivanov
04933f3a94 cmd/kubeadm/test/cmd: refactor _test.go files
Make getKubeadmPath() fetch the KUBEADM_PATH env. variable.
Panic if it's missing. Don't handle the "--kubeadm-path"
flag. Remove the same flag from the BUILD bazel test rule.

Don't handle "--kubeadm-cmd-skip" usage of this flag is missing
from the code base.

Remove usage of "kubeadmCmdSkip" as the flag "--kubeadm-cmd-skip"
is never passed.
2020-04-09 00:47:16 +03:00
Marek Siarkowicz
24321b2d4e Refactor show-hidden-metric-for-version flag 2020-04-08 22:42:14 +02:00
Lubomir I. Ivanov
d4de1a571a kubeadm: skip kube-proxy and DNS upgrades on missing ConfigMaps
If the kube-proxy/dns ConfigMap are missing, show warnings and assume
that these addons were skipped during "kubeadm init",
and that their redeployment on upgrade is not desired.

TODO: remove this once "kubeadm upgrade apply" phases are supported:
https://github.com/kubernetes/kubeadm/issues/1318
2020-04-08 22:58:42 +03:00
Rafał Wicha
c4d20ca8a8 Add types for Scheduler plugin args to kube-scheduler.config.k8s.io 2020-04-08 20:23:56 +01:00
Kubernetes Prow Robot
5123c3a018
Merge pull request #89867 from gongguan/ipvs-check
remove duplicate ipvs check
2020-04-07 16:45:57 -07:00
David Eads
45c2f4534c add flag check to ensure that flowcontrol API is present 2020-04-07 15:08:50 -04:00
louisgong
d6ea9d7c4c remove duplicate ipvs check 2020-04-07 23:12:09 +08:00
Kubernetes Prow Robot
cf144eb485
Merge pull request #89656 from dashpole/json_flag
specify in the flag help text that --enable-cadvisor-json-endpoints d…
2020-04-06 17:47:48 -07:00
Kubernetes Prow Robot
cabf5d1cdc
Merge pull request #89350 from SataQiu/fix-kube-proxy-20200323
kube-proxy: treat failure to bind to a port as fatal
2020-04-06 17:47:20 -07:00
Kubernetes Prow Robot
b984f59fa3
Merge pull request #89735 from rosti/kubeadm-fix-bootstrap-wait
kubeadm join: Properly wait for TLS bootstrapping
2020-04-06 11:19:48 -07:00
Kubernetes Prow Robot
4f90253b58
Merge pull request #89596 from neolit123/1.19-fix-misleading-warning-on-jcp
kubeadm: remove misleading warning on kubeadm join
2020-04-03 04:27:45 -07:00
Kubernetes Prow Robot
dd35908c7f
Merge pull request #89298 from gavinfish/scheuler-config-alph1
Remove kubescheduler.config.k8s.io/v1alpha1
2020-04-02 21:39:59 -07:00
Kubernetes Prow Robot
3c4017c2d0
Merge pull request #89785 from andrewsykim/log-ipvs-err
ipvs: log err from CanUseIPVSProxier
2020-04-02 17:24:00 -07:00
Kubernetes Prow Robot
b7aaa59b49
Merge pull request #89585 from cwdsuzhou/March/proxy_kernel
add `kernelspace` to flag description of kube-proxy
2020-04-02 12:43:02 -07:00
Andrew Sy Kim
e3656db5bc ipvs: log err from CanUseIPVSProxier
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-04-02 13:48:15 -04:00
Rostislav M. Georgiev
d2c4426e97 kubeadm join: Wait longer for TLS bootstrapping
The TLS bootstrapping timeout is increased to 5 minutes with a retry
once every 5 seconds. Failing fast if the kubelet is not healthy is also
preserved.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-04-02 16:44:39 +03:00
Kubernetes Prow Robot
ad4bd386eb
Merge pull request #86752 from SataQiu/fix-kubelet-20191231
Add error handler for rlimit.RlimitNumFiles
2020-04-01 22:14:38 -07:00
SataQiu
871b90ba23 kube-proxy: add '--bind-address-hard-fail' flag to treat failure to bind to a port as fatal
Signed-off-by: SataQiu <1527062125@qq.com>
2020-04-02 13:13:10 +08:00
Tim Hockin
c27ceb6449
Edit log string 2020-04-01 15:34:29 -07:00
zhouya0
4d3d722ebc Add missing kube build info metric 2020-04-01 17:04:45 +08:00
Kubernetes Prow Robot
0804667ff1
Merge pull request #89151 from jingyih/add_metric_etcd_db_size
apiserver: add a metric exposing etcd database size
2020-03-31 12:37:00 -07:00
jingyih
922ec728de Add a metric exposing etcd database size 2020-03-31 09:02:38 -07:00
Tim Hockin
15632b10cb Clean up kube-proxy metrics startup 2020-03-30 10:29:14 -07:00
Tim Hockin
8747ba9370 Clean up kube-proxy healthz startup
Make the healthz package simpler, move retries back to caller.
2020-03-30 10:29:14 -07:00
David Ashpole
3ec1043f83 specify in the flag help text that --enable-cadvisor-json-endpoints defaults to false 2020-03-30 09:32:33 -07:00
Rostislav M. Georgiev
c8b7e5739c kubeadm: Use image tag as version of stacked etcd
kubeadm uses image tags (such as `v3.4.3-0`) to specify the version of
etcd. However, the upgrade code in kubeadm uses the etcd client API to
fetch the currently deployed version. The result contains only the etcd
version without the additional information (such as image revision) that
is normally found in the tag. As a result it would refuse an upgrade
where the etcd versions match and the only difference is the image
revision number (`v3.4.3-0` to `v3.4.3-1`).

To fix the above issue, the following changes are done:
- Replace the existing etcd version querying code, that uses the etcd
  client library, with code that returns the etcd image tag from the
  local static pod manifest file.
- If an etcd `imageTag` is specified in the ClusterConfiguration during
  upgrade, use that tag instead. This is done regardless if the tag was
  specified in the configuration stored in the cluster or with a new
  configuration supplied by the `--config` command line parameter.
  If no custom tag is specified, kubeadm will select one depending on
  the desired Kubernetes version.
- `kubeadm upgrade plan` no longer prints upgrade information about
  external etcd. It's the user's responsibility to manage it in that
  case.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-03-30 16:28:45 +03:00
Kubernetes Prow Robot
9cbb46e39f
Merge pull request #89602 from kvaps/fix-rejoin
Kubeadm: fix Ready condition check
2020-03-28 00:11:52 -07:00
caiweidong
986a7431ce Add 'kernel' to the comments of proxy-mode 2020-03-28 11:55:37 +08:00
kvaps
68dcc17155 Kubeadm: fix Ready condition check 2020-03-27 23:55:18 +01:00
Lubomir I. Ivanov
63b3bd1826 kubeadm: fix unit test requiring admin.conf and root 2020-03-28 00:43:39 +02:00
Lubomir I. Ivanov
e56b4c3172 kubeadm: remove misleading warning on kubeadm join
If the user does not provide --config or --control-plane
but provides some other flags such as --certificate-key
kubeadm is supposed to print a warning.

The logic around printing the warning is bogus. Implement
proper checks of when to print the warning.
2020-03-27 23:09:59 +02:00
Kubernetes Prow Robot
c1fc466cdd
Merge pull request #88854 from bart0sh/PR0088-kubeadm-redesign-printAvailableUpgrades
kubeadm: redesign printAvailableUpgrades function
2020-03-27 05:14:23 -07:00
Kubernetes Prow Robot
903f1e63f9
Merge pull request #89537 from neolit123/1.19-kubeadm-add-get-node-rbac
kubeadm: add missing RBAC for getting nodes on "upgrade apply"
2020-03-26 20:06:23 -07:00
Lubomir I. Ivanov
6f99791021 kubeadm: add missing RBAC for getting nodes on "upgrade apply"
b117a928 added a new check during "join" whether a Node with
the same name exists in the cluster.

When upgrading from 1.17 to 1.18 make sure the required RBAC
by this check is added. Otherwise "kubeadm join" will complain that
it lacks permissions to GET a Node.
2020-03-26 22:02:55 +02:00
Rostislav M. Georgiev
fbfd44f337 kubeadm: Fix panic in isCoreDNSVersionSupported
A narrow assumption of what is contained in the `imageID` fields for the
CoreDNS pods causes a panic upon upgrade.
Fix this by using a proper regex to match a trailing SHA256 image digest
in `imageID` or return an error if it cannot find it.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-03-26 20:26:32 +02:00
yameiwang
6783f991c3 fix function NodeAllocatableRoot 2020-03-26 18:48:05 +08:00
Kubernetes Prow Robot
295b53f7b4
Merge pull request #89214 from jingyih/update_etcd_server_3p4p4
Update default etcd server to 3.4.4 in k8s v1.19
2020-03-26 01:14:24 -07:00
notpad
52ad3d95f7 Add test for algorithm provider and policy config file 2020-03-24 23:18:32 +08:00
Ed Bartosh
0eac66d647 kubeadm: refactor printAvailableUpgrades
Split printAvailableUpgrades into 2 functions:

- genUpgradePlan that handles business logic
- printUpgradePlan that outputs upgrade plan
2020-03-24 12:47:52 +02:00
Ed Bartosh
e5d6536ade add UpgradePlan to the kubeadm.output API group 2020-03-24 12:47:42 +02:00
Kubernetes Prow Robot
907d4c1bb9
Merge pull request #89381 from dashpole/comment_disable_readonly
Add comment explaining when to remove cadvisor json endpoints
2020-03-23 20:31:19 -07:00
David Ashpole
b4ed7273da add comment explaining when to remove the --enable-cadvisor-json-endpoints 2020-03-23 12:52:00 -07:00
gavinfish
1865a104a9 Remove kubescheduler.config.k8s.io/v1alpha1 2020-03-21 15:11:48 +08:00
Kubernetes Prow Robot
72102c04c7
Merge pull request #88728 from notpad/feature/scheduler_e2e_test
Add test for kube-scheduler command setup
2020-03-19 20:30:36 -07:00
notpad
16015a691c Add test for kube-scheduler command setup 2020-03-20 07:36:47 +08:00
Davanum Srinivas
1d057da2f7
Move k8s.io/apiserver/pkg/util/term to k8s.io/component-base/term
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-03-19 07:18:09 -04:00
Kubernetes Prow Robot
f899ad704a
Merge pull request #89069 from enj/enj/i/drop_password_file
Remove support for basic authentication
2020-03-18 22:24:20 -07:00
jingyih
f9e0e4c6b4 Update default etcd server to 3.4.4 2020-03-18 00:27:46 -07:00
Kubernetes Prow Robot
d45fa525e7
Merge pull request #88945 from sandyleo26/kubeadm-check-windows-wrap-error-properly
fix: #2056 check_windows wrap error properly
2020-03-17 19:28:29 -07:00
Kubernetes Prow Robot
ed4c2dbf92
Merge pull request #88893 from kinvolk/invidian/kube-apiserver-so-reuseport
kube-apiserver: use SO_REUSEPORT when creating listener
2020-03-17 19:28:11 -07:00
Kubernetes Prow Robot
be2f9e74bf
Merge pull request #88811 from rajansandeep/invalidmigrationfail
Ensure CoreDNS running when Corefile migration doesn't support current version
2020-03-17 19:27:18 -07:00
Kubernetes Prow Robot
42c94f35a7
Merge pull request #88541 from cmluciano/cml/41ipvsfix
ipvs: only attempt setting of sysctlconnreuse on supported kernels
2020-03-17 16:21:28 -07:00
Kubernetes Prow Robot
393bb44ea9
Merge pull request #88515 from SataQiu/fix-kubelet-20200225
kubelet: fix wrong flag types
2020-03-17 16:21:10 -07:00
Alena Prokharchyk
2c6b149bf0 Kubelet doc: clarification for api-qps/burst flags
Note that the flags don't rate limit the events and node heartbeat apis controlled by the diff set of flags
2020-03-16 13:27:57 -07:00
Mateusz Gozdek
dfe1f968ac
kube-apiserver: use SO_REUSEPORT when creating listener on Unix systems
So multiple instances of kube-apiserver can bind on the same address and
port, to provide seamless upgrades.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
2020-03-13 23:55:57 +01:00
Christopher M. Luciano
d22e18ad4f
ipvs: only attempt setting of sysctlconnreuse on supported kernels
This builds on previous work but only sets the sysctlConnReuse value
if the kernel is known to be above 4.19. To avoid calling GetKernelVersion
twice, I store the value from the CanUseIPVS method and then check the version
constraint at time of expected sysctl call.

Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2020-03-12 13:16:00 -04:00
Monis Khan
df292749c9
Remove support for basic authentication
This change removes support for basic authn in v1.19 via the
--basic-auth-file flag.  This functionality was deprecated in v1.16
in response to ATR-K8S-002: Non-constant time password comparison.

Similar functionality is available via the --token-auth-file flag
for development purposes.

Signed-off-by: Monis Khan <mok@vmware.com>
2020-03-11 20:55:47 -04:00
Sandeep Rajan
fcd229e4bd ensure coredns running when migration fails
add an additional check for coredns image sha

add a check to see if migration is required
2020-03-11 11:32:32 -04:00
Ted Yu
ced2948fde Remove wait.Until for running Kubelet Bootstrap
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-03-11 08:30:00 -07:00
Savitha Raghunathan
3234d34714 moving volume plugin dir to kubelet config - part 1 2020-03-10 16:22:29 -04:00
Satyadeep Musuvathy
e053fdd08a Add NodeCIDR for detect-local-mode 2020-03-09 13:44:34 -07:00
Sha Liu
12750ac64f kubeadm: wrap error properly in check_windows.go 2020-03-09 22:29:15 +11:00
skilxn-go
6b8fc8dc5e Move TaintBasedEvictions feature gates to GA 2020-03-09 10:49:00 +08:00
Jordan Liggitt
b7c2faf26c client-go dynamic client: add context to callers 2020-03-06 10:56:23 -05:00
Christian Huffman
c6fd25d100 Updated CSIDriver references 2020-03-06 08:21:26 -05:00
Kubernetes Prow Robot
5708511499
Merge pull request #88708 from mikedanese/deleteopts
Migrate clientset metav1.DeleteOpts to pass-by-value
2020-03-05 23:09:23 -08:00
Kubernetes Prow Robot
8b8dd79d53
Merge pull request #88768 from damemi/extenders-cc
Add Extenders to v1alpha2 Component Config
2020-03-05 20:04:28 -08:00
Mike Danese
76f8594378 more artisanal fixes
Most of these could have been refactored automatically but it wouldn't
have been uglier. The unsophisticated tooling left lots of unnecessary
struct -> pointer -> struct transitions.
2020-03-05 14:59:47 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Mike Dame
1d7006c38d Add Extenders to scheduler v1alpha2 component config 2020-03-05 16:42:15 -05:00
Lubomir I. Ivanov
8943e443e8 kubeadm: deprecate the flag --use-api for cert renewal
The KCM is moving to means of only singing apiserver (kubelet) client
and kubelet serving certificates. See:
  https://github.com/kubernetes/enhancements/blob/master/keps/sig-auth/20190607-certificates-api.md#signers
Up until now the experimental kubeadm functionality '--use-api'
under "kubeadm alpha certs renew" was using the KCM to sign *any*
certficate as long as the KCM has the root CA cert/key.

Post discussions with the kubeadm maintainers, it was decided that
this functionality should be removed from kubeadm due to the
requirement to have external signers for renewing the common
control-plane certificates that kubeadm manages.
2020-03-05 03:37:00 +02:00
Kubernetes Prow Robot
5c5faed39b
Merge pull request #88287 from gab-satchi/master
Windows specific kubelet flags in kubeadm-flags.env
2020-03-04 13:18:52 -08:00
Gab Satch
9fabafdbb1 Windows specific kubelet flags in kubeadm-flags.env
- Uses correct pause image for Windows
- Omits systemd specific flags
- Common build flags function to be used by Linux and Windows
- Uses user configured image repository for Windows pause image
2020-03-04 11:05:53 -05:00
Kubernetes Prow Robot
c86aec0564
Merge pull request #88745 from mborsz/slice3
Implement simple endpoint slice batching
2020-03-03 03:03:38 -08:00
Maciej Borsz
49b11b5431 Implement simple endpoint slice batching 2020-03-03 08:16:42 +01:00
Kubernetes Prow Robot
90a622bbdb
Merge pull request #88512 from SataQiu/fix-kubeproxy-20200225
kube-proxy: fix confusing default value for healthz and metrics bind address, deprecate healthz-port and metrics-port flag
2020-03-02 14:49:53 -08:00
Kubernetes Prow Robot
e9d502e4fc
Merge pull request #88663 from deads2k/enable-profiling-by-default
update kube-controller-manager and kube-scheduler to match kube-apiserver defaults
2020-03-02 07:24:43 -08:00
Kubernetes Prow Robot
56987164f8
Merge pull request #88626 from yuzhiquan/patch-clean1
(cleanup/scheduler): remove unused function
2020-02-29 07:54:40 -08:00
yuzhiquanlong
3eec87cd91 update WithPlugin comment, in case remove function 2020-02-29 19:53:04 +08:00
Kubernetes Prow Robot
03b7f272c8
Merge pull request #88246 from munnerz/csr-signername-controllers
Update CSR controllers & kubelet to respect signerName field
2020-02-28 23:38:39 -08:00
Kubernetes Prow Robot
268d0a1d3a
Merge pull request #85870 from Jefftree/authn-netproxy
Use Network Proxy with Authentication & Authorizer Webhooks
2020-02-28 18:44:39 -08:00
David Eads
aa07992a44 update kube-controller-manager and kube-scheduler to match kube-apiserver defaults 2020-02-28 11:18:00 -05:00
Jefftree
1b38199ea8 pass Dialer instead of egressselector to webhooks 2020-02-27 17:47:23 -08:00
Jefftree
d318e52ffe authentication webhook via network proxy 2020-02-27 17:47:23 -08:00
Jonathan Tomer
711c1e1720 Rename --enable-inflight-quota-handler to --enable-priority-and-fairness.
The old flag name doesn't make sense with the renamed API Priority and
Fairness feature, and it's still safe to change the flag since it hasn't done
anything useful in a released k8s version yet.
2020-02-27 14:04:37 -08:00
Sandeep Rajan
da8453af6e fix unsupported bug 2020-02-27 10:39:47 -05:00
James Munnelly
a983356caa Add signerName field to CSR resource spec
Signed-off-by: James Munnelly <james.munnelly@jetstack.io>
2020-02-27 10:17:55 +00:00
Kubernetes Prow Robot
e61a878e6d
Merge pull request #88482 from rajansandeep/fixunsupported
[kubeadm]: Fix the CoreDNS preflight check for unsupported plugins
2020-02-26 19:39:33 -08:00
Sandeep Rajan
ca5d394f6a fix the coredns preflight check for unsupported plugins 2020-02-26 15:08:05 -05:00
Aldo Culquicondor
07c4982245 Add unit and integration tests for multiple profiles support
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-26 10:14:03 -05:00
Kubernetes Prow Robot
6ec3ea855d
Merge pull request #85282 from serathius/flag-kubelet
Add show-hidden-metrics-for-version to kubelet
2020-02-26 03:54:26 -08:00
Kubernetes Prow Robot
5704bff0de
Merge pull request #84913 from serathius/metrics-scheduler
Add show-hidden-metrics-for-version to scheduler
2020-02-25 21:02:26 -08:00
Marek Siarkowicz
d44d5b35f3 Add show-hidden-metrics-for-version to kubelet 2020-02-25 20:46:34 +01:00
Aldo Culquicondor
c048858471 Support multiple scheduling profiles in a single scheduler
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-25 11:31:20 -05:00
SataQiu
a7d927f1e7 kubelet: fix wrong flag types 2020-02-25 18:04:44 +08:00
SataQiu
c261d12bbf kube-proxy: fix confusing default value for healthz and metrics bind address, deprecate healthz-port and metrics-port flag 2020-02-25 16:59:11 +08:00
Kubernetes Prow Robot
95504c32fe
Merge pull request #86260 from rajansandeep/corednsto1.6.6-kubeadm
[kubeadm]: Bump CoreDNS version to 1.6.7
2020-02-24 23:10:49 -08:00
Kubernetes Prow Robot
59870dad01
Merge pull request #87748 from satyasm/kep-local-cidr
Refactor handling of local traffic detection.
2020-02-24 19:06:48 -08:00
Kubernetes Prow Robot
f6525dbc81
Merge pull request #88087 from alculquicondor/mutiprofiles-api
Add Schedulings Profiles to kubescheduler.config.k8s.io/v1alpha2
2020-02-24 14:43:35 -08:00
Kubernetes Prow Robot
b68f869f43
Merge pull request #88434 from SataQiu/fix-kubeadm-20200223
kubeadm: fix the bug that 'kubeadm upgrade' hangs in single node cluster
2020-02-24 13:11:59 -08:00
Sandeep Rajan
a980cb7ead update coredns to 1.6.7 2020-02-24 15:00:55 -05:00
Kubernetes Prow Robot
4e79344501
Merge pull request #88467 from neolit123/1.18-print-volume-verbosity
kubeadm: modify how component volumes are printed
2020-02-24 11:03:15 -08:00
Kubernetes Prow Robot
116e27fc19
Merge pull request #86953 from rojkov/ecdsa
kubeadm: allow creating a cluster with ECDSA keys
2020-02-24 11:02:50 -08:00
Aldo Culquicondor
9e71741d06 Add Profiles to kubescheduler.config.k8s.io/v1alpha2
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-24 09:45:46 -05:00
Lubomir I. Ivanov
1b710a4c56 kubeadm: modify how component volumes are printed
After the shift for init phases, GetStaticPodSpecs() from
app/phases/controlplane/manifests.go gets called on each control-plane
component sub-phase. This ends up calling the Printf from
AddExtraHostPathMounts() in app/phases/controlplane/volumes.go
multiple times printing the same volumes for different components.

- Remove the Printf call from AddExtraHostPathMounts().
- Print all volumes for a component in CreateStaticPodFiles() using klog
V(2).

Perhaps in the future a bigger refactor is needed here were a
single control-plane component spec can be requested instead of a
map[string]v1.Pod.
2020-02-24 16:41:03 +02:00
Kubernetes Prow Robot
20e3288277
Merge pull request #88373 from SataQiu/fix-kubeadm-20200220
kubeadm: fallback to a known etcd version if an unknown k8s version is passed
2020-02-24 05:14:47 -08:00
Dmitry Rozhkov
109f5db5a3 kubeadm: allow creating a cluster with ECDSA keys
The selected key type is defined by kubeadm's --feature-gates option:
if it contains PublicKeysECDSA=true then ECDSA keys will be generated
and used.

By default RSA keys are used still.

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
2020-02-24 11:20:07 +02:00
SataQiu
2e23f84745 kubeadm: fallback to a known etcd version if an unknown k8s version is passed 2020-02-24 10:46:39 +08:00
Kubernetes Prow Robot
ac25069a05
Merge pull request #88436 from andrewsykim/ccm-client-builder-cleanup
use ControllerClientBuilder from k8s.io/cloud-provider in cloud-controller-manager
2020-02-23 15:04:46 -08:00
Kubernetes Prow Robot
b513f359a0
Merge pull request #88429 from taesunny/master
Fix: cmd/kubeadm Typos in some error messages, comments
2020-02-23 11:14:47 -08:00
andrewsykim
ed9492ad69 use ControllerClientBuilder from k8s.io/cloud-provider in cloud-controller-manager
Signed-off-by: andrewsykim <kim.andrewsy@gmail.com>
2020-02-23 06:40:20 -05:00
SataQiu
8067dd8470 kubeadm: fix the bug that 'kubeadm upgrade' hangs in single node cluster 2020-02-23 18:57:32 +08:00
Kubernetes Prow Robot
31b8c0d23d
Merge pull request #87656 from ereslibre/do-not-depend-on-cluster-status
kubeadm: deprecate the `ClusterStatus` dependency
2020-02-22 22:30:47 -08:00
Kubernetes Prow Robot
b893aa707e
Merge pull request #88052 from neolit123/1.18-renew-use-ca-in-kubeconfig
kubeadm: update embedded CA in kubeconfig files on renewal
2020-02-22 20:50:47 -08:00
Taesun Lee
d10e3da92d Fix typos in some error messages, comments
- cmd/kubeadm
- RemoveContnainers -> RemoveContainers
- iterface -> interface
- stategicMergeSlice -> strategicMergeSlice
2020-02-23 00:44:47 +09:00
Satyadeep Musuvathy
8c6956e5bb Refactor handling of local traffic detection. 2020-02-21 17:57:34 -08:00
Kubernetes Prow Robot
58fcca211f
Merge pull request #88359 from taesunny/master
Fix: Typos in apiclient util.
2020-02-20 19:50:46 -08:00
Kubernetes Prow Robot
58596b2bf5
Merge pull request #88347 from neolit123/1.18-kubeadm-update-constants
kubeadm: update constants for 1.18
2020-02-20 04:29:43 -08:00
Kubernetes Prow Robot
79b674d827
Merge pull request #84381 from Sh4d1/egress_selector_proxy_v2
Use network proxy for proxy subresources
2020-02-20 04:29:03 -08:00
Rafael Fernández López
3e59a0651f
kubeadm: optimize the upgrade path from ClusterStatus to annotations
When doing the very first upgrade from a cluster that contains the
source of truth in the ClusterStatus struct, the new kubeadm logic
will try to retrieve this information from annotations.

This changeset adds to both etcd and apiserver endpoint retrieval the
special case in which they won't retry if we are in such cases. The
logic will retry if we find any unknown error, but will not retry in
the following cases:

- etcd annotations do not contain etcd endpoints, but the overall list
  of etcd pods is greater than 0. This means that we listed at least
  one etcd pod, but they are missing the annotation.

- API server annotation is not found on the api server pod for a given
  node name, but no errors aside from that one were found. This means
  that the API server pod is present, but is missing the annotation.

In both cases there is no point in retrying, and so, this speeds up the
upgrade path when coming from a previous existing cluster.
2020-02-20 12:19:05 +01:00
Rafael Fernández López
b140c5d64b
kubeadm: remove ClusterStatus dependency
While `ClusterStatus` will be maintained and uploaded, it won't be
used by the internal `kubeadm` logic in order to determine the etcd
endpoints anymore.

The only exception is during the first upgrade cycle (`kubeadm upgrade
apply`, `kubeadm upgrade node`), in which we will fallback to the
ClusterStatus to let the upgrade path add the required annotations to
the newly created static pods.
2020-02-20 12:18:56 +01:00