mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 18:11:35 +00:00
kubernetes: Add /etc/os-release to host and bind to kubelet image.
Adding a `PRETTY_NAME` to this causes it to appear in the node information: $ kubectl --namespace=kube-system get -o wide nodes NAME STATUS ROLES AGE VERSION EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME linuxkit-b6e09efea36e Ready master 29m v1.8.0 <none> LinuxKit Kubernetes Project 4.9.53-linuxkit containerd://1.0.0-beta.1 Previously it would be `Unknown`. A later yaml passed to `moby build` can override this by simply duplicating the path. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
26d93d613c
commit
466e5db203
@ -42,6 +42,9 @@ files:
|
||||
metadata: yaml
|
||||
- path: /etc/kubernetes
|
||||
symlink: "/var/lib/kubeadm"
|
||||
- path: /etc/os-release
|
||||
contents: |
|
||||
PRETTY_NAME="LinuxKit Kubernetes Project"
|
||||
- path: /usr/libexec/kubernetes/kubelet-plugins
|
||||
symlink: "/var/lib/kubelet-plugins"
|
||||
- path: /etc/kubeadm/kube-system.init/50-network.yaml
|
||||
|
@ -75,4 +75,4 @@ WORKDIR /
|
||||
ENTRYPOINT ["/usr/bin/kubelet.sh"]
|
||||
COPY --from=build /out /
|
||||
ENV KUBECONFIG "/etc/kubernetes/admin.conf"
|
||||
LABEL org.mobyproject.config='{"binds": ["/dev:/dev", "/etc/resolv.conf:/etc/resolv.conf", "/run:/run:rshared,rbind", "/var:/var:rshared,rbind", "/var/lib/kubeadm:/etc/kubernetes", "/etc/kubelet.sh.conf:/etc/kubelet.sh.conf", "/etc/kubeadm:/etc/kubeadm", "/var/lib/kubelet-plugins:/usr/libexec/kubernetes/kubelet-plugins:rshared,rbind"], "mounts": [{"type": "cgroup", "options": ["rw","nosuid","noexec","nodev","relatime"]}], "capabilities": ["all"], "rootfsPropagation": "shared", "pid": "host", "runtime": {"mkdir": ["/var/lib/kubeadm", "/var/lib/cni/etc", "/var/lib/cni/opt", "/var/lib/kubelet-plugins"], "mounts": [{"type": "bind", "source": "/var/lib/cni/opt", "destination": "/opt/cni", "options": ["rw", "bind"]}, {"type": "bind", "source": "/var/lib/cni/etc", "destination": "/etc/cni", "options": ["rw", "bind"]}]}}'
|
||||
LABEL org.mobyproject.config='{"binds": ["/dev:/dev", "/etc/resolv.conf:/etc/resolv.conf", "/etc/os-release:/etc/os-release", "/run:/run:rshared,rbind", "/var:/var:rshared,rbind", "/var/lib/kubeadm:/etc/kubernetes", "/etc/kubelet.sh.conf:/etc/kubelet.sh.conf", "/etc/kubeadm:/etc/kubeadm", "/var/lib/kubelet-plugins:/usr/libexec/kubernetes/kubelet-plugins:rshared,rbind"], "mounts": [{"type": "cgroup", "options": ["rw","nosuid","noexec","nodev","relatime"]}], "capabilities": ["all"], "rootfsPropagation": "shared", "pid": "host", "runtime": {"mkdir": ["/var/lib/kubeadm", "/var/lib/cni/etc", "/var/lib/cni/opt", "/var/lib/kubelet-plugins"], "mounts": [{"type": "bind", "source": "/var/lib/cni/opt", "destination": "/opt/cni", "options": ["rw", "bind"]}, {"type": "bind", "source": "/var/lib/cni/etc", "destination": "/etc/cni", "options": ["rw", "bind"]}]}}'
|
||||
|
Loading…
Reference in New Issue
Block a user