Skip to content

Commit

Permalink
Update calico to use the correct CIDR for pods
Browse files Browse the repository at this point in the history
Currently, we are using .NonMasqueradeCIDR in the wrong fashion. We
should be using .KubeControllerManager.ClusterCIDR to prevent IP
collision with Service IPs.
  • Loading branch information
ottoyiu committed Jun 26, 2017
1 parent f9f64e3 commit 8674309
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ spec:
key: enable_bgp
# Configure the IP Pool from which Pod IPs will be chosen.
- name: CALICO_IPV4POOL_CIDR
value: "{{ .NonMasqueradeCIDR }}"
value: "{{ .KubeControllerManager.ClusterCIDR }}"
- name: CALICO_IPV4POOL_IPIP
value: "{{- if and (eq .CloudProvider "aws") (.Networking.Calico.CrossSubnet) -}}cross-subnet{{- else -}}always{{- end -}}"
# Disable file logging so `kubectl logs` works.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
value: "true"
# Configure the IP Pool from which Pod IPs will be chosen.
- name: CALICO_IPV4POOL_CIDR
value: "{{ .NonMasqueradeCIDR }}"
value: "{{ .KubeControllerManager.ClusterCIDR }}"
- name: CALICO_IPV4POOL_IPIP
value: "{{- if and (eq .CloudProvider "aws") (.Networking.Calico.CrossSubnet) -}}cross-subnet{{- else -}}always{{- end -}}"
# Auto-detect the BGP IP address.
Expand Down
3 changes: 2 additions & 1 deletion upup/pkg/fi/cloudup/bootstrapchannelbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ func (b *BootstrapChannelBuilder) buildManifest() (*channelsapi.Addons, map[stri

if b.cluster.Spec.Networking.Calico != nil {
key := "networking.projectcalico.org"
version := "2.1.1"
// 2.1.2-kops.1 = 2.1.1 with CIDR change
version := "2.1.2-kops.1"

{
location := key + "/pre-k8s-1.6.yaml"
Expand Down

0 comments on commit 8674309

Please sign in to comment.