Search in sources :

Example 1 with KubernetesAccount

use of com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount in project halyard by spinnaker.

the class KubernetesV1DistributedService method getServerGroupDescription.

default Map<String, Object> getServerGroupDescription(AccountDeploymentDetails<KubernetesAccount> details, SpinnakerRuntimeSettings runtimeSettings, List<ConfigSource> configSources) {
    DeployKubernetesAtomicOperationDescription description = new DeployKubernetesAtomicOperationDescription();
    SpinnakerMonitoringDaemonService monitoringService = getMonitoringDaemonService();
    ServiceSettings settings = runtimeSettings.getServiceSettings(getService());
    DeploymentEnvironment deploymentEnvironment = details.getDeploymentConfiguration().getDeploymentEnvironment();
    String accountName = details.getAccount().getName();
    String namespace = getNamespace(settings);
    String name = getServiceName();
    Names parsedName = Names.parseName(name);
    description.setNamespace(namespace);
    description.setAccount(accountName);
    description.setApplication(parsedName.getApp());
    description.setStack(parsedName.getStack());
    description.setFreeFormDetails(parsedName.getDetail());
    List<KubernetesVolumeSource> volumeSources = new ArrayList<>();
    for (ConfigSource configSource : configSources) {
        KubernetesVolumeSource volumeSource = new KubernetesVolumeSource();
        volumeSource.setName(configSource.getId());
        volumeSource.setType(KubernetesVolumeSourceType.Secret);
        KubernetesSecretVolumeSource secretVolumeSource = new KubernetesSecretVolumeSource();
        secretVolumeSource.setSecretName(configSource.getId());
        volumeSource.setSecret(secretVolumeSource);
        volumeSources.add(volumeSource);
    }
    description.setVolumeSources(volumeSources);
    description.setPodAnnotations(settings.getKubernetes().getPodAnnotations());
    List<String> loadBalancers = new ArrayList<>();
    loadBalancers.add(name);
    description.setLoadBalancers(loadBalancers);
    List<KubernetesContainerDescription> containers = new ArrayList<>();
    ServiceSettings serviceSettings = runtimeSettings.getServiceSettings(getService());
    KubernetesContainerDescription container = buildContainer(name, serviceSettings, configSources, deploymentEnvironment, description);
    containers.add(container);
    ServiceSettings monitoringSettings = runtimeSettings.getServiceSettings(monitoringService);
    if (monitoringSettings.getEnabled() && serviceSettings.getMonitored()) {
        serviceSettings = runtimeSettings.getServiceSettings(monitoringService);
        container = buildContainer(monitoringService.getServiceName(), serviceSettings, configSources, deploymentEnvironment, description);
        containers.add(container);
    }
    description.setContainers(containers);
    return getObjectMapper().convertValue(description, new TypeReference<Map<String, Object>>() {
    });
}
Also used : DeploymentEnvironment(com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentEnvironment) DeployKubernetesAtomicOperationDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.DeployKubernetesAtomicOperationDescription) ServiceSettings(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceSettings) ArrayList(java.util.ArrayList) KubernetesVolumeSource(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesVolumeSource) Names(com.netflix.frigga.Names) ConfigSource(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ConfigSource) KubernetesContainerDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesContainerDescription) KubernetesSecretVolumeSource(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesSecretVolumeSource) SpinnakerMonitoringDaemonService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.SpinnakerMonitoringDaemonService) Map(java.util.Map) HashMap(java.util.HashMap)

Example 2 with KubernetesAccount

use of com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount in project halyard by spinnaker.

the class KubernetesAddAccountCommand method buildAccount.

