-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for OVN networking API (k8s.ovn.org/v1) for Openshift 4.12+ #5636
Comments
Is this OVN API enabled in OpenShift by default? Do I have to install some operator to add these resources? I'm not able to access these on OpenShift 4.13.12 (CRC). |
Our OpenShift rep recommended us to directly enable the OVN api when we starting building a new cluster, I think the migration process for existing clusters is detailed here: https://docs.openshift.com/container-platform/4.12/networking/ovn_kubernetes_network_provider/migrate-from-openshift-sdn.html |
I see. We would need to add support for these resources. As a workaround, you can try generating POJOs for OVN CRDs using Fabric8 Java Generator |
Could you please verify if by using the cluster bot to start an OVN variant cluster these types are enabled? |
closes: fabric8io#5636 Signed-off-by: Steve Hawkins <[email protected]>
Umm, yes I can see OVN types when I create a cluster using cluster bot:
|
@lherman-vd : It would be nice if you could provide some early feedback now that the functionality has been merged. I've created a demo project showcasing OVN networking extension. After the nightly SNAPSHOT build, you should be able to access <dependency>
<groupId>io.fabric8</groupId>
<artifactId>open-virtual-networking-client</artifactId>
<version>${fabric8.version}</version>
</dependency> Here is an example of sample usage: try (OpenVirtualNetworkingClient ovnClient = new KubernetesClientBuilder().build().adapt(OpenVirtualNetworkingClient.class)) {
EgressFirewall egressFirewall = new EgressFirewallBuilder()
.withNewMetadata()
.withName("default")
// ...
.build();
egressFirewall = ovnClient.v1().egressFirewalls().resource(egressFirewall).serverSideApply();
egressFirewall = ovnClient.v1().egressFirewalls().resource(egressFirewall).get();
System.out.println(egressFirewall.getMetadata().getName() + " Created");
} |
Apologies, I was on holiday the past few weeks. |
Is your enhancement related to a problem? Please describe
Since OpenShift switched their recommended networking API to the OVN stack (meaning they removed the old
network.openshift.io/v1
endpoints likenetwork.openshift.io/v1/NetNamespaces
andnetwork.openshift.io/v1/EgressFirewall
) we can't use the provided DSL methods from openshift-client anymore in the clusters that have migrated to the new stack.Describe the solution you'd like
It'd be nice to add the
k8s.ovn.org/v1
APIs to the built-in DSL for openshift-client so that we can reference to either APIs depending on the cluster version and capabilities.Describe alternatives you've considered
I'm using the typeless API for now but it's verbose and hard to maintain.
Additional context
API docs for OVN:
The text was updated successfully, but these errors were encountered: