Commit Graph

39 Commits (29c1b81d4c54b52a5d94c12d5c0ac544b4370143)

Author SHA1 Message Date
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Josh Horwitz 48b3fb84ab do not allow backsteps in host volume plugin
Fixes #47107
2017-06-16 16:48:24 -04:00
Ricky Pai 407fe8b356 write HostAliases to hosts file 2017-04-29 11:31:24 -07:00
Ricky Pai e21da839e5 extract content-generation concern from `ensureHostsFile`
add tests to assert the output of `ensureHostsFile`
2017-04-24 12:33:45 -07:00
andrewsykim 4f6c1b5ad5 call GetHostIP from makeEnvironment 2017-03-28 20:20:21 -04:00
andrewsykim c001deed43 fetch hostIP at runtime since status manager didn't update it yet 2017-03-28 20:20:20 -04:00
andrewsykim 824d0b11cb e2e tests for status.hostIP in downward api 2017-03-28 20:20:20 -04:00
Michael Fraenkel c4d07466e8 Invalid environment var names are reported and pod starts
When processing EnvFrom items, all invalid keys are collected and
reported as a single event.

The Pod is allowed to start.
2017-03-09 07:21:53 +00:00
vefimova fc8a37ec86 Added ability for Docker containers to set usage of dns settings along with hostNetwork is true
Introduced chages:
   1. Re-writing of the resolv.conf file generated by docker.
      Cluster dns settings aren't passed anymore to docker api in all cases, not only for pods with host network:
      the resolver conf will be overwritten after infra-container creation to override docker's behaviour.

   2. Added new one dnsPolicy - 'ClusterFirstWithHostNet', so now there are:
      - ClusterFirstWithHostNet - use dns settings in all cases, i.e. with hostNet=true as well
      - ClusterFirst - use dns settings unless hostNetwork is true
      - Default

Fixes #17406
2017-03-01 17:10:00 +00:00
Vishnu kannan 3b0a408e3b improve gpu integration
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-28 11:27:53 -08:00
Kubernetes Submit Queue 3bc575c91f Merge pull request #33550 from rtreffer/kubelet-allow-multiple-dns-server
Automatic merge from submit-queue

Allow multipe DNS servers as comma-seperated argument for kubelet --dns

This PR explores how kubectls "--dns" could be extended to specify multiple DNS servers for in-cluster PODs. Testing on the local libvirt-coreos cluster shows that multiple DNS server are injected without issues.

Specifying multiple DNS servers increases resilience against
- Packet drops
- Single server failure

I am debugging services that do 50+ DNS requests for a single incoming interactive request, thus highly increase the chance of a slowdown (+5s) due to a single packet drop. Switching to two DNS servers will reduce the impact of the issues (roughly +1s on glibc, 0s on musl, error-rate goes down to error-rate^2).

Note that there is no need to change any runtime related code as far as I know. In the case of "default" dns the /etc/resolv.conf is parsed and multiple DNS server are send to the backend anyway. This only adds the same capability for the clusterFirst case.

I've heard from @thockin that multiple DNS entries are somehow considered. I've no idea what was considered, though. This is what I would like to see for our production use, though.

```release-note
NONE
```
2017-02-15 12:45:32 -08:00
Michael Fraenkel 93c11422e4 CRI Portforward needs to forward websocket ports
- adjust ports to int32
- CRI flows the websocket ports as query params

- Do not validate ports since the protocol is unknown
  SPDY flows the ports as headers and websockets uses query params
- Only flow query params if there is at least one port query param
2017-02-01 18:03:42 -07:00
Rene Treffer 42ff859c27 Allow multipe DNS servers as comma-seperated argument for --dns
Depending on an exact cluster setup multiple dns may make sense.
Comma-seperated lists of DNS server are quite common as DNS servers
are always plain IPs.
2017-02-01 22:38:40 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
deads2k 9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
Kubernetes Submit Queue 43286a82c6 Merge pull request #39981 from fraenkel/optional_configmaps_secrets
Automatic merge from submit-queue

Optional configmaps and secrets

Allow configmaps and secrets for environment variables and volume sources to be optional

Implements approved proposal c9f881b7bb

Release note:
```release-note
Volumes and environment variables populated from ConfigMap and Secret objects can now tolerate the named source object or specific keys being missing, by adding `optional: true` to the volume or environment variable source specifications.
```
2017-01-23 23:06:35 -08:00
Michael Fraenkel 4e466040d9 Allow Optional ConfigMap and Secrets
- ConfigMaps and Secrets for Env or Volumes are allowed to be optional
2017-01-23 18:59:49 -07:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Kubernetes Submit Queue b5929bfb2b Merge pull request #38789 from jessfraz/cleanup-temp-dirs
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

