Java Code Examples for io.fabric8.kubernetes.api.model.IntOrString#getStrVal()
The following examples show how to use
io.fabric8.kubernetes.api.model.IntOrString#getStrVal() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultServiceEnricher.java From jkube with Eclipse Public License 2.0 | 5 votes |
private String getPortValue(IntOrString port) { String val = port.getStrVal(); if (val == null) { val = Integer.toString(port.getIntVal()); } return val; }
Example 2
Source File: Routes.java From che with Eclipse Public License 2.0 | 5 votes |
private static boolean matchesPort(ServicePort servicePort, IntOrString routePort) { if (routePort.getStrVal() != null && routePort.getStrVal().equals(servicePort.getName())) { return true; } if (routePort.getIntVal() != null && routePort.getIntVal().equals(servicePort.getPort())) { return true; } return false; }
Example 3
Source File: Ingresses.java From che with Eclipse Public License 2.0 | 5 votes |
private static boolean matchesServicePort(IntOrString backendPort, ServicePort servicePort) { if (backendPort.getStrVal() != null && backendPort.getStrVal().equals(servicePort.getName())) { return true; } if (backendPort.getIntVal() != null && backendPort.getIntVal().equals(servicePort.getPort())) { return true; } return false; }