Update Kube-router version to v0.4.0 (#5756)
This commit is contained in:
parent
45626a05dc
commit
974902af31
5 changed files with 32 additions and 28 deletions
|
@ -125,7 +125,7 @@ Note: Upstart/SysV init based OS types are not supported.
|
|||
- [cilium](https://github.com/cilium/cilium) v1.5.5
|
||||
- [contiv](https://github.com/contiv/install) v1.2.1
|
||||
- [flanneld](https://github.com/coreos/flannel) v0.11.0
|
||||
- [kube-router](https://github.com/cloudnativelabs/kube-router) v0.2.5
|
||||
- [kube-router](https://github.com/cloudnativelabs/kube-router) v0.4.0
|
||||
- [multus](https://github.com/intel/multus-cni) v3.4
|
||||
- [weave](https://github.com/weaveworks/weave) v2.5.2
|
||||
- Application
|
||||
|
|
|
@ -82,7 +82,7 @@ pod_infra_version: 3.1
|
|||
contiv_version: 1.2.1
|
||||
cilium_version: "v1.7.1"
|
||||
kube_ovn_version: "v0.6.0"
|
||||
kube_router_version: "v0.2.5"
|
||||
kube_router_version: "v0.4.0"
|
||||
multus_version: "v3.4"
|
||||
|
||||
# Get kubernetes major version (i.e. 1.15.4 => 1.15)
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
- name: kube-router | Slurp cni config
|
||||
slurp:
|
||||
src: /etc/cni/net.d/10-kuberouter.conf
|
||||
src: /etc/cni/net.d/10-kuberouter.conflist
|
||||
register: cni_config_slurp
|
||||
ignore_errors: true
|
||||
|
||||
|
@ -49,30 +49,24 @@
|
|||
|
||||
- name: kube-router | Set host_subnet variable
|
||||
set_fact:
|
||||
host_subnet: "{{ cni_config.ipam.subnet }}"
|
||||
host_subnet: "{{ cni_config | json_query('plugins[?bridge==`kube-bridge`].ipam.subnet') | first }}"
|
||||
when:
|
||||
- cni_config is defined
|
||||
- cni_config.ipam is defined
|
||||
- cni_config.ipam.subnet is defined
|
||||
|
||||
- name: kube-router | Set wanted cni config variable
|
||||
set_fact:
|
||||
wanted_cni_config: "{{ lookup('template', 'cni-conf.json.j2') }}"
|
||||
|
||||
- name: kube-router | Set wanted_cni_config variable
|
||||
set_fact:
|
||||
wanted_cni_config: "{{ wanted_cni_config | combine({ 'ipam': { 'subnet': host_subnet }}, recursive=True) }}"
|
||||
when: host_subnet is defined
|
||||
- cni_config | json_query('plugins[?bridge==`kube-bridge`].ipam.subnet') | length > 0
|
||||
|
||||
- name: kube-router | Create cni config
|
||||
copy:
|
||||
content: "{{ wanted_cni_config | to_nice_json }}"
|
||||
dest: /etc/cni/net.d/10-kuberouter.conf
|
||||
template:
|
||||
src: cni-conf.json.j2
|
||||
dest: /etc/cni/net.d/10-kuberouter.conflist
|
||||
owner: kube
|
||||
changed_when: wanted_cni_config != cni_config
|
||||
notify:
|
||||
- reset_kube_router
|
||||
|
||||
- name: kube-router | Delete old configuration
|
||||
file:
|
||||
path: /etc/cni/net.d/10-kuberouter.conf
|
||||
state: absent
|
||||
|
||||
- name: kube-router | Create manifest
|
||||
template:
|
||||
src: kube-router.yml.j2
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
{
|
||||
"name":"kubernetes",
|
||||
"cniVersion": "0.2.0",
|
||||
"type":"bridge",
|
||||
"bridge":"kube-bridge",
|
||||
"isDefaultGateway":true,
|
||||
"cniVersion":"0.3.0",
|
||||
"name":"kubernetes",
|
||||
"plugins":[
|
||||
{
|
||||
"name":"kubernetes",
|
||||
"type":"bridge",
|
||||
"bridge":"kube-bridge",
|
||||
"isDefaultGateway":true,
|
||||
{% if kube_router_support_hairpin_mode %}
|
||||
"hairpinMode":true,
|
||||
"hairpinMode":true,
|
||||
{% endif %}
|
||||
"ipam": {
|
||||
"type":"host-local"
|
||||
}
|
||||
"ipam":{
|
||||
{% if host_subnet is defined %}
|
||||
"subnet": "{{ host_subnet }}",
|
||||
{% endif %}
|
||||
"type":"host-local"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -69,6 +69,8 @@ spec:
|
|||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: KUBE_ROUTER_CNI_CONF_FILE
|
||||
value: /etc/cni/net.d/10-kuberouter.conflist
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
|
|
Loading…
Reference in a new issue