Commit Graph

7658 Commits (160ed26c20e8114579dd15e0a7f8bf51b916aa12)

Author SHA1 Message Date
Kubernetes Prow Robot eac19a3ab9
Merge pull request #73616 from dims/move-part-of-kubelet-apis-well-known-lables
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
2019-02-07 19:44:34 -08:00
Kubernetes Prow Robot 7d1dc61920
Merge pull request #73678 from ereslibre/do-not-create-etcd-datadir-dryrun
kubeadm: do not create etcd datastore if we are in dryrun mode
2019-02-07 15:49:53 -08:00
Kubernetes Prow Robot 920045652d
Merge pull request #73816 from mkumatag/fix_tmpdir
Use ioutil.TempDir for temporary dir creation
2019-02-07 13:33:19 -08:00
Chao Xu b971b12d3c Adding a limit on the maximum bytes accepted to be decoded in a resource
write request.
2019-02-07 11:07:02 -08:00
Kubernetes Prow Robot 5b6a23f3af
Merge pull request #73798 from MalloZup/remove-wrong-string
kubeadm: improve ux on infoMsg kubeconfig
2019-02-07 10:20:34 -08:00
Manjunath A Kumatagi 782409255a Use ioutil.TempDir for temporary dir creating 2019-02-07 12:27:19 -05:00
Ojas M ebb5b9436f Add priorityClassName to kubeadm kubedns manifest 2019-02-07 09:21:05 -08:00
Kubernetes Prow Robot 1b26097e1e
Merge pull request #73030 from tnozicka/fix-csr-list-watch
Switch WaitForCertificate to informers to avoid broken watches
2019-02-07 01:45:33 -08:00
Kubernetes Prow Robot b00b5d4ac0
Merge pull request #73713 from caesarxuchao/bump-json-patch-again
Importing the latest json patch and set the accumulated copy size limit
2019-02-06 21:13:45 -08:00
Ojas M b41bafac7c Add priorityClassName to kubeadm coredns manifest 2019-02-06 15:23:37 -08:00
dmaiocchi 83b808b3b0 kubeadm: improve ux on infoMsg kubeconfig 2019-02-06 23:27:12 +01:00
Chao Xu f001f9e1db Set the maximum size increase the copy operations in a json patch can cause 2019-02-06 14:15:20 -08:00
Rafael Fernández López 981bf1930c
kubeadm: do not create etcd datastore if we are in dryrun mode
This allows for kubeadm tests to pass when run with an unprivileged
user.
2019-02-06 22:59:19 +01:00
Tomas Nozicka a7588723f7 Switch WaitForCertificate to informers to avoid broken watches 2019-02-06 22:27:00 +01:00
Yago Nobre e7a8ac1099
kubeadm: graduate kubelet start join phase 2019-02-06 01:35:28 -02:00
Davanum Srinivas b975573385
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
Co-Authored-By: Weibin Lin <linweibin1@huawei.com>

