8c2c5f383b
Add missing --require-kubeconfig to the if..else stanza. Make sure certs dirs mounted in RO. Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
---
|
|
kind: "Pod"
|
|
apiVersion: "v1"
|
|
metadata:
|
|
name: "flannel"
|
|
namespace: "kube-system"
|
|
labels:
|
|
app: "flannel"
|
|
version: "v0.1"
|
|
spec:
|
|
volumes:
|
|
- name: "subnetenv"
|
|
hostPath:
|
|
path: "/run/flannel"
|
|
- name: "etcd-certs"
|
|
hostPath:
|
|
path: "{{ etcd_cert_dir }}"
|
|
containers:
|
|
- name: "flannel-container"
|
|
image: "{{ flannel_image_repo }}:{{ flannel_image_tag }}"
|
|
command:
|
|
- "/bin/sh"
|
|
- "-c"
|
|
- "/opt/bin/flanneld -etcd-endpoints {{ etcd_access_endpoint }} -etcd-prefix /{{ cluster_name }}/network -etcd-cafile {{ etcd_cert_dir }}/ca.pem -etcd-certfile {{ etcd_cert_dir }}/node.pem -etcd-keyfile {{ etcd_cert_dir }}/node-key.pem {% if flannel_interface is defined %}-iface {{ flannel_interface }}{% endif %} {% if flannel_public_ip is defined %}-public-ip {{ flannel_public_ip }}{% endif %}"
|
|
ports:
|
|
- hostPort: 10253
|
|
containerPort: 10253
|
|
resources:
|
|
limits:
|
|
cpu: "100m"
|
|
volumeMounts:
|
|
- name: "subnetenv"
|
|
mountPath: "/run/flannel"
|
|
- name: "etcd-certs"
|
|
mountPath: "{{ etcd_cert_dir }}"
|
|
readOnly: true
|
|
securityContext:
|
|
privileged: true
|
|
hostNetwork: true
|