mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #46038 from dnardo/ip-masq-agent
Automatic merge from submit-queue (batch tested with PRs 44606, 46038) Add ip-masq-agent addon to the addons folder. This also ensures that under gce we add this DaemonSet if the non-masq-cidr is set to 0/0. **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note Add ip-masq-agent addon to the addons folder which is used in GCE if --non-masquerade-cidr is set to 0/0 ```
This commit is contained in:
commit
d3aa925c01
38
cluster/addons/ip-masq-agent/ip-masq-agent.yaml
Normal file
38
cluster/addons/ip-masq-agent/ip-masq-agent.yaml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# https://github.com/kubernetes-incubator/ip-masq-agent/blob/v2.0.0/README.md
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: ip-masq-agent
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: ip-masq-agent
|
||||||
|
annotations:
|
||||||
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||||
|
scheduler.alpha.kubernetes.io/tolerations: |
|
||||||
|
[{"key": "dedicated", "value": "master", "effect": "NoSchedule" },
|
||||||
|
{"key":"CriticalAddonsOnly", "operator":"Exists"}]
|
||||||
|
spec:
|
||||||
|
hostNetwork: true
|
||||||
|
containers:
|
||||||
|
- name: ip-masq-agent
|
||||||
|
image: gcr.io/google-containers/ip-masq-agent-amd64:v2.0.0
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /etc/config
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
# Note this ConfigMap must be created in the same namespace as the daemon pods - this spec uses kube-system
|
||||||
|
name: ip-masq-agent
|
||||||
|
optional: true
|
||||||
|
items:
|
||||||
|
# The daemon looks for its config in a YAML file at /etc/config/ip-masq-agent
|
||||||
|
- key: config
|
||||||
|
path: ip-masq-agent
|
@ -1424,6 +1424,9 @@ function start-kube-addons {
|
|||||||
if [[ "${ENABLE_DEFAULT_STORAGE_CLASS:-}" == "true" ]]; then
|
if [[ "${ENABLE_DEFAULT_STORAGE_CLASS:-}" == "true" ]]; then
|
||||||
setup-addon-manifests "addons" "storage-class/gce"
|
setup-addon-manifests "addons" "storage-class/gce"
|
||||||
fi
|
fi
|
||||||
|
if [[ "${NON_MASQUERADE_CIDR:-}" == "0.0.0.0/0" ]]; then
|
||||||
|
setup-addon-manifests "addons" "ip-masq-agent"
|
||||||
|
fi
|
||||||
|
|
||||||
# Place addon manager pod manifest.
|
# Place addon manager pod manifest.
|
||||||
cp "${src_dir}/kube-addon-manager.yaml" /etc/kubernetes/manifests
|
cp "${src_dir}/kube-addon-manager.yaml" /etc/kubernetes/manifests
|
||||||
|
Loading…
Reference in New Issue
Block a user