@Override
protected Account buildAccount(String accountName) {
    KubernetesAccount account = (KubernetesAccount) new KubernetesAccount().setName(accountName);
    account.setContext(context);
    account.setKubeconfigFile(kubeconfigFile);
    account.setNamespaces(namespaces);
    account.setOmitNamespaces(omitNamespaces);
    account.setKinds(namespaces);
    account.setOmitKinds(omitKinds);
    account.setConfigureImagePullSecrets(configureImagePullSecrets);
    account.setServiceAccount(serviceAccount);
    dockerRegistries.forEach(registryName -> account.getDockerRegistries().add(new DockerRegistryReference().setAccountName(registryName)));
    account.setOAuthServiceAccount(oAuthServiceAccount);
    account.setOAuthScopes(oAuthScopes);
    account.setNamingStrategy(namingStrategy);
    account.setSkin(skin);
    return account;
}
Also used : DockerRegistryReference(com.netflix.spinnaker.halyard.config.model.v1.providers.containers.DockerRegistryReference) KubernetesAccount(com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount)

Example 3 with KubernetesAccount

use of com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount in project halyard by spinnaker.

the class KubectlDeployer method deploy.

@Override
public RemoteAction deploy(KubectlServiceProvider serviceProvider, AccountDeploymentDetails<KubernetesAccount> deploymentDetails, GenerateService.ResolvedConfiguration resolvedConfiguration, List<SpinnakerService.Type> serviceTypes) {
    List<KubernetesV2Service> services = serviceProvider.getServicesByPriority(serviceTypes);
    services.stream().forEach((service) -> {
        ServiceSettings settings = resolvedConfiguration.getServiceSettings((SpinnakerService) service);
        if (settings.getEnabled() != null && !settings.getEnabled()) {
            return;
        }
        if (settings.getSkipLifeCycleManagement() != null && settings.getSkipLifeCycleManagement()) {
            return;
        }
        DaemonTaskHandler.newStage("Deploying " + service.getServiceName() + " with kubectl");
        KubernetesAccount account = deploymentDetails.getAccount();
        String namespaceDefinition = service.getNamespaceYaml(resolvedConfiguration);
        String serviceDefinition = service.getServiceYaml(resolvedConfiguration);
        if (!KubernetesV2Utils.exists(account, namespaceDefinition)) {
            KubernetesV2Utils.apply(account, namespaceDefinition);
        }
        if (!KubernetesV2Utils.exists(account, serviceDefinition)) {
            KubernetesV2Utils.apply(account, serviceDefinition);
        }
        String resourceDefinition = service.getResourceYaml(deploymentDetails, resolvedConfiguration);
        DaemonTaskHandler.message("Running kubectl apply on the resource definition...");
        KubernetesV2Utils.apply(account, resourceDefinition);
    });
    return new RemoteAction();
}
Also used : KubernetesAccount(com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount) ServiceSettings(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceSettings) RemoteAction(com.netflix.spinnaker.halyard.core.RemoteAction) KubernetesV2Service(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.distributed.kubernetes.v2.KubernetesV2Service)

Example 4 with KubernetesAccount

use of com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount in project halyard by spinnaker.

the class KubernetesV1DistributedService method stageProfiles.

