Open cybercoder opened 2 days ago
The issue you're experiencing, where the ovn.kubernetes.io/external-gw
node label resets to false
after a restart of the kube-ovn-controller
, is not directly addressed in the available documentation or codebase information. However, this behavior suggests that the label might not be persisted correctly across restarts.
Here are a few steps you can consider to troubleshoot and potentially resolve this issue:
Check Controller Logs: Review the logs of the kube-ovn-controller
for any messages related to node label changes during startup. This might provide insights into why the label is being reset.
Configuration Review: Ensure that there are no configurations or scripts that might be resetting the label on startup. This could include any automation tools or scripts that manage node configurations.
Kubernetes Events: Check Kubernetes events for any actions related to node label changes. This might help identify if there is an external factor causing the label reset.
Persistence Mechanism: If the label is critical for your setup, consider implementing a mechanism to reapply the label automatically after a restart. This could be done using a Kubernetes operator or a startup script.
Version Check: Ensure that you are using the latest stable version of Kube-OVN, as there might be bug fixes or improvements related to label handling in newer versions.
If these steps do not resolve the issue, further investigation into the specific behavior of the kube-ovn-controller
regarding node labels might be necessary.
To continue talking to Dosu, mention @dosu.
@dosu
I have used this workaround, after reviewing the code:
apiVersion: v1
kind: ConfigMap
metadata:
name: ovn-external-gw-config
namespace: kube-system
data:
type: "distributed"
enable-external-gw: "true"
Is it ok?
@cybercoder Yes, I think you need this configmap and set enable-external-gw
to true
Kube-OVN Version
v1.12.28
Kubernetes Version
v1.30.6+k3s1
Operation-system/Kernel Version
not important
Description
These are my configs:
Steps To Reproduce
Current Behavior
Reset the node label to false and all OEIP,OFIP and pings get down. We must set all labels for nodes and restart it again.
Expected Behavior
detect the situation!
dirty workaround:
A cronjob: