Commit Graph

2101 Commits (f9c8d7de9ca02b10d7978cd55381dbf97b49394c)

Author SHA1 Message Date
Kubernetes Submit Queue afdbfa251f Merge pull request #52358 from crassirostris/audit-policy-groups
Automatic merge from submit-queue (batch tested with PRs 52376, 52439, 52382, 52358, 52372)

Add new api groups to the GCE advanced audit policy

Fixes https://github.com/kubernetes/kubernetes/issues/52265

It introduces the missing api groups, that were introduced in 1.8 release.

@piosz there's also the 'metrics' api group, should we audit it?
2017-09-14 15:27:05 -07:00
Jacob Simpson 0ac34781c8 Add env var to enable kubelet rotation in kube-up.sh. 2017-09-14 11:30:03 -07:00
Lee Verberne 83847eac79 Test gcloud exit when detecting master for e2e
e2e tests set errexit, so without testing the exit status of a command
its scripted error message will not be printed.
2017-09-14 12:00:29 +02:00
Isaac Hollander McCreery 6930f5ac31 Allow metadata firewall & proxy on in GCE, off by default 2017-09-13 09:58:51 -07:00
Kubernetes Submit Queue cd343fd806 Merge pull request #52342 from crassirostris/audit-policy-gcp-variable
Automatic merge from submit-queue (batch tested with PRs 51601, 52153, 52364, 52362, 52342)

Make advanced audit policy on GCP configurable

Related to https://github.com/kubernetes/kubernetes/issues/52265

Make GCP audit policy configurable

/cc @tallclair
2017-09-13 09:30:19 -07:00
Mik Vyatskov ccf40abd50 Make advanced audit policy on GCP configurable 2017-09-13 14:36:26 +02:00
Mik Vyatskov a9fb3c8efb Add new api groups to the GCE advanced audit policy 2017-09-13 12:07:48 +02:00
Kubernetes Submit Queue e81aeb59aa Merge pull request #52343 from crassirostris/audit-policy-switch-to-beta
Automatic merge from submit-queue (batch tested with PRs 52339, 52343, 52125, 52360, 52301)

Switch default audit policy to beta and omit RequestReceived stage

Related to https://github.com/kubernetes/kubernetes/issues/52265

```release-note
By default, clusters on GCE no longer sends RequestReceived audit event, if advanced audit is configured.
```
2017-09-12 21:45:54 -07:00
Kubernetes Submit Queue 108ee22096 Merge pull request #52305 from MrHohn/kube-proxy-ds-warning
Automatic merge from submit-queue

[GCE kube-up] Add a warning for kube-proxy DaemonSet option

**What this PR does / why we need it**:
Add a warning for kube-proxy DaemonSet option for GCE kube-up so that user will be aware of the risks.

Ref: https://github.com/kubernetes/kubernetes/issues/23225

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

**Special notes for your reviewer**:
/assign @bowei 

**Release note**:

```release-note
NONE
```
2017-09-12 13:53:44 -07:00
Mik Vyatskov 0933f5c8e0 Switch default audit policy to beta and omit RequestReceived stage 2017-09-12 16:36:13 +02:00
Kubernetes Submit Queue 01a4a600ac Merge pull request #52120 from abgworrall/cvm-to-cos-by-default
Automatic merge from submit-queue (batch tested with PRs 52227, 52120)

Use COS for nodes in testing clusters by default, and bump COS.

Addresses part of issue #51487. May assist with #51961 and #50695.

CVM is being deprecated, and falls out of support on 2017/10/01. We shouldn't run test jobs on it. So start using COS for all test jobs.

The default value of `KUBE_NODE_OS_DISTRIBUTION` for clusters created for testing will now be gci. Testjobs that do not specify this value will now run on clusters using COS (aka GCI) as the node OS, instead of CVM, the previous default.

This change only affects testing; non-testing clusters already use COS by default.

In addition, bump the version of COS from `cos-stable-60-9592-84-0` to `cos-stable-60-9592-90-0`.

```release-note
NONE
```
/cc @yujuhong, @mtaufen, @fejta, @krzyzacy
2017-09-12 01:09:17 -07:00
Eric Chiang cd3c8770c5 Revert "Add cluster up configuration for certificate signing duration."
This reverts commit bd0c16cc8e.
2017-09-11 16:28:17 -07:00
Zihong Zheng 1bad3c3814 Add warning for kube-proxy DaemonSet option 2017-09-08 18:07:15 -07:00
Kubernetes Submit Queue ed154988c5 Merge pull request #51844 from jcbsmpsn/add-signing-duration-configuration-flag
Automatic merge from submit-queue

Add cluster up configuration for certificate signing duration.

```release-note
Add CLUSTER_SIGNING_DURATION environment variable to cluster configuration scripts
to allow configuration of signing duration of certificates issued via the Certificate
Signing Request API.
```
2017-09-08 13:24:20 -07:00
Jeff Grafton b310b328d1 Convert deprecated gcloud --regexp flag into --filter 2017-09-07 14:39:38 -07:00
Adam Worrall d32b9a6925 Use COS for nodes in cluster by default, and bump COS.
Addresses part of issue #51487.

This is a big change for testing; any testjobs that do not
set an explicit KUBE_NODE_OS_DISTRIBUTION will have been running
on CVM, but after this PR will start running COS.

CVM is being deprecated, and falls out of support on 2018/10/01.

In addition, bump the patch version of COS from
cos-stable-60-9592-84-0 to cos-stable-60-9592-90-0.
2017-09-07 14:33:28 -07:00
Nick Sardo 2bea4f7dd1 Fall back to network if subnet is unknown 2017-09-06 11:59:47 -07:00
Kubernetes Submit Queue fa916c1002 Merge pull request #51986 from yujuhong/docker-pids
Automatic merge from submit-queue (batch tested with PRs 51921, 51829, 51968, 51988, 51986)

COS/GCE: bump the max pids for the docker service

**What this PR does / why we need it**:
TasksMax limits how many threads/processes docker can create. Insufficient limit affects container starts.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Ensure TasksMax is sufficient for docker
```
2017-09-05 21:03:17 -07:00
Kubernetes Submit Queue 578690448a Merge pull request #51988 from zmerlynn/fix-pod-priority
Automatic merge from submit-queue (batch tested with PRs 51921, 51829, 51968, 51988, 51986)

Fix unbound variable in configure-helper.sh

This isn't plumbed yet on GKE, so results in an unbound variable.

```release-note
NONE
```
2017-09-05 21:03:15 -07:00
Kubernetes Submit Queue 63fde2af16 Merge pull request #51968 from yujuhong/fix-alphas
Automatic merge from submit-queue (batch tested with PRs 51921, 51829, 51968, 51988, 51986)

GCE: pass GCE_ALPHA_FEATURES environment variable

This fixes #51976

This PR fixes the tests in https://k8s-testgrid.appspot.com/sig-network#gce-alpha-api
2017-09-05 21:03:13 -07:00
Kubernetes Submit Queue e8d99f5839 Merge pull request #51645 from jingxu97/Aug/nameserver
Automatic merge from submit-queue (batch tested with PRs 51186, 50350, 51751, 51645, 51837)

Set up DNS server in containerized mounter path

During NFS/GlusterFS mount, it requires to have DNS server to be able to
resolve service name. This PR gets the DNS server ip from kubelet and
add it to the containerized mounter path. So if containerized mounter is
used, service name could be resolved during mount
**Release note**:

```release-note
Allow DNS resolution of service name for COS using containerized mounter.  It fixed the issue with DNS resolution of NFS and Gluster services.
```
2017-09-05 17:30:09 -07:00
Zach Loafman bd86be402c Fix unbound variable in configure-helper.sh
This isn't plumbed yet on GKE, so results in an unbound variable.
2017-09-05 16:21:58 -07:00
Yu-Ju Hong d6de90e8f7 COS/GCE: Ensure TasksMax is sufficient for docker
This affects how many threads/processes docker can create, and should
not be limited.
2017-09-05 16:18:43 -07:00
Jacob Simpson bd0c16cc8e Add cluster up configuration for certificate signing duration. 2017-09-05 15:56:33 -07:00
Kubernetes Submit Queue bcf22bcf6a Merge pull request #51951 from shyamjvs/heapster-node-with-ip-alias
Automatic merge from submit-queue

Make heapster VM creation work with IP aliases

Our experiment with 5k-node run today failed due to this :(
2017-09-05 15:46:10 -07:00
Yu-Ju Hong 9c95143365 GCE: pass GCE_ALPHA_FEATURES if it is set 2017-09-05 13:25:48 -07:00
Jing Xu 3d4bc931d3 Set up DNS server in containerized mounter path
During NFS/GlusterFS mount, it requires to have DNS server to be able to
resolve service name. This PR gets the DNS server ip from kubelet and
add it to the containerized mounter path. So if containerized mounter is
used, service name could be resolved during mount
2017-09-05 11:40:23 -07:00
Shyam Jeedigunta 009f62ebad Make heapster VM creation work with IP aliases 2017-09-05 14:45:26 +02:00
Nick Sardo 8ac7bb5fb2 Use different project id for network ops & always set subnet 2017-09-04 09:55:56 -07:00
Kubernetes Submit Queue ffed1d3408 Merge pull request #51792 from piosz/metrics-server
Automatic merge from submit-queue (batch tested with PRs 49727, 51792)

Introducing metrics-server

ref https://github.com/kubernetes/features/issues/271

There is still some work blocked on problems with repo synchronization:
- migrate to `v1beta1` introduced in #51653 
- bump deps to HEAD
Will do it in a follow up PRs once the issue is resolved.

```release-note
Introduced Metrics Server
```
2017-09-04 03:37:59 -07:00
Kubernetes Submit Queue 53ee4397e7 Merge pull request #51827 from bowei/2ndary-range-name
Automatic merge from submit-queue (batch tested with PRs 51682, 51546, 51369, 50924, 51827)

Add `secondary-range-name` to the gce.conf

```release-note
NONE
```
2017-09-03 15:54:25 -07:00
Kubernetes Submit Queue 47d0db0e87 Merge pull request #51237 from gunjan5/calico-2.5-rbac
Automatic merge from submit-queue

Add RBAC, healthchecks, autoscalers and update Calico to v2.5.1

**What this PR does / why we need it**:
- Updates Calico to `v2.5`
  - Calico/node to `v2.5.1`
  - Calico CNI to `v1.10.0`
  - Typha to `v0.4.1`
- Enable health check endpoints
  - Add Readiness probe for calico-node and Typha
  - Add Liveness probe for calico-node and Typha
- Add RBAC manifest
  - With calico ClusterRole, ServiceAccount and ClusterRoleBinding
- Add Calico CRDs in the Calico manifest (only works for k8s v1.7+)
- Add vertical autoscaler for calico-node and Typha
- Add horizontal autoscaler for Typha 

**Release note**:

```release-note
NONE
```
2017-09-03 14:01:04 -07:00
Piotr Szczesniak 55c21ac801 Introduced Metrics Server 2017-09-03 22:13:59 +02:00
Kubernetes Submit Queue 9637f46122 Merge pull request #51725 from nicksardo/gce-plumb-netvars
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

GCE: Plumb network & subnetwork to master

**Which issue this PR fixes** *
Fixes #51714

/assign @bowei 

**Release note**:
```release-note
NONE
```
2017-09-03 11:10:00 -07:00
Kubernetes Submit Queue 5632613c5b Merge pull request #51069 from MrHohn/kube-proxy-pod-priority
Automatic merge from submit-queue (batch tested with PRs 51553, 51538, 51663, 51069, 51737)

Allow enable pod priority feature gate for GCE and configure priority for kube-proxy

**What this PR does / why we need it**:
From #23225, this PR adds an option for user to enable pod priority feature gate using GCE startup scripts, and configure pod priority for kube-proxy when enabled.

The setup `priorityClassName: system` derives from: ce1485c626/staging/src/k8s.io/api/core/v1/types.go (L2536-L2542)

The plan is to configure pod priority for kube-proxy daemonset (https://github.com/kubernetes/kubernetes/pull/50705) in the same way.

**Special notes for your reviewer**:
cc @bsalamat @davidopp @thockin 

**Release note**:

```release-note
When using kube-up.sh on GCE, user could set env `ENABLE_POD_PRIORITY=true` to enable pod priority feature gate.
```
2017-09-02 21:58:04 -07:00
Kubernetes Submit Queue af52d4403c Merge pull request #51690 from bowei/service-as-2ndary
Automatic merge from submit-queue (batch tested with PRs 51583, 51283, 51374, 51690, 51716)

Create a secondary range for the services instead of a subnetwork

GCE now supports >1 secondary ranges / subnetwork.

Fixes #51774 

```release-note
When using IP aliases, use a secondary range rather than subnetwork to reserve cluster IPs.
```
2017-09-02 20:35:26 -07:00
Kubernetes Submit Queue a4428b3f7b Merge pull request #48627 from verult/FlexOnCOSScript
Automatic merge from submit-queue (batch tested with PRs 51590, 48217, 51209, 51575, 48627)

FlexVolume setup script for COS instance using mounting utility image in GCR.

**What this PR does / why we need it**: This scripts automates FlexVolume installation for a single COS instance. Users need to pre-pack their drivers and mount utilities in a Docker image and upload it to GCR.

For each FlexVolume plugin, the script places a driver wrapper in a writable and executable location. The wrapper calls commands from the actual driver but in a chroot environment, so that mount utilities from the image can be used.

I'm working on a script that automatically executes this on all instances. Will be in a separate PR.

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

```release-note
NONE
```

/cc @gmarek @chakri-nelluri 
/assign @saad-ali @msau42 
/sig storage
/release-note-none
2017-09-02 11:12:16 -07:00
Kubernetes Submit Queue 2e69d4e625 Merge pull request #51564 from verult/MasterFlexDir
Automatic merge from submit-queue

Adding Flexvolume plugin dir piping for controller manager on COS

**What this PR does / why we need it**: Sets the default Flexvolume plugin directory correctly for controller manager running on COS images.

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

```release-note
NONE
```

/release-note-none
/sig storage
/assign @msau42 
/cc @wongma7
2017-09-02 08:20:13 -07:00
Bowei Du 1aeebcf6d3 Add `secondary-range-name` to the gce.conf 2017-09-01 14:28:16 -07:00
Gunjan Patel 05661b68eb Add RBAC, healthchecks, autoscaler and update Calico to v2.5.0, Typha to 0.4.0 2017-09-01 12:52:53 -07:00
Kubernetes Submit Queue 9a3a578cd8 Merge pull request #51480 from mml/timeout-flag
Automatic merge from submit-queue (batch tested with PRs 51480, 49616, 50123, 50846, 50404)

Add KUBE_APISERVER_REQUEST_TIMEOUT_SEC env var.

Cluster startup support for the flag added by #51415.  I won't merge until that PR merges.

Bug: #51355

cc @jpbetz
2017-08-31 20:08:35 -07:00
Nick Sardo 506064376b Set NODE_NETWORK and NODE_SUBNETWORK in kube-up 2017-08-31 17:23:30 -07:00
Matt Liggett ef0503b834 Add KUBE_APISERVER_REQUEST_TIMEOUT_SEC env var.
If set, connect it to kube-apiserver's --request-timeout flag.
2017-08-31 14:33:10 -07:00
Bowei Du f14cc276b0 Add bowei to the OWNER for cluster/gce 2017-08-31 10:29:19 -07:00
Bowei Du b145beb3da Create a secondary range for the services instead of a subnetwork
GCE now supports >1 secondary ranges / subnetwork.
2017-08-31 01:33:17 -07:00
Kubernetes Submit Queue e3210c6ccf Merge pull request #51533 from shyamjvs/master-creation-retry
Automatic merge from submit-queue

Retry master instance creation in case of retriable error (with sleep)

To help with our 5k-node CI tests failing to startup the cluster.
And also towards the greater goal - https://github.com/kubernetes/kubernetes/issues/43140

cc @kubernetes/sig-scalability-misc @kubernetes/sig-cluster-lifecycle-misc
2017-08-30 05:14:49 -07:00
Kubernetes Submit Queue 04bc4ec716 Merge pull request #50398 from pci/gcloud-compute-list
Automatic merge from submit-queue (batch tested with PRs 47054, 50398, 51541, 51535, 51545)

Switch away from gcloud deprecated flags in compute resource listings

**What is fixed**

Remove deprecated `gcloud compute` flags, see linked issue.

**Which issue this PR fixes**:

fixes #49673 

**Special notes for your reviewer**:

The change in `gcloudComputeResourceList` in `test/e2e/framework/ingress_utils.go` isn't strictly needed as currently no affected resources are called on within that file, however the function has the _potential_ to access affected resources so I covered it as well. Happy to change if deemed unnecessary.

**Release note**:

```release-note
NONE
```
2017-08-30 01:51:29 -07:00
Philip Ingrey 697f92a5d2
Switch away from gcloud deprecated flags in compute resource listings 2017-08-30 06:41:09 +01:00
Shyam JVS 36910232ab Merge pull request #51343 from shyamjvs/correct-cluster-ip-range
Correct default cluster-ip-range subnet
2017-08-30 01:31:50 +02:00
Cheng Xing da2a7a0bcc Adding Flexvolume plugin dir piping for master on COS 2017-08-29 15:09:29 -07:00
Shyam Jeedigunta 2df4698473 Correct default cluster-ip-range subnet 2017-08-29 23:15:23 +02:00
Kubernetes Submit Queue 0d17e9deb7 Merge pull request #48574 from sakshamsharma/kms-transformer
Automatic merge from submit-queue

Add Google cloud KMS service for envelope encryption transformer

This adds the required pieces which will allow addition of KMS based encryption providers (envelope transformer).

For now, we will be implementing it using Google Cloud KMS, but the code should make it easy to add support for any other such provider which can expose Decrypt and Encrypt calls.

Writing tests for Google Cloud KMS Service may cause a significant overhead to the testing framework. It has been tested locally and on GKE though.

Upcoming after this PR:
* Complete implementation of the envelope transformer, which uses LRU cache to maintain decrypted DEKs in memory.
* Track key version to assist in data re-encryption after a KEK rotation.

Development branch containing the changes described above: https://github.com/sakshamsharma/kubernetes/pull/4

Envelope transformer used by this PR was merged in #49350 

Concerns #48522 

Planned configuration:
```
kind: EncryptionConfig
apiVersion: v1
resources:
  - resources:
    - secrets
    providers:
    - kms:
        cachesize: 100
        configfile: gcp-cloudkms.conf
        name: gcp-cloudkms
    - identity: {}
