mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 02:51:55 +00:00
kubernetes: use image labels to simplify yaml requirements
Also `net: host` is the default, so drop. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
f853fab1f9
commit
20c0d080df
@ -63,20 +63,6 @@ services:
|
||||
- /var/run:/var/run
|
||||
- name: kubelet
|
||||
image: linuxkitprojects/kubernetes:dev
|
||||
capabilities:
|
||||
- all
|
||||
net: host
|
||||
pid: host
|
||||
mounts:
|
||||
- type: cgroup
|
||||
options: ["rw","nosuid","noexec","nodev","relatime"]
|
||||
binds:
|
||||
- /dev:/dev
|
||||
- /var:/var:rshared,rbind
|
||||
- /var/lib/kubeadm:/etc/kubernetes
|
||||
- /etc/cni:/rootfs/etc/cni:rshared,rbind
|
||||
- /opt/cni:/rootfs/opt/cni:rshared,rbind
|
||||
rootfsPropagation: shared
|
||||
files:
|
||||
- path: root/.ssh/authorized_keys
|
||||
source: ~/.ssh/id_rsa.pub
|
||||
|
@ -59,20 +59,6 @@ services:
|
||||
- /var/run:/var/run
|
||||
- name: kubelet
|
||||
image: linuxkitprojects/kubernetes:dev
|
||||
capabilities:
|
||||
- all
|
||||
net: host
|
||||
pid: host
|
||||
mounts:
|
||||
- type: cgroup
|
||||
options: ["rw","nosuid","noexec","nodev","relatime"]
|
||||
binds:
|
||||
- /dev:/dev
|
||||
- /var:/var:rshared,rbind
|
||||
- /var/lib/kubeadm:/etc/kubernetes
|
||||
- /etc/cni:/rootfs/etc/cni:rshared,rbind
|
||||
- /opt/cni:/rootfs/opt/cni:rshared,rbind
|
||||
rootfsPropagation: shared
|
||||
files:
|
||||
- path: root/.ssh/authorized_keys
|
||||
source: ~/.ssh/id_rsa.pub
|
||||
|
@ -46,3 +46,4 @@ WORKDIR /
|
||||
ENTRYPOINT ["/usr/bin/kubelet.sh"]
|
||||
COPY --from=build /out /
|
||||
ENV KUBECONFIG "/etc/kubernetes/admin.conf"
|
||||
LABEL org.mobyproject.config='{"binds": ["/dev:/dev", "/var:/var:rshared,rbind", "/var/lib/kubeadm:/etc/kubernetes", "/etc/cni:/rootfs/etc/cni:rshared,rbind", "/opt/cni:/rootfs/opt/cni:rshared,rbind"], "mounts": [{"type": "cgroup", "options": ["rw","nosuid","noexec","nodev","relatime"]}], "capabilities": ["all"], "rootfsPropagation": "shared", "pid": "host"}'
|
||||
|
Loading…
Reference in New Issue
Block a user