Search in sources :

Example 6 with ConfigProblemSetBuilder

use of com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder in project halyard by spinnaker.

the class GoogleBaseImageValidator method validate.

@Override
public void validate(ConfigProblemSetBuilder p, GoogleBaseImage n) {
    String sourceImage = n.getVirtualizationSettings().getSourceImage();
    String sourceImageFamily = n.getVirtualizationSettings().getSourceImageFamily();
    if (StringUtils.isEmpty(sourceImage) && StringUtils.isEmpty(sourceImageFamily)) {
        p.addProblem(Problem.Severity.ERROR, "Either source image or source image family must be specified for " + n.getBaseImage().getId() + ".");
    }
    if (!StringUtils.isEmpty(sourceImage)) {
        int i = 0;
        boolean[] foundSourceImageHolder = new boolean[1];
        while (!foundSourceImageHolder[0] && i < credentialsList.size()) {
            GoogleNamedAccountCredentials credentials = credentialsList.get(i);
            List<String> imageProjects = Lists.newArrayList(credentials.getProject());
            imageProjects.addAll(credentials.getImageProjects());
            imageProjects.addAll(baseImageProjects);
            Compute compute = credentials.getCompute();
            BatchRequest imageListBatch = buildBatchRequest(compute);
            JsonBatchCallback<ImageList> imageListCallback = new JsonBatchCallback<ImageList>() {

                @Override
                public void onFailure(GoogleJsonError e, HttpHeaders responseHeaders) throws IOException {
                    p.addProblem(Problem.Severity.ERROR, "Error locating " + sourceImage + " in these projects: " + imageProjects + ": " + e.getMessage() + ".");
                }

                @Override
                public void onSuccess(ImageList imageList, HttpHeaders responseHeaders) throws IOException {
                    // No need to look through these images if the requested image was already found.
                    if (!foundSourceImageHolder[0]) {
                        if (imageList.getItems() != null) {
                            foundSourceImageHolder[0] = imageList.getItems().stream().filter(image -> image.getName().equals(sourceImage)).findFirst().isPresent();
                        }
                    }
                }
            };
            try {
                for (String imageProject : imageProjects) {
                    compute.images().list(imageProject).queue(imageListBatch, imageListCallback);
                }
                imageListBatch.execute();
            } catch (IOException e) {
                p.addProblem(Problem.Severity.ERROR, "Error locating " + sourceImage + " in these projects: " + imageProjects + ": " + e.getMessage() + ".");
            }
            i++;
        }
        if (!foundSourceImageHolder[0]) {
            p.addProblem(Problem.Severity.ERROR, "Image " + sourceImage + " not found via any configured google account.");
        }
    }
    if (!StringUtils.isEmpty(sourceImageFamily)) {
        int i = 0;
        boolean[] foundSourceImageFamilyHolder = new boolean[1];
        while (!foundSourceImageFamilyHolder[0] && i < credentialsList.size()) {
            GoogleNamedAccountCredentials credentials = credentialsList.get(i);
            List<String> imageProjects = Lists.newArrayList(credentials.getProject());
            imageProjects.addAll(credentials.getImageProjects());
            imageProjects.addAll(baseImageProjects);
            Compute compute = credentials.getCompute();
            BatchRequest imageListBatch = buildBatchRequest(compute);
            JsonBatchCallback<ImageList> imageListCallback = new JsonBatchCallback<ImageList>() {

                @Override
                public void onFailure(GoogleJsonError e, HttpHeaders responseHeaders) throws IOException {
                    p.addProblem(Problem.Severity.ERROR, "Error locating " + sourceImageFamily + " in these projects: " + imageProjects + ": " + e.getMessage() + ".");
                }

                @Override
                public void onSuccess(ImageList imageList, HttpHeaders responseHeaders) throws IOException {
                    // No need to look through these images if the requested image family was already found.
                    if (!foundSourceImageFamilyHolder[0]) {
                        if (imageList.getItems() != null) {
                            foundSourceImageFamilyHolder[0] = imageList.getItems().stream().filter(image -> sourceImageFamily.equals(image.getFamily())).findFirst().isPresent();
                        }
                    }
                }
            };
            try {
                for (String imageProject : imageProjects) {
                    compute.images().list(imageProject).queue(imageListBatch, imageListCallback);
                }
                imageListBatch.execute();
            } catch (IOException e) {
                p.addProblem(Problem.Severity.ERROR, "Error locating " + sourceImageFamily + " in these projects: " + imageProjects + ": " + e.getMessage() + ".");
            }
            i++;
        }
        if (!foundSourceImageFamilyHolder[0]) {
            p.addProblem(Problem.Severity.ERROR, "Image family " + sourceImageFamily + " not found via any configured google account.");
        }
    }
    if (StringUtils.isEmpty(n.getBaseImage().getPackageType())) {
        p.addProblem(Problem.Severity.ERROR, "Package type must be specified for " + n.getBaseImage().getId() + ".");
    }
}
Also used : GoogleNamedAccountCredentials(com.netflix.spinnaker.clouddriver.google.security.GoogleNamedAccountCredentials) HttpHeaders(com.google.api.client.http.HttpHeaders) GoogleJsonError(com.google.api.client.googleapis.json.GoogleJsonError) GoogleBaseImage(com.netflix.spinnaker.halyard.config.model.v1.providers.google.GoogleBaseImage) IOException(java.io.IOException) HttpRequest(com.google.api.client.http.HttpRequest) ImageList(com.google.api.services.compute.model.ImageList) EqualsAndHashCode(lombok.EqualsAndHashCode) ConfigProblemSetBuilder(com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder) List(java.util.List) Lists(com.google.common.collect.Lists) Validator(com.netflix.spinnaker.halyard.config.model.v1.node.Validator) Data(lombok.Data) Problem(com.netflix.spinnaker.halyard.core.problem.v1.Problem) JsonBatchCallback(com.google.api.client.googleapis.batch.json.JsonBatchCallback) BatchRequest(com.google.api.client.googleapis.batch.BatchRequest) Compute(com.google.api.services.compute.Compute) StringUtils(org.springframework.util.StringUtils) BatchRequest(com.google.api.client.googleapis.batch.BatchRequest) HttpHeaders(com.google.api.client.http.HttpHeaders) JsonBatchCallback(com.google.api.client.googleapis.batch.json.JsonBatchCallback) IOException(java.io.IOException) GoogleNamedAccountCredentials(com.netflix.spinnaker.clouddriver.google.security.GoogleNamedAccountCredentials) ImageList(com.google.api.services.compute.model.ImageList) Compute(com.google.api.services.compute.Compute) GoogleJsonError(com.google.api.client.googleapis.json.GoogleJsonError)

Example 7 with ConfigProblemSetBuilder

use of com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder in project halyard by spinnaker.

the class KubernetesAccountValidator method validateKubeconfig.

private void validateKubeconfig(ConfigProblemSetBuilder psBuilder, KubernetesAccount account) {
    io.fabric8.kubernetes.api.model.Config kubeconfig;
    String context = account.getContext();
    String kubeconfigFile = account.getKubeconfigFile();
    String cluster = account.getCluster();
    String user = account.getUser();
    List<String> namespaces = account.getNamespaces();
    List<String> omitNamespaces = account.getOmitNamespaces();
    // This indicates if a first pass at the config looks OK. If we don't see any serious problems, we'll do one last check
    // against the requested kubernetes cluster to ensure that we can run spinnaker.
    boolean smoketest = true;
    boolean namespacesProvided = namespaces != null && !namespaces.isEmpty();
    boolean omitNamespacesProvided = omitNamespaces != null && !omitNamespaces.isEmpty();
    if (namespacesProvided && omitNamespacesProvided) {
        psBuilder.addProblem(ERROR, "At most one of \"namespaces\" and \"omitNamespaces\" can be supplied.");
        smoketest = false;
    }
    // TODO(lwander) find a good resource / list of resources for generating kubeconfig files to link to here.
    try {
        if (ValidatingFileReader.contents(psBuilder, kubeconfigFile) == null) {
            return;
        }
        File kubeconfigFileOpen = new File(kubeconfigFile);
        kubeconfig = KubeConfigUtils.parseConfig(kubeconfigFileOpen);
    } catch (IOException e) {
        psBuilder.addProblem(ERROR, e.getMessage());
        return;
    }
    System.out.println(context);
    if (context != null && !context.isEmpty()) {
        Optional<NamedContext> namedContext = kubeconfig.getContexts().stream().filter(c -> c.getName().equals(context)).findFirst();
        if (!namedContext.isPresent()) {
            psBuilder.addProblem(ERROR, "Context \"" + context + "\" not found in kubeconfig \"" + kubeconfigFile + "\".", "context").setRemediation("Either add this context to your kubeconfig, rely on the default context, or pick another kubeconfig file.");
            smoketest = false;
        }
    } else {
        String currentContext = kubeconfig.getCurrentContext();
        if (StringUtils.isEmpty(currentContext)) {
            psBuilder.addProblem(ERROR, "You have not specified a Kubernetes context, and your kubeconfig \"" + kubeconfigFile + "\" has no current-context.", "context").setRemediation("Either specify a context in your halconfig, or set a current-context in your kubeconfig.");
            smoketest = false;
        } else {
            psBuilder.addProblem(WARNING, "You have not specified a Kubernetes context in your halconfig, Spinnaker will use \"" + currentContext + "\" instead.", "context").setRemediation("We recommend explicitly setting a context in your halconfig, to ensure changes to your kubeconfig won't break your deployment.");
        }
    }
    if (smoketest) {
        Config config = KubernetesConfigParser.parse(kubeconfigFile, context, cluster, user, namespaces, false);
        try {
            KubernetesClient client = new DefaultKubernetesClient(config);
            client.namespaces().list();
        } catch (Exception e) {
            ConfigProblemBuilder pb = psBuilder.addProblem(ERROR, "Unable to communicate with your Kubernetes cluster: " + e.getMessage() + ".");
            if (e.getMessage().contains("Token may have expired")) {
                pb.setRemediation("If you downloaded these keys with gcloud, it's possible they are in the wrong format. To fix this, run \n\n" + "gcloud config set container/use_client_certificate true\n\ngcloud container clusters get-credentials $CLUSTERNAME");
            } else {
                pb.setRemediation("Unable to authenticate with your Kubernetes cluster. Try using kubectl to verify your credentials.");
            }
        }
    }
}
Also used : KubernetesAccount(com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount) ConfigProblemSetBuilder(com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder) StringUtils(org.apache.commons.lang3.StringUtils) DaemonTaskHandler(com.netflix.spinnaker.halyard.core.tasks.v1.DaemonTaskHandler) WARNING(com.netflix.spinnaker.halyard.core.problem.v1.Problem.Severity.WARNING) CollectionUtils(org.apache.commons.collections.CollectionUtils) JobExecutor(com.netflix.spinnaker.halyard.core.job.v1.JobExecutor) KubernetesConfigParser(com.netflix.spinnaker.clouddriver.kubernetes.v1.security.KubernetesConfigParser) Validator(com.netflix.spinnaker.halyard.config.model.v1.node.Validator) KubeConfigUtils(io.fabric8.kubernetes.client.internal.KubeConfigUtils) NamedContext(io.fabric8.kubernetes.api.model.NamedContext) Provider(com.netflix.spinnaker.halyard.config.model.v1.node.Provider) DefaultKubernetesClient(io.fabric8.kubernetes.client.DefaultKubernetesClient) DockerRegistryReference(com.netflix.spinnaker.halyard.config.model.v1.providers.containers.DockerRegistryReference) JobRequest(com.netflix.spinnaker.halyard.core.job.v1.JobRequest) ERROR(com.netflix.spinnaker.halyard.core.problem.v1.Problem.Severity.ERROR) IOException(java.io.IOException) DeploymentConfiguration(com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration) Collectors(java.util.stream.Collectors) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) ConfigProblemBuilder(com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemBuilder) Config(io.fabric8.kubernetes.client.Config) Component(org.springframework.stereotype.Component) List(java.util.List) FATAL(com.netflix.spinnaker.halyard.core.problem.v1.Problem.Severity.FATAL) DockerRegistryReferenceValidation.validateDockerRegistries(com.netflix.spinnaker.halyard.config.validate.v1.providers.dockerRegistry.DockerRegistryReferenceValidation.validateDockerRegistries) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) Optional(java.util.Optional) ValidatingFileReader(com.netflix.spinnaker.halyard.config.validate.v1.util.ValidatingFileReader) DaemonTaskInterrupted(com.netflix.spinnaker.halyard.core.tasks.v1.DaemonTaskInterrupted) Node(com.netflix.spinnaker.halyard.config.model.v1.node.Node) JobStatus(com.netflix.spinnaker.halyard.core.job.v1.JobStatus) Collections(java.util.Collections) DefaultKubernetesClient(io.fabric8.kubernetes.client.DefaultKubernetesClient) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) NamedContext(io.fabric8.kubernetes.api.model.NamedContext) Config(io.fabric8.kubernetes.client.Config) IOException(java.io.IOException) IOException(java.io.IOException) ConfigProblemBuilder(com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemBuilder) DefaultKubernetesClient(io.fabric8.kubernetes.client.DefaultKubernetesClient) File(java.io.File)

Example 8 with ConfigProblemSetBuilder

use of com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder in project halyard by spinnaker.

the class AppengineAccountValidator method validate.

@Override
public void validate(ConfigProblemSetBuilder p, AppengineAccount account) {
    String jsonKey = null;
    String jsonPath = account.getJsonPath();
    String project = account.getProject();
    String knownHostsPath = account.getSshKnownHostsFilePath();
    AppengineNamedAccountCredentials credentials = null;
    boolean hasPassword = account.getGitHttpsPassword() != null;
    boolean hasUsername = account.getGitHttpsUsername() != null && !account.getGitHttpsUsername().isEmpty();
    if (hasPassword != hasUsername) {
        if (!hasUsername) {
            p.addProblem(Severity.ERROR, "Git HTTPS password supplied without git HTTPS username.");
        } else {
            p.addProblem(Severity.ERROR, "Git HTTPS username supplied without git HTTPS password.");
        }
    }
    boolean hasSshPrivateKeyPassphrase = account.getSshPrivateKeyPassphrase() != null;
    boolean hasSshPrivateKeyFilePath = account.getSshPrivateKeyFilePath() != null && !account.getSshPrivateKeyFilePath().isEmpty();
    if (hasSshPrivateKeyPassphrase != hasSshPrivateKeyFilePath) {
        if (!hasSshPrivateKeyFilePath) {
            p.addProblem(Severity.ERROR, "SSH private key passphrase supplied without SSH private key filepath.");
        } else {
            p.addProblem(Severity.ERROR, "SSH private key filepath supplied without SSH private key passphrase.");
        }
    } else if (hasSshPrivateKeyPassphrase && hasSshPrivateKeyFilePath) {
        String sshPrivateKey = ValidatingFileReader.contents(p, account.getSshPrivateKeyFilePath());
        if (sshPrivateKey == null) {
            return;
        } else if (sshPrivateKey.isEmpty()) {
            p.addProblem(Severity.WARNING, "The supplied SSH private key file is empty.");
        } else {
            try {
                // Assumes that the public key is sitting next to the private key with the extension ".pub".
                KeyPair keyPair = KeyPair.load(new JSch(), account.getSshPrivateKeyFilePath());
                boolean decrypted = keyPair.decrypt(account.getSshPrivateKeyPassphrase());
                if (!decrypted) {
                    p.addProblem(Severity.ERROR, "Could not unlock SSH public/private keypair with supplied passphrase.");
                }
            } catch (JSchException e) {
                p.addProblem(Severity.ERROR, "Could not unlock SSH public/private keypair: " + e.getMessage() + ".");
            }
        }
    }
    if (knownHostsPath != null && !knownHostsPath.isEmpty()) {
        String knownHosts = ValidatingFileReader.contents(p, knownHostsPath);
        if (knownHosts == null) {
            return;
        }
        if (knownHosts.isEmpty()) {
            p.addProblem(Severity.WARNING, "The supplied known_hosts file is empty.");
        }
    }
    if (jsonPath != null && !jsonPath.isEmpty()) {
        jsonKey = ValidatingFileReader.contents(p, account.getJsonPath());
        if (jsonKey == null) {
            return;
        }
        if (jsonKey.isEmpty()) {
            p.addProblem(Severity.WARNING, "The supplied credentials file is empty.");
        }
    }
    if (jsonPath != null && !jsonPath.isEmpty() && account.isSshTrustUnknownHosts()) {
        p.addProblem(Severity.WARNING, "You have supplied a known_hosts file path and set the `--ssh-trust-unknown-hosts` flag to true." + " Spinnaker will ignore your `--ssh-trust-unknown-hosts` flag.").setRemediation("Run `--ssh-trust-unknown-hosts false`.");
    }
    if (account.getProject() == null || account.getProject().isEmpty()) {
        p.addProblem(Severity.ERROR, "No appengine project supplied.");
        return;
    }
    try {
        credentials = new AppengineNamedAccountCredentials.Builder().jsonKey(jsonKey).project(project).region("halyard").applicationName("halyard " + halyardVersion).build();
    } catch (Exception e) {
        p.addProblem(Severity.ERROR, "Error instantiating appengine credentials: " + e.getMessage() + ".");
        return;
    }
    try {
        credentials.getAppengine().apps().get(project).execute();
    } catch (GoogleJsonResponseException e) {
        if (e.getStatusCode() == 404) {
            p.addProblem(Severity.ERROR, "No appengine application found for project " + project + ".").setRemediation("Run `gcloud app create --region <region>` to create an appengine application.");
        } else {
            p.addProblem(Severity.ERROR, "Failed to connect to appengine Admin API: " + e.getMessage() + ".");
        }
    } catch (Exception e) {
        p.addProblem(Severity.ERROR, "Failed to connect to appengine Admin API: " + e.getMessage() + ".");
    }
}
Also used : JSchException(com.jcraft.jsch.JSchException) GoogleJsonResponseException(com.google.api.client.googleapis.json.GoogleJsonResponseException) KeyPair(com.jcraft.jsch.KeyPair) ConfigProblemSetBuilder(com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder) AppengineNamedAccountCredentials(com.netflix.spinnaker.clouddriver.appengine.security.AppengineNamedAccountCredentials) JSch(com.jcraft.jsch.JSch) GoogleJsonResponseException(com.google.api.client.googleapis.json.GoogleJsonResponseException) JSchException(com.jcraft.jsch.JSchException)

Example 9 with ConfigProblemSetBuilder

use of com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder in project halyard by spinnaker.

the class DCOSAccountValidator method validateClusters.

private void validateClusters(final ConfigProblemSetBuilder problems, final DCOSAccount account) {
    final NodeIterator children = account.getParent().getChildren();
    Node n = children.getNext();
    Set<String> definedClusters = new HashSet<>();
    while (n != null) {
        if (n instanceof DCOSCluster) {
            definedClusters.add(((DCOSCluster) n).getName());
        }
        n = children.getNext();
    }
    final Set<String> accountClusters = account.getClusters().stream().map(c -> c.getName()).collect(Collectors.toSet());
    accountClusters.removeAll(definedClusters);
    accountClusters.forEach(c -> problems.addProblem(ERROR, "Cluster \"" + c.toString() + "\" not defined for provider").setRemediation("Add cluster to the provider or remove from the account").setOptions(Lists.newArrayList(definedClusters)));
    Set<List<String>> credentials = new HashSet<>();
    account.getClusters().forEach(c -> {
        final List<String> key = Lists.newArrayList(c.getName(), c.getUid());
        if (credentials.contains(key)) {
            problems.addProblem(ERROR, "Account contains duplicate credentials for cluster \"" + c.getName() + "\" and user id \"" + c.getUid() + "\".").setRemediation("Remove the duplicate credentials");
        } else {
            credentials.add(key);
        }
        // we can connect without a password
        if (Strings.isStringEmpty(c.getPassword()) && Strings.isStringEmpty(c.getServiceKeyFile())) {
            problems.addProblem(WARNING, "Account has no password or service key.  Unless the cluster has security disabled this may be an error").setRemediation("Add a password or service key.");
        }
        if (!Strings.isStringEmpty(c.getPassword()) && !Strings.isStringEmpty(c.getServiceKeyFile())) {
            problems.addProblem(ERROR, "Account has both a password and service key").setRemediation("Remove either the password or service key.");
        }
        if (!Strings.isStringEmpty(c.getServiceKeyFile())) {
            String resolvedServiceKey = ValidatingFileReader.contents(problems, c.getServiceKeyFile());
            if (Strings.isStringEmpty(resolvedServiceKey)) {
                problems.addProblem(ERROR, "The supplied service key file does not exist or is empty.").setRemediation("Supply a valid service key file.");
            }
        }
    });
}
Also used : NodeIterator(com.netflix.spinnaker.halyard.config.model.v1.node.NodeIterator) DockerRegistryReference(com.netflix.spinnaker.halyard.config.model.v1.providers.containers.DockerRegistryReference) NodeIterator(com.netflix.spinnaker.halyard.config.model.v1.node.NodeIterator) Set(java.util.Set) ERROR(com.netflix.spinnaker.halyard.core.problem.v1.Problem.Severity.ERROR) Lists(com.beust.jcommander.internal.Lists) DeploymentConfiguration(com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration) ConfigProblemSetBuilder(com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder) Collectors(java.util.stream.Collectors) HashSet(java.util.HashSet) DCOSAccount(com.netflix.spinnaker.halyard.config.model.v1.providers.dcos.DCOSAccount) Component(org.springframework.stereotype.Component) List(java.util.List) WARNING(com.netflix.spinnaker.halyard.core.problem.v1.Problem.Severity.WARNING) Strings(com.beust.jcommander.Strings) Validator(com.netflix.spinnaker.halyard.config.model.v1.node.Validator) DockerRegistryReferenceValidation.validateDockerRegistries(com.netflix.spinnaker.halyard.config.validate.v1.providers.dockerRegistry.DockerRegistryReferenceValidation.validateDockerRegistries) DCOSCluster(com.netflix.spinnaker.halyard.config.model.v1.providers.dcos.DCOSCluster) ValidatingFileReader(com.netflix.spinnaker.halyard.config.validate.v1.util.ValidatingFileReader) Provider(com.netflix.spinnaker.halyard.config.model.v1.node.Provider) Node(com.netflix.spinnaker.halyard.config.model.v1.node.Node) Node(com.netflix.spinnaker.halyard.config.model.v1.node.Node) List(java.util.List) DCOSCluster(com.netflix.spinnaker.halyard.config.model.v1.providers.dcos.DCOSCluster) HashSet(java.util.HashSet)

