Commit Graph

7355 Commits (bfa389dd5d2bd94e3221931ef5c91dad2365202d)

Author SHA1 Message Date
Jay Lim 7fbdcf889a kube-apiserver: fix missing global flags for --help
Signed-off-by: Jay Lim <jay@imjching.com>
2018-11-21 12:30:09 -05:00
Rostislav M. Georgiev 037fb6103e kubeadm: config migrate handles more valid configs
kubeadm config migrate uses AnyConfigFileAndDefaultsToInternal, which can
unmarshal config from file only if InitConfiguration or JoinConfiguration are
present. Even with that in mind, it can only return a singlie config object,
with InitConfiguration taking precendence over JoinConfiguration. Thus, the
following cases were not handled properly, while they were perfectly valid for
kubeadm init/join:

- ClusterConfiguration only file caused kubeadm config migrate to exit with
  error.
- Init + Join configurations in the same file caused Init + Cluster
  configuration to be produced (ignoring JoinConfiguration). The same is valid
  when the combo is Init + Cluster + Join configurations.
- Cluster + Join configuration ignores ClusterConfiguration and only
  JoinConfiguration gets migrated.

To fix this, the following is done:
- Introduce MigrateOldConfigFromFile which migrates old config from a file,
  while ensuring that all kubeadm originated input config kinds are taken care
  of. Add comprehensive unit tests for this.
- Replace the use of AnyConfigFileAndDefaultsToInternal in
  kubeadm config migrate with MigrateOldConfigFromFile.
- Remove the no longer used and error prone AnyConfigFileAndDefaultsToInternal.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-21 13:18:39 +02:00
Jay Lim 97f9c6afe7 auto-generated file 2018-11-21 17:39:15 +08:00
stewart-yu f5836c865b add --cloud-provider-gce-lb-src-cidrs for *-controller-manager, and add test 2018-11-21 17:39:15 +08:00
Jay Lim 10dd5d6631 *-controller-manager: fix missing global flags for --help 2018-11-21 17:39:14 +08:00
k8s-ci-robot 1431aeb45d
Merge pull request #71283 from Klaven/kubeadm_857
Updates to always pass spec.nodeName as --hostname-override
2018-11-20 17:31:24 -08:00
k8s-ci-robot aac9ee1793
Merge pull request #71259 from rosti/minver-bump-12
kubeadm: Bump minimum Kubernetes version to v1.12
2018-11-20 17:31:15 -08:00
k8s-ci-robot f8983a8988
Merge pull request #70633 from leblancd/kubeadm_etcd_v6_fix
Fix kubeadm etcd manifests to use brackets around IPv6 addrs
2018-11-20 15:34:24 -08:00
Marek Counts 5ad7e4ee09 Fixes kubeadm 857
updated manifest file to always pass spec.nodeName as the --hostname-override.
2018-11-20 17:44:26 -05:00
Ed Bartosh 012e46320b kubeadm: override node registration options from command line
'kubeadm join' silently ignores --node-name and --cri-socket
command line options if --config option is specified.

In some cases it's much easier for users to override these parameters
from the command line instead of updating config, especially for
multi-node automatic deployments where only node name should be changed.

Implemented setting 'name' and 'criSocket' options from the command
line even if --config command line option is used.
2018-11-20 16:26:57 +02:00
Rostislav M. Georgiev aa414e139e kubeadm: Bump minimum Kubernetes version to v1.12
Bump MinimumControlPlaneVersion and MinimumKubeletVersion to v1.12 and update
any related tests.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-20 16:21:49 +02:00
k8s-ci-robot 50e02fd0cc
Merge pull request #71229 from chuckha/etcd-server
kubeadm: adds etcd server version for 1.13
2018-11-19 16:25:42 -08:00
k8s-ci-robot 956dcdd4ca
Merge pull request #71232 from liztio/sparse-cert-creation
Sparse cert creation for `kubeadm init`
2018-11-19 15:07:32 -08:00
liz 2f14e1801e
`kubeadm init` supports sparse certificates 2018-11-19 16:55:16 -05:00
k8s-ci-robot 16d6daf520
Merge pull request #71219 from neolit123/kubeadm-go-docs-1.13
kubeadm: fix issues in the v1beta1 godoc
2018-11-19 13:03:25 -08:00
liz 9e8228f14a
Move some test functions into test utils 2018-11-19 14:38:10 -05:00
Chuck Ha 679d4397cf
kubeadm: adds etcd server version for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-11-19 14:34:00 -05:00
Yago Nobre c185836e64
Add flags to kubeadm init phase uploadconfig all 2018-11-19 14:02:29 -02:00
Lubomir I. Ivanov bc6837ffe3 kubeadm: fix issues in the v1beta1 godoc
- make the whole config example actually pass strict verification
(i.e. make the config work with --config)
- add print init-defaults/join defaults
- other small fixes
2018-11-19 17:26:34 +02:00
Clayton Coleman 3464222267
Revert "Make bootstrap client cert loading part of rotation"
This reverts commit 0af19875ad.

Revert "Ensure the bootstrap rotation code is tested by forcing rotation"

This reverts commit de293b2d7d.
2018-11-17 10:24:39 -05:00
Clayton Coleman de293b2d7d
Ensure the bootstrap rotation code is tested by forcing rotation
Expose both a Stop() method (for cleanup) and a method to force
cert rotation, but only expose Stop() on the interface.

Verify that we choose the correct client.
2018-11-16 21:50:52 -05:00
Clayton Coleman 0af19875ad
Make bootstrap client cert loading part of rotation
Ensure that bootstrap+clientcert-rotation in the Kubelet can:

1. happen in the background so that static pods aren't blocked by bootstrap
2. collapse down to a single call path for requesting a CSR
3. reorganize the code to allow future flexibility in retrieving bootstrap creds

Fetching the first certificate and later certificates when the kubelet
is using client rotation and bootstrapping should share the same code
path. We also want to start the Kubelet static pod loop before
bootstrapping completes. Finally, we want to take an incremental step
towards improving how the bootstrap credentials are loaded from disk
(potentially allowing for a CLI call to get credentials, or a remote
plugin that better integrates with cloud providers or KSMs).

Reorganize how the kubelet client config is determined. If rotation is
off, simplify the code path. If rotation is on, load the config
from disk, and then pass that into the cert manager. The cert manager
creates a client each time it tries to request a new cert.

Preserve existing behavior where:

1. bootstrap kubeconfig is used if the current kubeconfig is invalid/expired
2. we create the kubeconfig file based on the bootstrap kubeconfig, pointing to
   the location that new client certs will be placed
3. the newest client cert is used once it has been loaded
2018-11-16 21:50:26 -05:00
liz 440a5ad7cb
Don't allow --csr-only for CA certs or all 2018-11-16 15:22:37 -08:00
k8s-ci-robot f4fd7b0b2b
Merge pull request #71069 from fabriziopandini/kubeadm-phases-add-all-subcommands
Kubeadm - add all subcommands to phases
2018-11-16 15:17:03 -08:00
k8s-ci-robot 5ec9349276
Merge pull request #70917 from dims/add-log-file-option-to-kubelet-flags
add log_file option to kubelet flags
2018-11-16 15:16:53 -08:00
k8s-ci-robot fab7009997
Merge pull request #71135 from luxas/kubeadm_repo_flag
kubeadm: Allow customizing the image repository via flags
2018-11-16 13:20:16 -08:00
Dane LeBlanc 99887716c5 Fix kubeadm etcd manifests to use brackets around IPv6 addrs
When 'kubeadm init ...' is used with an IPv6 kubeadm configuration,
kubeadm currently generates an etcd.yaml manifest that uses IP:port
combinatins where the IP is an IPv6 address, but it is not enclosed
in square brackets, e.g.:
    - --advertise-client-urls=https://fd00:20::2:2379
For IPv6 advertise addresses, this should be of the form:
    - --advertise-client-urls=https://[fd00:20::2]:2379

The lack of brackets around IPv6 addresses in cases like this is
causing failures to bring up IPv6-only clusters with Kubeadm as
described in kubernetes/kubeadm Issues #1212.

This format error is fixed by using net.JoinHostPort() to generate
URLs as shown above.

