Commit Graph

432 Commits (7ffa2faeacb213d25c86ab91a2ce5b67f30b9c33)

Author SHA1 Message Date
Kubernetes Submit Queue 9cfb0ae565 Merge pull request #48508 from mengqiy/fix_term
Automatic merge from submit-queue

fix cross build

Fix the issue introduced in #48299 which breaks cross-build (https://github.com/kubernetes/kubernetes/pull/48299#issuecomment-312846398).
move setsize.go and setsize_unsupported.go back to util/term for kubelet.
move unmark_windows.go as well.

```release-note
NONE
```
2017-07-06 00:08:49 -07:00
ymqytw ce561b2044 fix cross build for windows 2017-07-05 12:42:41 -07:00
JulienBalestra 9f37efcf7e Provide a way to setup the limit NO files for rkt Pods 2017-07-01 18:57:52 +02:00
ymqytw f0ce897277 move term to kubectl/util 2017-06-30 15:00:24 -07:00
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
mbohlool c91a12d205 Remove all references to types.UnixUserID and types.UnixGroupID 2017-06-21 04:09:07 -07:00
David Ashpole 889afa5e2d trigger aggressive container garbage collection when under disk pressure 2017-06-03 07:52:36 -07:00
Derek Carr f59069720e Fix kubelet event recording 2017-05-22 17:24:36 -04:00
Dmitry Shulyak 2612e0c78a Move client/unversioned/remotecommand to client-go
Module remotecommand originally part of kubernetes/pkg/client/unversioned was moved
to client-go/tools, and will be used as authoritative in kubectl, e2e and other places.

Module remotecommand relies on util/exec module which will be copied to client-go/pkg/util
2017-05-15 16:28:56 +03:00
Julien Balestra 00d87a7209 Remove the termination-log files, the finished- marker file during the GC 2017-05-11 16:36:44 +02:00
JulienBalestra 7a2e0e24f7 Generate a new Network Namespace for each Pod. 2017-05-09 09:59:00 +02:00
Jamie Hannaford 9440a68744 Use dedicated Unix User and Group ID types 2017-05-05 14:07:38 +02:00
Clayton Coleman 49209b3394
Make timeouts in the Kubelet slightly offset to aid debugging
Several of these loops overlap, and when they are the reason a failure
is happening it is difficult to sort them out. Slighly misalign these
loops to make their impact obvious.
2017-04-28 12:00:28 -04:00
Kubernetes Submit Queue 2c774753e1 Merge pull request #44467 from JulienBalestra/fix-rkt-host-path-volume
Automatic merge from submit-queue (batch tested with PRs 44469, 44566, 44467, 44526)

Kubelet:rkt Fix the hostPath Volume creation

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

This PR fix the `hostPath` volume when the path exist and it's not a directory.
At the moment, the creation of a `hostPath` volume for an existing file leads to this error:

> kubelet[1984]: E0413 07:53:16.480922    1984 pod_workers.go:184] Error syncing pod 38359a57-1fb1-11e7-a484-76870fe7db83, skipping: failed to SyncPod: mkdir /usr/share/coreos/lsb-release: not a directory

**Special notes for your reviewer**:

