1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-31 06:34:03 +00:00

Merge pull request #199 from superseb/calico_cloudprovider_gce

Support for Calico on GCE
This commit is contained in:
Alena Prokharchyk
2018-01-15 10:48:26 -08:00
committed by GitHub
3 changed files with 12 additions and 9 deletions

View File

@@ -81,7 +81,7 @@ There are extra options that can be specified for each network plugin:
- **calico_cni_image**: Calico CNI binary installer Docker image
- **calico_controllers_image**: Calico Controller Docker image
- **calicoctl_image**: Calicoctl tool Docker image
- **calico_cloud_provider**: Cloud provider where Calico will operate, current available value is: `aws`
- **calico_cloud_provider**: Cloud provider where Calico will operate, currently supported values are: `aws`, `gce`
#### Cannal

View File

@@ -10,8 +10,10 @@ auth:
# canal
# weave
#
# If you are using calico on AWS, use the network plugin config option:
# If you are using calico on AWS or GCE, use the network plugin config option:
# 'calico_cloud_provider: aws'
# or
# 'calico_cloud_provider: gce'
network:
plugin: flannel
options:

View File

@@ -469,13 +469,12 @@ metadata:
namespace: kube-system
{{if eq .CloudProvider "aws"}}
## aws stuff here
{{if ne .CloudProvider ""}}
---
kind: ConfigMap
apiVersion: v1
metadata:
name: aws-ippool
name: {{.CloudProvider}}-ippool
namespace: kube-system
data:
aws-ippool: |-
@@ -484,6 +483,8 @@ data:
metadata:
cidr: {{.ClusterCIDR}}
spec:
ipip:
enabled: true
nat-outgoing: true
---
apiVersion: v1
@@ -497,7 +498,7 @@ spec:
containers:
- name: calicoctl
image: {{.Calicoctl}}
command: ["/bin/sh", "-c", "calicoctl apply -f aws-ippool.yaml"]
command: ["/bin/sh", "-c", "calicoctl apply -f {{.CloudProvider}}-ippool.yaml"]
env:
- name: ETCD_ENDPOINTS
valueFrom:
@@ -510,9 +511,9 @@ spec:
volumes:
- name: ippool-config
configMap:
name: aws-ippool
name: {{.CloudProvider}}-ippool
items:
- key: aws-ippool
path: aws-ippool.yaml
- key: {{.CloudProvider}}-ippool
path: {{.CloudProvider}}-ippool.yaml
{{end}}
`