```

gcp-cloudkms.conf:
```
[GoogleCloudKMS]
    kms-location: global
    kms-keyring: google-container-engine
    kms-cryptokey: example-key
```
2017-08-29 11:11:10 -07:00
Zihong Zheng f2def6575c Configure pod priority for kube-proxy when enabled 2017-08-29 10:06:51 -07:00
Zihong Zheng 09e2e251a8 Set up ENABLE_POD_PRIORITY env for GCE and common.sh 2017-08-29 09:58:20 -07:00
Shyam Jeedigunta 2595f66466 Retry master instance creation in case of retriable error (with sleep) 2017-08-29 18:10:49 +02:00
Kubernetes Submit Queue 83bff8df0b Merge pull request #51471 from ixdy/gcloud-compute-managed-list
Automatic merge from submit-queue (batch tested with PRs 51471, 50561, 50435, 51473, 51436)

Fix `gcloud compute instance-groups managed list` call

**What this PR does / why we need it**: gcloud 168.0.0 makes the `gcloud compute instance-groups managed list --format='value(instanceGroup)'` call return a URL instead of just the name, which is causing `list-instances` to fail. Switching to `--format='value(name)'` seems to restore the old behavior.

x-ref #49673 

**Release note**:

```release-note
NONE
```

/cc @wojtek-t @mwielgus @shyamjvs @jiayingz @mindprince
2017-08-29 02:22:06 -07:00
Kubernetes Submit Queue 04b3ab9aba Merge pull request #50705 from MrHohn/kube-proxy-ds
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Allow running kube-proxy as a DaemonSet when using kube-up.sh on GCE

**What this PR does / why we need it**:
From #23225, this PR adds an option for user to run kube-proxy as a DaemonSet instead of static pods using GCE startup scripts. By default, kube-proxy will run as static pods.

This is the first step for moving kube-proxy into a DaemonSet in GCE, remaining tasks will be tracked on #23225.

**Special notes for your reviewer**:
The last commit are purely for testing out kube-proxy as daemonset via CIs.

cc @kubernetes/sig-network-misc @kubernetes/sig-cluster-lifecycle-misc 

**Release note**:

```release-note
When using kube-up.sh on GCE, user could set env `KUBE_PROXY_DAEMONSET=true` to run kube-proxy as a DaemonSet. kube-proxy is run as static pods by default.
```
2017-08-29 01:17:45 -07:00
Saksham Sharma 3e11baf702 Add Google Cloud KMS plugin for encryption 2017-08-29 11:15:27 +05:30
Zihong Zheng 6d35b94fc3 Add kube-proxy daemonset track to GCE startup scripts (GCI, Debian and CoreOS). 2017-08-28 13:31:07 -07:00
Zihong Zheng 1102656c88 Set up KUBE_PROXY_DAEMONSET env for GCE and common.sh. 2017-08-28 13:31:01 -07:00
Jeff Grafton 0d1055213d Fix `gcloud compute instance-groups managed list` call 2017-08-28 12:24:37 -07:00
CJ Cullen e44c876276 Default ABAC to off in GCE/GKE (for new clusters). 2017-08-25 13:58:40 -07:00
Kubernetes Submit Queue 16a438b56e Merge pull request #50063 from dixudx/manifests_use_hostpath_type
Automatic merge from submit-queue (batch tested with PRs 51038, 50063, 51257, 47171, 51143)

update related manifest files to use hostpath type

**What this PR does / why we need it**:
Per [discussion in #46597](https://github.com/kubernetes/kubernetes/pull/46597#pullrequestreview-53568947)

Dependes on #46597

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

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

**Special notes for your reviewer**:
/cc @euank @thockin @tallclair @Random-Liu 

**Release note**:

```release-note
None
```
2017-08-25 12:31:02 -07:00
Kubernetes Submit Queue 5f805a5e66 Merge pull request #51207 from yguo0905/uc
Automatic merge from submit-queue (batch tested with PRs 50033, 49988, 51132, 49674, 51207)

Update cos image to cos-stable-60-9592-84-0

cos-m60 has been stable for a long time. This image contains a docker upgrade, which has been validated in https://github.com/kubernetes/kubernetes/issues/42926.

**Release note**:

```
None
```

/assign @yujuhong 
/cc @dchen1107
2017-08-25 11:07:17 -07:00
Kubernetes Submit Queue 29e6698c6f Merge pull request #51193 from shyamjvs/network-name-change
Automatic merge from submit-queue (batch tested with PRs 51193, 51154, 42689, 51189, 51200)

Include $USER in network name to not clash for different users' cl…
2017-08-24 04:38:01 -07:00
Di Xu 7c72594c85 update related files 2017-08-24 17:49:18 +08:00
Kubernetes Submit Queue db928095a0 Merge pull request #50947 from shyamjvs/clusterIpRange-ginkgo
Automatic merge from submit-queue (batch tested with PRs 51108, 51035, 50539, 51160, 50947)

Auto-calculate CLUSTER_IP_RANGE based on cluster size

In preparation for eliminating CLUSTER_IP_RANGE env var from job configs, making it less error prone while folks try to start their own large cluster tests (https://github.com/kubernetes/kubernetes/issues/50907).

/cc @kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-08-24 02:32:14 -07:00
Kubernetes Submit Queue 8bfde3a03f Merge pull request #51160 from yujuhong/alpha-feature-env
Automatic merge from submit-queue (batch tested with PRs 51108, 51035, 50539, 51160, 50947)

Set GCE_ALPHA_FEATURES environment variable in gce.conf

This allows us to gate alpha features in the pkg/cloudprovider/providers/gce.
2017-08-24 02:32:11 -07:00
Yang Guo 9fb015987b Update cos image to cos-stable-60-9592-84-0 2017-08-23 09:43:08 -07:00
Shyam Jeedigunta 19fbd19841 Include $USER in network name to not clash for different users' clusters 2017-08-23 14:35:00 +02:00
Cheng Xing cecceedb7b Adding script to set up FlexVolume on a COS instance using mounting utility image in GCR. 2017-08-22 17:47:59 -07:00
Yu-Ju Hong ab07115ff2 Set GCE_ALPHA_FEATURES environment variable in gce.conf 2017-08-22 17:17:56 -07:00
Marian Lobur d48e2d338d Add flags for prometheus-to-sd components.
Configure prometheus-to-sd-endpoint and prometheus-to-sd-prefix base on
the environment.
2017-08-22 08:30:08 +02:00
Shyam Jeedigunta bacc01f729 Auto-calculate CLUSTER_IP_RANGE based on no. of nodes 2017-08-21 14:21:43 +02:00
Michael Taufen 102e4ee9e6 Fix duplicate field in kubeconfig
The server field was accidentally duplicated during a rebase of #40050.
2017-08-18 16:16:20 -07:00
Kubernetes Submit Queue 55160e7cc1 Merge pull request #49322 from bsalamat/priority_admission
Automatic merge from submit-queue

Add Priority admission controller

**What this PR does / why we need it**: Add Priority admission controller. This admission controller checks creation and update of PriorityClasses. It also resolves a PriorityClass name of a pod to its integer value.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Add Priority admission controller for monitoring and resolving PriorityClasses.
```

ref/ #47604
ref/ #48646
2017-08-15 03:13:15 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Kubernetes Submit Queue a755d3e577 Merge pull request #50386 from crassirostris/change-audit-policy
Automatic merge from submit-queue (batch tested with PRs 50386, 50374, 50444, 50382)

