Cluster support for ovn-central.
Without minimal cluster configuration, even on a one node control plane, the health check of the ovn-cental container always fails as it queries the cluster/status.
This commit is contained in:
parent
fc0d58ff48
commit
9477255fca
3 changed files with 13 additions and 4 deletions
|
@ -28,8 +28,13 @@ kube_ovn_dpdk_node_memory_request: 2Gi
|
||||||
kube_ovn_dpdk_node_cpu_limit: 1000m
|
kube_ovn_dpdk_node_cpu_limit: 1000m
|
||||||
kube_ovn_dpdk_node_memory_limit: 2Gi
|
kube_ovn_dpdk_node_memory_limit: 2Gi
|
||||||
|
|
||||||
kube_ovn_central_replics: 1
|
kube_ovn_central_hosts: "{{ groups['kube_control_plane'] }}"
|
||||||
kube_ovn_controller_replics: 1
|
kube_ovn_central_replics: "{{ kube_ovn_central_hosts | length }}"
|
||||||
|
kube_ovn_controller_replics: "{{ kube_ovn_central_hosts | length }}"
|
||||||
|
kube_ovn_central_ips: |-
|
||||||
|
{% for item in kube_ovn_central_hosts -%}
|
||||||
|
{{ hostvars[item]['ip'] | default(fallback_ips[item]) }}{% if not loop.last %},{% endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
# geneve or vlan
|
# geneve or vlan
|
||||||
kube_ovn_network_type: geneve
|
kube_ovn_network_type: geneve
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: Kube-OVN | Label ovn-db node
|
- name: Kube-OVN | Label ovn-db node
|
||||||
command: >-
|
command: "{{ kubectl }} label --overwrite node {{ item }} kube-ovn/role=master"
|
||||||
{{ kubectl }} label --overwrite node {{ groups['kube_control_plane'] | first }} kube-ovn/role=master
|
loop: "{{ kube_ovn_central_hosts }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['kube_control_plane'][0]
|
- inventory_hostname == groups['kube_control_plane'][0]
|
||||||
|
|
||||||
|
|
|
@ -249,6 +249,8 @@ spec:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: status.podIP
|
fieldPath: status.podIP
|
||||||
|
- name: NODE_IPS
|
||||||
|
value: "{{ kube_ovn_central_ips }}"
|
||||||
- name: POD_NAME
|
- name: POD_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
|
@ -386,6 +388,8 @@ spec:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: spec.nodeName
|
fieldPath: spec.nodeName
|
||||||
|
- name: OVN_DB_IPS
|
||||||
|
value: "{{ kube_ovn_central_ips }}"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /var/run/netns
|
- mountPath: /var/run/netns
|
||||||
name: host-ns
|
name: host-ns
|
||||||
|
|
Loading…
Reference in a new issue