Example 10 with ConfigProblemSetBuilder

use of com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder in project halyard by spinnaker.

the class OptionsService method options.

public <T extends Node> FieldOptions options(NodeFilter filter, Class<T> nodeClass, String field) {
    ConfigProblemSetBuilder problemSetBuilder = new ConfigProblemSetBuilder(applicationContext);
    List<T> nodes = lookupService.getMatchingNodesOfType(filter, nodeClass);
    List<String> options = nodes.stream().map(n -> {
        problemSetBuilder.setNode(n);
        return n.fieldOptions(problemSetBuilder, field);
    }).reduce(new ArrayList<>(), (a, b) -> {
        a.addAll(b);
        return a;
    });
    return new FieldOptions().setOptions(options).setProblemSet(problemSetBuilder.build());
}
Also used : Component(org.springframework.stereotype.Component) List(java.util.List) Data(lombok.Data) DaemonResponse(com.netflix.spinnaker.halyard.core.DaemonResponse) Autowired(org.springframework.beans.factory.annotation.Autowired) Node(com.netflix.spinnaker.halyard.config.model.v1.node.Node) ProblemSet(com.netflix.spinnaker.halyard.core.problem.v1.ProblemSet) ConfigProblemSetBuilder(com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder) ApplicationContext(org.springframework.context.ApplicationContext) NodeFilter(com.netflix.spinnaker.halyard.config.model.v1.node.NodeFilter) ArrayList(java.util.ArrayList) ConfigProblemSetBuilder(com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder)

