Commit Graph

5714 Commits (2ac136bf0734586847d1a239400953718abf9052)

Author SHA1 Message Date
Kubernetes Submit Queue bd6b71d015
Merge pull request #59582 from sttts/sttts-ctrl-mgr-auth
Automatic merge from submit-queue (batch tested with PRs 59653, 58812, 59582, 59665, 59511). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

controller-manager: switch to options+config pattern and add https+auth

This PR switch the {kube,cloud}-controller-managers to use the Options+Config struct pattern for bootstrapping, as we use it throughout all apiservers. This allows us to easily plug in https and authn/z support.

Fixes parts of https://github.com/kubernetes/kubernetes/issues/59483

This is equivalent to https://github.com/kubernetes/kubernetes/pull/59408 after squashing.

```release-note
Deprecate insecure HTTP port of kube-controller-manager and cloud-controller-manager. Use `--secure-port` and `--bind-address` instead.
```
2018-02-13 11:12:47 -08:00
Kubernetes Submit Queue f7e5757380
Merge pull request #58812 from bart0sh/PR0001-join-checks
Automatic merge from submit-queue (batch tested with PRs 59653, 58812, 59582, 59665, 59511). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add   HTTPProxyCheck to preflight checks for 'kubeadm join' subcommand

**What this PR does / why we need it:**

Add HTTPProxyCheck for API servers
    
It makes sense to check API servers and print warnings if they're
going to be accessed through proxy. This is similar to what's
already done for 'kubeadm init'.
2018-02-13 11:12:44 -08:00
Kubernetes Submit Queue 1e8f40f42b
Merge pull request #59653 from bart0sh/PR0006-remove-bootstrap-config
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove bootstrap kubelet config on reset

**What this PR does / why we need it**:

Remove /etc/kubernetes/bootstrap-kubelet.conf when running 'kubeadm reset'
to ensure it will not be reused when joining the cluster next time.

**Release note**:
```release-note
NONE
```
2018-02-13 10:34:27 -08:00
Kubernetes Submit Queue fd553ca8e2
Merge pull request #53766 from liggitt/ui-redirect
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove /ui/ redirect

The existing kube-apiserver hard-codes `/ui` to redirect to an optional add-on, which is not appropriate. It does not work in the following scenarios:
* https-enabled dashboards
* the dashboard is deployed to a different namespace or service name
* the dashboard is not installed at all
* authorization is enabled and does not allow access to /ui

This PR removes the hard-coded `/ui` redirect.

```release-note
apiserver: the /ui kube-dashboard redirect has been removed. Follow instructions specific to your deployment to access kube-dashboard
```
2018-02-13 04:29:18 -08:00
Dr. Stefan Schimanski 5483ab7679 Update generated files 2018-02-13 11:16:48 +01:00
Dr. Stefan Schimanski cecd663c21 controller-manager: add authz/n to options, nil by default 2018-02-13 11:16:48 +01:00
Dr. Stefan Schimanski f4564ea0b8 controller-manager: add SecureServingOptions 2018-02-13 11:16:47 +01:00
Dr. Stefan Schimanski 4e0114b0dd apiserver: make SecureServingOptions and authz/n options re-usable 2018-02-13 11:16:38 +01:00
stewart-yu 0cbe0a6034 controller-manager: switch to config/option struct pattern 2018-02-13 11:16:17 +01:00
Kubernetes Submit Queue fd55cb25f1
Merge pull request #55479 from ijc/kubeadm-optional-master-taint
Automatic merge from submit-queue (batch tested with PRs 59767, 56454, 59237, 59730, 55479). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: add configuration option to not taint master

**What this PR does / why we need it**:

Although tainting the master is normally a good and proper thing to do in some situations (docker for mac in our case, but I suppose minikube and such as well) having a single host configuration is desirable.

In linuxkit we have a [workaround](443e47c408/projects/kubernetes/kubernetes/kubeadm-init.sh (L19...L22)) to remove the taint after initialisation. With the change here we could simply populate `/etc/kubeadm/kubeadm.yaml` with `noTaintMaster: true` instead and have it never be tainted in the first place.

