Compare commits
15 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb3c83a187 | ||
|
|
b0d70454f3 | ||
|
|
1c1d41dbad | ||
|
|
0ac8943510 | ||
|
|
ae31c736a5 | ||
|
|
54c24f124d | ||
|
|
eedb5cf409 | ||
|
|
3df2149318 | ||
|
|
972518ad86 | ||
|
|
1bc39006dd | ||
|
|
3101b1d171 | ||
|
|
1cb41cb0be | ||
|
|
6f2ac0a46c | ||
| bec335d375 | |||
|
|
700ff95b86 |
4 changed files with 29 additions and 22 deletions
13
Dockerfile
13
Dockerfile
|
|
@ -1,23 +1,24 @@
|
|||
FROM registry.fedoraproject.org/kubernetes-node:29
|
||||
FROM registry.fedoraproject.org/f27/kubernetes-node:latest
|
||||
MAINTAINER "Jason Brooks" <jbrooks@redhat.com>
|
||||
|
||||
ENV container=docker
|
||||
|
||||
ENV NAME=kubernetes-kubelet VERSION=0 ARCH=x86_64
|
||||
ENV NAME=kubernetes-kubelet VERSION=0 RELEASE=17 ARCH=x86_64
|
||||
LABEL BZComponent="$NAME" \
|
||||
name="$FGC/$NAME" \
|
||||
version="$VERSION" \
|
||||
release="$RELEASE.$DISTTAG" \
|
||||
architecture="$ARCH" \
|
||||
atomic.type='system' \
|
||||
maintainer="Jason Brooks <jbrooks@redhat.com>"
|
||||
atomic.type='system'
|
||||
|
||||
# Containerized kubelet requires nsenter
|
||||
RUN dnf install -y --setopt=tsflags=nodocs util-linux ethtool systemd-udev e2fsprogs xfsprogs && dnf clean all
|
||||
RUN dnf install -y util-linux ethtool && 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 manifest.json tmpfiles.template service.template config.json.template /exports/
|
||||
COPY tmpfiles.template service.template config.json.template /exports/
|
||||
|
||||
RUN mkdir -p /exports/hostfs/etc/cni/net.d && \
|
||||
mkdir -p /exports/hostfs/etc/kubernetes && \
|
||||
|
|
|
|||
|
|
@ -232,12 +232,14 @@
|
|||
"source": "proc"
|
||||
},
|
||||
{
|
||||
"source": "/dev",
|
||||
"destination": "/dev",
|
||||
"type": "bind",
|
||||
"type": "tmpfs",
|
||||
"source": "tmpfs",
|
||||
"options": [
|
||||
"rbind",
|
||||
"rslave"
|
||||
"nosuid",
|
||||
"strictatime",
|
||||
"mode=755",
|
||||
"size=65536k"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -265,6 +267,16 @@
|
|||
"size=65536k"
|
||||
]
|
||||
},
|
||||
{
|
||||
"destination": "/dev/mqueue",
|
||||
"type": "mqueue",
|
||||
"source": "mqueue",
|
||||
"options": [
|
||||
"nosuid",
|
||||
"noexec",
|
||||
"nodev"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bind",
|
||||
"source": "/sys",
|
||||
|
|
@ -368,7 +380,7 @@
|
|||
"destination": "/var/lib/kubelet",
|
||||
"options": [
|
||||
"rbind",
|
||||
"rshared",
|
||||
"rslave",
|
||||
"rw",
|
||||
"mode=755"
|
||||
]
|
||||
|
|
@ -385,21 +397,20 @@
|
|||
},
|
||||
{
|
||||
"destination": "/tmp",
|
||||
"type": "tmpfs",
|
||||
"type": "tmpfs",
|
||||
"source": "tmpfs",
|
||||
"options": [
|
||||
"mode=755",
|
||||
"size=65536k"
|
||||
]
|
||||
}
|
||||
$ADDTL_MOUNTS
|
||||
],
|
||||
"linux": {
|
||||
"rootfsPropagation": "rslave",
|
||||
"resources": {
|
||||
"devices": [
|
||||
{
|
||||
"allow": true,
|
||||
"allow": false,
|
||||
"access": "rwm"
|
||||
}
|
||||
]
|
||||
|
|
@ -410,6 +421,7 @@
|
|||
}
|
||||
],
|
||||
"devices": null,
|
||||
"apparmorProfile": ""
|
||||
"apparmorProfile": "",
|
||||
"selinuxProcessLabel": ""
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ source /etc/kubernetes/config
|
|||
|
||||
TEMP_KUBELET_ARGS='--cgroup-driver=systemd --cgroups-per-qos=false --enforce-node-allocatable='
|
||||
|
||||
ARGS="$@ $TEMP_KUBELET_ARGS $KUBE_LOGTOSTDERR $KUBE_LOG_LEVEL $KUBELET_API_SERVER $KUBELET_ADDRESS $KUBELET_PORT $KUBELET_HOSTNAME $KUBE_ALLOW_PRIV $KUBELET_ARGS"
|
||||
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)
|
||||
|
||||
exec /usr/bin/kubelet $ARGS --containerized
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"version": "1.0",
|
||||
"defaultValues": {
|
||||
"ADDTL_MOUNTS": ""
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue