Search in sources :

Example 11 with MetadataNested

use of io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionFluent.MetadataNested in project entando-k8s-controller-coordinator by entando-k8s.

the class CrdManagementTest method testCustomResourceEvent.

@Test
@Description("New instances of my CustomResources should result in my controller image to be executed against the resource")
void testCustomResourceEvent() throws IOException {
    step("Given I have prepared a cluster scoped deployment of the EntandoOperator", () -> System.setProperty(EntandoOperatorConfigProperty.ENTANDO_NAMESPACES_TO_OBSERVE.getJvmSystemProperty(), "*"));
    step("And I have started the Entando Operator", () -> entandoControllerCoordinator.onStartup(new StartupEvent()));
    ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory());
    final CustomResourceDefinition value = objectMapper.readValue(Thread.currentThread().getContextClassLoader().getResource("mycrds.test.org.crd.yaml"), CustomResourceDefinition.class);
    final MetadataNested<CustomResourceDefinitionBuilder> builder = new CustomResourceDefinitionBuilder(value).editMetadata();
    step("And I have a CustomResourceDefinition with", () -> {
        step(format("the %s label ", LabelNames.CRD_OF_INTEREST.getName()), () -> {
            builder.addToLabels(LabelNames.CRD_OF_INTEREST.getName(), "MyCRD");
        });
        step(format("and the %s annotation ", AnnotationNames.CONTROLLER_IMAGE.getName()), () -> {
            builder.addToAnnotations(AnnotationNames.CONTROLLER_IMAGE.getName(), "test/my-controller");
        });
    });
    step("And I have registered my custom resource definition", () -> {
        client.getCluster().putCustomResourceDefinition(builder.endMetadata().build());
    });
    final SerializedEntandoResource resource = new SerializedEntandoResource();
    resource.setMetadata(new ObjectMetaBuilder().withName("my-resource").withNamespace(MY_NAMESPACE).build());
    resource.setDefinition(CustomResourceDefinitionContext.fromCrd(builder.endMetadata().build()));
    step("When I create a new custom resource based on my CustomResourceDefinition my controller image is used to execute a " + "Controller pod that runs to completion", () -> client.createOrPatchEntandoResource(resource));
    step(format("Then a controller pod has been created with the image that I specified in the %s annotation", AnnotationNames.CONTROLLER_IMAGE.getName()), () -> {
        await().atMost(10, TimeUnit.SECONDS).ignoreExceptions().until(() -> client.loadPod(AbstractK8SClientDouble.CONTROLLER_NAMESPACE, CoordinatorUtils.podLabelsFor(resource)) != null);
        assertThat(client.loadPod(AbstractK8SClientDouble.CONTROLLER_NAMESPACE, CoordinatorUtils.podLabelsFor(resource)).getSpec().getContainers().get(0).getImage()).contains("test/my-controller");
    });
}
Also used : CustomResourceDefinitionBuilder(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionBuilder) SerializedEntandoResource(org.entando.kubernetes.controller.spi.client.SerializedEntandoResource) CustomResourceDefinition(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition) StartupEvent(io.quarkus.runtime.StartupEvent) YAMLFactory(com.fasterxml.jackson.dataformat.yaml.YAMLFactory) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Description(io.qameta.allure.Description) Test(org.junit.jupiter.api.Test)

Example 12 with MetadataNested

use of io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionFluent.MetadataNested in project che-server by eclipse-che.

the class OpenShiftProjectTest method setUp.