I have only added this to the config file and not to the CLI since AIUI the latter is somewhat deprecated.

The code also arranges to _remove_ an existing taint if it is unwanted. I'm unsure if this behaviour is correct or desirable, I think a reasonable argument could be made for leaving an existing taint in place too.

Signed-off-by: Ian Campbell <ijc@docker.com>

**Release note**:

Since the requirement for this option is rather niche and not best practice in the majority of cases I'm not sure if it warrants mentioning in the release notes? If it were then perhaps

```release-note
`kubeadm init` can now omit the tainting of the master node if configured to do so in `kubeadm.yaml`.
```
2018-02-12 15:44:41 -08:00
Kubernetes Submit Queue f072871b07
Merge pull request #59359 from khenidak/svc-remove-sync
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove controller-manager --service-sync-period flag

**What this PR does / why we need it**:
This PR removes controller manager --service-sync-period flag which is not used anywhere in the code and is causing confusion
 
**Which issue(s) this PR fixes** 
https://github.com/kubernetes/kubernetes/issues/58776

**Special notes for your reviewer**:
@deads2k this remove the flag as per the discussion on #58776 
2 commits 
1. one for code change
2. one for auto generated code

**Release note**:
```release-note
1. Controller-manager --service-sync-period flag is removed (was never used in the code).
```
2018-02-12 13:50:09 -08:00
Kubernetes Submit Queue fdeaa8c67a
Merge pull request #59067 from chuckha/audit
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Feature Gate - Kubeadm Audit Logging

Fixes kubernetes/kubeadm#623

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>



