components/global/core/io.cellery.observability.k8s.client/src/test/java/io/cellery/observability/k8s/client/BaseTestCase.java
Component generateServicesTemplate(String serviceName, String protocol) {
        Port port = new Port();
        port.setProtocol(protocol);

        ComponentSpec componentSpec = new ComponentSpec();
        componentSpec.setPorts(Collections.singletonList(port));

        Component component = new Component();
        component.setMetadata(new ObjectMetaBuilder()
                .withName(serviceName)
                .withCreationTimestamp(CREATION_TIMESTAMP_STRING)
                .build());
        component.setSpec(componentSpec);
        return component;
    }
/**
     * Generate a K8s Service Template Object.
     *
     * @param serviceName The name of the service
     * @param protocol    The protocol used by the service
     * @return The generated Service Template
     */
Generate a K8s Service Template Object.
@param serviceName The name of the service
@param protocol    The protocol used by the service
@return The generated Service Template
Generate a K8s Service Template Object . @param serviceName The name of the service @param protocol The protocol used by the service @return The generated Service Template
Component generateServicesTemplate(String serviceName, String protocol) {
        Port port = new Port();
        port.setProtocol(protocol);
        ComponentSpec componentSpec = new ComponentSpec();
        componentSpec.setPorts(Collections.singletonList(port));
        Component component = new Component();
        component.setMetadata(new ObjectMetaBuilder()
                .withName(serviceName)
                .withCreationTimestamp(CREATION_TIMESTAMP_STRING)
                .build());
        component.setSpec(componentSpec);
        return component;
    }
Component generateServicesTemplate ( String serviceName , String protocol ) { Port port = new Port ( ) ; port . setProtocol ( protocol ) ; ComponentSpec componentSpec = new ComponentSpec ( ) ; componentSpec . setPorts ( Collections . singletonList ( port ) ) ; Component component = new Component ( ) ; component . setMetadata ( new ObjectMetaBuilder ( ) . withName ( serviceName ) . withCreationTimestamp ( CREATION_TIMESTAMP_STRING ) . build ( ) ) ; component . setSpec ( componentSpec ) ; return component ; }
Generate a K8s Service Template Object.
Generate a K8s Service Template Object .