@BeforeMethod
public void setUp() throws Exception {
    lenient().when(clientFactory.create(anyString())).thenReturn(kubernetesClient);
    lenient().when(clientFactory.createOC()).thenReturn(openShiftClient);
    lenient().when(clientFactory.createOC(anyString())).thenReturn(openShiftClient);
    lenient().when(cheServerOpenshiftClientFactory.createOC()).thenReturn(openShiftCheServerClient);
    lenient().when(openShiftClient.adapt(OpenShiftClient.class)).thenReturn(openShiftClient);
    final MixedOperation mixedOperation = mock(MixedOperation.class);
    final NonNamespaceOperation namespaceOperation = mock(NonNamespaceOperation.class);
    lenient().doReturn(mixedOperation).when(kubernetesClient).serviceAccounts();
    lenient().when(mixedOperation.inNamespace(anyString())).thenReturn(namespaceOperation);
    lenient().when(namespaceOperation.withName(anyString())).thenReturn(serviceAccountResource);
    lenient().when(serviceAccountResource.get()).thenReturn(mock(ServiceAccount.class));
    lenient().doReturn(projectRequestOperation).when(openShiftClient).projectrequests();
    lenient().doReturn(metadataNested).when(metadataNested).withName(anyString());
    openShiftProject = new OpenShiftProject(clientFactory, cheClientFactory, cheServerOpenshiftClientFactory, WORKSPACE_ID, PROJECT_NAME, deployments, services, routes, pvcs, ingresses, secrets, configsMaps);
}
Also used : ServiceAccount(io.fabric8.kubernetes.api.model.ServiceAccount) MixedOperation(io.fabric8.kubernetes.client.dsl.MixedOperation) NonNamespaceOperation(io.fabric8.kubernetes.client.dsl.NonNamespaceOperation) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 13 with MetadataNested

use of io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionFluent.MetadataNested in project devspaces-images by redhat-developer.

the class OpenShiftProjectTest method testOpenShiftProjectPreparingWhenProjectDoesNotExistWithCheServerSA.

@Test
public void testOpenShiftProjectPreparingWhenProjectDoesNotExistWithCheServerSA() throws Exception {
    // given
    prepareNamespaceGet(PROJECT_NAME);
    Resource resource = prepareProjectResource(PROJECT_NAME);
    doThrow(new KubernetesClientException("error", 403, null)).when(resource).get();
    final MixedOperation mixedOperation = mock(MixedOperation.class);
    final NonNamespaceOperation namespaceOperation = mock(NonNamespaceOperation.class);
    doReturn(mixedOperation).when(openShiftCheServerClient).serviceAccounts();
    when(mixedOperation.inNamespace(anyString())).thenReturn(namespaceOperation);
    when(namespaceOperation.withName(anyString())).thenReturn(serviceAccountResource);
    when(serviceAccountResource.get()).thenReturn(mock(ServiceAccount.class));
    doReturn(projectRequestOperation).when(openShiftCheServerClient).projectrequests();
    // doReturn(metadataNested).when(metadataNested).withName(anyString());
    when(openShiftCheServerClient.roleBindings()).thenReturn(mixedRoleBindingOperation);
    lenient().when(mixedRoleBindingOperation.inNamespace(anyString())).thenReturn(nonNamespaceRoleBindingOperation);
    when(openShiftClient.currentUser()).thenReturn(new UserBuilder().withNewMetadata().withName("user").endMetadata().build());
    // when
    openShiftProject.prepare(true, true, Map.of(), Map.of());
    // then
    ArgumentCaptor<ProjectRequest> captor = ArgumentCaptor.forClass(ProjectRequest.class);
    verify(projectRequestOperation).create(captor.capture());
    Assert.assertEquals(captor.getValue().getMetadata().getName(), PROJECT_NAME);
    verifyNoMoreInteractions(openShiftCheServerClient);
    verifyNoMoreInteractions(kubernetesClient);
    ArgumentCaptor<RoleBinding> roleBindingArgumentCaptor = ArgumentCaptor.forClass(RoleBinding.class);
    verify(nonNamespaceRoleBindingOperation).createOrReplace(roleBindingArgumentCaptor.capture());
    assertNotNull(roleBindingArgumentCaptor.getValue());
}
Also used : ServiceAccount(io.fabric8.kubernetes.api.model.ServiceAccount) ProjectRequest(io.fabric8.openshift.api.model.ProjectRequest) Resource(io.fabric8.kubernetes.client.dsl.Resource) RoleBinding(io.fabric8.openshift.api.model.RoleBinding) MixedOperation(io.fabric8.kubernetes.client.dsl.MixedOperation) NonNamespaceOperation(io.fabric8.kubernetes.client.dsl.NonNamespaceOperation) KubernetesClientException(io.fabric8.kubernetes.client.KubernetesClientException) UserBuilder(io.fabric8.openshift.api.model.UserBuilder) Test(org.testng.annotations.Test)

Example 14 with MetadataNested

use of io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionFluent.MetadataNested in project devspaces-images by redhat-developer.

the class OpenShiftProjectTest method testOpenShiftProjectPreparingRoleBindingWhenProjectDoesNotExistWithCheServerSA.

@Test(dependsOnMethods = "testOpenShiftProjectPreparingWhenProjectDoesNotExistWithCheServerSA")
public void testOpenShiftProjectPreparingRoleBindingWhenProjectDoesNotExistWithCheServerSA() throws Exception {
    // given
    prepareNamespaceGet(PROJECT_NAME);
    Resource resource = prepareProjectResource(PROJECT_NAME);
    doThrow(new KubernetesClientException("error", 403, null)).when(resource).get();
    final MixedOperation mixedOperation = mock(MixedOperation.class);
    final NonNamespaceOperation namespaceOperation = mock(NonNamespaceOperation.class);
    doReturn(mixedOperation).when(openShiftCheServerClient).serviceAccounts();
    when(mixedOperation.inNamespace(anyString())).thenReturn(namespaceOperation);
    when(namespaceOperation.withName(anyString())).thenReturn(serviceAccountResource);
    when(serviceAccountResource.get()).thenReturn(mock(ServiceAccount.class));
    doReturn(projectRequestOperation).when(openShiftCheServerClient).projectrequests();
    // doReturn(metadataNested).when(metadataNested).withName(anyString());
    when(openShiftCheServerClient.roleBindings()).thenReturn(mixedRoleBindingOperation);
    lenient().when(mixedRoleBindingOperation.inNamespace(anyString())).thenReturn(nonNamespaceRoleBindingOperation);
    when(openShiftClient.currentUser()).thenReturn(new UserBuilder().withNewMetadata().withName("jdoe").endMetadata().build());
    // when
    openShiftProject.prepare(true, true, Map.of(), Map.of());
    // then
    ArgumentCaptor<RoleBinding> roleBindingArgumentCaptor = ArgumentCaptor.forClass(RoleBinding.class);
    verify(nonNamespaceRoleBindingOperation).createOrReplace(roleBindingArgumentCaptor.capture());
    RoleBinding roleBinding = roleBindingArgumentCaptor.getValue();
    assertNotNull(roleBinding);
    assertEquals(roleBinding.getMetadata().getName(), "admin");
    assertEquals(roleBinding.getRoleRef().getName(), "admin");
    assertEquals(roleBinding.getUserNames(), ImmutableList.of("jdoe"));
}
Also used : ServiceAccount(io.fabric8.kubernetes.api.model.ServiceAccount) Resource(io.fabric8.kubernetes.client.dsl.Resource) RoleBinding(io.fabric8.openshift.api.model.RoleBinding) MixedOperation(io.fabric8.kubernetes.client.dsl.MixedOperation) NonNamespaceOperation(io.fabric8.kubernetes.client.dsl.NonNamespaceOperation) KubernetesClientException(io.fabric8.kubernetes.client.KubernetesClientException) UserBuilder(io.fabric8.openshift.api.model.UserBuilder) Test(org.testng.annotations.Test)

Example 15 with MetadataNested

use of io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionFluent.MetadataNested in project kubernetes-plugin by jenkinsci.

the class PodTemplateBuilder method build.

/**
 * Create a Pod object from a PodTemplate
 */
public Pod build() {
    // Build volumes and volume mounts.
    Map<String, Volume> volumes = new HashMap<>();
    Map<String, VolumeMount> volumeMounts = new HashMap<>();
    if (agent == null) {
        throw new IllegalStateException("No KubernetesSlave is set");
    }
    String podName = agent.getPodName();
    int i = 0;
    for (final PodVolume volume : template.getVolumes()) {
        final String volumeName = "volume-" + i;
        final String mountPath = normalizePath(volume.getMountPath());
        if (!volumeMounts.containsKey(mountPath)) {
            VolumeMountBuilder volumeMountBuilder = // 
            new VolumeMountBuilder().withMountPath(mountPath).withName(volumeName).withReadOnly(false);
            if (volume instanceof ConfigMapVolume) {
                final ConfigMapVolume configmapVolume = (ConfigMapVolume) volume;
                String subPath = configmapVolume.getSubPath();
                if (subPath != null) {
                    volumeMountBuilder = volumeMountBuilder.withSubPath(normalizePath(subPath));
                }
            }
            volumeMounts.put(mountPath, volumeMountBuilder.build());
            volumes.put(volumeName, volume.buildVolume(volumeName, podName));
            i++;
        }
    }
    volumes.put(WORKSPACE_VOLUME_NAME, template.getWorkspaceVolume().buildVolume(WORKSPACE_VOLUME_NAME, podName));
    Map<String, Container> containers = new HashMap<>();
    // containers from pod template
    for (ContainerTemplate containerTemplate : template.getContainers()) {
        containers.put(containerTemplate.getName(), createContainer(containerTemplate, template.getEnvVars(), volumeMounts.values()));
    }
    MetadataNested<PodBuilder> metadataBuilder = new PodBuilder().withNewMetadata();
    if (agent != null) {
        metadataBuilder.withName(agent.getPodName());
    }
    Map<String, String> labels = new HashMap<>();
    if (agent != null) {
        labels.putAll(agent.getKubernetesCloud().getPodLabelsMap());
    }
    labels.putAll(template.getLabelsMap());
    if (!labels.isEmpty()) {
        metadataBuilder.withLabels(labels);
    }
    Map<String, String> annotations = getAnnotationsMap(template.getAnnotations());
    if (!annotations.isEmpty()) {
        metadataBuilder.withAnnotations(annotations);
    }
    SpecNested<PodBuilder> builder = metadataBuilder.endMetadata().withNewSpec();
    if (template.getActiveDeadlineSeconds() > 0) {
        builder = builder.withActiveDeadlineSeconds(Long.valueOf(template.getActiveDeadlineSeconds()));
    }
    if (!volumes.isEmpty()) {
        builder.withVolumes(volumes.values().toArray(new Volume[volumes.size()]));
    }
    if (template.getServiceAccount() != null) {
        builder.withServiceAccountName(substituteEnv(template.getServiceAccount()));
    }
    if (template.getSchedulerName() != null) {
        builder.withSchedulerName(substituteEnv(template.getSchedulerName()));
    }
    List<LocalObjectReference> imagePullSecrets = template.getImagePullSecrets().stream().map((x) -> x.toLocalObjectReference()).collect(Collectors.toList());
    if (!imagePullSecrets.isEmpty()) {
        builder.withImagePullSecrets(imagePullSecrets);
    }
    Map<String, String> nodeSelector = getNodeSelectorMap(template.getNodeSelector());
    if (!nodeSelector.isEmpty()) {
        builder.withNodeSelector(nodeSelector);
    }
    if (template.getTerminationGracePeriodSeconds() != null) {
        builder.withTerminationGracePeriodSeconds(template.getTerminationGracePeriodSeconds());
    }
    builder.withContainers(containers.values().toArray(new Container[containers.size()]));
    Long runAsUser = template.getRunAsUserAsLong();
    Long runAsGroup = template.getRunAsGroupAsLong();
    String supplementalGroups = template.getSupplementalGroups();
    if (runAsUser != null || runAsGroup != null || supplementalGroups != null) {
        PodSpecFluent.SecurityContextNested<SpecNested<PodBuilder>> securityContext = builder.editOrNewSecurityContext();
        if (runAsUser != null) {
            securityContext.withRunAsUser(runAsUser);
        }
        if (runAsGroup != null) {
            securityContext.withRunAsGroup(runAsGroup);
        }
        if (supplementalGroups != null) {
            securityContext.withSupplementalGroups(parseSupplementalGroupList(supplementalGroups));
        }
        securityContext.endSecurityContext();
    }
    if (template.isHostNetworkSet()) {
        builder.withHostNetwork(template.isHostNetwork());
    }
    // merge with the yaml fragments
    Pod pod = combine(template.getYamlsPod(), builder.endSpec().build());
    // Apply defaults
    // default jnlp container
    Optional<Container> jnlpOpt = pod.getSpec().getContainers().stream().filter(c -> JNLP_NAME.equals(c.getName())).findFirst();
    Container jnlp = jnlpOpt.orElse(new ContainerBuilder().withName(JNLP_NAME).withVolumeMounts(volumeMounts.values().toArray(new VolumeMount[volumeMounts.values().size()])).build());
    if (!jnlpOpt.isPresent()) {
        pod.getSpec().getContainers().add(jnlp);
    }
    pod.getSpec().getContainers().stream().filter(c -> c.getWorkingDir() == null).forEach(c -> c.setWorkingDir(jnlp.getWorkingDir()));
    if (StringUtils.isBlank(jnlp.getImage())) {
        String jnlpImage = DEFAULT_JNLP_IMAGE;
        if (StringUtils.isNotEmpty(DEFAULT_JNLP_DOCKER_REGISTRY_PREFIX)) {
            jnlpImage = Util.ensureEndsWith(DEFAULT_JNLP_DOCKER_REGISTRY_PREFIX, "/") + jnlpImage;
        }
        jnlp.setImage(jnlpImage);
    }
    Map<String, EnvVar> envVars = new HashMap<>();
    envVars.putAll(jnlpEnvVars(jnlp.getWorkingDir()));
    envVars.putAll(defaultEnvVars(template.getEnvVars()));
    Optional.ofNullable(jnlp.getEnv()).ifPresent(jnlpEnv -> {
        jnlpEnv.forEach(var -> envVars.put(var.getName(), var));
    });
    jnlp.setEnv(new ArrayList<>(envVars.values()));
    if (jnlp.getResources() == null) {
        Map<String, Quantity> reqMap = new HashMap<>();
        Map<String, Quantity> limMap = new HashMap<>();
        reqMap.put("cpu", new Quantity(DEFAULT_JNLP_CONTAINER_CPU_REQUEST));
        reqMap.put("memory", new Quantity(DEFAULT_JNLP_CONTAINER_MEMORY_REQUEST));
        if (DEFAULT_JNLP_CONTAINER_CPU_LIMIT != null) {
            limMap.put("cpu", new Quantity(DEFAULT_JNLP_CONTAINER_CPU_LIMIT));
        }
        if (DEFAULT_JNLP_CONTAINER_MEMORY_LIMIT != null) {
            limMap.put("memory", new Quantity(DEFAULT_JNLP_CONTAINER_MEMORY_LIMIT));
        }
        ResourceRequirements reqs = new ResourceRequirementsBuilder().withRequests(reqMap).withLimits(limMap).build();
        jnlp.setResources(reqs);
    }
    if (cloud != null) {
        pod = PodDecorator.decorateAll(cloud, pod);
    }
    Pod finalPod = pod;
    LOGGER.finest(() -> "Pod built: " + Serialization.asYaml(finalPod));
    return pod;
}
Also used : Quantity(io.fabric8.kubernetes.api.model.Quantity) VolumeMount(io.fabric8.kubernetes.api.model.VolumeMount) JavaSpecificationVersion(io.jenkins.lib.versionnumber.JavaSpecificationVersion) StringUtils(org.apache.commons.lang.StringUtils) JNLP_NAME(org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud.JNLP_NAME) PodTemplateStepExecution(org.csanchez.jenkins.plugins.kubernetes.pipeline.PodTemplateStepExecution) ConfigMapVolume(org.csanchez.jenkins.plugins.kubernetes.volumes.ConfigMapVolume) SpecNested(io.fabric8.kubernetes.api.model.PodFluent.SpecNested) Matcher(java.util.regex.Matcher) TcpSlaveAgentListener(hudson.TcpSlaveAgentListener) ResourceRequirements(io.fabric8.kubernetes.api.model.ResourceRequirements) VolumeMountBuilder(io.fabric8.kubernetes.api.model.VolumeMountBuilder) PodBuilder(io.fabric8.kubernetes.api.model.PodBuilder) Map(java.util.Map) NonNull(edu.umd.cs.findbugs.annotations.NonNull) ContainerBuilder(io.fabric8.kubernetes.api.model.ContainerBuilder) PodTemplateUtils.isNullOrEmpty(org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.isNullOrEmpty) Restricted(org.kohsuke.accmod.Restricted) Collection(java.util.Collection) Jenkins(jenkins.model.Jenkins) SlaveComputer(hudson.slaves.SlaveComputer) Logger(java.util.logging.Logger) Collectors(java.util.stream.Collectors) StandardCharsets(java.nio.charset.StandardCharsets) PodTemplateUtils.combine(org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.combine) List(java.util.List) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) ProbeBuilder(io.fabric8.kubernetes.api.model.ProbeBuilder) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings) PodTemplateUtils.substituteEnv(org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.substituteEnv) EnvVar(io.fabric8.kubernetes.api.model.EnvVar) Container(io.fabric8.kubernetes.api.model.Container) ResourceRequirementsBuilder(io.fabric8.kubernetes.api.model.ResourceRequirementsBuilder) HashMap(java.util.HashMap) LocalObjectReference(io.fabric8.kubernetes.api.model.LocalObjectReference) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) Serialization(io.fabric8.kubernetes.client.utils.Serialization) PodSpecFluent(io.fabric8.kubernetes.api.model.PodSpecFluent) Volume(io.fabric8.kubernetes.api.model.Volume) Util(hudson.Util) Probe(io.fabric8.kubernetes.api.model.Probe) PodVolume(org.csanchez.jenkins.plugins.kubernetes.volumes.PodVolume) ExecAction(io.fabric8.kubernetes.api.model.ExecAction) NoExternalUse(org.kohsuke.accmod.restrictions.NoExternalUse) Pod(io.fabric8.kubernetes.api.model.Pod) IOException(java.io.IOException) MetadataNested(io.fabric8.kubernetes.api.model.PodFluent.MetadataNested) TemplateEnvVar(org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar) ContainerPort(io.fabric8.kubernetes.api.model.ContainerPort) IOUtils(hudson.util.IOUtils) Paths(java.nio.file.Paths) PodDecorator(org.csanchez.jenkins.plugins.kubernetes.pod.decorator.PodDecorator) CheckForNull(edu.umd.cs.findbugs.annotations.CheckForNull) Collections(java.util.Collections) InputStream(java.io.InputStream) HashMap(java.util.HashMap) ResourceRequirementsBuilder(io.fabric8.kubernetes.api.model.ResourceRequirementsBuilder) SpecNested(io.fabric8.kubernetes.api.model.PodFluent.SpecNested) ResourceRequirements(io.fabric8.kubernetes.api.model.ResourceRequirements) Container(io.fabric8.kubernetes.api.model.Container) ContainerBuilder(io.fabric8.kubernetes.api.model.ContainerBuilder) EnvVar(io.fabric8.kubernetes.api.model.EnvVar) TemplateEnvVar(org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar) PodVolume(org.csanchez.jenkins.plugins.kubernetes.volumes.PodVolume) ConfigMapVolume(org.csanchez.jenkins.plugins.kubernetes.volumes.ConfigMapVolume) Pod(io.fabric8.kubernetes.api.model.Pod) PodBuilder(io.fabric8.kubernetes.api.model.PodBuilder) Quantity(io.fabric8.kubernetes.api.model.Quantity) VolumeMountBuilder(io.fabric8.kubernetes.api.model.VolumeMountBuilder) ConfigMapVolume(org.csanchez.jenkins.plugins.kubernetes.volumes.ConfigMapVolume) Volume(io.fabric8.kubernetes.api.model.Volume) PodVolume(org.csanchez.jenkins.plugins.kubernetes.volumes.PodVolume) PodSpecFluent(io.fabric8.kubernetes.api.model.PodSpecFluent) LocalObjectReference(io.fabric8.kubernetes.api.model.LocalObjectReference) VolumeMount(io.fabric8.kubernetes.api.model.VolumeMount)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)7 YAMLFactory (com.fasterxml.jackson.dataformat.yaml.YAMLFactory)7 CustomResourceDefinition (io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition)7 CustomResourceDefinitionBuilder (io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionBuilder)7 Description (io.qameta.allure.Description)7 StartupEvent (io.quarkus.runtime.StartupEvent)7 Test (org.junit.jupiter.api.Test)7 ServiceAccount (io.fabric8.kubernetes.api.model.ServiceAccount)6 MixedOperation (io.fabric8.kubernetes.client.dsl.MixedOperation)6 NonNamespaceOperation (io.fabric8.kubernetes.client.dsl.NonNamespaceOperation)6 KubernetesClientException (io.fabric8.kubernetes.client.KubernetesClientException)4 Resource (io.fabric8.kubernetes.client.dsl.Resource)4 RoleBinding (io.fabric8.openshift.api.model.RoleBinding)4 UserBuilder (io.fabric8.openshift.api.model.UserBuilder)4 SerializedEntandoResource (org.entando.kubernetes.controller.spi.client.SerializedEntandoResource)4 Test (org.testng.annotations.Test)4 ConfigMapBuilder (io.fabric8.kubernetes.api.model.ConfigMapBuilder)3 ObjectMetaBuilder (io.fabric8.kubernetes.api.model.ObjectMetaBuilder)3 Container (io.fabric8.kubernetes.api.model.Container)2 LocalObjectReference (io.fabric8.kubernetes.api.model.LocalObjectReference)2