mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 15:06:23 +00:00
Merge pull request #199 from superseb/calico_cloudprovider_gce
Support for Calico on GCE
This commit is contained in:
@@ -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_cni_image**: Calico CNI binary installer Docker image
|
||||||
- **calico_controllers_image**: Calico Controller Docker image
|
- **calico_controllers_image**: Calico Controller Docker image
|
||||||
- **calicoctl_image**: Calicoctl tool 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
|
#### Cannal
|
||||||
|
|
||||||
|
@@ -10,8 +10,10 @@ auth:
|
|||||||
# canal
|
# canal
|
||||||
# weave
|
# 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'
|
# 'calico_cloud_provider: aws'
|
||||||
|
# or
|
||||||
|
# 'calico_cloud_provider: gce'
|
||||||
network:
|
network:
|
||||||
plugin: flannel
|
plugin: flannel
|
||||||
options:
|
options:
|
||||||
|
@@ -469,13 +469,12 @@ metadata:
|
|||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
|
|
||||||
|
|
||||||
{{if eq .CloudProvider "aws"}}
|
{{if ne .CloudProvider ""}}
|
||||||
## aws stuff here
|
|
||||||
---
|
---
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: aws-ippool
|
name: {{.CloudProvider}}-ippool
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
data:
|
data:
|
||||||
aws-ippool: |-
|
aws-ippool: |-
|
||||||
@@ -484,6 +483,8 @@ data:
|
|||||||
metadata:
|
metadata:
|
||||||
cidr: {{.ClusterCIDR}}
|
cidr: {{.ClusterCIDR}}
|
||||||
spec:
|
spec:
|
||||||
|
ipip:
|
||||||
|
enabled: true
|
||||||
nat-outgoing: true
|
nat-outgoing: true
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@@ -497,7 +498,7 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: calicoctl
|
- name: calicoctl
|
||||||
image: {{.Calicoctl}}
|
image: {{.Calicoctl}}
|
||||||
command: ["/bin/sh", "-c", "calicoctl apply -f aws-ippool.yaml"]
|
command: ["/bin/sh", "-c", "calicoctl apply -f {{.CloudProvider}}-ippool.yaml"]
|
||||||
env:
|
env:
|
||||||
- name: ETCD_ENDPOINTS
|
- name: ETCD_ENDPOINTS
|
||||||
valueFrom:
|
valueFrom:
|
||||||
@@ -510,9 +511,9 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: ippool-config
|
- name: ippool-config
|
||||||
configMap:
|
configMap:
|
||||||
name: aws-ippool
|
name: {{.CloudProvider}}-ippool
|
||||||
items:
|
items:
|
||||||
- key: aws-ippool
|
- key: {{.CloudProvider}}-ippool
|
||||||
path: aws-ippool.yaml
|
path: {{.CloudProvider}}-ippool.yaml
|
||||||
{{end}}
|
{{end}}
|
||||||
`
|
`
|
||||||
|
Reference in New Issue
Block a user