Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 249b6aa78d | |||
| 3dc8bff861 | |||
|
|
19b57ba82a | ||
| c31d52d28c | |||
|
|
4ff605b1c1 | ||
|
|
6609d3338d |
4 changed files with 226 additions and 0 deletions
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
FROM registry.fedoraproject.org/f26/kubernetes-master:latest
|
||||||
|
MAINTAINER "Jason Brooks" <jbrooks@redhat.com>
|
||||||
|
|
||||||
|
ENV container=docker
|
||||||
|
|
||||||
|
ENV NAME=kubernetes-controller-manager 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-controller-manager-docker.sh
|
||||||
|
|
||||||
|
LABEL RUN /usr/bin/docker run -d --net=host
|
||||||
|
|
||||||
|
COPY service.template config.json.template /exports/
|
||||||
|
|
||||||
|
RUN mkdir -p /exports/hostfs/etc/kubernetes && cp /etc/kubernetes/{config,controller-manager} /exports/hostfs/etc/kubernetes
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/kube-controller-manager-docker.sh"]
|
||||||
184
config.json.template
Normal file
184
config.json.template
Normal file
|
|
@ -0,0 +1,184 @@
|
||||||
|
{
|
||||||
|
"ociVersion": "1.0.0",
|
||||||
|
"platform": {
|
||||||
|
"os": "linux",
|
||||||
|
"arch": "amd64"
|
||||||
|
},
|
||||||
|
"process": {
|
||||||
|
"terminal": false,
|
||||||
|
"user": {
|
||||||
|
"uid": 996,
|
||||||
|
"gid": 994
|
||||||
|
},
|
||||||
|
"args": [
|
||||||
|
"/usr/bin/kube-controller-manager-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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"linux": {
|
||||||
|
"resources": {
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"allow": false,
|
||||||
|
"access": "rwm"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"namespaces": [
|
||||||
|
{
|
||||||
|
"type": "pid"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ipc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "mount"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"devices": null,
|
||||||
|
"apparmorProfile": "",
|
||||||
|
"selinuxProcessLabel": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
8
launch.sh
Executable file
8
launch.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /etc/kubernetes/controller-manager
|
||||||
|
source /etc/kubernetes/config
|
||||||
|
|
||||||
|
ARGS=$(echo "$@ $KUBE_LOGTOSTDERR $KUBE_LOG_LEVEL $KUBE_MASTER $KUBE_CONTROLLER_MANAGER_ARGS" | xargs -n1 | sort -u -t = -k 1,1 | xargs)
|
||||||
|
|
||||||
|
exec /usr/bin/kube-controller-manager $ARGS
|
||||||
12
service.template
Normal file
12
service.template
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
[Unit]
|
||||||
|
Description=kubernetes-controller-manager
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=$EXEC_START
|
||||||
|
ExecStop=$EXEC_STOP
|
||||||
|
Restart=on-failure
|
||||||
|
WorkingDirectory=$DESTDIR
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue