@Override
    public boolean validate(WorkflowContext context) throws HyscaleException {

        if (clusterValidationMap.containsKey(context.getAuthConfig())) {
            return clusterValidationMap.get(context.getAuthConfig());
        }
        long startTime = System.currentTimeMillis();
        boolean isClusterValid = false;
        logger.debug("Starting K8s cluster validation");
        try {
            isClusterValid = deployer.authenticate(context.getAuthConfig());
            clusterValidationMap.put(context.getAuthConfig(), isClusterValid);
        } catch (HyscaleException ex) {
            logger.error("Error while validating cluster", ex);
            clusterValidationMap.put(context.getAuthConfig(), false);
            throw ex;
        } finally {
            if (!isClusterValid) {
                WorkflowLogger.persist(ValidatorActivity.CLUSTER_AUTHENTICATION_FAILED, LoggerTags.ERROR);
                if(WorkflowLogger.isDisabled()){
                    outputHandler.addErrorMessage(CommonErrorCode.FAILED_TO_CONNECT_TO_CLUSTER.getMessage());
                }
            }
        }
        logger.debug("Is K8s cluster valid: {}. Time taken: {}", isClusterValid, System.currentTimeMillis() - startTime);
        return isClusterValid;
    }
Validate cluster information using {@link AuthConfig}
provided by {@link WorkflowContext}
Checks if access to cluster is allowed.
workflow-controller/controller-service/src/main/java/io/hyscale/controller/validator/impl/ClusterValidator.java