Cleanup temp dirs

So funny story my /tmp ran out of space running the unit tests so I am cleaning up all the temp dirs we create.
2017-01-20 12:34:58 -08:00
Michael Fraenkel 13d693d220 Secrets can populate environment variables 2017-01-19 13:46:05 -05:00
Kubernetes Submit Queue 0144fae64f Merge pull request #29666 from vefimova/fix_29270
Automatic merge from submit-queue

Fixed merging of host's and dns' search lines

Fixed forming of pod's Search line in resolv.conf:
 - exclude duplicates while merging of host's and dns' search lines to form pod's one
 - truncate pod's search line if it exceeds resolver limits: is > 255 chars and containes > 6 searches
 - monitoring the resolv.conf file which is used by kubelet (set thru --resolv-conf="") and logging and eventing if search line in it consists of more than 3 entries (or 6 if Cluster Domain is set) or its lenght is > 255 chars
 - logging and eventing when a pod's search line is > 255 chars or containes > 6 searches during forming

Fixes #29270

**Release note**:

```release-note
Fixed forming resolver search line for pods: exclude duplicates, obey libc limitations, logging and eventing appropriately.
```
2017-01-19 01:37:50 -08:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
vefimova d925439727 Fixed forming of pod's Search line in resolv.conf:
- exclude duplicates while merging of host's and dns' search lines to form pod's one
 - truncate pod's search line if it exceeds resolver limits: is > 255 chars and containes > 6 searches
 - monitoring the resolv.conf file which is used by kubelet (set thru --resolv-conf="") and logging and eventing if search line in it consists of more than 3 entries
   (or 6 if Cluster Domain is set) or its lenght is > 255 chars
 - logging and eventing when a pod's search line is > 255 chars or containes > 6 searches during forming
Fixes #29270
2017-01-17 13:18:26 +00:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Michael Fraenkel f6c9ab4312 Check if key is a valid after prefix is prepended
- Allow invalid keys to become valid by requiring a prefix
2017-01-04 17:26:44 -05:00
Jess Frazelle a2dbd456a7
cleanup all /tmp/kubelet_test files
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:26:24 -08:00
Michael Fraenkel 2d803afc98 ConfigMaps populate environment variables 2017-01-03 11:02:15 -05:00
Euan Kemp bcd939cb08 kuberuntime: set privileged for sandboxes 2016-12-08 13:11:16 -08:00
Chao Xu 5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Random-Liu e9f1b0f972 Fix hostname truncate. 2016-11-16 18:09:31 -08:00
pweil- d0d78f478c experimental host user ns defaulting 2016-11-14 10:16:03 -05:00
Rodolfo Carvalho 506129ba4e Add timeout argument to ExecInContainer
This allows us to interrupt/kill the executed command if it exceeds the
timeout (not implemented by this commit).

Set timeout in Exec probes. HTTPGet and TCPSocket probes respect the
timeout, while Exec probes used to ignore it.

Add e2e test for exec probe with timeout. However, the test is skipped
while the default exec handler doesn't support timeouts.
2016-11-07 13:00:59 +01:00
Kubernetes Submit Queue f787cea237 Merge pull request #36020 from timstclair/klet-stream
Automatic merge from submit-queue

Separate Direct and Indirect streaming paths, implement indirect path for CRI

This PR refactors the `pkg/kubelet/container.Runtime` interface to remove the `ExecInContainer`, `PortForward` and `AttachContainer` methods. Instead, those methods are part of the `DirectStreamingRuntime` interface which all "legacy" runtimes implement. I also added an `IndirectStreamingRuntime` which handles the redirect path and is implemented by CRI runtimes. To control the size of this PR, I did not fully setup the indirect streaming path for the dockershim, so I left legacy path behind.

Most of this PR is moving & renaming associated with the refactoring. To understand the functional changes, I suggest tracing the code from `getExec` in `pkg/kubelet/server/server.go`, which calls `GetExec` in `pkg/kubelet/kubelet_pods.go` to determine whether to follow the direct or indirect path.

For https://github.com/kubernetes/kubernetes/issues/29579

/cc @kubernetes/sig-node
2016-11-04 11:52:06 -07:00
Tim St. Clair 86d849e374
Separate Direct and Indirect streaming paths, implement indirect path with CRI 2016-11-03 13:26:33 -07:00
Pengfei Ni e0f89a322b CRI: Add devices implementation and moves GPU to devices 2016-11-02 15:24:45 +08:00
deads2k 518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
Paul Morie b1f91bd510 Move Kubelet pod-management code into kubelet_pods.go 2016-09-26 17:16:59 -04:00