Add explicit API kind and version to the audit policy file on GCE

Adds an explicit API version and kind to the audit policy file in GCE configuration scripts. It's a prerequisite for https://github.com/kubernetes/kubernetes/pull/49115

/cc @tallclair @piosz
2017-08-10 05:33:54 -07:00
Kubernetes Submit Queue 4e1d1dedab Merge pull request #50372 from x13n/fluentd
Automatic merge from submit-queue (batch tested with PRs 50300, 50328, 50368, 50370, 50372)

Bugfix: set resources only for fluentd-gcp container.

There is more than one container in fluentd-gcp deployment. Previous
implementation was setting resources for all containers, not just
the fluent-gcp one.

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

Bugfix; https://github.com/kubernetes/kubernetes/pull/49009 without this is eating more resources.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-08-09 22:58:30 -07:00
Mik Vyatskov 782d87c405 Add explicit API kind and version to the audit policy file on GCE 2017-08-09 19:14:41 +02:00
Daniel Kłobuszewski b7935b9699 Bugfix: set resources only for fluentd-gcp container.
There is more than one container in fluentd-gcp deployment. Previous
implementation was setting resources for multiple containers, not just
the fluent-gcp one.
2017-08-09 15:44:06 +02:00
Kubernetes Submit Queue 3655685d64 Merge pull request #50330 from mwielgus/default-pricing
Automatic merge from submit-queue

Ensure that pricing expander is used by default in Cluster Autoscaler

Pricing expander was set as the default one for GCP, however on some occasion it was possible that AUTOSCALER_EXPANDER_CONFIG variable was not set resulting in using the the random expander.
2017-08-09 04:30:09 -07:00
Marcin Wielgus d0bedba9e1 Ensure that pricing expander is used by default in Cluster Autoscaler 2017-08-08 20:52:07 +02:00
Shyam Jeedigunta 2eafc562fa Block on master-creation step for large clusters (>50 nodes) in kube-up 2017-08-08 14:09:15 +02:00
Kubernetes Submit Queue 361079af43 Merge pull request #49009 from x13n/fluentd
Automatic merge from submit-queue (batch tested with PRs 48487, 49009, 49862, 49843, 49700)

Enable overriding fluentd resources in GCP

**What this PR does / why we need it**: This enables overriding fluentd resources in GCP, when there is a need for custom ones.

**Release note**:

```release-note
NONE
```
2017-08-04 23:40:02 -07:00
Kubernetes Submit Queue b070227e89 Merge pull request #48366 from wongma7/flex-e2e
Automatic merge from submit-queue (batch tested with PRs 50119, 48366, 47181, 41611, 49547)

Add basic install and mount flexvolumes e2e tests

fixes https://github.com/kubernetes/kubernetes/issues/47010

These two tests install a skeleton "dummy" flex driver, attachable and non-attachable respectively, then test that a pod can successfully use the flex driver. They are labeled disruptive because kubelet and controller-manager get restarted as part of the flex install. IMO it's important to keep this install procedure as part of the test to isolate any bugs with the startup plugin probe code.

There is a bit of an ugly dependency on cluster/gce/config-test.sh because --flex-volume-plugin-dir must be set to a dir that's readable from controller-manager container and writable by the flex e2e test. The default path is not writable on GCE masters with read-only root so I picked a location that looks okay.

In the "dummy" drivers I trick kubelet into thinking there is a mount point by doing "mount -t tmpfs none ${MNTPATH} >/dev/null 2>&1", hope that is okay.

I have only tested on GCE and theoretically they may work on AWS but I don't think there is a need to test on multiple cloudproviders.

-->
```release-note
NONE
```
2017-08-04 14:29:34 -07:00
Matthew Wong 55a417e84f Add basic install and mount flexvolumes e2e tests 2017-08-04 10:39:24 -04:00
Daniel Kłobuszewski b48b1b80bc Enable overriding fluentd resources in GCP 2017-08-03 11:58:43 +02:00
Jeff Grafton 3afeb7cd3c Fix BUILD files 2017-08-02 18:33:32 -07:00
Jeff Grafton 3579017b86 Run hack/update-bazel.sh to generate BUILD files 2017-08-02 18:33:25 -07:00
Kubernetes Submit Queue 968ebc6603 Merge pull request #49649 from shiliangxue/master
Automatic merge from submit-queue (batch tested with PRs 49989, 49806, 49649, 49412, 49512)

Use existing k8s binaries and images on disk when they are preloaded to gce cos image.

**What this PR does / why we need it**:
This change is to accelerate K8S startup time on gce when k8s tarballs and images are already preloaded in VM image, by skipping the downloading, extracting and file transfer steps.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-02 17:06:00 -07:00
Kubernetes Submit Queue a2f2a220c5 Merge pull request #49953 from gmarek/logrotate
Automatic merge from submit-queue

Allow configuration of logrorate in GCE

Fix #49941
2017-08-02 07:53:15 -07:00
Kubernetes Submit Queue e9617b694e Merge pull request #48429 from shyamjvs/parallel-upgrade
Automatic merge from submit-queue

Add parallelism to GCE cluster upgrade

Fixes https://github.com/kubernetes/kubernetes/issues/48373
Should allow upgrading 500-node cluster (1.6->1.7) in < 1 hr. It currently takes ~1.5 day.
Though it is the duty of the upgrader to choose the right parallelism in order to avoid disrupting too many pods.

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews @kubernetes/sig-scalability-misc @mikedanese @gmarek
2017-08-02 01:26:57 -07:00
Kubernetes Submit Queue 49955b1594 Merge pull request #49897 from mikedanese/atomic-append
Automatic merge from submit-queue (batch tested with PRs 49898, 49897, 49919, 48860, 49491)

gce: make append_or_replace.. atomic

Before this change,
* the final echo is not atomically written to the target file
* two concurrent callers will use the same tempfile

Helps with https://github.com/kubernetes/kubernetes/issues/49895

cc @miekg
2017-08-01 17:57:14 -07:00
gmarek 54f43f5f56 Allow configuration of logrorate in GCE 2017-08-01 17:07:44 +02:00
shiliang f561a299ac refactor function is-preloaded in configure.sh 2017-07-31 15:57:02 -07:00
Mike Danese a120906756 gce: extend CLOBBER_CONFIG to support known_tokens.csv 2017-07-31 13:39:18 -07:00
Mike Danese 1c2feb02fa gce: make append_or_replace.. atomic
Before this change,
* the final echo is not atomically written to the target file
* two concurrent callers will use the same tempfile
2017-07-31 13:14:51 -07:00
Shyam Jeedigunta 5b5d3b9410 Add parallelism to GCE cluster upgrade 2017-07-31 13:39:01 +02:00
Bobby (Babak) Salamat de8689c99b Add priority admission controller 2017-07-27 18:44:40 -07:00
shiliang 994275aa55 skip downloading and extracting tarballs and docker images when they are preloaded. 2017-07-25 15:40:03 -07:00
Kubernetes Submit Queue 2189314895 Merge pull request #40050 from mtaufen/standalone-mode
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Use presence of kubeconfig file to toggle standalone mode

Fixes #40049 

```release-note
The deprecated --api-servers flag has been removed. Use --kubeconfig to provide API server connection information instead. The --require-kubeconfig flag is now deprecated. The default kubeconfig path is also deprecated. Both --require-kubeconfig and the default kubeconfig path will be removed in Kubernetes v1.10.0.
```

/cc @kubernetes/sig-cluster-lifecycle-misc @kubernetes/sig-node-misc
2017-07-25 12:14:43 -07:00
Kubernetes Submit Queue 7f1d9382ec Merge pull request #48846 from dashpole/remove_ood
Automatic merge from submit-queue

Remove flags low-diskspace-threshold-mb and outofdisk-transition-frequency

issue: #48843

This removes two flags replaced by the eviction manager.  These have been depreciated for two releases, which I believe correctly follows the kubernetes depreciation guidelines.

```release-note
Remove depreciated flags: --low-diskspace-threshold-mb and --outofdisk-transition-frequency, which are replaced by --eviction-hard
```

cc @mtaufen since I am changing kubelet flags
cc @vishh @derekwaynecarr 
/sig node
2017-07-24 23:05:50 -07:00
Michael Taufen 38aee0464d Providing kubeconfig file is now the switch for standalone mode
Replaces use of --api-servers with --kubeconfig in Kubelet args across
the turnup scripts. In many cases this involves generating a kubeconfig
file for the Kubelet and placing it in the correct location on the node.
2017-07-24 11:03:00 -07:00
Wojciech Tyczynski 5740c7afbf Fix ha_master tests 2017-07-24 12:10:22 +02:00
Kubernetes Submit Queue ab40f526fd Merge pull request #49344 from shyamjvs/master-disk-size
Automatic merge from submit-queue

Auto-calculate master disk and root disk sizes in GCE

@gmarek PR https://github.com/kubernetes/kubernetes/pull/49282 didn't fix the issue because MASTER_DISK_SIZE was defaulting to 20GB in config-test.sh before being calculated inside get-master-disk-size() where you use pre-existing value if any.

It should be fixed by this now.
2017-07-21 06:24:39 -07:00
Kubernetes Submit Queue ef98b80bd0 Merge pull request #49172 from ianchakeres/gce-local-ssd-fix
Automatic merge from submit-queue (batch tested with PRs 48565, 49172)

On GCE check whether NODE_LOCAL_SSDS=0 and handle this case appropriately

**What this PR does / why we need it**: Presently if you are using a mac and GCE and specify NODE_LOCAL_SSDS=0, or use the default, you end up with 2 local SSDs.

**Which issue this PR fixes** : fixes https://github.com/kubernetes/kubernetes/issues/49171

**Special notes for your reviewer**:

I've discovered that this issue is due to b353792f9c/cluster/gce/util.sh (L579)

If NODE_LOCAL_SSDS=0, this evaluates to $(seq 0)

```
$ for i in $(seq 0); do echo $i; done
1
0
```

From man seq on mac osx

```
The seq utility prints a sequence of numbers, one per line (default), from first (default 1), 
to near last as possible, in increments of incr (default 1).When first is larger than last the 
default incr is -1.
```

This was run on mac with the seq manpage indicating it comes from BSD Feb 19 2010.

**Release note**:

```release-note
NONE
```
2017-07-21 01:13:19 -07:00
Kubernetes Submit Queue 80582826aa Merge pull request #49337 from jingxu97/July/mounterfix
Automatic merge from submit-queue (batch tested with PRs 49222, 49333, 48708, 49337)

Fix issue in installing containerized mounter

Fix PR #49335

PR #49157 causes failure when installing containerized mounter. This
PR is a fix for it
2017-07-20 23:01:23 -07:00
Shyam Jeedigunta 94b3cc21f9 Auto-calculate master disk and root disk sizes in GCE 2017-07-21 03:35:37 +02:00
Jing Xu 04e5243db4 Fix issue in installing containerized mounter
PR #49157 causes failure when installing containerized mounter. THis
PR is a fix for it
2017-07-20 16:30:55 -07:00
David Ashpole 7a23f8b018 remove deprecated flags LowDiskSpaceThresholdMB and OutOfDiskTransitionFrequency 2017-07-20 13:23:13 -07:00
Ajit Kumar f45cc00440 Use custom port for node-problem-detector 2017-07-20 11:25:44 -07:00
gmarek 83d3018085 Fix master disk size variable usage 2017-07-20 14:15:06 +02:00
Ian Chakeres a18a18367f Check whether NODE_LOCAL_SSDS=0 and handle this case appropriately.
Some versions of seq will count down from 1 if "seq 0" is specified
2017-07-19 17:06:21 -07:00
Kubernetes Submit Queue c5b47482ae Merge pull request #49121 from mikedanese/remove-kubelet-bearer-token
Automatic merge from submit-queue (batch tested with PRs 47509, 46821, 45319, 49121, 49125)

gce: don't add kubelet bearer token to known tokens
2017-07-19 16:16:31 -07:00
Kubernetes Submit Queue c3f4e7e59a Merge pull request #49165 from mikedanese/cleanup2
Automatic merge from submit-queue (batch tested with PRs 49120, 46755, 49157, 49165, 48950)

gce: don't print every file in mounter to stdout

This is printing ~3000 lines.
2017-07-19 00:06:27 -07:00
Kubernetes Submit Queue 5e50097c57 Merge pull request #49157 from mikedanese/cleanup1
Automatic merge from submit-queue (batch tested with PRs 49120, 46755, 49157, 49165, 48950)

gce: make some global variables local

/approve no-issue
2017-07-19 00:06:25 -07:00
Mike Danese 7a6917f552 gce: don't print every file in mounter to stdout 2017-07-18 17:04:03 -07:00
Mike Danese 0d662e8845 gce: make some global variables local 2017-07-18 15:55:37 -07:00
Mike Danese 9ee240dfcf aggr: don't write empty CA files
write now if the metadata is not supplied, we write an empty file for
these certs. we should just fail
2017-07-18 14:40:24 -07:00
Mike Danese 65cc002877 gce: don't add kubelet bearer token to known tokens
since it is no longer used after kubelet TLS bootstrap.
2017-07-18 08:52:08 -07:00
gmarek af6480210e Create 64-core masters for huge clusters 2017-07-17 15:03:39 +02:00
gmarek afe1a2c71b Revert "Merge pull request #48560 from nicksardo/gce-network-project"
This reverts commit d4881dd491, reversing
changes made to b5c4346130.
2017-07-13 18:34:24 +02:00
Minhan Xia 3e8b4a27c4 use overrided api endpoint in gce cloud provider 2017-07-12 15:10:13 -07:00
Kubernetes Submit Queue 6396b9ddc3 Merge pull request #48279 from abgworrall/cos-nodes-by-default
Automatic merge from submit-queue

Use Container-optimzed OS images for nodes by default

Part of the deprecation of the debian-based ContainerVM images.

```release-note
kube-up and kubemark will default to using cos (GCI) images for nodes.
The previous default was container-vm (CVM, "debian"), which is deprecated.
If you need to explicitly use container-vm for some reason, you should set
KUBE_NODE_OS_DISTRIBUTION=debian
```
2017-07-12 11:46:19 -07:00
Kubernetes Submit Queue 7001b9d9d1 Merge pull request #48425 from kawych/master
Automatic merge from submit-queue

Pass cluster name to Heapster with Stackdriver sink.

**What this PR does / why we need it**:
Passes cluster name as argument to Heapster when it's used with Stackdriver sink to allow setting resource label 'cluster_name' in exported metrics.

**Release note**:
```release-note
NONE
```
2017-07-12 10:51:09 -07:00
Adam Worrall 2196be7c7f Leave testing on CVM by default
Avoid breaking tests that assume they're testing CVM.
2017-07-11 14:53:49 -07:00
Adam Worrall 72f58e09c1 Leave the test jobs running on CVM after all. 2017-07-11 14:47:35 -07:00
Adam Worrall ddeab2a69a Update NODE_OS_DISTRIBUTION from debian to gci
This in turn drives how NODE_IMAGE is set
2017-07-11 14:47:35 -07:00
Adam Worrall ba2dd9ea4c Use Container-optimzed OS images for node 2017-07-11 14:47:35 -07:00
Nick Sardo ebce7d2497 Allow missing NETWORK_PROJECT_ID env var 2017-07-10 14:26:47 -07:00
Nick Sardo 06e328627c Use network project id for firewall/route mgmt and zone listing 2017-07-06 16:58:27 -07:00
Wojciech Tyczynski 37b5a214bc Add ability to enable patch conversion detector 2017-07-04 14:33:24 +02:00
Karol Wychowaniec ca5581edcc Pass cluster name to Heapster with Stackdriver sink. 2017-07-03 11:55:57 +02:00
Kubernetes Submit Queue c0337c92cc Merge pull request #47881 from cadmuxe/endpoint
Automatic merge from submit-queue (batch tested with PRs 47918, 47964, 48151, 47881, 48299)

Add ApiEndpoint support to GCE config.

**What this PR does / why we need it**:
Add the ability to change ApiEndpoint  for GCE.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
None
```
2017-06-30 18:42:40 -07:00
Kubernetes Submit Queue 87c6fb5de2 Merge pull request #42376 from jingxu97/Feb/mounter
Automatic merge from submit-queue (batch tested with PRs 43558, 48261, 42376, 46803, 47058)

Add bind mount /etc/resolv.conf from host to containerized mounter

Currently, in containerized mounter rootfs, there is no DNS setup. If client
try to set up volume with host name instead of IP address, it will fail to resolve
the host name. 
By bind mount the host's /etc/resolv.conf to mounter rootfs, VM hosts name
could be resolved when using host name during mount. 

```release-note
Fixes issue where you could not mount NFS or glusterFS volumes using hostnames on GCI/GKE with COS images.
```
2017-06-30 16:28:46 -07:00
Koonwah Chen c4e84e263c Change KUBE_GCE_API_ENDPOINT to GCE_API_ENDPOINT 2017-06-29 10:04:53 -07:00
Koonwah Chen b3956a689e Add KUBE_GCE_API_ENDPOINT for GCE API endpoint config. 2017-06-28 16:03:18 -07:00
Shyam Jeedigunta cc8bb857f9 Allow creating special node for heapster in GCE 2017-06-28 21:27:36 +02:00
Kubernetes Submit Queue 63d4af44ac Merge pull request #48004 from dnardo/gke
Automatic merge from submit-queue (batch tested with PRs 48004, 48205, 48130, 48207)

Do not set CNI in cases where there is a private master and network policy provider is set.

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
In GCE and in a "private master" setup, do not set the network-plugin provider to CNI by default if a network policy provider is given.
```
2017-06-28 10:35:10 -07:00
gmarek 10ce8e2c0d Fix bug cluster-subnet logic 2017-06-28 14:27:52 +02:00
Zach Loafman 903bc643b1 Bump GCE ContainerVM to container-vm-v20170627
Remove the built-in kubelet (finally), pick up security fixes.
2017-06-27 16:14:55 -07:00
Kubernetes Submit Queue ede78d9ee7 Merge pull request #47513 from gmarek/subnet
Automatic merge from submit-queue

Make big clusters work again after introduction of subnets

This PR does two things: 
  - make IP aliases automatically pick Node IP Range based on number of Nodes,
  - fix logic for starting clusters >4095 Nodes that was broken by introduction of subnets,

cc @wojtek-t @shyamjvs 

```release-note
Setting env var ENABLE_BIG_CLUSTER_SUBNETS=true will allow kube-up.sh to start clusters bigger that 4095 Nodes on GCE.
```

Ref https://github.com/kubernetes/kubernetes/issues/47344
2017-06-27 08:52:50 -07:00
Kubernetes Submit Queue 0dad2d0803 Merge pull request #47983 from yguo0905/memcg
Automatic merge from submit-queue (batch tested with PRs 48092, 47894, 47983)

Enables memcg notification in cluster/node e2e tests

Ref: https://github.com/kubernetes/kubernetes/issues/42676

This PR sets Kubelet flag `--experimental-kernel-memcg-notification=true` when running cluster/node e2e tests on COS and Ubuntu images.

Tested:
```
e2e-node-cos:
I0623 00:09:06.641776    1080 server.go:147] Starting server "kubelet" with command "/usr/bin/systemd-run --unit=kubelet-777178888.service --slice=runtime.slice --remain-after-exit /tmp/node-e2e-20170622T170739/kubelet --kubelet-cgroups=/kubelet.slice --cgroup-root=/ --api-servers http://localhost:8080 --address 0.0.0.0 --port 10250 --read-only-port 10255 --volume-stats-agg-period 10s --allow-privileged true --serialize-image-pulls false --pod-manifest-path /tmp/node-e2e-20170622T170739/pod-manifest571288056 --file-check-frequency 10s --pod-cidr 10.100.0.0/24 --eviction-pressure-transition-period 30s --feature-gates  --eviction-hard memory.available<250Mi,nodefs.available<10%%,nodefs.inodesFree<5%% --eviction-minimum-reclaim nodefs.available=5%%,nodefs.inodesFree=5%% --v 4 --logtostderr --network-plugin=kubenet --cni-bin-dir /tmp/node-e2e-20170622T170739/cni/bin --cni-conf-dir /tmp/node-e2e-20170622T170739/cni/net.d --hostname-override tmp-node-e2e-bfe5799d-cos-stable-59-9460-64-0 --experimental-mounter-path=/tmp/node-e2e-20170622T170739/cluster/gce/gci/mounter/mounter --experimental-kernel-memcg-notification=true"

e2e-node-ubuntu:
I0623 00:03:28.526984    2279 server.go:147] Starting server "kubelet" with command "/usr/bin/systemd-run --unit=kubelet-1407651753.service --slice=runtime.slice --remain-after-exit /tmp/node-e2e-20170622T170203/kubelet --kubelet-cgroups=/kubelet.slice --cgroup-root=/ --api-servers http://localhost:8080 --address 0.0.0.0 --port 10250 --read-only-port 10255 --volume-stats-agg-period 10s --allow-privileged true --serialize-image-pulls false --pod-manifest-path /tmp/node-e2e-20170622T170203/pod-manifest083943734 --file-check-frequency 10s --pod-cidr 10.100.0.0/24 --eviction-pressure-transition-period 30s --feature-gates  --eviction-hard memory.available<250Mi,nodefs.available<10%%,nodefs.inodesFree<5%% --eviction-minimum-reclaim nodefs.available=5%%,nodefs.inodesFree=5%% --v 4 --logtostderr --network-plugin=kubenet --cni-bin-dir /tmp/node-e2e-20170622T170203/cni/bin --cni-conf-dir /tmp/node-e2e-20170622T170203/cni/net.d --hostname-override tmp-node-e2e-e48cdd73-ubuntu-gke-1604-xenial-v20170420-1 --experimental-kernel-memcg-notification=true"

e2e-node-containervm:
I0623 00:14:35.392383    2774 server.go:147] Starting server "kubelet" with command "/tmp/node-e2e-20170622T171318/kubelet --runtime-cgroups=/docker-daemon --kubelet-cgroups=/kubelet --cgroup-root=/ --system-cgroups=/system --api-servers http://localhost:8080 --address 0.0.0.0 --port 10250 --read-only-port 10255 --volume-stats-agg-period 10s --allow-privileged true --serialize-image-pulls false --pod-manifest-path /tmp/node-e2e-20170622T171318/pod-manifest507536807 --file-check-frequency 10s --pod-cidr 10.100.0.0/24 --eviction-pressure-transition-period 30s --feature-gates  --eviction-hard memory.available<250Mi,nodefs.available<10%,nodefs.inodesFree<5% --eviction-minimum-reclaim nodefs.available=5%,nodefs.inodesFree=5% --v 4 --logtostderr --network-plugin=kubenet --cni-bin-dir /tmp/node-e2e-20170622T171318/cni/bin --cni-conf-dir /tmp/node-e2e-20170622T171318/cni/net.d --hostname-override tmp-node-e2e-9e3fdd7c-e2e-node-containervm-v20161208-image"

e2e-cos:
Jun 23 17:54:38 e2e-test-ygg-minion-group-t5r0 kubelet[2005]: I0623 17:54:38.646374    2005 flags.go:52] FLAG: --experimental-kernel-memcg-notification="true"

e2e-ubuntu:
Jun 23 18:25:27 e2e-test-ygg-minion-group-19qp kubelet[1547]: I0623 18:25:27.722253    1547 flags.go:52] FLAG: --experimental-kernel-memcg-notification="true"

e2e-containervm:
I0623 18:55:51.886632    3385 flags.go:52] FLAG: --experimental-kernel-memcg-notification="false"
```

**Release note**:
```
None
```

/sig node
/area node-e2e
/assign @dchen1107 @dashpole
2017-06-26 21:08:10 -07:00
gmarek 536f48ef15 Fix test commands in cluster/gce/util.sh 2017-06-26 21:27:04 +02:00
gmarek 64f6606833 Make big clusters work again after introduction of subnets 2017-06-26 21:27:04 +02:00
Yang Guo 50d49d9c51 Enables memcg notification in cluster/node e2e tests 2017-06-26 11:40:22 -07:00
Kubernetes Submit Queue 14edc46c2e Merge pull request #47892 from ajitak/npd-config
Automatic merge from submit-queue (batch tested with PRs 47993, 47892, 47591, 47469, 47845)

Bump up npd version to v0.4.1

```
Bump up npd version to v0.4.1
```

Fixes #47219
2017-06-23 18:05:46 -07:00
Kubernetes Submit Queue de86a83535 Merge pull request #47993 from dnardo/ip-masq-agent
Automatic merge from submit-queue (batch tested with PRs 47993, 47892, 47591, 47469, 47845)

Use a different env var to enable the ip-masq-agent addon.