default List<ConfigSource> stageProfiles(AccountDeploymentDetails<KubernetesAccount> details, GenerateService.ResolvedConfiguration resolvedConfiguration) {
    SpinnakerService thisService = getService();
    ServiceSettings thisServiceSettings = resolvedConfiguration.getServiceSettings(thisService);
    SpinnakerRuntimeSettings runtimeSettings = resolvedConfiguration.getRuntimeSettings();
    Integer version = getRunningServiceDetails(details, runtimeSettings).getLatestEnabledVersion();
    if (version == null) {
        version = 0;
    } else {
        version++;
    }
    String namespace = getNamespace(thisServiceSettings);
    KubernetesV1ProviderUtils.createNamespace(details, namespace);
    String name = getServiceName();
    Map<String, String> env = new HashMap<>();
    List<ConfigSource> configSources = new ArrayList<>();
    Map<String, Profile> serviceProfiles = resolvedConfiguration.getProfilesForService(thisService.getType());
    Set<String> requiredFiles = new HashSet<>();
    for (SidecarService sidecarService : getSidecars(runtimeSettings)) {
        for (Profile profile : sidecarService.getSidecarProfiles(resolvedConfiguration, thisService)) {
            if (profile == null) {
                throw new HalException(Problem.Severity.FATAL, "Service " + sidecarService.getService().getCanonicalName() + " is required but was not supplied for deployment.");
            }
            serviceProfiles.put(profile.getName(), profile);
            requiredFiles.addAll(profile.getRequiredFiles());
        }
    }
    Map<String, Set<Profile>> collapseByDirectory = new HashMap<>();
    for (Map.Entry<String, Profile> entry : serviceProfiles.entrySet()) {
        Profile profile = entry.getValue();
        String mountPoint = Paths.get(profile.getOutputFile()).getParent().toString();
        Set<Profile> profiles = collapseByDirectory.getOrDefault(mountPoint, new HashSet<>());
        profiles.add(profile);
        requiredFiles.addAll(profile.getRequiredFiles());
        collapseByDirectory.put(mountPoint, profiles);
    }
    String stagingPath = getSpinnakerStagingPath(details.getDeploymentName());
    if (!requiredFiles.isEmpty()) {
        String secretName = KubernetesV1ProviderUtils.componentDependencies(name, version);
        String mountPoint = null;
        for (String file : requiredFiles) {
            String nextMountPoint = Paths.get(file).getParent().toString();
            if (mountPoint == null) {
                mountPoint = nextMountPoint;
            }
            assert (mountPoint.equals(nextMountPoint));
        }
        Set<Pair<File, String>> pairs = requiredFiles.stream().map(f -> {
            return new ImmutablePair<>(new File(f), new File(f).getName());
        }).collect(Collectors.toSet());
        KubernetesV1ProviderUtils.upsertSecret(details, pairs, secretName, namespace);
        configSources.add(new ConfigSource().setId(secretName).setMountPath(mountPoint));
    }
    int ind = 0;
    for (Map.Entry<String, Set<Profile>> entry : collapseByDirectory.entrySet()) {
        env.clear();
        String mountPoint = entry.getKey();
        Set<Profile> profiles = entry.getValue();
        env.putAll(profiles.stream().reduce(new HashMap<>(), (acc, profile) -> {
            acc.putAll(profile.getEnv());
            return acc;
        }, (a, b) -> {
            a.putAll(b);
            return a;
        }));
        String secretName = KubernetesV1ProviderUtils.componentSecret(name + ind, version);
        ind += 1;
        Set<Pair<File, String>> pairs = profiles.stream().map(p -> {
            return new ImmutablePair<>(new File(stagingPath, p.getName()), new File(p.getOutputFile()).getName());
        }).collect(Collectors.toSet());
        KubernetesV1ProviderUtils.upsertSecret(details, pairs, secretName, namespace);
        configSources.add(new ConfigSource().setId(secretName).setMountPath(mountPoint).setEnv(env));
    }
    return configSources;
}
Also used : KubernetesResourceDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesResourceDescription) KubernetesUtil(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.KubernetesUtil) SpinnakerMonitoringDaemonService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.SpinnakerMonitoringDaemonService) KubernetesAccount(com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount) LogCollector(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.LogCollector) HalException(com.netflix.spinnaker.halyard.core.error.v1.HalException) DaemonTaskHandler(com.netflix.spinnaker.halyard.core.tasks.v1.DaemonTaskHandler) SidecarService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.distributed.SidecarService) Pair(org.apache.commons.lang3.tuple.Pair) Names(com.netflix.frigga.Names) Map(java.util.Map) ContainerStatus(io.fabric8.kubernetes.api.model.ContainerStatus) Provider(com.netflix.spinnaker.halyard.config.model.v1.node.Provider) TypeReference(com.fasterxml.jackson.core.type.TypeReference) SpinnakerService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.SpinnakerService) ServiceBuilder(io.fabric8.kubernetes.api.model.ServiceBuilder) Strings(io.fabric8.utils.Strings) DeploymentEnvironment(com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentEnvironment) SecretVolumeSourceBuilder(io.fabric8.kubernetes.api.model.SecretVolumeSourceBuilder) ServiceInterfaceFactory(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceInterfaceFactory) KubernetesVolumeMount(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesVolumeMount) Set(java.util.Set) KubernetesProbe(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesProbe) GenerateService(com.netflix.spinnaker.halyard.deploy.services.v1.GenerateService) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) Collectors(java.util.stream.Collectors) List(java.util.List) KubernetesVolumeSource(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesVolumeSource) SocketUtils(org.springframework.util.SocketUtils) Problem(com.netflix.spinnaker.halyard.core.problem.v1.Problem) KubernetesContainerDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesContainerDescription) ServiceSettings(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceSettings) JobStatus(com.netflix.spinnaker.halyard.core.job.v1.JobStatus) Container(io.fabric8.kubernetes.api.model.Container) DeployKubernetesAtomicOperationDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.DeployKubernetesAtomicOperationDescription) CustomSizing(com.netflix.spinnaker.halyard.config.model.v1.node.CustomSizing) ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortBuilder) HashMap(java.util.HashMap) ArtifactService(com.netflix.spinnaker.halyard.deploy.services.v1.ArtifactService) LocalObjectReference(io.fabric8.kubernetes.api.model.LocalObjectReference) RunningServiceDetails(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.RunningServiceDetails) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) KubernetesHandler(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesHandler) AccountDeploymentDetails(com.netflix.spinnaker.halyard.deploy.deployment.v1.AccountDeploymentDetails) ReplicaSet(io.fabric8.kubernetes.api.model.extensions.ReplicaSet) JobExecutor(com.netflix.spinnaker.halyard.core.job.v1.JobExecutor) KubernetesImageDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesImageDescription) KubernetesContainerPort(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesContainerPort) Instance(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.RunningServiceDetails.Instance) KubernetesNamedServicePort(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.loadbalancer.KubernetesNamedServicePort) Volume(io.fabric8.kubernetes.api.model.Volume) ReplicaSetBuilder(io.fabric8.kubernetes.api.model.extensions.ReplicaSetBuilder) KubernetesLoadBalancerDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.loadbalancer.KubernetesLoadBalancerDescription) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) KubernetesEnvVar(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesEnvVar) KubernetesSecretVolumeSource(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesSecretVolumeSource) JobRequest(com.netflix.spinnaker.halyard.core.job.v1.JobRequest) Pod(io.fabric8.kubernetes.api.model.Pod) SpinnakerRuntimeSettings(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) Profile(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.Profile) Paths(java.nio.file.Paths) KubernetesHttpGetAction(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesHttpGetAction) KubernetesVolumeSourceType(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesVolumeSourceType) KubernetesTcpSocketAction(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesTcpSocketAction) DistributedService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.distributed.DistributedService) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) ConfigSource(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ConfigSource) Collections(java.util.Collections) KubernetesHandlerType(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesHandlerType) Set(java.util.Set) HashSet(java.util.HashSet) ReplicaSet(io.fabric8.kubernetes.api.model.extensions.ReplicaSet) HashMap(java.util.HashMap) HalException(com.netflix.spinnaker.halyard.core.error.v1.HalException) ArrayList(java.util.ArrayList) SpinnakerRuntimeSettings(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings) Profile(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.Profile) HashSet(java.util.HashSet) Pair(org.apache.commons.lang3.tuple.Pair) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) SidecarService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.distributed.SidecarService) ServiceSettings(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceSettings) SpinnakerService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.SpinnakerService) ConfigSource(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ConfigSource) Map(java.util.Map) HashMap(java.util.HashMap) File(java.io.File)