Change-Id: I163b2f2833e6b8767f72e2c815dcacd0f4e504ea
2019-02-05 13:39:07 -05:00
Kubernetes Prow Robot 667584cec0
Merge pull request #73728 from neolit123/kubeadm-remove-experimental-config
kubeadm: remove warning about config usage
2019-02-05 06:47:39 -08:00
Kubernetes Prow Robot 28fefba116
Merge pull request #73725 from fabriziopandini/kubeadm-organize-phases
kubeadm: organize phases cmd
2019-02-05 03:18:42 -08:00
Kubernetes Prow Robot 1e78fec9b4
Merge pull request #73718 from fabriziopandini/remove-kubeadm-alpha-preflight
kubeadm: Remove kubeadm alpha preflight subcommand
2019-02-04 18:28:36 -08:00
Lubomir I. Ivanov b9816b1231 kubeadm: remove warning about config usage 2019-02-05 03:06:25 +02:00
Kubernetes Prow Robot 6a149864fb
Merge pull request #73285 from tallclair/typed-runtimeclass
Migrate RuntimeClass support to the generated typed client
2019-02-04 16:13:30 -08:00
fabriziopandini 64a7c0c7a5 autogenerated 2019-02-05 00:36:24 +01:00
fabriziopandini f38217c75b kubeadm-organize-phases 2019-02-05 00:36:12 +01:00
Kubernetes Prow Robot 7e086471c4
Merge pull request #73663 from danielqsj/rflag
remove flag repair-malformed-updates
2019-02-04 14:33:31 -08:00
Roy Lenferink b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
fabriziopandini 7333cc79d6 remove-kubeadm-alpha-preflight 2019-02-04 21:57:55 +01:00
Kubernetes Prow Robot 9d6ebf6c78
Merge pull request #73467 from ashishranjan738/newpackage
Refactor to use k8s.io/utils/net/ package instead of kubernetes/pkg/util/net/sets
2019-02-04 11:43:14 -08:00
Kubernetes Prow Robot 664aafbf5c
Merge pull request #73337 from yuwenma/crashloop-controllers
[Mitigate KCM CrashLooping] Add unittests for controllers' Init func
2019-02-04 09:36:20 -08:00
Rafael Fernández López 031ce12dbd
kubeadm: graduate control plane prepare phase 2019-02-04 09:58:06 +01:00
Ashish Ranjan 7be223e798 Refactor to use k8s.io/utils/net/ package instead of kubernetes/pkg/util/net/sets
Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>
2019-02-04 10:34:53 +05:30
danielqsj 2b8898b95e remove flag repair-malformed-updates 2019-02-02 20:54:35 +08:00
Kubernetes Prow Robot 0c2613c71a
Merge pull request #73474 from rosti/IsSupportedVersion
kubeadm: Introduce ValidateSupportedVersion
2019-02-02 01:59:37 -08:00
Kubernetes Prow Robot 73ccf56edd
Merge pull request #59176 from dixudx/reload_kubeproxy_config
exit kube-proxy when configuration file changes
2019-02-01 18:29:06 -08:00
yuwenma e6ab3cfc54 [Mitigate KCM CrashLooping] Add unittests for controllers' Init function. 2019-02-01 14:11:20 -08:00
David Eads b1f67e9330 catch some unhandled errors 2019-02-01 15:16:23 -05:00
Rostislav M. Georgiev e10dcf07d7 kubeadm: Introduce ValidateSupportedVersion in place of DetectUnsupportedVersion
DetectUnsupportedVersion is somewhat uncomfortable, complex and inefficient
function to use. It takes an entire YAML document as bytes, splits it up to
byte slices of the different YAML sub-documents and group-version-kinds and
searches through those to detect an unsupported kubeadm config. If such config
is detected, the function returns an error, if it is not (i.e. the normal
function operation) everything done so far is discarded.

This could have been acceptable, if not the fact, that in all cases that this
function is called, the YAML document bytes are split up and an iteration on
GVK map is performed yet again. Hence, we don't need DetectUnsupportedVersion
in its current form as it's inefficient, complex and takes only YAML document
bytes.

This change replaces DetectUnsupportedVersion with ValidateSupportedVersion,
which takes a GroupVersion argument and checks if it is on the list of
unsupported config versions. In that case an error is returned.
ValidateSupportedVersion relies on the caller to read and split the YAML
document and then iterate on its GVK map checking if the particular
GroupVersion is supported or not.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-01 19:35:39 +02:00
Kubernetes Prow Robot b5b627d522
Merge pull request #73636 from bart0sh/PR0059-kubeadm-reset-fix-null-pointer-dereference
kubeadm: fix nil pointer dereference
2019-02-01 09:03:56 -08:00
Kubernetes Prow Robot 5dd46ad911
Merge pull request #73406 from MalloZup/02-refactor
Limit scope and refactor config functions
2019-02-01 07:44:37 -08:00
Kubernetes Prow Robot b1eae78fc7
Merge pull request #73610 from rajansandeep/coredns1.3.1
Bump CoreDNS version to 1.3.1
2019-02-01 06:32:11 -08:00
Ed Bartosh ab655a29b8 kubeadm: fix nil pointer dereference
If configuration file doesn't exist client variable is not assigned
and causes kubeadm crash:

$ sudo ./_output/bin/kubeadm reset
[reset] Reading configuration from the cluster...
[reset] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xf8 pc=0x108c9e7]

goroutine 1 [running]:
cmd/kubeadm/app/util/config.getInitConfigurationFromCluster(0x171109b, 0xf, 0x0, 0x0, 0xc0005b5a00, 0x3, 0x3, 0x69)
	cmd/kubeadm/app/util/config/cluster.go:93 +0x37
cmd/kubeadm/app/util/config.loadConfiguration(0x0, 0x0, 0x18d63a0, 0xc00000c018, 0x170620b, 0x5, 0x0, 0x0, 0x15d6000, 0x18d7601, ...)
	cmd/kubeadm/app/util/config/cluster.go:67 +0x374
k8s.io/kubernetes/cmd/kubeadm/app/util/config.FetchConfigFromFileOrCluster(0x0, 0x0, 0x18d63a0, 0xc00000c018, 0x170620b, 0x5, 0x0, 0x0, 0x497700, 0x18d63e0, ...)
	cmd/kubeadm/app/util/config/cluster.go:45 +0x9c
k8s.io/kubernetes/cmd/kubeadm/app/cmd.resetDetectCRISocket(0x0, 0x0, 0x1, 0x0, 0x18d63e0, 0xc0003f0630)
	cmd/kubeadm/app/cmd/reset.go:304 +0x73
k8s.io/kubernetes/cmd/kubeadm/app/cmd.NewCmdReset.func1(0xc0002a6780, 0x26dd548, 0x0, 0x0)
	cmd/kubeadm/app/cmd/reset.go:71 +0x267
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).execute(0xc0002a6780, 0x26dd548, 0x0, 0x0, 0xc0002a6780, 0x26dd548)
	vendor/github.com/spf13/cobra/command.go:760 +0x2cc
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc00019a000, 0xc000389180, 0xc00019a500, 0xc00057c1a0)
	vendor/github.com/spf13/cobra/command.go:846 +0x2fd
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).Execute(0xc00019a000, 0xc00000c010, 0x18d63a0)
	vendor/github.com/spf13/cobra/command.go:794 +0x2b
k8s.io/kubernetes/cmd/kubeadm/app.Run(0xc000086180, 0x18b)
	cmd/kubeadm/app/kubeadm.go:48 +0x202
main.main()
	cmd/kubeadm/kubeadm.go:29 +0x33