You can have a look to the difference with this [gist](https://gist.github.com/JulienBalestra/28ae15efc8a1393d350300880c07ff4f)
2017-04-17 20:06:59 -07:00
Julien Balestra edc4ccd660 Kubelet:rkt Fix the hostPath Volume creation
Kubelet:rkt Fix the hostPath Volume creation
2017-04-15 15:03:27 +02:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Dmitry Shulyak f50480c714 Decouple remotecommand client from term/kubelet dependencies
In order to move client/unversioned/remotecommand to client-go as a followup
for this change we have to decouple it from tons of dependencies
2017-04-13 15:56:40 +03:00
Kubernetes Submit Queue 964e1553ab Merge pull request #43604 from k82cn/rkt_typo
Automatic merge from submit-queue

Fix comments typo in rkt.

fixes comments typo of rkt runtime.

```release-note
None
```
2017-03-29 00:15:14 -07:00
Klaus Ma 7c91274df2 Fix comments typo in rkt. 2017-03-24 11:31:15 +08:00
Julien Balestra cd7c480f86 Kubelet:rkt Create any missing hostPath Volumes 2017-03-17 10:47:02 +01: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
Kubernetes Submit Queue f68c824f95 Merge pull request #42139 from Random-Liu/unify-fake-runtime-helper
Automatic merge from submit-queue (batch tested with PRs 41921, 41695, 42139, 42090, 41949)

Unify fake runtime helper in kuberuntime, rkt and dockertools.

Addresses https://github.com/kubernetes/kubernetes/pull/42081#issuecomment-282429775.

Add `pkg/kubelet/container/testing/fake_runtime_helper.go`, and change `kuberuntime`, `rkt` and `dockertools` to use it.

@yujuhong This is a small unit test refactoring PR. Could you help me review it?
2017-03-01 04:10:04 -08:00
Minhan Xia 947e0e1bf5 pass pod annotation to SetUpPod 2017-02-27 10:09:45 -08:00
Random-Liu 0deec63d1a Unify fake runtime helper in kuberuntime, rkt and dockertools. 2017-02-27 01:43:37 -08:00
Random-Liu 8380148d48 Remove extra operations when generating pod sandbox configuration. 2017-02-24 15:06:03 -08:00
Kubernetes Submit Queue 17175b24a2 Merge pull request #40007 from JulienBalestra/rktnetes-systemd-ops-helpers
Automatic merge from submit-queue (batch tested with PRs 41812, 41665, 40007, 41281, 41771)

Kubelet-rkt: Add useful informations for Ops on the Kubelet Host

Create a Systemd SyslogIdentifier inside the [Service]
Create a Systemd Description inside the [Unit]

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

#### Overview
Logged against the host, it's difficult to identify who's who.
This PR add useful information to quickly get straight to the point with the **DESCRIPTION** field:

```
systemctl list-units "k8s*"
UNIT                                             LOAD   ACTIVE SUB     DESCRIPTION
k8s_b5a9bdf7-e396-4989-8df0-30a5fda7f94c.service loaded active running kube-controller-manager-172.20.0.206
k8s_bec0d8a1-dc15-4b47-a850-e09cf098646a.service loaded active running nginx-daemonset-gxm4s
k8s_d2981e9c-2845-4aa2-a0de-46e828f0c91b.service loaded active running kube-apiserver-172.20.0.206
k8s_fde4b0ab-87f8-4fd1-b5d2-3154918f6c89.service loaded active running kube-scheduler-172.20.0.206

```

#### Overview and Journal

Always on the host, to easily retrieve the pods logs, this PR add a SyslogIdentifier named as the PodBaseName.


```
# A DaemonSet prometheus-node-exporter is running on the Kubernetes Cluster
systemctl list-units "k8s*" | grep prometheus-node-exporter
k8s_c60a4b1a-387d-4fce-afa1-642d6f5716c1.service loaded active running prometheus-node-exporter-85cpp

# Get the logs from the prometheus-node-exporter DaemonSet 
journalctl -t prometheus-node-exporter | wc -l
278
```

Sadly the `journalctl` flag `-t` / `--identifier` doesn't allow a pattern to catch the logs.

Also this field improve any queries made by any tools who exports the Journal (E.g: ES, Kibana):
```
{
	"__CURSOR" : "s=86fd390d123b47af89bb15f41feb9863;i=164b2c27;b=7709deb3400841009e0acc2fec1ebe0e;m=1fe822ca4;t=54635e6a62285;x=b2d321019d70f36f",
	"__REALTIME_TIMESTAMP" : "1484572200411781",
	"__MONOTONIC_TIMESTAMP" : "8564911268",
	"_BOOT_ID" : "7709deb3400841009e0acc2fec1ebe0e",
	"PRIORITY" : "6",
	"_UID" : "0",
	"_GID" : "0",
	"_SYSTEMD_SLICE" : "system.slice",
	"_SELINUX_CONTEXT" : "system_u:system_r:kernel_t:s0",
	"_MACHINE_ID" : "7bbb4401667243da81671e23fd8a2246",
	"_HOSTNAME" : "Kubelet-Host",
	"_TRANSPORT" : "stdout",
	"SYSLOG_FACILITY" : "3",
	"_COMM" : "ld-linux-x86-64",
	"_CAP_EFFECTIVE" : "3fffffffff",
	"SYSLOG_IDENTIFIER" : "prometheus-node-exporter",
	"_PID" : "88827",
	"_EXE" : "/var/lib/rkt/pods/run/c60a4b1a-387d-4fce-afa1-642d6f5716c1/stage1/rootfs/usr/lib64/ld-2.21.so",
	"_CMDLINE" : "stage1/rootfs/usr/lib/ld-linux-x86-64.so.2 stage1/rootfs/usr/bin/systemd-nspawn [....]",
	"_SYSTEMD_CGROUP" : "/system.slice/k8s_c60a4b1a-387d-4fce-afa1-642d6f5716c1.service",
	"_SYSTEMD_UNIT" : "k8s_c60a4b1a-387d-4fce-afa1-642d6f5716c1.service",
	"MESSAGE" : "[ 8564.909237] prometheus-node-exporter[115]: time=\"2017-01-16T13:10:00Z\" level=info msg=\" - time\" source=\"node_exporter.go:157\""
}
```
2017-02-23 00:11:38 -08:00
JulienBalestra 7de2d51f90 gofmt rkt.go, rkt_test.go 2017-02-21 23:06:13 +01:00
Julien Balestra 89e1382dd9 Remove else if else 2017-02-20 18:24:41 +01:00
Julien Balestra ff8fbd4c8b Fix a typo 2017-02-20 18:16:41 +01:00
Dan Williams 4c3cc67385 rkt: use network PluginManager to synchronize pod network operations 2017-02-16 13:51:19 -06:00
Dan Williams 60525801c1 kubelet/network: move mock network plugin to pkg/kubelet/network/testing 2017-02-16 13:48:32 -06:00
Kubernetes Submit Queue 0477100f98 Merge pull request #33684 from fraenkel/port_forward_ws
Automatic merge from submit-queue

Add websocket support for port forwarding

#32880

**Release note**:
```release-note
Port forwarding can forward over websockets or SPDY.
```
2017-02-01 23:19:02 -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
Kubernetes Submit Queue 4bffae39cb Merge pull request #40574 from yujuhong/mv_securitycontext
Automatic merge from submit-queue

securitycontext: move docker-specific logic into kubelet/dockertools

This change moves the code specific to docker to kubelet/dockertools,
while leaving the common utility functions at its current package
(pkg/securitycontext).

When we deprecate dockertools in the future, the code will be moved to
pkg/kubelet/dockershim instead.
2017-02-01 15:31:49 -08:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski 88d9829ad5 pkg/kubelet/rkt: adapt to new appc/spec 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Yu-Ju Hong 4506f4c2d0 securitycontext: move docker-specific logic into kubelet/dockertools
This change moves the code specific to docker to kubelet/dockertools,
while leaving the common utility functions at its current package
(pkg/securitycontext).

When we deprecate dockertools in the future, the code will be moved to
pkg/kubelet/dockershim instead.
2017-01-27 12:25:46 -08:00
Kubernetes Submit Queue 52863de51d Merge pull request #40495 from yujuhong/fnv_hash
Automatic merge from submit-queue (batch tested with PRs 38739, 40480, 40495, 40172, 40393)

Use fnv hash in the CRI implementation

fnv is more stable than adler. This PR changes CRI implementation to
use fnv for generating container hashes, but leaving the old
implementation (dockertools/rkt). This is because hash is what kubelet
uses to identify a container -- changes to the hash will cause kubelet
to restart existing containers. This is ok for CRI implementation (which
requires a disruptive upgrade already), but not for older implementations.

#40140
2017-01-25 21:20:31 -08:00
Yu-Ju Hong 87f1291c19 Use fnv hash in the CRI implementation
Leave the old implementation (dockertools/rkt) untouched so that
containers will not be restarted during kubelet upgrade. For CRI
implementation (kuberuntime), container restart is required for kubelet
upgrade.
2017-01-25 15:01:41 -08:00
Dr. Stefan Schimanski a0137e9b28 Update generated files 2017-01-25 19:49:45 +01:00
Dr. Stefan Schimanski d7eb3b6870 pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
Antoine Pelisse 3d82265340 Update OWNERS approvers and reviewers: pkg/kubelet 2017-01-18 10:27:11 -08:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Julien Balestra 3841690dbf Kubelet-rkt: Add useful informations for Ops on the Kubelet Host
Create a Systemd SyslogIdentifier inside the [Service]
Create a Systemd Description inside the [Unit]
2017-01-17 10:29:50 +01:00