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.

40 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. imagePullPolicy: {{ k8s_image_pull_policy }}
  22. command:
  23. - "/bin/sh"
  24. - "-c"
  25. - "/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 %}"
  26. ports:
  27. - hostPort: 10253
  28. containerPort: 10253
  29. resources:
  30. limits:
  31. cpu: "100m"
  32. volumeMounts:
  33. - name: "subnetenv"
  34. mountPath: "/run/flannel"
  35. - name: "etcd-certs"
  36. mountPath: "{{ etcd_cert_dir }}"
  37. readOnly: true
  38. securityContext:
  39. privileged: true
  40. hostNetwork: true