We shouldn't mix setting the non-masq-cidr with enabling the addon.



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```

https://github.com/kubernetes/kubernetes/issues/47865
2017-06-23 18:05:44 -07:00
Daniel Nardo 00b62df554 Do not set CNI on a private master when enabling network policy. 2017-06-23 17:07:56 -07:00
Daniel Nardo c75de4e39f Use a different env var to enable the ip-masq-agent addon.
We shouldn't mix setting the non-masq-cidr with enabling the addon.
2017-06-23 14:47:49 -07:00
Tim St. Clair ed8ea24f65
Strip versions from known api groups in audit policy 2017-06-23 11:55:45 -07:00
Kubernetes Submit Queue cdc9770346 Merge pull request #46792 from ianchakeres/avoid-redundant-copy-to-staging
Automatic merge from submit-queue (batch tested with PRs 47403, 46646, 46906, 46527, 46792)

Avoid redundant copying of tars during kube-up for gce if the same file already exists

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

Whenever I execute cluster/kube-up.sh it copies my tar files to google cloud, even if the files haven't changed. This PR checks to see whether the files already exist, and avoids uploading them again. These files are large and can take a long time to upload.

**Which issue this PR fixes**: fixes #46791

**Special notes for your reviewer**:

Here is the new output:

cluster/kube-up.sh 
... Starting cluster in us-central1-b using provider gce
... calling verify-prereqs
... calling verify-kube-binaries
... calling kube-up
Project: PROJECT
Zone: us-central1-b
+++ Staging server tars to Google Storage: gs://kubernetes-staging-PROJECT/kubernetes-devel
+++ kubernetes-server-linux-amd64.tar.gz uploaded earlier, cloud and local file md5 match (md5 = 3a095kcf27267a71fe58f91f89fab1bc)


**Release note**:
```cluster/kube-up.sh on gce now avoids redundant copying of kubernetes tars if the local and cloud files' md5 hash match```
2017-06-23 02:59:31 -07:00
Kubernetes Submit Queue 9e71b122f5 Merge pull request #47922 from dnardo/ip-masq-agent
Automatic merge from submit-queue

Remove limits from ip-masq-agent for now and disable ip-masq-agent in GCE

ip-masq-agent when issuing an iptables-save will read any configured iptables on the node.  This means that the ip-masq-agent's memory requirements would grow with the number of iptables (i.e. services) on the node.



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

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
#47865
**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-22 20:41:26 -07:00
Daniel Nardo 630fb9657a Remove limits from ip-masq-agent for now.
ip-masq-agent when issuing an iptables-save will read
any configured iptables on the node.  This means that
the ip-masq-agent's memory requirements would grow
with the number of iptables (i.e. services) on the node.

Disable ip-masq-agent in GCE
2017-06-22 17:01:22 -07:00
Tim St. Clair dcdcb19c47
Don't audit log tokens in TokenReviews 2017-06-22 13:38:44 -07:00
Ajit Kumar caff16c678 Bump up npd version to v0.4.1 2017-06-22 13:13:50 -07:00
Kubernetes Submit Queue afa78083de Merge pull request #47794 from dnardo/ip-masq-agent
Automatic merge from submit-queue

Add ip-masq-agent readiness label by default.  

Since we are setting the non-masq-cidr in the kubelet to 0.0.0.0/0 we
need to ensure the ip-masq-agent runs.

pr/#46473 made the NON_MASQUERADE_CIDR default to 0.0.0.0/0 which means we need to have this label set now.



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

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
fixes #47752
**Special notes for your reviewer**:

**Release note**:

```release-note
ip-masq-agent is now the default for GCE
```
2017-06-20 23:26:30 -07:00
Kubernetes Submit Queue 26c431affa Merge pull request #47632 from mwielgus/node-taints-scripts
Automatic merge from submit-queue (batch tested with PRs 45268, 47573, 47632, 47818)

NODE_TAINTS in gce startup scripts

Currently there is now way to pass a list of taints that should be added on node registration (at least not in gce or other saltbased deployment). This PR adds necessary plumbing to pass the taints from user or instance group template to kubelet startup flags. 

```release-note
Taints support in gce/salt startup scripts. 
```

The PR was manually tested. 
```
NODE_TAINTS: 'dedicated=ml:NoSchedule'
```
in kube-env results in 
```
spec:
[...]
  taints:
  - effect: NoSchedule
    key: dedicated
    timeAdded: null
    value: ml
```

cc: @davidopp @gmarek @dchen1107 @MaciekPytel
2017-06-20 18:18:59 -07:00
Daniel Nardo fc279e069e Add ip-masq-agent readiness label by default. Since we are
setting the non-masq-cidr in the kubelet to 0.0.0.0/0 we
need to ensure the ip-masq-agent runs.

Add node label pre-req back to ip-masq-agent.

Make gce test consistent with gce default scripts.
2017-06-20 16:19:50 -07:00
Kubernetes Submit Queue d746cbbb39 Merge pull request #47634 from mwielgus/expander-price
Automatic merge from submit-queue (batch tested with PRs 46604, 47634)

Set price expander in Cluster Autoscaler for GCE

With CA 0.6 we will make price-preferred node expander the default one for GCE. For other cloud providers we will stick to the default one (random) until the community implement the required interfaces in CA repo.

https://github.com/kubernetes/autoscaler/issues/82

cc: @MaciekPytel @aleksandra-malinowska
2017-06-20 03:15:57 -07:00
Marcin Wielgus 9143569891 NODE_TAINTS in gce startup scripts 2017-06-20 00:51:56 +02:00
Kubernetes Submit Queue c5f38f4478 Merge pull request #47669 from caseydavenport/fix-typha
Automatic merge from submit-queue

Set Typha replica count to 0 when Calico is not enabled

**What this PR does / why we need it**:
A replacement for https://github.com/kubernetes/kubernetes/pull/47624, which turned out not to be the right fix. 

**Which issue this PR fixes**
https://github.com/kubernetes/kubernetes/issues/47622

**Release note**:
```release-note
NONE
```
2017-06-19 15:06:02 -07:00
Marcin Wielgus 8d801d918d Set price expander in Cluster Autoscaler for gce 2017-06-19 23:52:47 +02:00
Kubernetes Submit Queue cc645a8c6f Merge pull request #46327 from supereagle/mark-network-plugin-dir-deprecated
Automatic merge from submit-queue (batch tested with PRs 46327, 47166)

mark --network-plugin-dir deprecated for kubelet

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

**Which issue this PR fixes** : fixes #43967

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-19 11:23:54 -07:00
Casey Davenport 2ba0f1c211 Set Typha replica count to 0 when Calico is not enabled 2017-06-19 11:08:17 -07:00
Kubernetes Submit Queue b6faf34862 Merge pull request #47530 from mindprince/issue-47388-remove-dead-code
Automatic merge from submit-queue (batch tested with PRs 47530, 47679)

Use cos-stable-59-9460-64-0 instead of cos-beta-59-9460-20-0.

Remove dead code that has now moved to another repo as part of #47467

**Release note**:
```release-note
NONE
```

/sig node
2017-06-16 20:57:58 -07:00
Kubernetes Submit Queue d7e5a8b67e Merge pull request #47626 from Q-Lee/metadata-fix
Automatic merge from submit-queue (batch tested with PRs 47626, 47674, 47683, 47290, 47688)

The KUBE-METADATA-SERVER firewall must be applied before the universa…

…l tcp ACCEPT



**What this PR does / why we need it**: the metadata firewall rule was broken by being appended after the universal tcp accept.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-16 19:56:55 -07:00
Kubernetes Submit Queue b00b6b97b7 Merge pull request #47606 from cheftako/requestCAFile
Automatic merge from submit-queue (batch tested with PRs 38751, 44282, 46382, 47603, 47606)

Working on fixing #43716.

This will create the necessary certificates.
On GCE is will upload those certificates to Metadata.
They are then pulled down on to the kube-apiserver.
They are written to the /etc/src/kubernetes/pki directory.
Finally they are loaded vi the appropriate command line flags.
The requestheader-client-ca-file can be seen by running the following:-
kubectl get ConfigMap extension-apiserver-authentication
--namespace=kube-system -o yaml
Minor bug fixes.
Made sure AGGR_MASTER_NAME is set up in all configs.
Clean up variable names.
Added additional requestheader configuration parameters.
Added check so that if there is no Aggregator CA contents we won't start
the aggregator with the relevant flags.

**What this PR does / why we need it**:
This PR creates a request header CA. It also creates a proxy client cert/key pair.
It causes these files to end up on kube-apiserver and set the CLI flags so they are properly loaded.
Without it the customer either has to set them up themselves or re-use the master CA which is a security vulnerability.
Currently this creates everything on GCE.

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

**Special notes for your reviewer**:
This is a reapply of pull/47094 with the GKE issue resolved.

**Release note**: None
2017-06-16 18:05:55 -07:00
Rohit Agarwal 3a86c97cf6 Use cos-stable-59-9460-64-0 instead of cos-beta-59-9460-20-0.
- It contains a fix for ipaliasing.
- It contains a fix which decouples GPU driver installation from kernel
version.

Remove dead code that has now moved to another repo as part of #47467
2017-06-16 13:48:50 -07:00
Quintin Lee b886897f9d Prepend the metadata firewall in gce, so it isn't superceded. 2017-06-16 10:08:48 -07:00
Kubernetes Submit Queue 6742fda0bb Merge pull request #47624 from caseydavenport/fix-typha
Automatic merge from submit-queue

Don't start any Typha instances if not using Calico

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

Don't start any Typha instances if Calico isn't being used.  A recent change now includes all add-ons on the master, but we don't always want a Typha replica.

**Which issue this PR fixes**

Fixes https://github.com/kubernetes/kubernetes/issues/47622

**Release note**:
```release-note
NONE
```


cc @dnardo
2017-06-15 22:58:31 -07:00
Kubernetes Submit Queue c8dc08ea87 Merge pull request #47562 from verult/VolumeDirFlag
Automatic merge from submit-queue (batch tested with PRs 47562, 47605)

Adding option in node start script to add "volume-plugin-dir" flag to kubelet.

**What this PR does / why we need it**: Adds a variable to allow specifying FlexVolume driver directory through cluster/kube-up.sh. Without this, the process of setting up FlexVolume in a non-default directory is very manual.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #47561
2017-06-15 21:54:28 -07:00
Kubernetes Submit Queue 8e1cf60a48 Merge pull request #47481 from sakshamsharma/encprovenv
Automatic merge from submit-queue

Add encryption provider support via environment variables

These changes are needed to allow cloud providers to use the encryption providers as an alpha feature. The version checks can be done in the respective cloud providers'.

Context: #46460 and #46916

@destijl @jcbsmpsn @smarterclayton
2017-06-15 20:39:57 -07:00
Casey Davenport 199ecdbbdd Don't start any Typha instances if not using Calico 2017-06-15 17:20:32 -07:00
Walter Fender e06795533f Working on fixing #43716.
This will create the necessary certificates.
On GCE is will upload those certificates to Metadata.
They are then pulled down on to the kube-apiserver.
They are written to the /etc/src/kubernetes/pki directory.
Finally they are loaded vi the appropriate command line flags.
The requestheader-client-ca-file can be seen by running the following:-
kubectl get ConfigMap extension-apiserver-authentication
--namespace=kube-system -o yaml
Minor bug fixes.
Made sure AGGR_MASTER_NAME is set up in all configs.
Clean up variable names.
Added additional requestheader configuration parameters.
Added check so that if there is no Aggregator CA contents we won't start
the aggregator with the relevant flags.
2017-06-15 10:48:34 -07:00
Kubernetes Submit Queue b2d844bd77 Merge pull request #47492 from bowei/fix-gci-gcloud
Automatic merge from submit-queue

Fix dangling reference to gcloud alpha API for GCI (should be beta)

This reference to the alpha API was missed (fixed in GCE, but not GCI)

Fixes #47494

```release-note
none
```
2017-06-14 21:39:21 -07:00
Kubernetes Submit Queue 454233512d Merge pull request #47482 from timstclair/audit-policy
Automatic merge from submit-queue (batch tested with PRs 47510, 47516, 47482, 47521, 47537)

Fix typos in audit policy config

For kubernetes/features#22
2017-06-14 20:32:47 -07:00
Kubernetes Submit Queue fa23890bd9 Merge pull request #47510 from mwielgus/allow-zero-size-migs
Automatic merge from submit-queue (batch tested with PRs 47510, 47516, 47482, 47521, 47537)

Allow autoscaler min at 0 in GCE

Allow scaling migs to zero in GCE startup scripts. This only makes sense when there is more than 1 mig. The main use case (for now) will be to test scaling to to zero in e2e tests.
2017-06-14 20:32:43 -07:00
Saksham Sharma a50114ac02 Add encryption provider support via env variables 2017-06-14 18:40:36 -07:00
Cheng Xing 6eecd3fb59 Adding option in node start script to add "volume-plugin-dir" flag to kubelet. 2017-06-14 17:56:06 -07:00
Dawn Chen d6e1e21230 Revert "Set up proxy certs for Aggregator." 2017-06-14 13:44:34 -07:00
Ian Chakeres b2450d2eb7 Moved gsutil_get_tar_md5 function before copy-to-staging function 2017-06-14 07:49:59 -07:00
Marcin Wielgus 5e390eff1a Allow autoscaler min at 0 in GCE 2017-06-14 07:36:18 +02:00
Bowei Du f927946dea Fix dangling reference to gcloud alpha API for GCI (should be beta)
This reference to the alpha API was missed (fixed in GCE, but not GCI)
2017-06-13 21:52:34 -07:00
Tim St. Clair 947efaf2d7
Fix typos in audit policy config 2017-06-13 18:34:19 -07:00
Ian Chakeres 14391d3eb8 Moved md5 comand to a separate function and added comments 2017-06-13 16:12:21 -07:00
Kubernetes Submit Queue 5d2dbb58d7 Merge pull request #46796 from mikedanese/gce-2
Automatic merge from submit-queue

enable Node authorizer and NodeRestriction admission controller

Fixes https://github.com/kubernetes/kubernetes/issues/46999
Fixes https://github.com/kubernetes/kubernetes/issues/47135

```release-note
gce kube-up: The `Node` authorization mode and `NodeRestriction` admission controller are now enabled
```
2017-06-13 02:03:14 -07:00
Kubernetes Submit Queue 55f887e9fb Merge pull request #47094 from cheftako/requestCAFile
Automatic merge from submit-queue (batch tested with PRs 47000, 47188, 47094, 47323, 47124)

Set up proxy certs for Aggregator.

Working on fixing https://github.com/kubernetes/kubernetes/issues/43716.
This will create the necessary certificates.
On GCE is will upload those certificates to Metadata.
They are then pulled down on to the kube-apiserver.
They are written to the /etc/src/kubernetes/pki directory.
Finally they are loaded vi the appropriate command line flags.
The requestheader-client-ca-file can be seen by running the following:-
kubectl get ConfigMap extension-apiserver-authentication --namespace=kube-system -o yaml

**What this PR does / why we need it**: 
This PR creates a request header CA. It also creates a proxy client cert/key pair. 
It causes these files to end up on kube-apiserver and set the CLI flags so they are properly loaded.
Without it the customer either has to set them up themselves or re-use the master CA which is a security vulnerability.
Currently this creates everything on GCE.

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

**Special notes for your reviewer**:
2017-06-12 18:19:47 -07:00
Casey Davenport 948c6c8027 Change how Typha CPU / replias are determined. 2017-06-12 13:13:16 -07:00
Mike Danese b63328984c gce/gke: enable Node authorizer and NodeRestriction admission controller 2017-06-12 11:00:19 -07:00
Casey Davenport 83ec0d87ff Make calico/node resource requests dynamic based on cluster size 2017-06-11 16:11:57 -07:00
Casey Davenport 8ef6b06d39 Use ip-masq-agent for MASQUERADE when using Calico policy 2017-06-11 16:11:56 -07:00
Walter Fender 46e179b422 Set up proxy certs for Aggregator.
Working on fixing https://github.com/kubernetes/kubernetes/issues/43716.
This will create the necessary certificates.
On GCE is will upload those certificates to Metadata.
They are then pulled down on to the kube-apiserver.
They are written to the /etc/src/kubernetes/pki directory.
Finally they are loaded vi the appropriate command line flags.
The requestheader-client-ca-file can be seen by running the following:-
kubectl get ConfigMap extension-apiserver-authentication
--namespace=kube-system -o yaml
Minor bug fixes.
Made sure AGGR_MASTER_NAME is set up in all configs.
Clean up variable names.
Added additional requestheader configuration parameters.
2017-06-09 16:20:58 -07:00
Kubernetes Submit Queue c0a3d26746 Merge pull request #46750 from cjcullen/grabbag
Automatic merge from submit-queue

Remove e2e-rbac-bindings.

Replace todo-grabbag binding w/ more specific heapster roles/bindings.
Move kubelet binding.

**What this PR does / why we need it**:
The "e2e-rbac-bindings" held 2 leftovers from the 1.6 RBAC rollout process:
 - One is the "kubelet-binding" which grants the "system:node" role to kubelet. This is needed until we enable the node authorizer. I moved this to the folder w/ some other kubelet related bindings.
 - The other is the "todo-remove-grabbag-cluster-admin" binding, which grants the cluster-admin role to the default service account in the kube-system namespace. This appears to only be required for heapster. Heapster will instead use a "heapster" service account, bound to a "system:heapster" role on the cluster (no write perms), and a "system:pod-nanny" role in the kube-system namespace.

**Which issue this PR fixes**: Addresses part of #39990

**Release Note**: 
```release-note
New and upgraded 1.7 GCE/GKE clusters no longer have an RBAC ClusterRoleBinding that grants the `cluster-admin` ClusterRole to the `default` service account in the `kube-system` namespace.
If this permission is still desired, run the following command to explicitly grant it, either before or after upgrading to 1.7:
    kubectl create clusterrolebinding kube-system-default --serviceaccount=kube-system:default --clusterrole=cluster-admin
```
2017-06-09 13:06:30 -07:00
Kubernetes Submit Queue 038d194723 Merge pull request #46815 from timstclair/audit-config
Automatic merge from submit-queue

Audit webhook config for GCE

Add a `ADVANCED_AUDIT_BACKEND` (comma delimited list) environment variable to the GCE cluster config to select the audit backend, and add configuration for the webhook backend.

~~Based on the first commit from https://github.com/kubernetes/kubernetes/pull/46557~~

For kubernetes/features#22

Since this is GCE-only configuration plumbing, I think this should be exempt from code-freeze.
2017-06-08 12:07:01 -07:00
Random-Liu 1d3979190c Bump up npd version to v0.4.0 2017-06-06 16:30:02 -07:00
Tim St. Clair a604d34c21
Add GCE configuration parameter for webhook audit logging 2017-06-06 10:56:19 -07:00
CJ Cullen eba50dfeb6 Replace todo-grabbag binding w/ more specific heapster roles/bindings.
Move kubelet binding to the rbac folder.
2017-06-06 09:03:09 -07:00
Kubernetes Submit Queue ea4764bf47 Merge pull request #46897 from timstclair/audit-policy
Automatic merge from submit-queue (batch tested with PRs 46897, 46899, 46864, 46854, 46875)

Write audit policy file for GCE/GKE configuration

Setup the audit policy configuration for GCE & GKE. Here is the high level summary of the policy:

- Default logging everything at `Metadata`
- Known write APIs default to `RequestResponse`
- Known read-only APIs default to `Request`
- Except secrets & configmaps are logged at `Metadata`
- Don't log events
- Don't log `/version`, swagger or healthchecks

In addition to the above, I spent time analyzing the noisiest lines in the audit log from a cluster that soaked for 24 hours (and ran a batch of e2e tests). Of those top requests, those that were identified as low-risk (all read-only, except update kube-system endpoints by controllers) are dropped.

I suspect we'll want to tweak this a bit more once we've had a time to soak it on some real clusters.

For kubernetes/features#22

/cc @sttts @ericchiang
2017-06-06 05:22:40 -07:00
Kubernetes Submit Queue 11aa1de0e0 Merge pull request #46992 from mikedanese/restart-fix
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672)

save kubelet bootstrap certs on GCI

Fix https://github.com/kubernetes/kubernetes/issues/46982
2017-06-05 20:27:44 -07:00
Kubernetes Submit Queue 8280bd5e1a Merge pull request #46799 from mikedanese/gce-3
Automatic merge from submit-queue (batch tested with PRs 46972, 42829, 46799, 46802, 46844)

promote tls-bootstrap to beta

last commit of this PR.

Towards https://github.com/kubernetes/kubernetes/issues/46999

```release-note
Promote kubelet tls bootstrap to beta. Add a non-experimental flag to use it and deprecate the old flag.
```
2017-06-05 17:46:52 -07:00
Mike Danese ab63017b39 save kubelet bootstrap certs on GCI 2017-06-05 15:31:02 -07:00
Tim St. Clair 00d52edfd1
Write audit policy file for GCE/GKE configuration 2017-06-05 12:28:34 -07:00
Mike Danese cdcfa35c2a promote tls-bootstrap to beta 2017-06-05 12:20:58 -07:00
Kubernetes Submit Queue 3837d95191 Merge pull request #45748 from mml/reliable-node-upgrade
Automatic merge from submit-queue

Respect PDBs during node upgrades and add test coverage to the ServiceTest upgrade test.

This is still a WIP... needs to be squashed at least, and I don't think it's currently passing until I increase the scale of the RC, but please have a look at the general outline.  Thanks!

Fixes #38336 

@kow3ns @bdbauer @krousey @erictune @maisem @davidopp 

```
On GCE, node upgrades will now respect PodDisruptionBudgets, if present.
```
2017-06-04 06:11:59 -07:00
Kubernetes Submit Queue 4c7e1590ee Merge pull request #40760 from mikedanese/gce
Automatic merge from submit-queue (batch tested with PRs 40760, 46706, 46783, 46742, 46751)

enable kubelet csr bootstrap in GCE/GKE

@jcbsmpsn @pipejakob 

Fixes https://github.com/kubernetes/kubernetes/issues/31168

```release-note
Enable kubelet csr bootstrap in GCE/GKE
```
2017-06-03 18:30:38 -07:00
Kubernetes Submit Queue 3473b8a792 Merge pull request #45565 from Q-Lee/mds
Automatic merge from submit-queue

Adding a metadata proxy addon

**What this PR does / why we need it**: adds a metadata server proxy daemonset to hide kubelet secrets.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: this partially addresses #8867

**Special notes for your reviewer**:

**Release note**: the gce metadata server can be hidden behind a proxy, hiding the kubelet's token.

```release-note
The gce metadata server can be hidden behind a proxy, hiding the kubelet's token.
```
2017-06-03 08:55:32 -07:00
Kubernetes Submit Queue 07f85565a2 Merge pull request #36721 from smarterclayton/initializers
Automatic merge from submit-queue

Add initializer support to admission and uninitialized filtering to rest storage

Initializers are the opposite of finalizers - they allow API clients to react to object creation and populate fields prior to other clients seeing them.

High level description:

1. Add `metadata.initializers` field to all objects
2. By default, filter objects with > 0 initializers from LIST and WATCH to preserve legacy client behavior (known as partially-initialized objects)
3. Add an admission controller that populates .initializer values per type, and denies mutation of initializers except by certain privilege levels (you must have the `initialize` verb on a resource)
4. Allow partially-initialized objects to be viewed via LIST and WATCH for initializer types
5. When creating objects, the object is "held" by the server until the initializers list is empty
6. Allow some creators to bypass initialization (set initializers to `[]`), or to have the result returned immediately when the object is created.

The code here should be backwards compatible for all clients because they do not see partially initialized objects unless they GET the resource directly. The watch cache makes checking for partially initialized objects cheap. Some reflectors may need to change to ask for partially-initialized objects.

```release-note
Kubernetes resources, when the `Initializers` admission controller is enabled, can be initialized (defaulting or other additive functions) by other agents in the system prior to those resources being visible to other clients.  An initialized resource is not visible to clients unless they request (for get, list, or watch) to see uninitialized resources with the `?includeUninitialized=true` query parameter.  Once the initializers have completed the resource is then visible.  Clients must have the the ability to perform the `initialize` action on a resource in order to modify it prior to initialization being completed.
```
2017-06-03 07:16:52 -07:00
Kubernetes Submit Queue 822e29dd3c Merge pull request #46524 from ajitak/npd_version
Automatic merge from submit-queue (batch tested with PRs 46239, 46627, 46346, 46388, 46524)

Configure NPD version through env variable

This lets user specify NPD version to be installed with kubernetes.
2017-06-02 23:37:45 -07:00
Clayton Coleman 4ce3907639
Add Initializers to all admission control paths by default 2017-06-02 22:09:04 -04:00
Matt Liggett 775f2ef9a0 Respect PDBs during GCE node upgrades.
Respect PDBs during node upgrades and add test coverage to the
ServiceTest upgrade test.  Modified that test so that we include pod
anti-affinity constraints and a PDB.
2017-06-01 17:58:45 -07:00
Ian Chakeres d0566faace Added logic to copy-to-staging to avoid copying if the same file already exists in gce 2017-06-01 11:06:48 -07:00
Mike Danese ae91ecb62e enable tls bootstrap in GCE/GKE 2017-06-01 09:17:32 -07:00
supereagle dc9f0f9729 mark --network-plugin-dir deprecated for kubelet, and update related bootstrap scripts 2017-06-01 22:06:44 +08:00
Ajit Kumar d8237597c9 Configure NPD version through env variable 2017-05-31 16:40:09 -07:00
Quintin Lee 1bfed01480 Adding a metadata proxy addon to gce 2017-05-31 16:23:11 -07:00
Tim St. Clair f62b5e69cf
Set up basic test configuration for AdavencedAuditing 2017-05-31 09:52:54 -07:00
Kubernetes Submit Queue 30a2d7c4dc Merge pull request #46552 from bowei/gcloud-beta
Automatic merge from submit-queue

gcloud command syntax changed between alpha and beta versions

syntax for secondary-ranges changed from:
  name=NAME,range=RANGE
to
  NAME=RANGE
2017-05-30 08:33:46 -07:00
Bowei Du 3d8785648e gcloud command syntax changed between alpha and beta versions
syntax for secondary-ranges changed from:
  name=NAME,range=RANGE
to
  NAME=RANGE
