Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Enable portmap for calico
Browse files Browse the repository at this point in the history
  • Loading branch information
weikinhuang committed Sep 19, 2017
1 parent 76f5178 commit fa9e3a3
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions pkg/asset/internal/templates.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1183,24 +1183,34 @@ data:
# The CNI network configuration to install on each node.
cni_network_config: |-
{
"name": "k8s-pod-network",
"cniVersion": "0.3.0",
"type": "calico",
"log_level": "debug",
"datastore_type": "kubernetes",
"nodename": "__KUBERNETES_NODE_NAME__",
"ipam": {
"name": "k8s-pod-network",
"cniVersion": "0.3.0",
"plugins": [
{
"type": "calico",
"log_level": "debug",
"datastore_type": "kubernetes",
"nodename": "__KUBERNETES_NODE_NAME__",
"ipam": {
"type": "host-local",
"subnet": "usePodCidr"
},
"policy": {
},
"policy": {
"type": "k8s",
"k8s_auth_token": "__SERVICEACCOUNT_TOKEN__"
},
"kubernetes": {
},
"kubernetes": {
"k8s_api_root": "https://__KUBERNETES_SERVICE_HOST__:__KUBERNETES_SERVICE_PORT__",
"kubeconfig": "__KUBECONFIG_FILEPATH__"
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
}
]
}
`)

Expand Down Expand Up @@ -1289,6 +1299,8 @@ spec:
image: {{ .Images.CalicoCNI }}
command: ["/install-cni.sh"]
env:
- name: CNI_CONF_NAME
value: 10-calico.conflist
- name: CNI_NETWORK_CONFIG
valueFrom:
configMapKeyRef:
Expand Down

0 comments on commit fa9e3a3

Please sign in to comment.