add /etc/hosts volume to rkt templates

This commit is contained in:
ArchiFleKs 2017-10-06 17:17:34 +02:00
parent da61b8e7c9
commit 7c663de6c9
3 changed files with 6 additions and 0 deletions

View file

@ -11,6 +11,8 @@ LimitNOFILE=40000
ExecStart=/usr/bin/rkt run \ ExecStart=/usr/bin/rkt run \
--uuid-file-save=/var/run/etcd.uuid \ --uuid-file-save=/var/run/etcd.uuid \
--volume hosts,kind=host,source=/etc/hosts,readOnly=true \
--mount volume=hosts,target=/etc/hosts \
--volume=etc-ssl-certs,kind=host,source=/etc/ssl/certs,readOnly=true \ --volume=etc-ssl-certs,kind=host,source=/etc/ssl/certs,readOnly=true \
--mount=volume=etc-ssl-certs,target=/etc/ssl/certs \ --mount=volume=etc-ssl-certs,target=/etc/ssl/certs \
--volume=etcd-cert-dir,kind=host,source={{ etcd_cert_dir }},readOnly=true \ --volume=etcd-cert-dir,kind=host,source={{ etcd_cert_dir }},readOnly=true \

View file

@ -16,6 +16,7 @@ EnvironmentFile={{kube_config_dir}}/kubelet.env
# stage1-fly mounts /proc /sys /dev so no need to duplicate the mounts # stage1-fly mounts /proc /sys /dev so no need to duplicate the mounts
ExecStart=/usr/bin/rkt run \ ExecStart=/usr/bin/rkt run \
--volume os-release,kind=host,source=/etc/os-release,readOnly=true \ --volume os-release,kind=host,source=/etc/os-release,readOnly=true \
--volume hosts,kind=host,source=/etc/hosts,readOnly=true \
--volume dns,kind=host,source=/etc/resolv.conf \ --volume dns,kind=host,source=/etc/resolv.conf \
--volume etc-kubernetes,kind=host,source={{ kube_config_dir }},readOnly=false \ --volume etc-kubernetes,kind=host,source={{ kube_config_dir }},readOnly=false \
--volume etc-ssl-certs,kind=host,source=/etc/ssl/certs,readOnly=true \ --volume etc-ssl-certs,kind=host,source=/etc/ssl/certs,readOnly=true \
@ -47,6 +48,7 @@ ExecStart=/usr/bin/rkt run \
--mount volume=var-lib-docker,target=/var/lib/docker \ --mount volume=var-lib-docker,target=/var/lib/docker \
--mount volume=var-lib-kubelet,target=/var/lib/kubelet \ --mount volume=var-lib-kubelet,target=/var/lib/kubelet \
--mount volume=var-log,target=/var/log \ --mount volume=var-log,target=/var/log \
--mount volume=hosts,target=/etc/hosts \
--stage1-from-dir=stage1-fly.aci \ --stage1-from-dir=stage1-fly.aci \
{% if kube_hyperkube_image_repo == "docker" %} {% if kube_hyperkube_image_repo == "docker" %}
--insecure-options=image \ --insecure-options=image \

View file

@ -14,6 +14,8 @@ LimitNOFILE=40000
# /vault/logs/ # Log files # /vault/logs/ # Log files
ExecStart=/usr/bin/rkt run \ ExecStart=/usr/bin/rkt run \
--insecure-options=image \ --insecure-options=image \
--volume hosts,kind=host,source=/etc/hosts,readOnly=true \
--mount volume=hosts,target=/etc/hosts \
--volume=volume-vault-file,kind=host,source=/var/lib/vault \ --volume=volume-vault-file,kind=host,source=/var/lib/vault \
--volume=volume-vault-logs,kind=host,source={{ vault_log_dir }} \ --volume=volume-vault-logs,kind=host,source={{ vault_log_dir }} \
--volume=vault-cert-dir,kind=host,source={{ vault_cert_dir }} \ --volume=vault-cert-dir,kind=host,source={{ vault_cert_dir }} \