ip-masq-agent.yaml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. apiVersion: v1
  2. kind: ServiceAccount
  3. metadata:
  4. name: ip-masq-agent
  5. namespace: kube-system
  6. labels:
  7. k8s-app: ip-masq-agent
  8. kubernetes.io/cluster-service: "true"
  9. addonmanager.kubernetes.io/mode: Reconcile
  10. ---
  11. # https://github.com/kubernetes-incubator/ip-masq-agent/blob/v2.4.1/README.md
  12. apiVersion: apps/v1
  13. kind: DaemonSet
  14. metadata:
  15. name: ip-masq-agent
  16. namespace: kube-system
  17. labels:
  18. addonmanager.kubernetes.io/mode: Reconcile
  19. spec:
  20. selector:
  21. matchLabels:
  22. k8s-app: ip-masq-agent
  23. template:
  24. metadata:
  25. labels:
  26. k8s-app: ip-masq-agent
  27. spec:
  28. priorityClassName: system-node-critical
  29. serviceAccountName: ip-masq-agent
  30. hostNetwork: true
  31. containers:
  32. - name: ip-masq-agent
  33. image: k8s.gcr.io/ip-masq-agent-amd64:v2.4.1
  34. args:
  35. - --masq-chain=IP-MASQ
  36. - --nomasq-all-reserved-ranges
  37. resources:
  38. requests:
  39. cpu: 10m
  40. memory: 16Mi
  41. securityContext:
  42. privileged: true
  43. volumeMounts:
  44. - name: config
  45. mountPath: /etc/config
  46. nodeSelector:
  47. beta.kubernetes.io/os: linux
  48. node.kubernetes.io/masq-agent-ds-ready: "true"
  49. volumes:
  50. - name: config
  51. configMap:
  52. # Note this ConfigMap must be created in the same namespace as the daemon pods - this spec uses kube-system
  53. name: ip-masq-agent
  54. optional: true
  55. items:
  56. # The daemon looks for its config in a YAML file at /etc/config/ip-masq-agent
  57. - key: config
  58. path: ip-masq-agent
  59. tolerations:
  60. - effect: NoSchedule
  61. operator: Exists
  62. - effect: NoExecute
  63. operator: Exists
  64. - key: "CriticalAddonsOnly"
  65. operator: "Exists"