Example 5 with KubernetesAccount

use of com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount in project halyard by spinnaker.

the class KubernetesV1DistributedService method getRunningServiceDetails.

@Override
default RunningServiceDetails getRunningServiceDetails(AccountDeploymentDetails<KubernetesAccount> details, SpinnakerRuntimeSettings runtimeSettings) {
    ServiceSettings settings = runtimeSettings.getServiceSettings(getService());
    RunningServiceDetails res = new RunningServiceDetails();
    KubernetesClient client = KubernetesV1ProviderUtils.getClient(details);
    String name = getServiceName();
    String namespace = getNamespace(settings);
    RunningServiceDetails.LoadBalancer lb = new RunningServiceDetails.LoadBalancer();
    lb.setExists(client.services().inNamespace(namespace).withName(name).get() != null);
    res.setLoadBalancer(lb);
    List<Pod> pods = client.pods().inNamespace(namespace).withLabel("load-balancer-" + name, "true").list().getItems();
    pods.addAll(client.pods().inNamespace(namespace).withLabel("load-balancer-" + name, "false").list().getItems());
    Map<Integer, List<Instance>> instances = res.getInstances();
    for (Pod pod : pods) {
        String podName = pod.getMetadata().getName();
        String serverGroupName = podName.substring(0, podName.lastIndexOf("-"));
        Names parsedName = Names.parseName(serverGroupName);
        Integer version = parsedName.getSequence();
        if (version == null) {
            throw new IllegalStateException("Server group for service " + getServiceName() + " has unknown sequence (" + serverGroupName + ")");
        }
        String location = pod.getMetadata().getNamespace();
        String id = pod.getMetadata().getName();
        Instance instance = new Instance().setId(id).setLocation(location);
        List<ContainerStatus> containerStatuses = pod.getStatus().getContainerStatuses();
        if (!containerStatuses.isEmpty() && containerStatuses.stream().allMatch(ContainerStatus::getReady)) {
            instance.setHealthy(true);
        }
        if (!containerStatuses.isEmpty() && containerStatuses.stream().allMatch(s -> s.getState().getRunning() != null && s.getState().getTerminated() == null)) {
            instance.setRunning(true);
        }
        List<Instance> knownInstances = instances.getOrDefault(version, new ArrayList<>());
        knownInstances.add(instance);
        instances.put(version, knownInstances);
    }
    List<ReplicaSet> replicaSets = client.extensions().replicaSets().inNamespace(settings.getLocation()).list().getItems();
    for (ReplicaSet rs : replicaSets) {
        String rsName = rs.getMetadata().getName();
        Names parsedRsName = Names.parseName(rsName);
        if (!parsedRsName.getCluster().equals(getServiceName())) {
            continue;
        }
        instances.computeIfAbsent(parsedRsName.getSequence(), i -> new ArrayList<>());
    }
    return res;
}
Also used : KubernetesResourceDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesResourceDescription) KubernetesUtil(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.KubernetesUtil) SpinnakerMonitoringDaemonService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.SpinnakerMonitoringDaemonService) KubernetesAccount(com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount) LogCollector(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.LogCollector) HalException(com.netflix.spinnaker.halyard.core.error.v1.HalException) DaemonTaskHandler(com.netflix.spinnaker.halyard.core.tasks.v1.DaemonTaskHandler) SidecarService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.distributed.SidecarService) Pair(org.apache.commons.lang3.tuple.Pair) Names(com.netflix.frigga.Names) Map(java.util.Map) ContainerStatus(io.fabric8.kubernetes.api.model.ContainerStatus) Provider(com.netflix.spinnaker.halyard.config.model.v1.node.Provider) TypeReference(com.fasterxml.jackson.core.type.TypeReference) SpinnakerService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.SpinnakerService) ServiceBuilder(io.fabric8.kubernetes.api.model.ServiceBuilder) Strings(io.fabric8.utils.Strings) DeploymentEnvironment(com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentEnvironment) SecretVolumeSourceBuilder(io.fabric8.kubernetes.api.model.SecretVolumeSourceBuilder) ServiceInterfaceFactory(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceInterfaceFactory) KubernetesVolumeMount(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesVolumeMount) Set(java.util.Set) KubernetesProbe(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesProbe) GenerateService(com.netflix.spinnaker.halyard.deploy.services.v1.GenerateService) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) Collectors(java.util.stream.Collectors) List(java.util.List) KubernetesVolumeSource(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesVolumeSource) SocketUtils(org.springframework.util.SocketUtils) Problem(com.netflix.spinnaker.halyard.core.problem.v1.Problem) KubernetesContainerDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesContainerDescription) ServiceSettings(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceSettings) JobStatus(com.netflix.spinnaker.halyard.core.job.v1.JobStatus) Container(io.fabric8.kubernetes.api.model.Container) DeployKubernetesAtomicOperationDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.DeployKubernetesAtomicOperationDescription) CustomSizing(com.netflix.spinnaker.halyard.config.model.v1.node.CustomSizing) ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortBuilder) HashMap(java.util.HashMap) ArtifactService(com.netflix.spinnaker.halyard.deploy.services.v1.ArtifactService) LocalObjectReference(io.fabric8.kubernetes.api.model.LocalObjectReference) RunningServiceDetails(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.RunningServiceDetails) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) KubernetesHandler(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesHandler) AccountDeploymentDetails(com.netflix.spinnaker.halyard.deploy.deployment.v1.AccountDeploymentDetails) ReplicaSet(io.fabric8.kubernetes.api.model.extensions.ReplicaSet) JobExecutor(com.netflix.spinnaker.halyard.core.job.v1.JobExecutor) KubernetesImageDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesImageDescription) KubernetesContainerPort(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesContainerPort) Instance(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.RunningServiceDetails.Instance) KubernetesNamedServicePort(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.loadbalancer.KubernetesNamedServicePort) Volume(io.fabric8.kubernetes.api.model.Volume) ReplicaSetBuilder(io.fabric8.kubernetes.api.model.extensions.ReplicaSetBuilder) KubernetesLoadBalancerDescription(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.loadbalancer.KubernetesLoadBalancerDescription) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) KubernetesEnvVar(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesEnvVar) KubernetesSecretVolumeSource(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesSecretVolumeSource) JobRequest(com.netflix.spinnaker.halyard.core.job.v1.JobRequest) Pod(io.fabric8.kubernetes.api.model.Pod) SpinnakerRuntimeSettings(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) Profile(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.Profile) Paths(java.nio.file.Paths) KubernetesHttpGetAction(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesHttpGetAction) KubernetesVolumeSourceType(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesVolumeSourceType) KubernetesTcpSocketAction(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesTcpSocketAction) DistributedService(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.distributed.DistributedService) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) ConfigSource(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ConfigSource) Collections(java.util.Collections) KubernetesHandlerType(com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesHandlerType) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) Pod(io.fabric8.kubernetes.api.model.Pod) Instance(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.RunningServiceDetails.Instance) ServiceSettings(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceSettings) Names(com.netflix.frigga.Names) ContainerStatus(io.fabric8.kubernetes.api.model.ContainerStatus) RunningServiceDetails(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.RunningServiceDetails) List(java.util.List) ArrayList(java.util.ArrayList) ReplicaSet(io.fabric8.kubernetes.api.model.extensions.ReplicaSet)

