components/global/core/io.cellery.observability.k8s.client/src/test/java/io/cellery/observability/k8s/client/BaseTestCase.java
Gateway generateGatewayTemplate(String host, List<HTTP> httpIngresses,
                                    List<TCP> tcpIngresses, List<GRPC> grpcIngresses) {
        ClusterIngress clusterIngress = new ClusterIngress();
        clusterIngress.setHost(host);
        Extensions gatewayExtensions = new Extensions();
        gatewayExtensions.setClusterIngress(clusterIngress);

        Ingress gatewayIngress = new Ingress();
        gatewayIngress.setExtensions(gatewayExtensions);
        gatewayIngress.setTcp(tcpIngresses);
        gatewayIngress.setHttp(httpIngresses);
        gatewayIngress.setGrpc(grpcIngresses);

        GatewaySpec gatewaySpec = new GatewaySpec();
        gatewaySpec.setIngress(gatewayIngress);

        Gateway gateway = new Gateway();
        gateway.setSpec(gatewaySpec);
        return gateway;
    }
/**
     * Generate a K8s Gateway Template Object.
     *
     * @param host The host added when used with a Web Ingress
     * @param httpIngresses The HTTP ingresses used by the gateway
     * @param tcpIngresses The TCP ingresses used by the gateway
     * @param grpcIngresses The gRPC ingresses
     * @return The generated Gateway Template
     */
Generate a K8s Gateway Template Object.
Generate a K8s Gateway Template Object .
Gateway generateGatewayTemplate(String host, List<HTTP> httpIngresses,
                                    List<TCP> tcpIngresses, List<GRPC> grpcIngresses) {
        ClusterIngress clusterIngress = new ClusterIngress();
        clusterIngress.setHost(host);
        Extensions gatewayExtensions = new Extensions();
        gatewayExtensions.setClusterIngress(clusterIngress);
        Ingress gatewayIngress = new Ingress();
        gatewayIngress.setExtensions(gatewayExtensions);
        gatewayIngress.setTcp(tcpIngresses);
        gatewayIngress.setHttp(httpIngresses);
        gatewayIngress.setGrpc(grpcIngresses);
        GatewaySpec gatewaySpec = new GatewaySpec();
        gatewaySpec.setIngress(gatewayIngress);
        Gateway gateway = new Gateway();
        gateway.setSpec(gatewaySpec);
        return gateway;
    }
Gateway generateGatewayTemplate ( String host , List < HTTP > httpIngresses , List < TCP > tcpIngresses , List < GRPC > grpcIngresses ) { ClusterIngress clusterIngress = new ClusterIngress ( ) ; clusterIngress . setHost ( host ) ; Extensions gatewayExtensions = new Extensions ( ) ; gatewayExtensions . setClusterIngress ( clusterIngress ) ; Ingress gatewayIngress = new Ingress ( ) ; gatewayIngress . setExtensions ( gatewayExtensions ) ; gatewayIngress . setTcp ( tcpIngresses ) ; gatewayIngress . setHttp ( httpIngresses ) ; gatewayIngress . setGrpc ( grpcIngresses ) ; GatewaySpec gatewaySpec = new GatewaySpec ( ) ; gatewaySpec . setIngress ( gatewayIngress ) ; Gateway gateway = new Gateway ( ) ; gateway . setSpec ( gatewaySpec ) ; return gateway ; }
Generate a K8s Gateway Template Object.
Generate a K8s Gateway Template Object .