OCPBUGS-55962: Provide config map to force loose isolation for UDN networks#2714
OCPBUGS-55962: Provide config map to force loose isolation for UDN networks#2714pperiyasamy wants to merge 1 commit intoopenshift:masterfrom
Conversation
This commit provides support for configuring loose isolation mode for the BGP advertised UDN networks. The config map with name openshift-network-operator/udn-config-overrides must be created with "force-loose-isolation" key set to "true" which rolls out the loose mode by recreating ovnkube-node daemonset pods. Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pperiyasamy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@pperiyasamy: This pull request references Jira Issue OCPBUGS-55962, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest |
|
/retest |
|
@pperiyasamy: This pull request references Jira Issue OCPBUGS-55962, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/assign @Meina-rh @anuragthehatter @jechen0648 |
|
@pperiyasamy: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
arkadeepsen
left a comment
There was a problem hiding this comment.
Overall looks good apart from the minor comments. Do we have e2e tests for this feature in the origin repo?
| // If the configmap doesn't exist, it returns false (the UDN isolation is protected by default). | ||
| func isLooseUDNIsolationEnabled(client cnoclient.Client) (bool, error) { | ||
| configMap := &corev1.ConfigMap{} | ||
| if err := client.ClientFor("").CRClient().Get(context.TODO(), |
There was a problem hiding this comment.
| if err := client.ClientFor("").CRClient().Get(context.TODO(), | |
| if err := client.Default().CRClient().Get(context.TODO(), |
| func isLooseUDNIsolationEnabled(client cnoclient.Client) (bool, error) { | ||
| configMap := &corev1.ConfigMap{} | ||
| if err := client.ClientFor("").CRClient().Get(context.TODO(), | ||
| types.NamespacedName{Name: "udn-config-overrides", Namespace: names.APPLIED_NAMESPACE}, configMap); err != nil { |
There was a problem hiding this comment.
Should udn-config-overrides be added as a constant? Then the constant can be used here.
There was a problem hiding this comment.
I was thinking if we should go more generic with the name and use ovn-kubernetes-config-overrides and this be a more generic getOVNKConfigOverrides returning a map. Just to prevent us from spreading on config map names.
There was a problem hiding this comment.
Can we just use the existing env-overrides configmap instead of creating a new configmap?
| ConsolePluginCRDExists bool | ||
|
|
||
| // LooseUDNIsolationModeEnabled set to true when loose isolation mode is enabled between two BGP advertised | ||
| // UDN networks. In loose isolation mode, those network pods can communicate with each other accoding to |
There was a problem hiding this comment.
| // UDN networks. In loose isolation mode, those network pods can communicate with each other accoding to | |
| // UDN networks. In loose isolation mode, those network pods can communicate with each other according to |
nit
| {{ if .IsLooseUDNIsolationEnabled }} | ||
| - name: UDN_ISOLATION_MODE | ||
| value: "loose" | ||
| {{ end }} |
There was a problem hiding this comment.
I don't think this matches what ovn-kubernetes/ovn-kubernetes@3dd6149 expects. The setting there is called
ROUTED_UDN_ISOLATION instead of UDN_ISOLATION_MODE. Also the values it takes are Disabled or Enabled not loose.
This should preferably be passed as a command line argument in script-lib rather than an environment variable for consistency.
I think UDN_ISOLATION_MODE is fine, I would probably use Strict and Loose for values rather than DisabledorEnabled`.
| return false, fmt.Errorf("unable to bootstrap OVN, unable to retrieve udn-config-overrides config: %s", err) | ||
| } | ||
| isLooseIsolationEnabled := configMap.Data["force-loose-isolation"] | ||
| return isLooseIsolationEnabled == "true", nil |
There was a problem hiding this comment.
Maybe just use the same key/value that we pass to ovnk for consistency? So UDNRoutedIsolationMode and Strict,Loose values? Any non expected value should return error.
| func isLooseUDNIsolationEnabled(client cnoclient.Client) (bool, error) { | ||
| configMap := &corev1.ConfigMap{} | ||
| if err := client.ClientFor("").CRClient().Get(context.TODO(), | ||
| types.NamespacedName{Name: "udn-config-overrides", Namespace: names.APPLIED_NAMESPACE}, configMap); err != nil { |
There was a problem hiding this comment.
I was thinking if we should go more generic with the name and use ovn-kubernetes-config-overrides and this be a more generic getOVNKConfigOverrides returning a map. Just to prevent us from spreading on config map names.
|
closing it in favor of #2752. |
|
@pperiyasamy: This pull request references Jira Issue OCPBUGS-55962. The bug has been updated to no longer refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
This PR adds support for configuring loose isolation mode for the BGP advertised UDN networks. The config map with name
openshift-network-operator/udn-config-overridesmust be created withforce-loose-isolationkey set totruewhich rolls out the loose mode by recreatingovnkube-nodedaemonset pods.Steps to roll out loose isolation mode: