mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-16 22:07:39 -02:30
Update network-plugins to use portmap plugin (#1763)
Portmap allow to use hostPort with CNI plugins. Should fix #1675
This commit is contained in:
committed by
Matthew Mosesohn
parent
d9879d8026
commit
6ec45b10f1
@@ -1,8 +1,8 @@
|
||||
---
|
||||
- name: Canal | Write Canal cni config
|
||||
template:
|
||||
src: "cni-canal.conf.j2"
|
||||
dest: "/etc/cni/net.d/10-canal.conf"
|
||||
src: "cni-canal.conflist.j2"
|
||||
dest: "/etc/cni/net.d/10-canal.conflist"
|
||||
owner: kube
|
||||
|
||||
- name: Canal | Create canal certs directory
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "canal-k8s-network",
|
||||
"type": "flannel",
|
||||
"delegate": {
|
||||
"type": "calico",
|
||||
"etcd_endpoints": "{{ etcd_access_addresses }}",
|
||||
"log_level": "info",
|
||||
"policy": {
|
||||
"type": "k8s"
|
||||
},
|
||||
"kubernetes": {
|
||||
"kubeconfig": "{{ kube_config_dir }}/node-kubeconfig.yaml"
|
||||
}
|
||||
}
|
||||
}
|
||||
26
roles/network_plugin/canal/templates/cni-canal.conflist.j2
Normal file
26
roles/network_plugin/canal/templates/cni-canal.conflist.j2
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "cni0",
|
||||
"cniVersion":"0.3.1",
|
||||
"plugins":[
|
||||
{
|
||||
"type": "flannel",
|
||||
"delegate": {
|
||||
"type": "calico",
|
||||
"etcd_endpoints": "{{ etcd_access_addresses }}",
|
||||
"log_level": "info",
|
||||
"policy": {
|
||||
"type": "k8s"
|
||||
},
|
||||
"kubernetes": {
|
||||
"kubeconfig": "{{ kube_config_dir }}/node-kubeconfig.yaml"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"portmap",
|
||||
"capabilities":{
|
||||
"portMappings":true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user