2017-05-26 17:02:25 -07:00
Walter Fender ad8a83a7c1 Change to aggregator so it calls a user apiservice via its pod IP.
proxy_handler now uses the endpoint router to map the cluster IP to
appropriate endpoint (Pod) IP for the given resource.
Added code to allow aggregator routing to be optional.
Updated bazel build.
Fixes to cover JLiggit comments.
Added util ResourceLocation method based on Listers.
Fixed issues from verification steps.
Updated to add an interface to obfuscate some of the routing logic.
Collapsed cluster IP resolution in to the aggregator routing
implementation.
Added 2 simple unit tests for ResolveEndpoint
2017-05-26 16:10:01 -07:00
Tim Hockin 91ed74c0e9 Enable the ip-masq-agent on GCE installs
Setting this will trigger
cluster/addons/ip-masq-agent/ip-masq-agent.yaml to be installed as an
addon, which disable configure IP masquerade for all of RFC1918, rather
than just 10.0/8.
2017-05-25 17:07:12 -07:00
Kubernetes Submit Queue ee671e64ee Merge pull request #46266 from thockin/proxy-periodic-runner-2
Automatic merge from submit-queue (batch tested with PRs 44774, 46266, 46248, 46403, 46430)

kube-proxy: ratelimit runs of iptables by sync-period flags

This bounds how frequently iptables can be synced.  It will be no more often than every 10 seconds and no less often than every 1 minute, by default.

@timothysc FYI

@dcbw @freehan FYI
2017-05-25 06:17:56 -07:00
Kubernetes Submit Queue 9c1480bb61 Merge pull request #46366 from nicksardo/gce-subnetwork-url
Automatic merge from submit-queue (batch tested with PRs 45573, 46354, 46376, 46162, 46366)

GCE - Retrieve subnetwork name/url from gce.conf 

**What this PR does / why we need it**:
Features like ILB require specifying the subnetwork if the network is type manual.

**Notes:**
The network URL can be [constructed](68e7e18698/pkg/cloudprovider/providers/gce/gce.go (L211-L217)) by fetching instance metadata; however, the subnetwork is not provided through this feature. Users must specify the subnetwork name/url through the gce.conf.

Although multiple subnets can exist in the same region for a network, the cloud provider will only use one subnet url for creating LBs. 


**Release note**:
```release-note
NONE
```
2017-05-25 03:14:05 -07:00
Kubernetes Submit Queue 80171e5106 Merge pull request #46150 from bowei/ip-alias-service
Automatic merge from submit-queue (batch tested with PRs 46299, 46309, 46311, 46303, 46150)

Create a subnet for reserving the service cluster IP range

This will be done if IP aliases is enabled on GCP.

```release-note
NONE
```
2017-05-24 23:19:11 -07:00
Tim Hockin 2856fde23b Use BoundedFrequencyRunner in kube-proxy 2017-05-24 20:33:15 -07:00
Nick Sardo 68e7e18698 Set NODE_SUBNETWORK env var in gce.conf 2017-05-24 10:23:08 -07:00
Kubernetes Submit Queue 3ff99a8381 Merge pull request #46149 from cjcullen/logtoggle
Automatic merge from submit-queue

Allow the /logs handler on the apiserver to be toggled.

Adds a flag to kube-apiserver, and plumbs through en environment variable in configure-helper.sh
2017-05-23 15:19:08 -07:00
CJ Cullen 9dca164ddd Allow the /logs handler on the apiserver to be toggled.
Change-Id: Ibf173b7f85cf7fffe8482eaee74fb77da2b2588b
2017-05-22 14:37:24 -07:00
Vishnu kannan 333e571bee update default project to cos-cloud in gce configs
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-05-20 21:21:23 -07:00
Vishnu kannan 86b5edb79a Update COS version to m59
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-05-20 21:17:19 -07:00
Vishnu kannan 1e77594958 Adding an installer script that installs Nvidia drivers in Container Optimized OS
Packaged the script as a docker container stored in gcr.io/google-containers
A daemonset deployment is included to make it easy to consume the installer
A cluster e2e has been added to test the installation daemonset along with verifying installation
by using a sample CUDA application.
Node e2e for GPUs updated to avoid running on nodes without GPU devices.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-05-20 21:17:19 -07:00
Kubernetes Submit Queue a9d0403858 Merge pull request #38169 from caseydavenport/calico-daemonset
Automatic merge from submit-queue

Update Calico add-on

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

Updates Calico to the latest version using self-hosted install as a DaemonSet, removes Calico's dependency on etcd.

- [x] Remove [last bits of Calico salt](175fe62720/cluster/saltbase/salt/calico/master.sls (L3))
- [x] Failing on the master since no kube-proxy to access API.
- [x] Fix outgoing NAT
- [x] Tweak to work on both debian / GCI (not just GCI)
- [x] Add the portmap plugin for host port support

Maybe:
- [ ] Add integration test

**Which issue this PR fixes:**

https://github.com/kubernetes/kubernetes/issues/32625

**Try it out**

Clone the PR, then:

```
make quick-release
export NETWORK_POLICY_PROVIDER=calico
export NODE_OS_DISTRIBUTION=gci
export MASTER_SIZE=n1-standard-4
./cluster/kube-up.sh 
```

**Release note:**

```release-note
The Calico version included in kube-up for GCE has been updated to v2.2.
```
2017-05-19 19:38:59 -07:00
Bowei Du 7c9b6e90e8 Create a subnet for reserving the service cluster IP range
This will be done if IP aliases is enabled on GCP.
2017-05-19 16:59:14 -07:00
Kubernetes Submit Queue d3aa925c01 Merge pull request #46038 from dnardo/ip-masq-agent
Automatic merge from submit-queue (batch tested with PRs 44606, 46038)

Add ip-masq-agent addon to the addons folder. 

This also ensures that under gce we add this DaemonSet if the non-masq-cidr
is set to 0/0.



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

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Add ip-masq-agent addon to the addons folder which is used in GCE if  --non-masquerade-cidr is set to 0/0
```
2017-05-19 11:52:09 -07:00
Daniel Nardo 96ae34685e Add ip-masq-agent addon to the addons folder. This also
ensures that under gce we add this daemonset if the non-masq-cidr
is set to 0/0.
2017-05-19 08:43:55 -07:00
Marcin Wielgus 2f4cb6bfe7 Use integer comparisons instead of string comparisons in autoscaler config validation 2017-05-19 14:50:55 +02:00
Bowei Du 7febdde22a Update cluster startup scripts to use gcloud beta for alias IP support
The feature has gone from alpha to beta.
2017-05-17 16:26:48 -07:00
Casey Davenport 63744a819f Update Calico add-on 2017-05-17 15:04:08 -07:00
Michael Taufen 2ee2ec5e21 Remove the deprecated --babysit-daemons kubelet flag 2017-05-17 09:08:57 -07:00
Matt Liggett 5dd4a5d56b Add --quiet to instance-templates delete.
Otherwise it hangs waiting for confirmation.
2017-05-15 16:26:11 -07:00
Kubernetes Submit Queue a507d30833 Merge pull request #45602 from dashpole/enable_memcg_for_all_tests
Automatic merge from submit-queue (batch tested with PRs 45569, 45602, 45604, 45478, 45550)

Enable kernel memcg notification for node and cluster GCI/COS testing.

Sets --experimental-kernel-memcg-notification=true when running on the GCI/COS image.  It sets this for master and nodes for cluster e2e tests, and for the node in node e2e tests.

Issue #42676 

cc @dchen1107 @Random-Liu
2017-05-10 21:34:39 -07:00
Ryan Hitchman 62235c3bb8 Fix ip-alias testing.
IP aliases are an alpha feature, and node accelerators are a beta
feature. $gcloud determines which is appropriate.

Before, this would try to run "gcloud alpha beta", which is incoherent.
2017-05-10 12:10:17 -07:00
David Ashpole 0b1e45c5ff enable memcg on all testing 2017-05-10 11:38:26 -07:00
Kubernetes Submit Queue d4f92711a1 Merge pull request #45130 from vishh/gpu-cluster-setup
Automatic merge from submit-queue (batch tested with PRs 44830, 45130)

Adding support for Accelerators to GCE clusters.

```release-note
Create clusters with GPUs in GKE by specifying "type=<gpu-type>,count=<gpu-count>" to NODE_ACCELERATORS env var.
List of available GPUs - https://cloud.google.com/compute/docs/gpus/#introduction
```
2017-05-05 15:39:32 -07:00
Kubernetes Submit Queue d7f72dcc44 Merge pull request #44590 from ihmccreery/rotate-username
Automatic merge from submit-queue (batch tested with PRs 44590, 44969, 45325, 45208, 44714)

Enable basic auth username rotation for GCI

When changing basic auth creds, just delete the whole file, in order to be able to rotate username in addition to password.
2017-05-05 14:08:08 -07:00
Kubernetes Submit Queue f156f7a741 Merge pull request #45162 from zhangxiaoyu-zidif/format-err-2
Automatic merge from submit-queue (batch tested with PRs 45285, 45162)

mounter.go: format return err.

**What this PR does / why we need it**:
when an error returned is nil, it's preferred to explicitly return nil.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-04 02:15:48 -07:00
Jeff Grafton e231d4280b Replace git_repository with http_archive and use ixdy's fork of bazel tools for pkg_tar 2017-05-03 10:13:06 -07:00
zhangxiaoyu-zidif f70065478e mounter.go: format return err. 2017-05-01 10:40:42 +08:00
Vishnu kannan e74d4a0d68 Adding support for Accelerators to GCE clusters.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-04-28 15:57:39 -07:00
Kubernetes Submit Queue 549bd4b7d5 Merge pull request #44591 from ixdy/bazel-push-build
Automatic merge from submit-queue (batch tested with PRs 44591, 44549)

Update repo-infra bazel dependency and use new gcs_upload rule

This PR provides similar functionality to push-build.sh entirely within Bazel rules (though it relies on gsutil).

It's an alternative to #44306.

Depends on https://github.com/kubernetes/repo-infra/pull/13.

**Release note**:

```release-note
NONE
```
2017-04-27 10:54:56 -07:00
Yang Guo 0d66fc97cd Makes cluster/gce/ubuntu to be a symlink to cluster/gce/gci and changes the gci's [master|node].yaml to enable kubernetes.target.
This enables Ubuntu to use the same provisioning scripts as GCI's. The
change for enabling kubernetes.target is needed for Ubuntu but a no-op
for GCI.
2017-04-25 16:19:00 -07:00
Jeff Grafton a9bfae8ec3 Update repo-infra bazel dependency and use new gcs_upload rule 2017-04-25 13:45:28 -07:00
Isaac Hollander McCreery 1769af78fa Comment extension 2017-04-21 15:58:39 -07:00
Isaac Hollander McCreery 596b9ebca7 Add comments and change function name 2017-04-21 11:25:12 -07:00
Isaac Hollander McCreery 7f599dc52f Make comments in config-default scripts more explicit 2017-04-21 10:27:34 -07:00
Chris Glass cf23d4c939 Add Ubuntu as a platform for e2e tests on GCE
Using Ubuntu on GCE to run cluster e2e tests requires slightly different
node.yaml and master.yaml files than GCI, because Ubuntu uses systemd as
PID 1, wheras GCI uses upstart with a systemd delegate. Therefore the
e2e tests fail using those files since the kubernetes services are not
brought back up after a node/master reboot.
2017-04-20 17:40:51 -07:00
Piotr Szczesniak 113f120e29 Removed fluentd-gcp manifest pod 2017-04-20 15:53:24 +02:00
Isaac Hollander McCreery 2acf60e44d When changing basic auth creds, just delete the whole file, in order to be able to rotate username in addition to password 2017-04-17 17:05:33 -07:00
Bowei Du 0e6af317a8 Change the default CLUSTER_IP_RANGE used by e2e
The existing choice intersects with the range reserved for auto
subnets and cannot be used with some GCP features.
2017-04-14 13:49:54 -07:00
Bowei Du c4a8ea2eb5 Missing --project in the cluster up scripts for gce
```release-note
NONE
```
2017-04-13 12:10:59 -07:00
Kubernetes Submit Queue 640c67792f Merge pull request #44363 from bowei/use-auto-net
Automatic merge from submit-queue

Use auto mode networks instead of legacy networks in GCP

Use of the --range flag creates legacy networks in GCP.

Legacy networks will not support new GCP features.

```release-note
NONE
```
2017-04-11 22:57:20 -07:00
Kubernetes Submit Queue ceccd305ce Merge pull request #42147 from bowei/ip-alias-2
Automatic merge from submit-queue

Add support for IP aliases for pod IPs (GCP alpha feature)

```release-note
Adds support for allocation of pod IPs via IP aliases.

# Adds KUBE_GCE_ENABLE_IP_ALIASES flag to the cluster up scripts (`kube-{up,down}.sh`).

KUBE_GCE_ENABLE_IP_ALIASES=true will enable allocation of PodCIDR ips
using the ip alias mechanism rather than using routes. This feature is currently
only available on GCE.

## Usage
$ CLUSTER_IP_RANGE=10.100.0.0/16 KUBE_GCE_ENABLE_IP_ALIASES=true bash -x cluster/kube-up.sh

# Adds CloudAllocator to the node CIDR allocator (kubernetes-controller manager).