Aggregations

KubernetesAccount (com.netflix.spinnaker.halyard.config.model.v1.providers.kubernetes.KubernetesAccount)14 ServiceSettings (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceSettings)8 ArrayList (java.util.ArrayList)7 List (java.util.List)7 Collectors (java.util.stream.Collectors)7 ConfigSource (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ConfigSource)6 File (java.io.File)6 Collections (java.util.Collections)6 HashMap (java.util.HashMap)6 Map (java.util.Map)6 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 KubernetesUtil (com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.KubernetesUtil)5 KubernetesImageDescription (com.netflix.spinnaker.clouddriver.kubernetes.v1.deploy.description.servergroup.KubernetesImageDescription)5 DeploymentConfiguration (com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration)5 JobRequest (com.netflix.spinnaker.halyard.core.job.v1.JobRequest)5 JobStatus (com.netflix.spinnaker.halyard.core.job.v1.JobStatus)5 AccountDeploymentDetails (com.netflix.spinnaker.halyard.deploy.deployment.v1.AccountDeploymentDetails)5 ArtifactService (com.netflix.spinnaker.halyard.deploy.services.v1.ArtifactService)5 GenerateService (com.netflix.spinnaker.halyard.deploy.services.v1.GenerateService)5 SpinnakerRuntimeSettings (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings)5