From 2a13d9f235176a0fd4f2418b530b6e66b8580d96 Mon Sep 17 00:00:00 2001 From: Jason Brooks Date: Thu, 9 Feb 2017 15:26:41 -0800 Subject: [PATCH 01/26] first import of kubernetes-proxy Dockerfile --- Dockerfile | 18 ++++++++++++++++++ launch.sh | 8 ++++++++ 2 files changed, 26 insertions(+) create mode 100644 Dockerfile create mode 100644 launch.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..77b52f8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM registry.fedoraproject.org/kubernetes-node:25 +MAINTAINER "Jason Brooks" + +ENV NAME=kubernetes-proxy VERSION=0.1 RELEASE=1 ARCH=x86_64 +LABEL BZComponent="$NAME" \ + Name="$FGC/$NAME" \ + Version="$VERSION" \ + Release="$RELEASE.$DISTTAG" \ + Architecture="$ARCH" + +RUN dnf install -y iptables conntrack-tools && dnf clean all + +LABEL RUN /usr/bin/docker run -d --privileged --net=host + +COPY launch.sh /usr/bin/kube-proxy-docker.sh + +ENTRYPOINT ["/usr/bin/kube-proxy-docker.sh"] + diff --git a/launch.sh b/launch.sh new file mode 100644 index 0000000..2906497 --- /dev/null +++ b/launch.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +source /etc/kubernetes/proxy +source /etc/kubernetes/config + +ARGS=$(echo "$@ $KUBE_LOGTOSTDERR $KUBE_LOG_LEVEL $KUBE_MASTER $KUBE_PROXY_ARGS" | xargs -n1 | sort -u -t = -k 1,1 | xargs) + +exec /usr/bin/kube-proxy $ARGS From 6e9c4a3c31b4d5425ba7f4279fd69a2c41a601f3 Mon Sep 17 00:00:00 2001 From: Jason Brooks Date: Fri, 17 Feb 2017 11:53:47 -0800 Subject: [PATCH 02/26] fix FROM line --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 77b52f8..0b30b0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM registry.fedoraproject.org/kubernetes-node:25 +FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0.1 RELEASE=1 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0.1 RELEASE=2 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 2717c3e07a1a5fda91df8ba60109a72e026dd2b4 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 2 Mar 2017 20:22:12 -0600 Subject: [PATCH 03/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0b30b0d..054faa6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0.1 RELEASE=2 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0.1 RELEASE=3 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 329e8c27d36f60e94e6dac745c4dd0ef17720664 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 15 Mar 2017 16:50:43 -0500 Subject: [PATCH 04/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 054faa6..1d97b08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0.1 RELEASE=3 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0.1 RELEASE=4 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 1d5e2a11e4c879dca2e9d2127d8331d9cc5caeb3 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 15 Mar 2017 17:25:19 -0500 Subject: [PATCH 05/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1d97b08..a67a0ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0.1 RELEASE=4 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0.1 RELEASE=5 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From d828af1fe4aa22628ecb9caf4b48084239319366 Mon Sep 17 00:00:00 2001 From: Jason Brooks Date: Fri, 17 Mar 2017 13:25:26 -0700 Subject: [PATCH 06/26] chmod +x launch script, set version to 0 --- Dockerfile | 2 +- launch.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 launch.sh diff --git a/Dockerfile b/Dockerfile index a67a0ca..d20165d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0.1 RELEASE=5 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=6 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ diff --git a/launch.sh b/launch.sh old mode 100644 new mode 100755 From 1786a4e52745fb5f2e65a3514c350ad8dc570fee Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 29 Mar 2017 15:18:17 -0500 Subject: [PATCH 07/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d20165d..809be6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=6 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=7 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 9606fbe2860cad92fd1c57e4617ad53992e85d8a Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 29 Mar 2017 22:39:38 -0500 Subject: [PATCH 08/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 809be6e..ab1f284 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=7 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=8 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From f3c70680d44463b157843d6de815610933999d9f Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 20 Apr 2017 21:34:28 -0500 Subject: [PATCH 09/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ab1f284..e4adbf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=8 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=9 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From cf22d77f2d874fd7404b4f609ba7b4f7aa3a7eda Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 23 May 2017 16:17:09 -0500 Subject: [PATCH 10/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e4adbf0..70aa1bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=9 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=10 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 063f7683a1bf4416dbc2a9b24469976841d90eee Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 23 May 2017 17:57:20 -0500 Subject: [PATCH 11/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 70aa1bf..0295f07 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=10 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=11 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 55ee72ce1e8eef831709007326599a58316bc9cc Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 23 May 2017 22:27:42 -0500 Subject: [PATCH 12/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0295f07..264c183 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=11 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=12 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 69b7fd05672cb9ad9b2fe1a7ad556d349ef3fbb3 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 14 Jun 2017 22:03:42 -0500 Subject: [PATCH 13/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 264c183..2bd9cef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=12 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=13 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From aca2704b59617fafb3c3a9eda3e9b01470caf006 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 27 Jun 2017 11:50:01 -0500 Subject: [PATCH 14/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2bd9cef..9940528 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=13 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=14 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 94ebaf18defff47cf318bc56c95080421d0e3d0f Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 27 Jun 2017 12:21:17 -0500 Subject: [PATCH 15/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9940528..ded1d34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=14 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=15 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 5e2b38f9c5f7fd75b3fbd1632d92ed0e4c0f8e29 Mon Sep 17 00:00:00 2001 From: Jason Brooks Date: Thu, 6 Jul 2017 12:35:46 -0700 Subject: [PATCH 16/26] initial commit --- Dockerfile | 25 ++++ config.json.template | 349 +++++++++++++++++++++++++++++++++++++++++++ launch.sh | 8 + service.template | 12 ++ 4 files changed, 394 insertions(+) create mode 100644 Dockerfile create mode 100644 config.json.template create mode 100644 launch.sh create mode 100644 service.template diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..db94c5d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM registry.fedoraproject.org/kubernetes-node:rawhide +MAINTAINER "Jason Brooks" + +ENV container=docker + +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=8 ARCH=x86_64 +LABEL bzcomponent="$NAME" \ + name="$FGC/$NAME" \ + version="$VERSION" \ + release="$RELEASE.$DISTTAG" \ + architecture="$ARCH" \ + atomic.type='system' + +RUN dnf install -y iptables conntrack-tools && dnf clean all + +LABEL RUN /usr/bin/docker run -d --privileged --net=host + +COPY launch.sh /usr/bin/kube-proxy-docker.sh + +COPY service.template config.json.template /exports/ + +RUN mkdir -p /exports/hostfs/etc/kubernetes && cp /etc/kubernetes/{config,proxy} /exports/hostfs/etc/kubernetes + +ENTRYPOINT ["/usr/bin/kube-proxy-docker.sh"] + diff --git a/config.json.template b/config.json.template new file mode 100644 index 0000000..5084c9b --- /dev/null +++ b/config.json.template @@ -0,0 +1,349 @@ +{ + "ociVersion": "1.0.0", + "platform": { + "os": "linux", + "arch": "amd64" + }, + "process": { + "terminal": false, + "user": { + "uid": 994, + "gid": 996 + }, + "args": [ + "/usr/bin/kube-proxy-docker.sh" + ], + "env": [ + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "TERM=xterm" + ], + "cwd": "/", + "capabilities": { + "bounding": [ + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_DAC_READ_SEARCH", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_KILL", + "CAP_SETGID", + "CAP_SETUID", + "CAP_SETPCAP", + "CAP_LINUX_IMMUTABLE", + "CAP_NET_BIND_SERVICE", + "CAP_NET_BROADCAST", + "CAP_NET_ADMIN", + "CAP_NET_RAW", + "CAP_IPC_LOCK", + "CAP_IPC_OWNER", + "CAP_SYS_MODULE", + "CAP_SYS_RAWIO", + "CAP_SYS_CHROOT", + "CAP_SYS_PTRACE", + "CAP_SYS_PACCT", + "CAP_SYS_ADMIN", + "CAP_SYS_BOOT", + "CAP_SYS_NICE", + "CAP_SYS_RESOURCE", + "CAP_SYS_TIME", + "CAP_SYS_TTY_CONFIG", + "CAP_MKNOD", + "CAP_LEASE", + "CAP_AUDIT_WRITE", + "CAP_AUDIT_CONTROL", + "CAP_SETFCAP", + "CAP_MAC_OVERRIDE", + "CAP_MAC_ADMIN", + "CAP_SYSLOG", + "CAP_WAKE_ALARM", + "CAP_BLOCK_SUSPEND" + ], + "permitted": [ + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_DAC_READ_SEARCH", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_KILL", + "CAP_SETGID", + "CAP_SETUID", + "CAP_SETPCAP", + "CAP_LINUX_IMMUTABLE", + "CAP_NET_BIND_SERVICE", + "CAP_NET_BROADCAST", + "CAP_NET_ADMIN", + "CAP_NET_RAW", + "CAP_IPC_LOCK", + "CAP_IPC_OWNER", + "CAP_SYS_MODULE", + "CAP_SYS_RAWIO", + "CAP_SYS_CHROOT", + "CAP_SYS_PTRACE", + "CAP_SYS_PACCT", + "CAP_SYS_ADMIN", + "CAP_SYS_BOOT", + "CAP_SYS_NICE", + "CAP_SYS_RESOURCE", + "CAP_SYS_TIME", + "CAP_SYS_TTY_CONFIG", + "CAP_MKNOD", + "CAP_LEASE", + "CAP_AUDIT_WRITE", + "CAP_AUDIT_CONTROL", + "CAP_SETFCAP", + "CAP_MAC_OVERRIDE", + "CAP_MAC_ADMIN", + "CAP_SYSLOG", + "CAP_WAKE_ALARM", + "CAP_BLOCK_SUSPEND" + ], + "inheritable": [ + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_DAC_READ_SEARCH", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_KILL", + "CAP_SETGID", + "CAP_SETUID", + "CAP_SETPCAP", + "CAP_LINUX_IMMUTABLE", + "CAP_NET_BIND_SERVICE", + "CAP_NET_BROADCAST", + "CAP_NET_ADMIN", + "CAP_NET_RAW", + "CAP_IPC_LOCK", + "CAP_IPC_OWNER", + "CAP_SYS_MODULE", + "CAP_SYS_RAWIO", + "CAP_SYS_CHROOT", + "CAP_SYS_PTRACE", + "CAP_SYS_PACCT", + "CAP_SYS_ADMIN", + "CAP_SYS_BOOT", + "CAP_SYS_NICE", + "CAP_SYS_RESOURCE", + "CAP_SYS_TIME", + "CAP_SYS_TTY_CONFIG", + "CAP_MKNOD", + "CAP_LEASE", + "CAP_AUDIT_WRITE", + "CAP_AUDIT_CONTROL", + "CAP_SETFCAP", + "CAP_MAC_OVERRIDE", + "CAP_MAC_ADMIN", + "CAP_SYSLOG", + "CAP_WAKE_ALARM", + "CAP_BLOCK_SUSPEND" + ], + "effective": [ + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_DAC_READ_SEARCH", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_KILL", + "CAP_SETGID", + "CAP_SETUID", + "CAP_SETPCAP", + "CAP_LINUX_IMMUTABLE", + "CAP_NET_BIND_SERVICE", + "CAP_NET_BROADCAST", + "CAP_NET_ADMIN", + "CAP_NET_RAW", + "CAP_IPC_LOCK", + "CAP_IPC_OWNER", + "CAP_SYS_MODULE", + "CAP_SYS_RAWIO", + "CAP_SYS_CHROOT", + "CAP_SYS_PTRACE", + "CAP_SYS_PACCT", + "CAP_SYS_ADMIN", + "CAP_SYS_BOOT", + "CAP_SYS_NICE", + "CAP_SYS_RESOURCE", + "CAP_SYS_TIME", + "CAP_SYS_TTY_CONFIG", + "CAP_MKNOD", + "CAP_LEASE", + "CAP_AUDIT_WRITE", + "CAP_AUDIT_CONTROL", + "CAP_SETFCAP", + "CAP_MAC_OVERRIDE", + "CAP_MAC_ADMIN", + "CAP_SYSLOG", + "CAP_WAKE_ALARM", + "CAP_BLOCK_SUSPEND" + ], + "ambient": [ + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_DAC_READ_SEARCH", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_KILL", + "CAP_SETGID", + "CAP_SETUID", + "CAP_SETPCAP", + "CAP_LINUX_IMMUTABLE", + "CAP_NET_BIND_SERVICE", + "CAP_NET_BROADCAST", + "CAP_NET_ADMIN", + "CAP_NET_RAW", + "CAP_IPC_LOCK", + "CAP_IPC_OWNER", + "CAP_SYS_MODULE", + "CAP_SYS_RAWIO", + "CAP_SYS_CHROOT", + "CAP_SYS_PTRACE", + "CAP_SYS_PACCT", + "CAP_SYS_ADMIN", + "CAP_SYS_BOOT", + "CAP_SYS_NICE", + "CAP_SYS_RESOURCE", + "CAP_SYS_TIME", + "CAP_SYS_TTY_CONFIG", + "CAP_MKNOD", + "CAP_LEASE", + "CAP_AUDIT_WRITE", + "CAP_AUDIT_CONTROL", + "CAP_SETFCAP", + "CAP_MAC_OVERRIDE", + "CAP_MAC_ADMIN", + "CAP_SYSLOG", + "CAP_WAKE_ALARM", + "CAP_BLOCK_SUSPEND" + ] + }, + "rlimits": [ + { + "type": "RLIMIT_NOFILE", + "hard": 1024, + "soft": 1024 + } + ] + }, + "root": { + "path": "rootfs", + "readonly": true + }, + "mounts": [ + { + "destination": "/proc", + "type": "proc", + "source": "proc" + }, + { + "destination": "/dev", + "type": "tmpfs", + "source": "tmpfs", + "options": [ + "nosuid", + "strictatime", + "mode=755", + "size=65536k" + ] + }, + { + "destination": "/dev/pts", + "type": "devpts", + "source": "devpts", + "options": [ + "nosuid", + "noexec", + "newinstance", + "ptmxmode=0666", + "mode=0620", + "gid=5" + ] + }, + { + "destination": "/dev/shm", + "type": "tmpfs", + "source": "shm", + "options": [ + "nosuid", + "noexec", + "nodev", + "mode=1777", + "size=65536k" + ] + }, + { + "destination": "/dev/mqueue", + "type": "mqueue", + "source": "mqueue", + "options": [ + "nosuid", + "noexec", + "nodev" + ] + }, + { + "destination": "/sys", + "type": "sysfs", + "source": "sysfs", + "options": [ + "nosuid", + "noexec", + "nodev" + ] + }, + { + "destination": "/sys/fs/cgroup", + "type": "cgroup", + "source": "cgroup", + "options": [ + "nosuid", + "noexec", + "nodev", + "relatime", + "ro" + ] + }, + { + "type": "bind", + "source": "/etc/kubernetes", + "destination": "/etc/kubernetes", + "options": [ + "rbind", + "ro", + "rprivate" + ] + }, + { + "destination": "/etc/resolv.conf", + "type": "bind", + "source": "/etc/resolv.conf", + "options": [ + "ro", + "rbind", + "rprivate" + ] + } + ], + "linux": { + "resources": { + "devices": [ + { + "allow": false, + "access": "rwm" + } + ] + }, + "namespaces": [ + { + "type": "pid" + }, + { + "type": "ipc" + }, + { + "type": "mount" + } + ], + "devices": null, + "apparmorProfile": "", + "selinuxProcessLabel": "" + } +} diff --git a/launch.sh b/launch.sh new file mode 100644 index 0000000..2906497 --- /dev/null +++ b/launch.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +source /etc/kubernetes/proxy +source /etc/kubernetes/config + +ARGS=$(echo "$@ $KUBE_LOGTOSTDERR $KUBE_LOG_LEVEL $KUBE_MASTER $KUBE_PROXY_ARGS" | xargs -n1 | sort -u -t = -k 1,1 | xargs) + +exec /usr/bin/kube-proxy $ARGS diff --git a/service.template b/service.template new file mode 100644 index 0000000..3abf07a --- /dev/null +++ b/service.template @@ -0,0 +1,12 @@ +[Unit] +Description=kubernetes-proxy + +[Service] +ExecStart=$EXEC_START +ExecStop=$EXEC_STOP +Restart=on-failure +WorkingDirectory=$DESTDIR + +[Install] +WantedBy=multi-user.target + From ca2d56750db8846e9aff280f44c83f70577e1704 Mon Sep 17 00:00:00 2001 From: Jason Brooks Date: Thu, 6 Jul 2017 13:12:12 -0700 Subject: [PATCH 17/26] fix BZComponent capitalization --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index db94c5d..1cffb99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER "Jason Brooks" ENV container=docker ENV NAME=kubernetes-proxy VERSION=0 RELEASE=8 ARCH=x86_64 -LABEL bzcomponent="$NAME" \ +LABEL BZComponent="$NAME" \ name="$FGC/$NAME" \ version="$VERSION" \ release="$RELEASE.$DISTTAG" \ From 5ee7958e482aff8a7b5a4e594e57b09a8139b464 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 6 Jul 2017 15:26:55 -0500 Subject: [PATCH 18/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ded1d34..cab3e4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=15 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=16 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From a01b61f01931f8de0f21e1074c30b39b109bdd15 Mon Sep 17 00:00:00 2001 From: Jason Brooks Date: Thu, 6 Jul 2017 14:03:00 -0700 Subject: [PATCH 19/26] build from f27 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1cffb99..618c672 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.fedoraproject.org/kubernetes-node:rawhide +FROM registry.fedoraproject.org/f27/kubernetes-node:latest MAINTAINER "Jason Brooks" ENV container=docker From b13f160bd4bdae859e340a460e617c2d1e8312a1 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 25 Jul 2017 14:53:39 -0500 Subject: [PATCH 20/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cab3e4a..c91d9ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=16 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=17 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 4ecb0e1ec9880645cc8310f853b65327b100197d Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 24 Aug 2017 16:28:35 -0500 Subject: [PATCH 21/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c91d9ff..7206551 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=17 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=18 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From 3ac22e827a20269ec4c6d0022b22a2c77d7749d0 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 21 Sep 2017 12:18:21 -0500 Subject: [PATCH 22/26] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7206551..a61ef40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/f25/kubernetes-node:latest MAINTAINER "Jason Brooks" -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=18 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=19 ARCH=x86_64 LABEL BZComponent="$NAME" \ Name="$FGC/$NAME" \ Version="$VERSION" \ From c88de4b53059ac4a2221be3902e91f8698dd7d64 Mon Sep 17 00:00:00 2001 From: Jason Brooks Date: Tue, 28 Nov 2017 13:01:13 -0800 Subject: [PATCH 23/26] fix gid/uid, make launch.sh executable --- Dockerfile | 2 +- config.json.template | 4 ++-- launch.sh | 0 3 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 launch.sh diff --git a/Dockerfile b/Dockerfile index 618c672..02c6571 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.fedoraproject.org/f27/kubernetes-node:latest +FROM registry.fedoraproject.org/kubernetes-master:rawhide MAINTAINER "Jason Brooks" ENV container=docker diff --git a/config.json.template b/config.json.template index 5084c9b..a4d7a0c 100644 --- a/config.json.template +++ b/config.json.template @@ -7,8 +7,8 @@ "process": { "terminal": false, "user": { - "uid": 994, - "gid": 996 + "uid": 996, + "gid": 994 }, "args": [ "/usr/bin/kube-proxy-docker.sh" diff --git a/launch.sh b/launch.sh old mode 100644 new mode 100755 From 593a3f9bdb863285ed06651819700d23be002bfe Mon Sep 17 00:00:00 2001 From: Jason Brooks Date: Mon, 18 Dec 2017 13:41:11 -0800 Subject: [PATCH 24/26] bind mount /run rw --- config.json.template | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config.json.template b/config.json.template index a4d7a0c..b63aab6 100644 --- a/config.json.template +++ b/config.json.template @@ -320,6 +320,16 @@ "rbind", "rprivate" ] + }, + { + "type": "bind", + "source": "/run", + "destination": "/run", + "options": [ + "rbind", + "rw", + "mode=755" + ] } ], "linux": { From 40655fd376c57d5af0a1c5c338dce560d30a48b4 Mon Sep 17 00:00:00 2001 From: Jason Brooks Date: Tue, 20 Mar 2018 13:26:37 -0700 Subject: [PATCH 25/26] from f28, run proxy as root --- Dockerfile | 4 ++-- config.json.template | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 02c6571..e7cfb05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM registry.fedoraproject.org/kubernetes-master:rawhide +FROM registry.fedoraproject.org/kubernetes-master:28 MAINTAINER "Jason Brooks" ENV container=docker -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=8 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 RELEASE=0 ARCH=x86_64 LABEL BZComponent="$NAME" \ name="$FGC/$NAME" \ version="$VERSION" \ diff --git a/config.json.template b/config.json.template index b63aab6..3400a6b 100644 --- a/config.json.template +++ b/config.json.template @@ -7,8 +7,8 @@ "process": { "terminal": false, "user": { - "uid": 996, - "gid": 994 + "uid": 0, + "gid": 0 }, "args": [ "/usr/bin/kube-proxy-docker.sh" From 39372cfa577eaff82272bac7ae77890a1fc2fcb9 Mon Sep 17 00:00:00 2001 From: Bhavin Gandhi Date: Sun, 26 Aug 2018 23:46:41 +0530 Subject: [PATCH 26/26] Drop Release label in favor of OSBS release_bump plugin OSBS can automatically bump the release number, for that we just need to drop the label from the Dockerfile See https://pagure.io/ContainerSIG/container-sig/issue/1 Signed-off-by: Bhavin Gandhi --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3cdff5b..837aaf7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,10 @@ MAINTAINER "Jason Brooks" ENV container=docker -ENV NAME=kubernetes-proxy VERSION=0 RELEASE=0 ARCH=x86_64 +ENV NAME=kubernetes-proxy VERSION=0 ARCH=x86_64 LABEL BZComponent="$NAME" \ name="$FGC/$NAME" \ version="$VERSION" \ - release="$RELEASE.$DISTTAG" \ architecture="$ARCH" \ atomic.type='system'