If CIDRAllocatorType is set to `CloudCIDRAllocator`, then allocation
of CIDR allocation instead is done by the external cloud provider and
the node controller is only responsible for reflecting the allocation
into the node spec.

- Splits off the rangeAllocator from the cidr_allocator.go file.
- Adds cloudCIDRAllocator, which is used when the cloud provider allocates
  the CIDR ranges externally. (GCE support only)
- Updates RBAC permission for node controller to include PATCH
```
2017-04-11 22:09:24 -07:00
Bowei Du 079505023f Use auto mode networks instead of legacy networks in GCP
Use of the --range flag creates legacy networks in GCP.
2017-04-11 14:36:17 -07:00
Bowei Du 345c65847f Add KUBE_GCE_ENABLE_IP_ALIASES flag to the cluster turn up scripts.
KUBE_GCE_ENABLE_IP_ALIASES=true will enable allocation of PodCIDR ips
using the ip alias mechanism rather than using routes.

NODE_IP_RANGE will control the node instance IP cidr
KUBE_GCE_IP_ALIAS_SIZE controls the size of each podCIDR
IP_ALIAS_SUBNETWORK controls the name of the subnet created for the cluster
2017-04-11 14:07:50 -07:00
Kubernetes Submit Queue b9a5a5c9b3 Merge pull request #42748 from dcbw/cfssl-localup
Automatic merge from submit-queue (batch tested with PRs 43866, 42748)

hack/cluster: download cfssl if not present

hack/local-up-cluster.sh uses cfssl to generate certificates and
will exit it cfssl is not already installed.  But other cluster-up
mechanisms (GCE) that generate certs just download cfssl if not
present.  Make local-up-cluster.sh do that too so users don't have
to bother installing it from somewhere.
2017-04-10 14:27:11 -07:00
Kubernetes Submit Queue 0653751fb4 Merge pull request #44169 from mikedanese/fix
Automatic merge from submit-queue (batch tested with PRs 42025, 44169, 43940)

if we have a dedicated serviceaccount keypair, use it to verify serviceaccounts
2017-04-06 17:00:20 -07:00
Mike Danese e2d7e2c866 make salt return non-zero exit code on failure 2017-04-06 13:57:33 -07:00
Mike Danese ffcbe213c1 if we have a dedicated serviceaccount keypair, use it to verify serviceaccounts 2017-04-06 11:06:25 -07:00
Kubernetes Submit Queue b41e415ebd Merge pull request #43137 from shashidharatd/federation-domain
Automatic merge from submit-queue

[Federation] Remove FEDERATIONS_DOMAIN_MAP references

Remove all references to FEDERATIONS_DOMAIN_MAP as this method is no longer is used and is replaced by adding federation domain map to kube-dns configmap.

cc @madhusudancs @kubernetes/sig-federation-pr-reviews 

**Release note**:
```
[Federation] Mechanism of adding `federation domain maps` to kube-dns deployment via `--federations` flag is superseded by adding/updating `federations` key in `kube-system/kube-dns` configmap. If user is using kubefed tool to join cluster federation, adding federation domain maps to kube-dns is already taken care by `kubefed join` and does not need further action.
```
2017-04-06 02:05:42 -07:00
Kubernetes Submit Queue 0f10d6ccf2 Merge pull request #43996 from ncdc/proxy-shared-informers
Automatic merge from submit-queue

Use shared informers for proxy endpoints and service configs

Use shared informers instead of creating local controllers/reflectors
for the proxy's endpoints and service configs. This allows downstream
integrators to pass in preexisting shared informers to save on memory &
cpu usage.

This also enables the cache mutation detector for kube-proxy for those
presubmit jobs that already turn it on.

Follow-up to #43295 cc @wojtek-t 

Will race with #43937 for conflicting changes 😄 cc @thockin 

cc @smarterclayton @sttts @liggitt @deads2k @derekwaynecarr @eparis @kubernetes/rh-cluster-infra
2017-04-05 06:52:25 -07:00
Mik Vyatskov 30f22ad683 Remove toleration from fluentd-elasticsearch 2017-04-05 11:27:14 +02:00
Andy Goldstein d2bc4d0b2e Use shared informers for proxy endpoints and service configs
Use shared informers instead of creating local controllers/reflectors
for the proxy's endpoints and service configs. This allows downstream
integrators to pass in preexisting shared informers to save on memory &
cpu usage.

This also enables the cache mutation detector for kube-proxy for those
presubmit jobs that already turn it on.
2017-04-04 12:51:41 -04:00
Dan Williams f20437a822 hack/cluster: download cfssl if not present
hack/local-up-cluster.sh uses cfssl to generate certificates and
will exit it cfssl is not already installed.  But other cluster-up
mechanisms (GCE) that generate certs just download cfssl if not
present.  Make local-up-cluster.sh do that too.
2017-04-03 23:31:16 -05:00
Dan Williams b3705b6e35 hack/cluster: consolidate cluster/ utils to hack/lib/util.sh
Per Clayton's suggestion, move stuff from cluster/lib/util.sh to
hack/lib/util.sh.  Also consolidate ensure-temp-dir and use the
hack/lib/util.sh implementation rather than cluster/common.sh.
2017-03-30 22:34:46 -05:00
Kubernetes Submit Queue b020fb1fda Merge pull request #43726 from vishh/local-ssd-gce
Automatic merge from submit-queue

Add support for local ssds in GCE

For #43640
2017-03-29 16:56:27 -07:00
Vishnu kannan 937bac940a add support for local ssds in GCE
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-03-29 15:06:58 -07:00
Kubernetes Submit Queue be4452cfce Merge pull request #42994 from Shawyeok/features/full-tls-etcd-cluster
Automatic merge from submit-queue

Centos provider: generate SSL certificates for etcd cluster.

**What this PR does / why we need it**:
Support secure etcd cluster for centos provider, generate SSL certificates for etcd in default. Running it w/o SSL is exposing cluster data to everyone and is not recommended. [#39462](https://github.com/kubernetes/kubernetes/pull/39462#issuecomment-271601547)

/cc @jszczepkowski @zmerlynn 

**Release note**:
```release-note
Support secure etcd cluster for centos provider.
```
2017-03-28 09:02:26 -07:00
Kubernetes Submit Queue b30fe32a66 Merge pull request #43381 from aleksandra-malinowska/stackdriver-config
Automatic merge from submit-queue (batch tested with PRs 43681, 40423, 43562, 43008, 43381)

Add stackdriver monitoring option
2017-03-27 12:49:29 -07:00
Kubernetes Submit Queue 8dfc939345 Merge pull request #43681 from ethernetdan/proto-upgrade-prompt
Automatic merge from submit-queue

added prompt warning if etcd3 media type isn't set during upgrade

**What this PR does / why we need it**:
This adds a prompt confirming the upgrade when `STORAGE_MEDIA_TYPE` is not explicitly set. This is to prevent users from accidentally upgrading to protobuf.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
Alongs with docs, addresses #43669

**Special notes for your reviewer**:
Should be cherrypicked onto `release-1.6`

**Release note**:
```release-note
NONE
```
2017-03-27 12:10:31 -07:00
Dan Gillespie d7a552c188 in storage media upgrade prompt, provide config for using protobuf 2017-03-27 16:46:38 +01:00
Dan Gillespie 031dd569ac etcd upgrade warning: add docs link, fixed etcd2 behavior, print non-interactive 2017-03-27 16:13:11 +01:00
Dan Gillespie d0bbb941fd added prompt warning if etcd3 media type isn't set during upgrade 2017-03-27 13:47:09 +01:00
Jerzy Szczepkowski 27b8e1f518 Added failing upgrade if there are many master replicas.
Added failing upgrade (GCE) if there are many master replicas. Releated
to #43688.
2017-03-27 14:29:06 +02:00
Aleksandra Malinowska a737fec50b Add stackdriver monitoring option 2017-03-27 12:10:04 +02:00
Jordan Liggitt eb45dc9eb9
Remove E2E_UPGRADE_TEST check in config-test.sh 2017-03-24 10:14:20 -04:00
shawyeok c692b55b57 Centos provider: generate SSL certificates for etcd cluster.
Making download-cfssl reusable.

Extract generate-etcd-cert method up to common.sh.
2017-03-24 09:15:57 +08:00
Kubernetes Submit Queue 1e879c69ec Merge pull request #43544 from liggitt/legacy-abac-kube-up
Automatic merge from submit-queue (batch tested with PRs 43546, 43544)

Default to enabling legacy ABAC policy in non-test kube-up.sh environments

Fixes https://github.com/kubernetes/kubernetes/issues/43541

In 1.5, we unconditionally stomped the abac policy file if KUBE_USER was set, and unconditionally used ABAC mode pointing to that file.

In 1.6, unless the user opts out (via `ENABLE_LEGACY_ABAC=false`), we want the same legacy policy included as a fallback to RBAC.

This PR:
* defaults legacy ABAC **on** in normal deployments
* defaults legacy ABAC **on** in upgrade E2Es (ensures combination of ABAC and RBAC works properly for upgraded clusters)
* defaults legacy ABAC **off** in non-upgrade E2Es (ensures e2e tests 1.6+ run with tightened permissions, and that default RBAC roles cover the required core components)

GKE changes to drive the `ENABLE_LEGACY_ABAC` envvar were made by @cjcullen out of band

```release-note
`kube-up.sh` using the `gce` provider enables both RBAC authorization and the permissive legacy ABAC policy that makes all service accounts superusers. To opt out of the permissive ABAC policy, export the environment variable `ENABLE_LEGACY_ABAC=false` before running `cluster/kube-up.sh`.
```
2017-03-23 14:13:18 -07:00
Kubernetes Submit Queue 6ed3bce7f4 Merge pull request #43546 from calebamiles/wip-bump-cni-ref
Automatic merge from submit-queue

Bump CNI consumers to v0.5.1

**What this PR does / why we need it**:
- vendored CNI plugins properly handle `DEL` on missing resources
- update CNI version refs

**Which issue this PR fixes**

fixes #43488

**Release note**:

`bumps CNI to version v0.5.1 where plugins properly handle DEL on non existent resources`
2017-03-23 14:13:05 -07:00
Jordan Liggitt b95f5286c1
Default to enabling legacy ABAC policy in non-test GCE kube-up.sh environments 2017-03-22 22:20:09 -04:00
Kubernetes Submit Queue c415325ced Merge pull request #43537 from Random-Liu/disable-master-taint-by-default
Automatic merge from submit-queue

Add an env KUBE_ENABLE_MASTER_NOSCHEDULE_TAINT and disable it by default

This PR changed master `NoSchedule` taint to opt-in.

As is discussed with @bgrant0607 @janetkuo, `NoSchedule` master taint breaks existing user workload, we should not enable it by default.

Previously, NPD required the taint because it can only support one OS distro with a specific configuration. If master and node are using different OS distros, NPD will not work either on master or node. However, we've already fixed this in https://github.com/kubernetes/kubernetes/pull/40206, so for NPD it's fine to disable the taint.

This should work, but I'll still try it in my cluster to confirm.

@kubernetes/sig-scheduling-misc @dchen1107 @mikedanese
2017-03-22 17:03:33 -07:00
caleb miles f4d9bbc7d8
Bump CNI consumers to latest version
- vendored CNI plugins properly handle `DEL` on missing resources
- [based on v0.5.1](https://github.com/kubernetes/kubernetes/issues/43488#issuecomment-288525151)
2017-03-22 16:03:13 -07:00
Random-Liu 965c262aab Remove the master NoSchedule taint. 2017-03-22 15:35:13 -07:00
Kubernetes Submit Queue cc3eb3916e Merge pull request #43529 from mikedanese/fix-down
Automatic merge from submit-queue (batch tested with PRs 43465, 43529, 43474, 43521)

link the server.key to the key not the crt
2017-03-22 12:35:08 -07:00
Mike Danese 3b83eb538c link the server.key to the key not the crt 2017-03-22 10:29:42 -07:00
Piotr Szczesniak 8968ac5c36 Renamed fluentd-ds-ready annotation 2017-03-21 20:48:13 +01:00
Jordan Liggitt bc539151f3
Keep ResourceQuota admission at the end of the chain 2017-03-21 01:53:11 -04:00
Kubernetes Submit Queue 14888854bc Merge pull request #43184 from mtaufen/fix-cos-name-change-issues
Automatic merge from submit-queue (batch tested with PRs 43254, 43255, 43184, 42509)

Symlink cluster/gce/cos to cluster/gce/gci

Fixes: #43139

As I just unfortunately found out after spending an hour getting to the point where I could test this, upgrade.sh does not support upgrading nodes to local binaries. So someone will have to cut a release to test whether this change actually works.
2017-03-16 19:02:26 -07:00
Kubernetes Submit Queue a10c8f49ff Merge pull request #42931 from piosz/annotation-fix
Automatic merge from submit-queue

Setup fluentd-ds-ready label in startup script not in kubelet

fix #42840

``` release-note
TBD
```
2017-03-16 16:10:12 -07:00