**What this PR does / why we need it**:
This PR enables [Auditing](https://kubernetes.io/docs/tasks/debug-application-cluster/audit/) behind a featureGate. A user can supply their own audit policy with configuration option as well as a place for the audit logs to live. If no policy is supplied a default policy will be provided. The default policy will log all Metadata level policy logs. It is the example provided in the documentation.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes kubernetes/kubeadm#623

**Special notes for your reviewer**:

**Release note**:

```release-note
kubeadm: Enable auditing behind a feature gate.
```
2018-02-12 09:35:42 -08:00
Ian Campbell a4e00ff3d8 kubeadm: add configuration option to not taint master
Although tainting the master is normally a good and proper thing to do in some
situations (docker for mac in our case, but I suppose minikube and such as
well) having a single host configuration is desirable.

In linuxkit we have a [workaround](443e47c408/projects/kubernetes/kubernetes/kubeadm-init.sh (L19...L22))
to remove the taint after initialisation. With the change here we could simply
populate /etc/kubeadm/kubeadm.yaml` with `noTaintMaster: true` instead and have
it never be tainted in the first place.

I have only added this to the config file and not to the CLI since AIUI the
latter is somewhat deprecated.

The code also arranges to _remove_ an existing taint if it is unwanted. I'm
unsure if this behaviour is correct or desirable, I think a reasonable argument
could be made for leaving an existing taint in place too.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-12 17:13:27 +00:00
Jordan Liggitt f8e206e802
Remove /ui/ redirect 2018-02-12 10:54:33 -05:00
Kubernetes Submit Queue 19829a24f1
Merge pull request #58960 from rosti/kubeadm-imagepullpolicy
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: imagePullPolicy option in init config

**What this PR does / why we need it**:
This PR adds `imagePullPolicy` option to the `kubeadm init` configuration file.

The new `imagePullPolicy` option is forwarded to the generated kubelet static pods for etcd, kube-apiserver, kube-controller-manager and kube-scheduler. This option allows for precise image pull policy specification for master nodes and thus for more tight control over images. It is useful in CI environments and in environments, where the user has total control over master VM templates (thus, the master VM templates can be preloaded with the required Docker images for the control plane services).

**Special notes for your reviewer**:

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @luxas

**Release note**:

```release-note
kubeadm: New "imagePullPolicy" option in the init configuration file, that gets forwarded to kubelet static pods to control pull policy for etcd and control plane images.
```
2018-02-11 07:40:46 -08:00
Kubernetes Submit Queue 317853c90c
Merge pull request #59464 from dixudx/fix_all_typos
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix all the typos across the project

**What this PR does / why we need it**:
There are lots of typos across the project. We should avoid small PRs on fixing those annoying typos, which is time-consuming and low efficient.

This PR does fix all the typos across the project currently. And with #59463, typos could be avoided when a new PR gets merged.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:
/sig testing
/area test-infra
/sig release
/cc @ixdy 
/assign @fejta 

**Release note**:

```release-note
None
```
2018-02-10 22:12:45 -08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Chuck Ha ed769174bb
Enable Audit Logs Behind a Feature Gate
Audit logs are configurable via the MasterConfiguration file.

All options are ignored unless the FeatureGate is enabled.

Fixes kubernetes/kubeadm#623

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-02-09 16:44:39 -05:00
Robert Pothier 4da39ae75d Update Kubeadm proxy handling for IPv6
This updates HTTPProxyCheck with brackets around
the ipv6 address to handle adding :port
2018-02-09 13:15:47 -05:00
Ed Bartosh 59d131d612 Remove bootstrap kubelet config on reset
Made sure /etc/kubernetes/bootstrap-kubelet.conf is removed
to ensure it will not be reused when joining the cluster next time.
2018-02-09 15:33:43 +02:00
Ed Bartosh 3ecc49daaa Add HTTPProxyCheck for API servers
It makes sense to check all API servers mentioned in the command
line and print warnings if they're going to be accessed through proxy.
This is similar to what's already done for 'kubeadm init'.
2018-02-09 15:24:36 +02:00
Rostislav M. Georgiev a50736f142 kubeadm: Support imagePullPolicy option in the kubeadm init configuration file 2018-02-09 10:07:33 +02:00
Kubernetes Submit Queue 36f902d5d0
Merge pull request #59344 from cheyang/fix_kubeadm_typo
Automatic merge from submit-queue (batch tested with PRs 59344, 59595, 59598). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix kubeadm typo

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-02-08 18:06:32 -08:00
Kubernetes Submit Queue 24f387127a
Merge pull request #58854 from liggitt/prefer-v1-storage
Automatic merge from submit-queue (batch tested with PRs 59580, 58854). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Prefer apps/v1 storage for daemonsets, deployments, replicasets, statefulsets

The workload API objects went GA in 1.9. This means we can safely begin persisting them in etcd in apps/v1 format in 1.10.

xref #43214

```release-note
DaemonSet, Deployment, ReplicaSet, and StatefulSet objects are now persisted in etcd in apps/v1 format
```
2018-02-08 16:58:32 -08:00
Kubernetes Submit Queue 6f1835d828
Merge pull request #59580 from mtaufen/kc-remove-cadvisor-port
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove CAdvisorPort from KubeletConfiguration struct

See: #56523, cAdvisor is becoming an implementation detail of
Kubernetes, and we should not canonize its knobs on the
KubeletConfiguration.

```release-note
NONE
```
2018-02-08 16:19:29 -08:00
Michael Taufen 5ab9ccd4fb remove CAdvisorPort from KubeletConfiguration
See: #56523, cAdvisor is becoming an implementation detail of
Kubernetes, and we should not canonize its knobs on the
KubeletConfiguration.
2018-02-08 13:51:41 -08:00
Kubernetes Submit Queue 1e1b32bf01
Merge pull request #59568 from dims/move-cloud-provider-instantiation-out-from-controller
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Extract instantiation of cloud provider

**What this PR does / why we need it**:

Add a separate method in a new file for creating cloud providers.
Currently the code is all mixed into the controller manager. We
should actively control what is made available to the cloud provider
so list explicitly the parms needed and move the code out. This will
avoid linkages to sneak in as we will catch it better during reviews.


**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-08 13:44:50 -08:00
Kubernetes Submit Queue c15ae2fff7
Merge pull request #59360 from immutableT/envelop_encryption_benchmark
Automatic merge from submit-queue (batch tested with PRs 59190, 59360). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding benchmarks to envelop encryption integration tests

**What this PR does / why we need it**:
Adding benchmarks for envelop encryption integration tests.
Allows to estimate how envelop encryption may impact the performance of KubeAPI server.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-08 13:31:31 -08:00
Kubernetes Submit Queue 3aa709423d
Merge pull request #59190 from bart0sh/PR0005-kubeadm-remove-os-exec
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Reimplement 2 tests using fakeexec

**What this PR does / why we need it**:

Used fakeexec API from utils/exec/testing to test
GetKubeletVersion and KubeletVersionCheck APIs without running kubelet.

```release-note
NONE
```
2018-02-08 13:02:38 -08:00
Kubernetes Submit Queue 6cc3641730
Merge pull request #59515 from mtaufen/kc-enforcenodeallocatable-none-option
Automatic merge from submit-queue (batch tested with PRs 59054, 59515, 59577). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add 'none' option to EnforceNodeAllocatable

This lets us use omitempty on `EnforceNodeAllocatable`. We shouldn't treat
`nil` as different from `[]T{}`, because this can play havoc with
serializers (a-la #43203).

See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166672137

```release-note
'none' can now be specified in KubeletConfiguration.EnforceNodeAllocatable (--enforce-node-allocatable) to explicitly disable enforcement.
```
2018-02-08 12:22:32 -08:00
Kubernetes Submit Queue 4830945af3
Merge pull request #59054 from bart0sh/PR0003-proxy-port
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove port from HTTPProxyCheck

**What this PR does / why we need it**:

HTTPProxyCheck doesn't use port. It uses proxy related variables
(HTTP_PROXY, NO_PROXY, etc) that only operate with protocol
and host.

Removing port from the check should make it more clear for
user that port is not used as it will not be present in
the check output.

**Release note**:
```release-note
NONE
```
2018-02-08 12:01:24 -08:00
alex cfdea234c3 Adding benchmarks to envelop encryption integration tests 2018-02-08 10:57:58 -08:00
Michael Taufen 3553390c97 Add 'none' option to EnforceNodeAllocatable
This lets us use omitempty on EnforceNodeAllocatable. We shouldn't treat
`nil` as different from `[]T{}`, because this can play havoc with
serializers (a-la #43203).

See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166672137
2018-02-08 10:24:39 -08:00
Davanum Srinivas 3d43b446c4 Extract instantiation of cloud provider
Add a separate method in a new file for creating cloud providers.
Currently the code is all mixed into the controller manager. We
should actively control what is made available to the cloud provider
so list explicitly the parms needed and move the code out. This will
avoid linkages to sneak in as we will catch it better during reviews.
2018-02-08 08:15:41 -05:00
Kubernetes Submit Queue fb340a4695
Merge pull request #57824 from thockin/gcr-vanity
Automatic merge from submit-queue (batch tested with PRs 57824, 58806, 59410, 59280). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

2nd try at using a vanity GCR name

The 2nd commit here is the changes relative to the reverted PR.  Please focus review attention on that.

This is the 2nd attempt.  The previous try (#57573) was reverted while we
figured out the regional mirrors (oops).
    
New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).
    
When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.
    
We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.

xref https://github.com/kubernetes/release/issues/281

TL;DR:
  *  The new `staging-k8s.gcr.io` is where we push images.  It is literally an alias to `gcr.io/google_containers` (the existing repo) and is hosted in the US.
  * The contents of `staging-k8s.gcr.io` are automatically synced to `{asia,eu,us)-k8s.gcr.io`.
  * The new `k8s.gcr.io` will be a read-only alias to whichever regional repo is closest to you.
  * In the future, images will be promoted from `staging` to regional "prod" more explicitly and auditably.

 ```release-note
Use "k8s.gcr.io" for pulling container images rather than "gcr.io/google_containers".  Images are already synced, so this should not impact anyone materially.
    
Documentation and tools should all convert to the new name. Users should take note of this in case they see this new name in the system.
```
2018-02-08 03:29:32 -08:00
Tim Hockin 3586986416 Switch to k8s.gcr.io vanity domain
This is the 2nd attempt.  The previous was reverted while we figured out
the regional mirrors (oops).

New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).

When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.

We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.
2018-02-07 21:14:19 -08:00
Kubernetes Submit Queue 5cecc6ec68
Merge pull request #59350 from jsafrane/recycler-wait
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Do not recycle volumes that are used by pods

**What this PR does / why we need it**:
Recycler should wait until all pods that use a volume are finished.

Consider this scenario:

1. User creates a PVC that's bound to a NFS PV.
2. User creates a pod that uses the PVC
3. User deletes the PVC.

Now the PV gets `Released` (the PVC does not exists) and recycled, however the PV is still mounted to a running pod. PVC protection won't help us, because it puts finalizers on PVC that is under user's control and user can remove it.

This PR checks that there is no pod that uses a PV before it recycles it.

**Release note**:

```release-note
NONE
```

/sig storage
2018-02-07 10:01:32 -08:00
Kubernetes Submit Queue 531369d70e
Merge pull request #57230 from xiangpengzhao/new-etcd-in-kubeadm
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update kubeadm supported etcd version to 3.2.14 in 1.10

**What this PR does / why we need it**:
Kubernetes will upgrade to etcd server 3.2.14 in 1.10 cycle (#58645), update DefaultEtcdVersion in kubeadm to this version.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
relevant PR: #57480 #58645
fixes: https://github.com/kubernetes/kubeadm/issues/621

**Special notes for your reviewer**:
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews

**Release note**:

```release-note
NONE
```
kubeadm don't need to advertise this in release notes.
2018-02-07 02:35:41 -08:00
Ed Bartosh 3bdfdda99b Reimplement 2 tests using fakeexec
Used fakeexec API from utils/exec/testing to test
GetKubeletVersion and KubeletVersionCheck APIs without
running kubelet.
2018-02-07 11:55:44 +02:00
Kubernetes Submit Queue 13ad4ca473
Merge pull request #59325 from kargakis/kubeadm-api-docs
Automatic merge from submit-queue (batch tested with PRs 58444, 59283, 59437, 59325, 59449). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Document kubeadm API

Fixes https://github.com/kubernetes/kubeadm/issues/336

@kubernetes/sig-cluster-lifecycle-pr-reviews
2018-02-06 22:42:42 -08:00
Kubernetes Submit Queue da932c19c8
Merge pull request #58769 from pmichali/node-cidr-fix
Automatic merge from submit-queue (batch tested with PRs 59394, 58769, 59423, 59363, 59245). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

IPv6: Ensure calculated node CIDR size for pod subnets is valid

With IPv4, the node CIDR prefix is set to /24, which gives 256 pods per node
and 256 nodes, when assuming a /16 is used for the pod subnet.

For IPv6, the node CIDR prefix, is hard coded to /64. This does not work,
because the pod subnet prefix must be /66 or higher and must be a larger subnet
(lower value) than the node CIDR prefix.

In addition, the bit mask used to track the subnets (implying the number of
nodes), can only handle 32K entries, so the difference between pod subnet
prefix and node CIDR prefix cannot be more than 16 (bits).

To address this, the following algorithm is proposed to provide as many pods
per node as possible, and not exceed the number of nodes.

If the pod subnet prefix is from /66 to /104, we'll set the node CIDR prefix
to 16 more, so that the bit map is not exceeded. The rest of the bits will be
for pods per node.

If the subnet prefix is from /105 to /112, we'll split the available bits
between what is used for the nodes and what is used for the pods per node.
This will give a node CIDR prefix from /116 to /120.

If the subnet prefix is from /113 to /119, we'll do like IPv4 and ensure that
there are 256 pods per node, and the remaining bits will be for the nodes,
giving a node CIDR prefix of /120 always. This supports a limited number of
nodes, in some cases.

If the subnet prefix is /120 to /128, we don't have enough bits and will set
the node CIDR prefix to be the same as the pod subnet prefix. This will cause
a falure later, when it tests that the pod subnet prefix is larger than the
node CIDR prefi.



**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #58766 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-06 21:34:40 -08:00
Khaled Henidak(Kal) f9c8d7de9c auto generated items
remove ServiceSyncPeriod from tests

fixing tests
2018-02-07 03:26:51 +00:00
Walter Fender e18e8ec3c0 Add context to all relevant cloud APIs
This adds context to all the relevant cloud provider interface signatures.
Callers of those APIs are currently satisfied using context.TODO().
There will be follow on PRs to push the context through the stack.
For an idea of the full scope of this change please look at PR #58532.
2018-02-06 12:49:17 -08:00
Paul Michali fcd0ab1f6e IPv6: Ensure calculated node CIDR size for pod subnets is valid
With IPv4, the node CIDR prefix is set to /24, which gives 256 pods per node
and 256 nodes, when assuming a /16 is used for the pod subnet.

For IPv6, the node CIDR prefix, is hard coded to /64. This does not work,
because currently the pod subnet prefix must be /66 or higher and must be a
larger subnet (lower value) than the node CIDR prefix.

In addition, the bit mask used to track the subnets (implying the number of
nodes), can only handle 64K entries, so the difference between pod subnet
prefix and node CIDR prefix cannot be more than 16 (bits). The node CIDR
value needs to support this restriction.

To address this, the following algorithm is proposed...

For pod subnet prefixes of /113 or smaller, the remaining bits will be used
for the node CIDR, in multiples of 8, and 9-16 bits will be reserved for the
nodes, so that there are 512-64K nodes and 256, 512, 768, ... pods/node.

For example, with a pod network of /111, there will be 17 bits available. This
would give 8 bits for pods per node and 9 bits for nodes. The node CIDR would
be /120. For a pod network of /104, there will be 24 bits available. There will
be 8 bits for nodes, and 16 bits for pods/node, using a /112 node CIDR.

If the pod subnet prefix is /112, then the node CIDR will be set to /120, and
256 nodes and 256 pods/node will be available.

If the subnet prefix is /113 to /128, we don't have enough bits and will set
the node CIDR prefix to be the same as the pod subnet prefix. This will cause
a falure later, when it tests that the pod subnet prefix is larger than the
node CIDR prefix.
2018-02-06 20:13:17 +00:00
Kubernetes Submit Queue c628c1a9d4
Merge pull request #59306 from zhangxiaoyu-zidif/cleanup-require-kubeconfig
Automatic merge from submit-queue (batch tested with PRs 51323, 59306, 58991, 59050). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

clean temporary para for require-kubeconfig

**What this PR does / why we need it**:
delete temporary require-kubeconfig

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-06 10:40:34 -08:00
Kubernetes Submit Queue aa1849efc4
Merge pull request #58237 from xiangpengzhao/remove-v18-ac
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove defaultV18AdmissionControl in 1.10 cycle

**Release note**:

```release-note
NONE
```
2018-02-06 09:16:23 -08:00
Michalis Kargakis 0a9323c93a
Update generated code 2018-02-06 17:14:53 +01:00
Michalis Kargakis c3521845c6
Document kubeadm API 2018-02-06 17:04:46 +01:00
Kubernetes Submit Queue f611b32254
Merge pull request #59386 from ravisantoshgudimetla/fix-scheduler-config-file
Automatic merge from submit-queue (batch tested with PRs 59165, 59386). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Scheduler - not able to read from config file if configmap is not found

**What this PR does / why we need it**:
As of now, we are not able to read config file if configmap is not present.  As of now, the only way to make it work is to enable legacy mode which should not be the case.
xref: https://bugzilla.redhat.com/show_bug.cgi?id=1540785
**Release note**:

```release-note
Scheduler should be able to read from config file if configmap is not present.
```
/cc @bsalamat @ironcladlou
2018-02-05 23:50:34 -08:00
xiangpengzhao 37fdb823e7 Remove defaultV18AdmissionControl in 1.10 cycle 2018-02-06 15:23:57 +08:00