Aggregations

ConfigProblemSetBuilder (com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemSetBuilder)11 List (java.util.List)6 Validator (com.netflix.spinnaker.halyard.config.model.v1.node.Validator)5 Component (org.springframework.stereotype.Component)4 DeploymentConfiguration (com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration)3 Node (com.netflix.spinnaker.halyard.config.model.v1.node.Node)3 ConfigProblemBuilder (com.netflix.spinnaker.halyard.config.problem.v1.ConfigProblemBuilder)3 ValidatingFileReader (com.netflix.spinnaker.halyard.config.validate.v1.util.ValidatingFileReader)3 Problem (com.netflix.spinnaker.halyard.core.problem.v1.Problem)3 Collectors (java.util.stream.Collectors)3 Data (lombok.Data)3 StringUtils (org.apache.commons.lang3.StringUtils)3 GoogleNamedAccountCredentials (com.netflix.spinnaker.clouddriver.google.security.GoogleNamedAccountCredentials)2 Provider (com.netflix.spinnaker.halyard.config.model.v1.node.Provider)2 DockerRegistryReference (com.netflix.spinnaker.halyard.config.model.v1.providers.containers.DockerRegistryReference)2 DockerRegistryReferenceValidation.validateDockerRegistries (com.netflix.spinnaker.halyard.config.validate.v1.providers.dockerRegistry.DockerRegistryReferenceValidation.validateDockerRegistries)2 ERROR (com.netflix.spinnaker.halyard.core.problem.v1.Problem.Severity.ERROR)2 WARNING (com.netflix.spinnaker.halyard.core.problem.v1.Problem.Severity.WARNING)2 File (java.io.File)2 IOException (java.io.IOException)2