Removing check for configuration file existence should fix the issue.
2019-02-01 15:36:43 +02:00
Avi Deitcher 0fae35dfd8 Update kubelet overview help doc 2019-02-01 13:14:48 +02:00
Kubernetes Prow Robot 6af7d2cb1a
Merge pull request #69552 from Pingan2017/remove-experimental-fail-swap-on-flag
remove kubelet flag '--experimental-fail-swap-on' (deprecated in v1.8)
2019-01-31 19:32:28 -08:00
Sandeep Rajan aa11f6c298 Bump CoreDNS version to 1.3.1 2019-01-31 16:55:02 -05:00
dmaiocchi fd708d173e refactor config functions 2019-01-31 16:48:18 +01:00
Kubernetes Prow Robot 92076f0d2e
Merge pull request #73501 from dlipovetsky/fix-kubelet-exec-error
kubeadm: Make exec error message more informative
2019-01-30 20:26:03 -08:00
Kubernetes Prow Robot 1f7e9fd9a2
Merge pull request #73488 from andrewsykim/replace-utils-file
Replace pkg/util/file with k8s.io/utils/path
2019-01-30 17:50:16 -08:00
Kubernetes Prow Robot 0f93328c7a
Merge pull request #73457 from xichengliudui/updatedockerversion
Update docker support for k8s
2019-01-30 16:39:01 -08:00
Kubernetes Prow Robot f2ade8e993
Merge pull request #73163 from MalloZup/phases-preflight
expose preflight join as phases
2019-01-30 14:28:43 -08:00
Chao Xu bed7696876 generated BUILD files 2019-01-30 13:28:48 -08:00
Chao Xu 1281243860 Remove the --storage-versions flag from kube-apiserver.
The storage version now is solely decided by the
scheme.PrioritizedVersionsForGroup(). For cohabitating resources, the storage
version will be that of the overriding group as returned by
storageFactory.getStorageGroupResource().
2019-01-30 13:28:48 -08:00
dmaiocchi 71494aa9ce add preflight-phase 2019-01-30 20:43:45 +01:00
Kubernetes Prow Robot d388b3eea7
Merge pull request #73531 from bradhoekstra/followup-71355
Refactor service-proxy-name label
2019-01-30 10:15:54 -08:00
AdamDang 2cb5a3ebdd
Update postprocessing_test.go
Small fix to make the code easy to read.
2019-01-30 21:22:22 +08:00
xichengliudui 945889988b Update docker support for k8s
update pull request

update pull request

update pull request

update pull request
2019-01-30 03:25:05 -05:00
Kubernetes Prow Robot d57d606275
Merge pull request #73495 from neolit123/phase-control-plane
kubeadm: fix missing 'all' in 'init phase control-plane'
2019-01-29 16:50:46 -08:00
Daniel Lipovetsky 4fe0d2107d kubeadm: Make exec error message more informative 2019-01-29 16:38:35 -08:00
Kubernetes Prow Robot bb9a12d6f8
Merge pull request #73487 from ereslibre/phases-cleanup
kubeadm: cleanup of phases arguments
2019-01-29 15:34:30 -08:00
Lubomir I. Ivanov 52e62a73d8 kubeadm: fix missing 'all' in 'init phase control-plane' 2019-01-30 00:24:48 +02:00
Kubernetes Prow Robot b8b689aae0
Merge pull request #72111 from rosti/reduce-initcfg
kubeadm: Reduce the usage of InitConfiguration
2019-01-29 14:01:07 -08:00
Rafael Fernández López 1bd15658f8
kubeadm: cleanup of phases arguments
* Return `nil` instead of a pointer to an empty struct when possible,
  before the pointer was introduced the empty struct was required.

* Explicitly accept only one argument maximum for `kubeadm join` as in
  `kubeadm join <master>`.

* Accept no arguments for `kubeadm init`.

* Make phases leafs accept arguments, whereas intermediate phases
  automatically gets set that they accept no arguments.
2019-01-29 22:11:59 +01:00
Andrew Kim bdbef741d1 remove usgae of NSEnterExecutor 2019-01-29 15:20:13 -05:00
Andrew Kim 84191eb99b replace pkg/util/file with k8s.io/utils/path 2019-01-29 15:20:13 -05:00
Kubernetes Prow Robot c501d464af
Merge pull request #73267 from rajansandeep/proxytoforward
Use forward plugin instead of proxy plugin in the default configuration of CoreDNS
2019-01-29 11:32:28 -08:00
Brad Hoekstra 6117316752 Refactor service-proxy-name label 2019-01-29 11:28:35 -05:00
Di Xu cc16d64368 exit kube-proxy when configuration file changes 2019-01-29 18:05:51 +08:00
Kubernetes Prow Robot 5262dba064
Merge pull request #73198 from mourya007/library
Re-Organize the pkutil library
2019-01-29 01:20:42 -08:00
Kubernetes Prow Robot 3c34d28fe0
Merge pull request #72818 from humblec/md-2
Remove explicit nil initialization and correct error string.
2019-01-28 21:52:03 -08:00
Rostislav M. Georgiev 80e2a3cf07 kubeadm: reduce the usage of InitConfiguration
For historical reasons InitConfiguration is used almost everywhere in kubeadm
as a carrier of various configuration components such as ClusterConfiguration,
local API server endpoint, node registration settings, etc.

Since v1alpha2, InitConfiguration is meant to be used solely as a way to supply
the kubeadm init configuration from a config file. Its usage outside of this
context is caused by technical dept, it's clunky and requires hacks to fetch a
working InitConfiguration from the cluster (as it's not stored in the config
map in its entirety).

This change is a small step towards removing all unnecessary usages of
InitConfiguration. It reduces its usage by replacing it in some places with
some of the following:

- ClusterConfiguration only.
- APIEndpoint (as local API server endpoint).
- NodeRegistrationOptions only.
- Some combinations of the above types, or if single fields from them are used,
  only those field.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-01-28 12:21:01 +02:00
Lubomir I. Ivanov 1b0ba920fe kubeadm: fix a couple of problems related to initData/joinData
Fix a couple of problems related to data used by the phases runners
of `init` and `join`.

1) make `newInitData()` and `newJoinData()` return pointers.

Methods of the data objects returned by these functions should
be able to modify fields in the data objects - e.g.
`func (d initData) Client()`. This allows us to store a state and
not execute the same logic multiple times - e.g. obtaining a client.

A side effect of this change is that the `new...` functions must return
pointers, so that casting the data object in a phase, from
`workflow.RunData` to a locally defined interface, works.

2) Make it possible to pass arguments from a parent command
to a sub-phase with regards to data initialization.
2019-01-26 18:41:19 +02:00
mourya007 7c37e91a6d Re-Organize the pkutil library 2019-01-26 14:56:36 +05:30
Kubernetes Prow Robot 30ed3b41b7
Merge pull request #73317 from hello2mao/remove-cloud-nil-check
Remove unnecessary nil check for cloud
2019-01-25 22:31:27 -08:00
Kubernetes Prow Robot a5e424dc17
Merge pull request #72923 from saschagrunert/dedent-update
Update dedent to latest release
2019-01-25 18:32:23 -08:00
Kubernetes Prow Robot 5673506540
Merge pull request #73320 from liggitt/initializer-cleanup
Clean up initializer-related comments, test data
2019-01-25 15:28:18 -08:00
Kubernetes Prow Robot d3a2566371
Merge pull request #73109 from palash25/verlog
Add version logging to kube-scheduler
2019-01-25 15:28:08 -08:00
Kubernetes Prow Robot d54716338a
Merge pull request #73302 from rajansandeep/prometheusport
Add metrics port to CoreDNS service
2019-01-25 12:04:37 -08:00
Kubernetes Prow Robot c6a6c65e32
Merge pull request #73316 from rosti/fix-kubeadm-reset
kubeadm: Fix auto CRI detection in kubeadm reset
2019-01-25 10:05:22 -08:00
Jordan Liggitt 89b0b0b84b Clean up initializer-related comments, test data 2019-01-25 12:37:45 -05:00
Kubernetes Prow Robot ce52bf1265
Merge pull request #73093 from ereslibre/verify-certificate-sans
kubeadm: verify that present certificates contain at least the required SANs
2019-01-25 08:53:08 -08:00
maohongbin01 ac8f0c81e5 remove unnecessary nil check for cloud 2019-01-25 23:26:40 +08:00
Rostislav M. Georgiev 873accd513 kubeadm: Fix auto CRI detection in kubeadm reset
Reversed if statement is turns off CRI detection in kubeadm reset. Trivial fix.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-01-25 17:04:43 +02:00
Sandeep Rajan e9220dd408 add prometheus port 2019-01-25 11:29:03 +05:30
Kubernetes Prow Robot 2cbb16bc8d
Merge pull request #73243 from andrewsykim/update-utils-vendor
Update vendor k8s.io/utils and remove internal utils
2019-01-24 16:30:14 -08:00
Kubernetes Prow Robot e28c757e87
Merge pull request #72972 from liggitt/remove-alpha-initializers
Remove use of alpha initializers
2019-01-24 14:54:52 -08:00
Andrew Kim 0bc5508aca replace client-go/util/integer with k8s.io/utils/integer 2019-01-24 15:34:21 -05:00
Kubernetes Prow Robot ccd83ce1c5
Merge pull request #72765 from yuwenma/kcm-test-ResourceQuotaController
[Mitigate KCM CrashLooping] Add test for ResourceQuotaController Init.
2019-01-24 11:54:21 -08:00
Tim Allclair aab3523e0e Migrate RuntimeClass support to the generated typed client 2019-01-24 11:08:30 -08:00
Andrew Kim 2ea82cea20 replace pkg/util/nsenter with k8s.io/utils/nsenter 2019-01-24 13:49:04 -05:00
Kubernetes Prow Robot 20a11ac5cc
Merge pull request #73239 from mattkelly/bugfix/kubeadm-sa-cert-dir
Add back --cert-dir option for kubeadm init phase certs sa
2019-01-24 08:45:36 -08:00
Kubernetes Prow Robot d027ecfa97
Merge pull request #70778 from wongma7/lease
Add Lease implementation to leaderelection package
2019-01-24 08:45:25 -08:00
Sandeep Rajan c346ae1e49 Use forward plugin instead of proxy in the default configuration 2019-01-24 17:28:55 +05:30
Palash Nigam e0bbce2a8a
Add version logging to kube-scheduler
Related to: #27744
2019-01-24 10:58:41 +05:30
Matt Kelly 35faaab570
Add back --cert-dir option for init phase certs sa 2019-01-23 19:37:08 -05:00
Akihito INOH 4a3b990bbe Change to [bootstrap-token] in kubeadm output
In output of "kubeadm init", there are two strings for meaning of
bootstrap token which are "bootstraptoken" and "bootstrap-token".
This changes `[bootstraptoken]` to `[bootstrap-token]`.
2019-01-24 08:40:58 +09:00
Kubernetes Prow Robot baaaa15fdf
Merge pull request #69940 from MarcPow/master
Bind coredns containers to  linux nodes to avoid Windows scheduling
2019-01-23 12:19:53 -08:00
Kubernetes Prow Robot b66e332d3c
Merge pull request #69366 from rosti/cri-auto-detect
kubeadm: Detect CRIs automatically
2019-01-23 09:49:17 -08:00
Jordan Liggitt dc1fa870bf Remove alpha InitializerConfiguration types, Initializers admission plugin 2019-01-23 11:37:39 -05:00
Matthew Wong 410175851c Add Lease implementation to leaderelection package 2019-01-23 10:50:53 -05:00
yuwenma 15b0d3de7c [Mitigate KCM CrashLooping] Add test for ResourceQuotaController Init 2019-01-22 16:23:34 -08:00
RA489 5b64a98689 Stop using API server's `--insecure-port` 2019-01-22 17:31:39 +05:30
Rostislav M. Georgiev f97770b175 kubeadm: Detect CRIs automatically
In order to allow for a smoother UX with CRIs different than Docker, we have to
make the --cri-socket command line flag optional when just one CRI is
installed.

This change does that by doing the following:

- Introduce a new runtime function (DetectCRISocket) that will attempt to
  detect a CRI socket, or return an appropriate error.
- Default to using the above function if --cri-socket is not specified and
  CRISocket in NodeRegistrationOptions is empty.
- Stop static defaulting to DefaultCRISocket. And rename it to
  DefaultDockerCRISocket. Its use is now narrowed to "Docker or not"
  distinguishment and tests.
- Introduce AddCRISocketFlag function that adds --cri-socket flag to a flagSet.
  Use that in all commands, that support --cri-socket.
- Remove the deprecated --cri-socket-path flag from kubeadm config images pull
  and deprecate --cri-socket in kubeadm upgrade apply.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-01-21 16:12:04 +02:00