Fixes kubernetes/kubeadm Issue #1212
2018-11-16 15:12:29 -05:00
k8s-ci-robot 7ff49c99d3
Merge pull request #71126 from rosti/warn-api-bind-override
kubeadm: Warn on API server bind address override
2018-11-16 12:04:10 -08:00
Lucas Käldström a666003b36
kubeadm: Allow customizing the image repository via flags 2018-11-16 23:52:56 +08:00
fabriziopandini 1308c7d2f5 kubeadm phases add all subcommands 2018-11-16 16:39:04 +01:00
k8s-ci-robot e94a9f9321
Merge pull request #71085 from bsalamat/leader-election-fix
Report kube-scheduler unhealthy if leader election is wedged
2018-11-16 05:13:28 -08:00
k8s-ci-robot a5f06fdd16
Merge pull request #71066 from fabriziopandini/kubeadm-fix-validateMixedArgs
Kubeadm - Fix validateMixedArgs for phases
2018-11-16 03:57:01 -08:00
k8s-ci-robot 0908af5e09
Merge pull request #71061 from yagonobre/init-todo
Remove todo from init phase
2018-11-16 03:56:52 -08:00
Rostislav M. Georgiev b46fbbc4e6 kubeadm: Warn on API server bind address override
ChooseAPIServerBindAddress is silently overriding the requested bind IP
address for the API server if that address is deemed unsuitable. This is
currently done only if the IP is a loopback one (127.0.0.0/8; ::1/128).
It's best to at least issue a warning if such override occurs, so that there
are no surprised users by this.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-16 13:00:52 +02:00
k8s-ci-robot 973b5d291d
Merge pull request #71053 from yagonobre/upload-config-fix
Fix `kubeadm upload-config kubeadm` example
2018-11-16 01:53:50 -08:00
k8s-ci-robot dc6632ad4c
Merge pull request #71046 from liztio/certs-renew-use-api-fix
Certs renew use api fix
2018-11-16 01:53:40 -08:00
k8s-ci-robot 4b98060f4e
Merge pull request #70901 from neolit123/kubeadm-strict-config
kubeadm: enable strict config unmarhaling
2018-11-15 23:52:36 -08:00
k8s-ci-robot 8797db339d
Merge pull request #69827 from tomkukral/kadm-etcd
use etcd endpoints from advertise-client-urls
2018-11-15 17:25:17 -08:00
Lubomir I. Ivanov 2473bba9e5 kubeadm: update autogenerated bazel 2018-11-16 02:22:04 +02:00
Lubomir I. Ivanov cc60625930 kubeadm: handle strict config unmarshaling 2018-11-16 02:21:31 +02:00
k8s-ci-robot 3d3cc63cc8
Merge pull request #70809 from liztio/csr
Generate CSRs for kubeadm
2018-11-15 15:00:02 -08:00
liz 6afb9a117b
Fix renewing certificates via the API
Poll for events, print CSR name, and parse PEM instead of CSR
2018-11-15 14:02:47 -08:00
k8s-ci-robot 7b4d4bc8ac
Merge pull request #70508 from dashpole/pod_resources_socket
Add socket-based kubelet pod resources API.
2018-11-15 13:43:44 -08:00
k8s-ci-robot 504466c4e6
Merge pull request #68267 from liggitt/node-label-update
Limit kubelets from updating their own labels when NodeRestriction is enabled
2018-11-15 11:11:02 -08:00
Bobby (Babak) Salamat 34b4a5bbee Add watchdog for leader election logic getting wedged 2018-11-15 11:02:14 -08:00
liz 5fc1a9a87c
Option to generate CSRs instead of issued certificates 2018-11-15 10:47:54 -08:00
David Ashpole 630cb53f82 add kubelet grpc server for pod-resources service 2018-11-15 09:43:20 -08:00
k8s-ci-robot b1a52a38e9
Merge pull request #67257 from pbarker/audit
dynamic audit configuration
2018-11-15 02:42:59 -08:00
fabriziopandini 807338e96a Fix validateMixedArgs for phases 2018-11-15 11:38:18 +01:00
k8s-ci-robot f48e18faa4
Merge pull request #70971 from cheftako/leaseCheck
Report KCM as unhealthy if leader election is wedged.
2018-11-15 01:30:59 -08:00
k8s-ci-robot 4fdac19603
Merge pull request #71059 from timothysc/kubeadmmsg
Minor update to the comment block characters for kubeadm
2018-11-14 23:20:07 -08:00
Yago Nobre 8b110e27fc
Remove todo from init phase 2018-11-15 01:43:56 -02:00
Timothy St. Clair aea4a4e0fb Minor update to the comment block characters for kubeadm 2018-11-14 20:31:11 -06:00
k8s-ci-robot e3ddaaad1d
Merge pull request #71045 from neolit123/kubeadm-go-docs-1.13
kubeadm: fix godocs indentation for v1beta1
2018-11-14 17:25:50 -08:00
k8s-ci-robot 2965d24547
Merge pull request #71043 from chuckha/etcd-doc
kubeadm: document required etcd configuration
2018-11-14 17:25:40 -08:00
k8s-ci-robot bb2fcd90f3
Merge pull request #71040 from fabriziopandini/kubeadm-phases-local-flags
Kubeadm phases - add local flags
2018-11-14 17:25:30 -08:00
Walter Fender 9c43ee6d6e Report KCM as unhealthy if leader election is wedged.
Feedback from lavalamp and deads2k.
Changed Check() logic to be central to LeaderElector.
Further changes, especially cleaning up the test code.
2018-11-14 16:57:37 -08:00
Patrick Barker eb89d3dddd adds dynamic audit configuration 2018-11-14 17:54:06 -07:00
Yago Nobre 606bbc0457
Fix kubeadm upload-config kubeadm example 2018-11-14 22:28:51 -02:00
k8s-ci-robot 1240274204
Merge pull request #71037 from rdodev/reset-iptables
Reset helptext alignment
2018-11-14 15:39:46 -08:00
Lubomir I. Ivanov da49adb52f kubeadm: fix godocs indentation for v1beta1 2018-11-15 00:13:58 +02:00
Chuck Ha 02ec1e84b0
kubeadm: document required etcd configuration
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-11-14 17:05:24 -05:00
k8s-ci-robot 0df79e4daa
Merge pull request #71008 from neolit123/kubeadm-go-docs-1.13
kubeadm: update notes and example config in v1beta1 godocs
2018-11-14 13:16:54 -08:00
k8s-ci-robot 1a9fd268a9
Merge pull request #71005 from mikedanese/certpubfix
rootcacertpublisher: trigger resync on namespace add and update
2018-11-14 11:38:07 -08:00
fabriziopandini 1b9986b219 Kubeadm phases - add local flags 2018-11-14 20:29:52 +01:00
k8s-ci-robot ba7d3c3ba8
Merge pull request #71009 from timothysc/phaseflow
Fixup language on help message to denote phases
2018-11-14 09:26:20 -08:00
Ruben Orduz d5cd412ae0 reset helptext alignment
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
2018-11-14 09:59:48 -05:00
k8s-ci-robot 3e6d414b55
Merge pull request #70967 from mikedanese/fixtropts
Fix broken defaulting and validation in TokenRequest enablement
2018-11-13 22:03:42 -08:00
Jordan Liggitt 9fb2dcad5e Limit kubelets from updating their own labels 2018-11-13 23:48:47 -05:00
Timothy St. Clair ef3380b42d Fixup language on help message to denote phases
Signed-off-by: Timothy St. Clair <timothysc@gmail.com>
2018-11-13 20:16:15 -06:00
k8s-ci-robot 90295640ef
Merge pull request #71010 from neolit123/revert-68890-dnspolicy
Revert "kubeadm: Create control plane with ClusterFirstWithHostNet dns policy"
2018-11-13 18:07:33 -08:00
Mike Danese 20bad760fc cleanup error handling in apiserver opts validation 2018-11-13 17:27:13 -08:00
Mike Danese 06935e1c90 split TokenRequest initialization out of run and into complete and validate 2018-11-13 17:27:13 -08:00
k8s-ci-robot 8d27e5683c
Merge pull request #70874 from rdodev/reset-iptables
iptables reset text message
2018-11-13 16:14:04 -08:00
k8s-ci-robot 48d788de6f
Merge pull request #71001 from Deepomatic/recognize_docker_1809_version
Recognize newer docker versions without -ce/-ee suffix: 18.09.0
2018-11-13 14:59:36 -08:00
Yann Hodique 4d9c01d747 replace golang.org/x/exp/inotify with standalone library
The inotify code was removed from golang.org/x/exp several years ago. Therefore
importing it from that path prevents downstream consumers from using any module
that makes use of more recent features of golang.org/x/exp.

This change is a followup to google/cadvisor#2060 which was merged with #70889

This fixes #68478
2018-11-13 14:51:40 -08:00
Lubomir I. Ivanov 24b4280e3f
Revert "kubeadm: Create control plane with ClusterFirstWithHostNet dns policy" 2018-11-14 00:18:32 +02:00
Lubomir I. Ivanov 865904d0e1 kubeadm: update notes and example config in v1beta1 godocs 2018-11-13 23:52:42 +02:00
k8s-ci-robot bea07c0dc6
Merge pull request #70935 from neolit123/kubeadm-update-cmd-go
kubeadm: update the state in app/cmd.go
2018-11-13 13:45:41 -08:00
k8s-ci-robot 8b562218b7
Merge pull request #70876 from chuckha/idempotency
kubeadm: Adds tests to node patching
2018-11-13 13:45:31 -08:00
k8s-ci-robot 3cba75ea60
Merge pull request #70603 from chuckha/pod-infra-container-image
kubeadm: set pod-infra-container-image for the kubelet
2018-11-13 13:45:02 -08:00
Mike Danese bf02f55147 rootcacertpublisher: trigger resync on namespace add and update
Last cleanup was a bit overzealous.
2018-11-13 11:38:45 -08:00
Mike Danese 766aab509a dedup APIAudiences config in kube-apiserver, use GenericConfig field 2018-11-13 11:07:31 -08:00
Yago Nobre 7a9a8f5f35
kubeadm graduate addons phase 2018-11-13 16:33:59 -02:00
k8s-ci-robot bfb95290b9
Merge pull request #70795 from yuexiao-wang/print-join-command
kubeadm: print the join command
2018-11-13 10:11:21 -08:00
Lubomir I. Ivanov 9a37f2d878
kubeadm: set pod-infra-container-image for the kubelet
The kubelet allows you to set `--pod-infra-container-image`
(also called `PodSandboxImage` in the kubelet config),
which can be a custom location to the "pause" image in the case
of Docker. Other CRIs are not supported.

