ip-masq-agent.yaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. annotations:
  28. scheduler.alpha.kubernetes.io/critical-pod: ''
  29. spec:
  30. priorityClassName: system-node-critical
  31. serviceAccountName: ip-masq-agent
  32. hostNetwork: true
  33. containers:
  34. - name: ip-masq-agent
  35. image: k8s.gcr.io/ip-masq-agent-amd64:v2.4.1
  36. args:
  37. - --masq-chain=IP-MASQ
  38. - --nomasq-all-reserved-ranges
  39. resources:
  40. requests:
  41. cpu: 10m
  42. memory: 16Mi
  43. securityContext:
  44. privileged: true
  45. volumeMounts:
  46. - name: config
  47. mountPath: /etc/config
  48. nodeSelector:
  49. # TODO(liggitt): switch to node.kubernetes.io/masq-agent-ds-ready in 1.16
  50. beta.kubernetes.io/masq-agent-ds-ready: "true"
  51. volumes:
  52. - name: config
  53. configMap:
  54. # Note this ConfigMap must be created in the same namespace as the daemon pods - this spec uses kube-system
  55. name: ip-masq-agent
  56. optional: true
  57. items:
  58. # The daemon looks for its config in a YAML file at /etc/config/ip-masq-agent
  59. - key: config
  60. path: ip-masq-agent
  61. tolerations:
  62. - effect: NoSchedule
  63. operator: Exists
  64. - effect: NoExecute
  65. operator: Exists
  66. - key: "CriticalAddonsOnly"
  67. operator: "Exists"