From 8ef6b06d3982afda14de7335afa953e12ea8452d Mon Sep 17 00:00:00 2001 From: Casey Davenport Date: Wed, 31 May 2017 19:18:11 -0700 Subject: [PATCH] Use ip-masq-agent for MASQUERADE when using Calico policy --- cluster/addons/calico-policy-controller/README.md | 7 ------- cluster/addons/calico-policy-controller/calico-node.yaml | 6 ++---- cluster/gce/container-linux/configure-helper.sh | 4 ---- cluster/gce/gci/configure-helper.sh | 4 ---- 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/cluster/addons/calico-policy-controller/README.md b/cluster/addons/calico-policy-controller/README.md index e467ff1b7f9..ef8a94e3f34 100644 --- a/cluster/addons/calico-policy-controller/README.md +++ b/cluster/addons/calico-policy-controller/README.md @@ -3,13 +3,6 @@ Calico is an implementation of the Kubernetes network policy API. The provided manifest installs a DaemonSet which runs Calico on each node in the cluster. -### Templating - -The provided `calico-node.yaml` manifest includes the following placeholders which are populated -via templating. - -- `__CLUSTER_CIDR__`: The IP range from which Pod IP addresses are assigned. - ### Learn More Learn more about Calico at http://docs.projectcalico.org diff --git a/cluster/addons/calico-policy-controller/calico-node.yaml b/cluster/addons/calico-policy-controller/calico-node.yaml index 9244711d18c..ac4c4ba8c32 100644 --- a/cluster/addons/calico-policy-controller/calico-node.yaml +++ b/cluster/addons/calico-policy-controller/calico-node.yaml @@ -32,10 +32,6 @@ spec: value: "true" - name: CALICO_NETWORKING_BACKEND value: "none" - - name: CALICO_IPV4POOL_CIDR - value: "__CLUSTER_CIDR__" - - name: CALICO_IPV4POOL_IPIP - value: "off" - name: DATASTORE_TYPE value: "kubernetes" - name: FELIX_DEFAULTENDPOINTTOHOSTACTION @@ -48,6 +44,8 @@ spec: value: "true" - name: IP value: "" + - name: NO_DEFAULT_POOLS + value: "true" - name: NODENAME valueFrom: fieldRef: diff --git a/cluster/gce/container-linux/configure-helper.sh b/cluster/gce/container-linux/configure-helper.sh index 3ce39b8db91..d602dcc19ab 100755 --- a/cluster/gce/container-linux/configure-helper.sh +++ b/cluster/gce/container-linux/configure-helper.sh @@ -1212,10 +1212,6 @@ function start-kube-addons { fi if [[ "${NETWORK_POLICY_PROVIDER:-}" == "calico" ]]; then setup-addon-manifests "addons" "calico-policy-controller" - - # Replace the cluster cidr. - local -r calico_file="${dst_dir}/calico-policy-controller/calico-node.yaml" - sed -i -e "s@__CLUSTER_CIDR__@${CLUSTER_IP_RANGE}@g" "${calico_file}" fi if [[ "${ENABLE_DEFAULT_STORAGE_CLASS:-}" == "true" ]]; then setup-addon-manifests "addons" "storage-class/gce" diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 71068f9ffe4..428ef14eb4c 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -1610,10 +1610,6 @@ function start-kube-addons { fi if [[ "${NETWORK_POLICY_PROVIDER:-}" == "calico" ]]; then setup-addon-manifests "addons" "calico-policy-controller" - - # Replace the cluster cidr. - local -r calico_file="${dst_dir}/calico-policy-controller/calico-node.yaml" - sed -i -e "s@__CLUSTER_CIDR__@${CLUSTER_IP_RANGE}@g" "${calico_file}" fi if [[ "${ENABLE_DEFAULT_STORAGE_CLASS:-}" == "true" ]]; then setup-addon-manifests "addons" "storage-class/gce"