Compare commits

...
Sign in to create a new pull request.

10 commits

Author SHA1 Message Date
Adam Miller
fc5c0aa891 Bump RELEASE for automatic rebuild 2017-11-14 16:42:46 -06:00
Adam Miller
4cb7736c5d Bump RELEASE for automatic rebuild 2017-09-21 15:06:25 -05:00
Jason Brooks
df814a1baa make /var/run/kubernetes writeable 2017-09-05 10:48:24 -07:00
Jason Brooks
e2131cd9c8 Merge branch 'f26' of ssh://pkgs.fedoraproject.org/container/kubernetes-apiserver into f26 2017-09-05 10:47:51 -07:00
Jason Brooks
304339a542 make /var/run/kubernetes writeable 2017-09-05 10:47:03 -07:00
Adam Miller
3cc453237d Bump RELEASE for automatic rebuild 2017-08-24 18:01:38 -05:00
Jason Brooks
c3911abed7 make init file executable 2017-08-16 21:22:36 -07:00
Jason Brooks
3867ab9f43 don't sort args 2017-07-24 18:12:00 -07:00
Jason Brooks
6bc5d7545d reset version 2017-07-07 09:47:00 -07:00
Jason Brooks
8b0120898b import from rawhide 2017-07-07 09:45:05 -07:00
5 changed files with 240 additions and 0 deletions

26
Dockerfile Normal file
View file

@ -0,0 +1,26 @@
FROM registry.fedoraproject.org/f26/kubernetes-master:latest
MAINTAINER "Jason Brooks" <jbrooks@redhat.com>
ENV container=docker
ENV NAME=kubernetes-apiserver VERSION=0 RELEASE=5 ARCH=x86_64
LABEL BZComponent="$NAME" \
name="$FGC/$NAME" \
version="$VERSION" \
release="$RELEASE.$DISTTAG" \
architecture="$ARCH" \
atomic.type='system'
COPY launch.sh /usr/bin/kube-apiserver-docker.sh
RUN chmod +x /usr/bin/kube-apiserver
LABEL RUN /usr/bin/docker/ run -d --net=host -p 443:443
COPY service.template config.json.template tmpfiles.template /exports/
RUN mkdir -p /exports/hostfs/usr/local/bin/ && cp /usr/bin/kubectl /exports/hostfs/usr/local/bin/kubectl
RUN mkdir -p /exports/hostfs/etc/kubernetes && cp /etc/kubernetes/{config,apiserver} /exports/hostfs/etc/kubernetes
ENTRYPOINT ["/usr/bin/kube-apiserver-docker.sh"]

193
config.json.template Normal file
View file

@ -0,0 +1,193 @@
{
"ociVersion": "1.0.0",
"platform": {
"os": "linux",
"arch": "amd64"
},
"process": {
"terminal": false,
"user": {
"uid": 996,
"gid": 994
},
"args": [
"/usr/bin/kube-apiserver-docker.sh"
],
"env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm"
],
"cwd": "/",
"capabilities": {
"bounding": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE",
"CAP_DAC_READ_SEARCH"
],
"permitted": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE",
"CAP_DAC_READ_SEARCH"
],
"inheritable": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE",
"CAP_DAC_READ_SEARCH"
],
"effective": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE",
"CAP_DAC_READ_SEARCH"
],
"ambient": [
"CAP_AUDIT_WRITE",
"CAP_KILL",
"CAP_NET_BIND_SERVICE",
"CAP_DAC_READ_SEARCH"
]
},
"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"
]
},
{
"destination": "/var/run/kubernetes",
"type": "bind",
"source": "/var/run/kubernetes",
"options": [
"rw",
"rbind"
]
}
],
"linux": {
"resources": {
"devices": [
{
"allow": false,
"access": "rwm"
}
]
},
"namespaces": [
{
"type": "pid"
},
{
"type": "ipc"
},
{
"type": "mount"
}
],
"devices": null,
"apparmorProfile": "",
"selinuxProcessLabel": ""
}
}

8
launch.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
source /etc/kubernetes/apiserver
source /etc/kubernetes/config
ARGS="$@ $KUBE_LOGTOSTDERR $KUBE_LOG_LEVEL $KUBE_ETCD_SERVERS $KUBE_API_ADDRESS $KUBE_API_PORT $KUBELET_PORT $KUBE_ALLOW_PRIV $KUBE_SERVICE_ADDRESSES $KUBE_ADMISSION_CONTROL $KUBE_API_ARGS"
exec /usr/bin/kube-apiserver $ARGS

12
service.template Normal file
View file

@ -0,0 +1,12 @@
[Unit]
Description=kubernetes-apiserver
[Service]
ExecStart=$EXEC_START
ExecStop=$EXEC_STOP
Restart=on-failure
WorkingDirectory=$DESTDIR
[Install]
WantedBy=multi-user.target

1
tmpfiles.template Normal file
View file

@ -0,0 +1 @@
d /var/run/kubernetes 0755 kube kube -