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.

44 lines
1.5 KiB

  1. ---
  2. kind: "Pod"
  3. apiVersion: "v1"
  4. metadata:
  5. name: "flannel"
  6. namespace: "{{system_namespace}}"
  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: "{{ flannel_cert_dir }}"
  18. containers:
  19. - name: "flannel-container"
  20. image: "{{ flannel_image_repo }}:{{ flannel_image_tag }}"
  21. imagePullPolicy: {{ k8s_image_pull_policy }}
  22. resources:
  23. limits:
  24. cpu: {{ flannel_cpu_limit }}
  25. memory: {{ flannel_memory_limit }}
  26. requests:
  27. cpu: {{ flannel_cpu_requests }}
  28. memory: {{ flannel_memory_requests }}
  29. command:
  30. - "/bin/sh"
  31. - "-c"
  32. - "/opt/bin/flanneld -etcd-endpoints {{ etcd_access_endpoint }} -etcd-prefix /{{ cluster_name }}/network -etcd-cafile {{ flannel_cert_dir }}/ca_cert.crt -etcd-certfile {{ flannel_cert_dir }}/cert.crt -etcd-keyfile {{ flannel_cert_dir }}/key.pem {% if flannel_interface is defined %}-iface {{ flannel_interface }}{% endif %} {% if flannel_public_ip is defined %}-public-ip {{ flannel_public_ip }}{% endif %}"
  33. ports:
  34. - hostPort: 10253
  35. containerPort: 10253
  36. volumeMounts:
  37. - name: "subnetenv"
  38. mountPath: "/run/flannel"
  39. - name: "etcd-certs"
  40. mountPath: "{{ flannel_cert_dir }}"
  41. readOnly: true
  42. securityContext:
  43. privileged: true
  44. hostNetwork: true