Compare commits
11 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28f98bfc6e | ||
|
|
99636e7114 | ||
|
|
c338dca994 | ||
|
|
cf334d024a | ||
|
|
99dce7ecad | ||
|
|
502959b2aa | ||
|
|
87638b8689 | ||
|
|
ab4a89ee75 | ||
|
|
b9edb641df | ||
|
|
7240b66091 | ||
|
|
a4e90204f6 |
4 changed files with 68 additions and 34 deletions
17
Dockerfile
17
Dockerfile
|
|
@ -1,25 +1,26 @@
|
|||
FROM registry.fedoraproject.org/f26/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=4 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 systemd-udev e2fsprogs xfsprogs && 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"]
|
||||
|
|
|
|||
|
|
@ -232,9 +232,9 @@
|
|||
"source": "proc"
|
||||
},
|
||||
{
|
||||
"source": "/dev",
|
||||
"destination": "/dev",
|
||||
"type": "bind",
|
||||
"source": "/dev",
|
||||
"options": [
|
||||
"rbind",
|
||||
"rslave"
|
||||
|
|
@ -266,26 +266,24 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
|
@ -297,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"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -319,8 +334,8 @@
|
|||
},
|
||||
{
|
||||
"type": "bind",
|
||||
"source": "/var/run/",
|
||||
"destination": "/var/run/",
|
||||
"source": "/var/run/secrets",
|
||||
"destination": "/var/run/secrets",
|
||||
"options": [
|
||||
"rbind",
|
||||
"rw",
|
||||
|
|
@ -329,7 +344,7 @@
|
|||
},
|
||||
{
|
||||
"type": "bind",
|
||||
"source": "/run",
|
||||
"source": "${RUN_DIRECTORY}",
|
||||
"destination": "/run",
|
||||
"options": [
|
||||
"rbind",
|
||||
|
|
@ -339,7 +354,7 @@
|
|||
},
|
||||
{
|
||||
"type": "bind",
|
||||
"source": "/var/lib",
|
||||
"source": "${STATE_DIRECTORY}",
|
||||
"destination": "/var/lib",
|
||||
"options": [
|
||||
"bind",
|
||||
|
|
@ -349,11 +364,11 @@
|
|||
},
|
||||
{
|
||||
"type": "bind",
|
||||
"source": "/var/lib/kubelet",
|
||||
"source": "${STATE_DIRECTORY}/kubelet",
|
||||
"destination": "/var/lib/kubelet",
|
||||
"options": [
|
||||
"rbind",
|
||||
"rslave",
|
||||
"rshared",
|
||||
"rw",
|
||||
"mode=755"
|
||||
]
|
||||
|
|
@ -367,7 +382,17 @@
|
|||
"rw",
|
||||
"mode=755"
|
||||
]
|
||||
},
|
||||
{
|
||||
"destination": "/tmp",
|
||||
"type": "tmpfs",
|
||||
"source": "tmpfs",
|
||||
"options": [
|
||||
"mode=755",
|
||||
"size=65536k"
|
||||
]
|
||||
}
|
||||
$ADDTL_MOUNTS
|
||||
],
|
||||
"linux": {
|
||||
"rootfsPropagation": "rslave",
|
||||
|
|
@ -385,7 +410,6 @@
|
|||
}
|
||||
],
|
||||
"devices": null,
|
||||
"apparmorProfile": "",
|
||||
"selinuxProcessLabel": ""
|
||||
"apparmorProfile": ""
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
manifest.json
Normal file
6
manifest.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"version": "1.0",
|
||||
"defaultValues": {
|
||||
"ADDTL_MOUNTS": ""
|
||||
}
|
||||
}
|
||||
3
tmpfiles.template
Normal file
3
tmpfiles.template
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
d ${STATE_DIRECTORY}/kubelet - - - - -
|
||||
d /var/lib/cni - - - - -
|
||||
d /var/run/secrets - - - - -
|
||||
Loading…
Add table
Add a link
Reference in a new issue