Compare commits

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

8 commits

Author SHA1 Message Date
Jason Brooks
28f98bfc6e Merge #1 Drop Release label in favor of OSBS release_bump plugin 2018-08-29 16:34:58 +00:00
Bhavin Gandhi
99636e7114 Use 29 tag for f29 branch
Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
2018-08-26 23:24:01 +05:30
Bhavin Gandhi
c338dca994 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 <bhavin7392@gmail.com>
2018-08-26 23:22:00 +05:30
Bhavin Gandhi
cf334d024a 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 <bhavin7392@gmail.com>
2018-08-26 23:19:59 +05:30
Jason Brooks
99dce7ecad fix BZComponent capitalization 2018-05-17 13:52:04 -07:00
Jason Brooks
502959b2aa from rawhide 2018-03-20 13:20:48 -07:00
Jason Brooks
87638b8689 * FROM f28
* Add ${STATE_DIR}/kubelet to tmpfiles
* Add kubelet system-container ADDLT_MOUNTS
* Update kubelet based openshift/node
* Enable mount propagation in /var/lib/kubelet
2018-03-20 13:15:27 -07:00
Jason Brooks
ab4a89ee75 make launch executable 2017-11-28 12:57:37 -08:00
5 changed files with 73 additions and 51 deletions

View file

@ -1,25 +1,26 @@
FROM registry.fedoraproject.org/f27/kubernetes-node:latest
MAINTAINER "Jason Brooks" <jbrooks@redhat.com>
FROM registry.fedoraproject.org/kubernetes-node:29
ENV container=docker
ENV NAME=kubernetes-kubelet VERSION=0 RELEASE=8 ARCH=x86_64
ENV NAME=kubernetes-kubelet VERSION=0 ARCH=x86_64
LABEL BZComponent="$NAME" \
name="$FGC/$NAME" \
version="$VERSION" \
release="$RELEASE.$DISTTAG" \
architecture="$ARCH" \
atomic.type='system'
atomic.type='system' \
maintainer="Jason Brooks <jbrooks@redhat.com>"
# Containerized kubelet requires nsenter
RUN dnf install -y util-linux ethtool && dnf clean all
RUN dnf install -y --setopt=tsflags=nodocs util-linux ethtool systemd-udev e2fsprogs xfsprogs && dnf clean all
LABEL RUN /usr/bin/docker run -d --privileged --net=host --pid=host -v /:/rootfs:ro -v /sys:/sys:rw -v /var/run:/var/run:rw -v /run:/run:rw -v /var/lib/docker:/var/lib/docker:rw -v /var/lib/kubelet:/var/lib/kubelet:slave -v /var/log/containers:/var/log/containers:rw
COPY launch.sh /usr/bin/kubelet-docker.sh
COPY service.template config.json.template /exports/
COPY manifest.json tmpfiles.template service.template config.json.template /exports/
RUN mkdir -p /exports/hostfs/etc/kubernetes && cp /etc/kubernetes/{config,kubelet} /exports/hostfs/etc/kubernetes
RUN mkdir -p /exports/hostfs/etc/cni/net.d && \
mkdir -p /exports/hostfs/etc/kubernetes && \
cp /etc/kubernetes/{config,kubelet} /exports/hostfs/etc/kubernetes
ENTRYPOINT ["/usr/bin/kubelet-docker.sh"]

View file

@ -232,14 +232,12 @@
"source": "proc"
},
{
"source": "/dev",
"destination": "/dev",
"type": "tmpfs",
"source": "tmpfs",
"type": "bind",
"options": [
"nosuid",
"strictatime",
"mode=755",
"size=65536k"
"rbind",
"rslave"
]
},
{
@ -268,36 +266,24 @@
]
},
{
"destination": "/dev/mqueue",
"type": "mqueue",
"source": "mqueue",
"options": [
"nosuid",
"noexec",
"nodev"
]
},
{
"type": "bind",
"source": "/sys",
"destination": "/sys",
"type": "sysfs",
"source": "sysfs",
"options": [
"nosuid",
"noexec",
"nodev"
"rbind",
"rw"
]
},
{
"destination": "/sys/fs/cgroup",
"type": "cgroup",
"source": "cgroup",
"options": [
"nosuid",
"noexec",
"nodev",
"relatime",
"ro"
]
"type": "bind",
"source": "/etc/cni/net.d",
"destination": "/etc/cni/net.d",
"options": [
"bind",
"slave",
"rw",
"mode=777"
]
},
{
"type": "bind",
@ -309,14 +295,31 @@
"rprivate"
]
},
{
"type": "bind",
"source": "/etc/localtime",
"destination": "/etc/localtime",
"options": [
"rbind",
"ro"
]
},
{
"type": "bind",
"source": "/etc/pki",
"destination": "/etc/pki",
"options": [
"bind",
"ro"
]
},
{
"destination": "/etc/resolv.conf",
"type": "bind",
"source": "/etc/resolv.conf",
"options": [
"ro",
"rbind",
"rprivate"
"bind"
]
},
{
@ -331,8 +334,8 @@
},
{
"type": "bind",
"source": "/var/run/",
"destination": "/var/run/",
"source": "/var/run/secrets",
"destination": "/var/run/secrets",
"options": [
"rbind",
"rw",
@ -341,7 +344,7 @@
},
{
"type": "bind",
"source": "/run",
"source": "${RUN_DIRECTORY}",
"destination": "/run",
"options": [
"rbind",
@ -351,7 +354,7 @@
},
{
"type": "bind",
"source": "/var/lib",
"source": "${STATE_DIRECTORY}",
"destination": "/var/lib",
"options": [
"bind",
@ -361,11 +364,11 @@
},
{
"type": "bind",
"source": "/var/lib/kubelet",
"source": "${STATE_DIRECTORY}/kubelet",
"destination": "/var/lib/kubelet",
"options": [
"rbind",
"rslave",
"rshared",
"rw",
"mode=755"
]
@ -379,14 +382,24 @@
"rw",
"mode=755"
]
},
{
"destination": "/tmp",
"type": "tmpfs",
"source": "tmpfs",
"options": [
"mode=755",
"size=65536k"
]
}
$ADDTL_MOUNTS
],
"linux": {
"rootfsPropagation": "rslave",
"resources": {
"devices": [
{
"allow": false,
"allow": true,
"access": "rwm"
}
]
@ -397,7 +410,6 @@
}
],
"devices": null,
"apparmorProfile": "",
"selinuxProcessLabel": ""
"apparmorProfile": ""
}
}

2
launch.sh Normal file → Executable file
View file

@ -5,6 +5,6 @@ source /etc/kubernetes/config
TEMP_KUBELET_ARGS='--cgroup-driver=systemd --cgroups-per-qos=false --enforce-node-allocatable='
ARGS=$(echo "$@ $TEMP_KUBELET_ARGS $KUBE_LOGTOSTDERR $KUBE_LOG_LEVEL $KUBELET_API_SERVER $KUBELET_ADDRESS $KUBELET_PORT $KUBELET_HOSTNAME $KUBE_ALLOW_PRIV $KUBELET_ARGS" | xargs -n1 | sort -u -t = -k 1,1 | xargs)
ARGS="$@ $TEMP_KUBELET_ARGS $KUBE_LOGTOSTDERR $KUBE_LOG_LEVEL $KUBELET_API_SERVER $KUBELET_ADDRESS $KUBELET_PORT $KUBELET_HOSTNAME $KUBE_ALLOW_PRIV $KUBELET_ARGS"
exec /usr/bin/kubelet $ARGS --containerized

6
manifest.json Normal file
View file

@ -0,0 +1,6 @@
{
"version": "1.0",
"defaultValues": {
"ADDTL_MOUNTS": ""
}
}

3
tmpfiles.template Normal file
View file

@ -0,0 +1,3 @@
d ${STATE_DIRECTORY}/kubelet - - - - -
d /var/lib/cni - - - - -
d /var/run/secrets - - - - -