Set the CLI flag for the Docker case in flags.go using
WriteKubeletDynamicEnvFile().
2018-11-13 13:10:22 -05:00
Thomas Riccardi 068cdaa56c Recognize newer docker versions without -ce/-ee suffix
Since docker 18.09, the ServerVersion field format changed: the `-ce`
or `-ee` suffix disappeared:

- docker 18.06: `18.06.1-ce`
- docker 18.09: `18.09.0`

This was not expected by the docker_validator version regexp, which
assumed newer docker versions ended with `-[a-z]{2}`.
This made the validator return an error, whereas we expect it to
return only a warning (by recognizing it as a newer but not yet
supported docker version).

This commit relax the version regexp to also recognize `18.09.0`.
The docker validator now returns a warning, as tested.
2018-11-13 18:55:29 +01:00
Chuck Ha db3d636f91
updates license year
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-11-13 12:49:42 -05:00
Chuck Ha 5792eeb137
kubeadm: Adds tests to node patching
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-11-13 12:48:54 -05:00
k8s-ci-robot 9199025b24
Merge pull request #70849 from yagonobre/rm-dynamic-kubelet
Remove DynamicKubeletConfig from init and join workflow
2018-11-13 08:54:34 -08:00
k8s-ci-robot bd2cb5a72d
Merge pull request #70831 from mikedanese/securesvcacct
add BoundServiceAccountTokenVolume feature
2018-11-13 08:54:25 -08:00
Ruben Orduz 89a5d5cadd iptables reset text message
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
2018-11-13 10:36:43 -05:00
Yago Nobre 62c9303ecf
Remove DynamicKubeletConfig from init and join workflow, also remove DynamicKubeletConfig feature gate 2018-11-13 11:56:24 -02:00
yuexiao-wang 5851fd556b kubeadm: print the join command should happen after all the phases in init have finished
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-11-13 19:05:10 +08:00
fabriziopandini 7f1b2a62a7 fix kubeadm upgrade 2018-11-13 09:14:16 +01:00
k8s-ci-robot bcef72bf06
Merge pull request #70877 from yagonobre/reset
Handler error when kubeconfig file not exist on kubeadm reset
2018-11-12 23:56:57 -08:00
k8s-ci-robot 3c5c6025bf
Merge pull request #70807 from Klaven/kubeadm_1221
kubeadm: Remove AuditPolicyConfiguration
2018-11-12 15:43:23 -08:00
Mike Danese f4ff26679f add BoundServiceAccountTokenVolume feature
* require TokenRequest to be enabled and configured
* bind ca.crt publisher to this feature rather than to TokenRequest
2018-11-12 13:11:47 -08:00
k8s-ci-robot 08784ad9af
Merge pull request #70842 from mikedanese/simplify
combine syncs in rootcacertpublisher
2018-11-12 12:01:45 -08:00
Marek 064f74b2e8 fixes kubeadm 1221 to remove AuditPolicyConfiguration
Added conversion test and failure.
2018-11-12 14:33:26 -05:00