Commit Graph

324 Commits (ef7b7ebd9cbf6e1c99ea2cbaa7b5de05b709e35e)

Author SHA1 Message Date
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
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 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
Marcin Wielgus d0bedba9e1 Ensure that pricing expander is used by default in Cluster Autoscaler 2017-08-08 20:52:07 +02:00
Daniel Kłobuszewski b48b1b80bc Enable overriding fluentd resources in GCP 2017-08-03 11:58:43 +02: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 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
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
shiliang 994275aa55 skip downloading and extracting tarballs and docker images when they are preloaded. 2017-07-25 15:40:03 -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
Ajit Kumar f45cc00440 Use custom port for node-problem-detector 2017-07-20 11:25:44 -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
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 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
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
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
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
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
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
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 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
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 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
Quintin Lee b886897f9d Prepend the metadata firewall in gce, so it isn't superceded. 2017-06-16 10:08:48 -07:00