You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.3 KiB

  1. ---
  2. kind: "Pod"
  3. apiVersion: "v1"
  4. metadata:
  5. name: "flannel"
  6. namespace: "kube-system"
  7. labels:
  8. app: "flannel"
  9. version: "v0.1"
  10. spec:
  11. volumes:
  12. - name: "subnetenv"
  13. hostPath:
  14. path: "/run/flannel"
  15. - name: "etcd-certs"
  16. hostPath:
  17. path: "{{ etcd_cert_dir }}"
  18. containers:
  19. - name: "flannel-container"
  20. image: "{{ flannel_image_repo }}:{{ flannel_image_tag }}"
  21. command:
  22. - "/bin/sh"
  23. - "-c"
  24. - "/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 %}"
  25. ports:
  26. - hostPort: 10253
  27. containerPort: 10253
  28. resources:
  29. limits:
  30. cpu: "100m"
  31. volumeMounts:
  32. - name: "subnetenv"
  33. mountPath: "/run/flannel"
  34. - name: "etcd-certs"
  35. mountPath: "{{ etcd_cert_dir }}"
  36. readOnly: true
  37. securityContext:
  38. privileged: true
  39. hostNetwork: true