@Override
    public boolean validate(WorkflowContext workflowContext) throws HyscaleException {
        logger.debug("Validating load balancer details from the service spec");
        ServiceSpec serviceSpec = workflowContext.getServiceSpec();
        TypeReference<LoadBalancer> loadBalancerTypeReference = new TypeReference<LoadBalancer>() {
        };

        LoadBalancer loadBalancer = serviceSpec.get(HyscaleSpecFields.loadBalancer, loadBalancerTypeReference);
        if (loadBalancer != null) {
            if (!validateMandatoryFields(loadBalancer)) {
                return false;
            }
            if (!portValidation(serviceSpec, loadBalancer)) {
                return false;
            }
            if (!checkForExternalTrue(serviceSpec)) {
                return false;
            }
        }
        return true;
    }
Checks for the required mandatory fields.
Checks for Ports mismatch
Checks for external true.
@param workflowContext
@return
@throws HyscaleException
workflow-controller/controller-service/src/main/java/io/hyscale/controller/validator/impl/LoadBalancerValidator.java