Search in sources :

Example 11 with JobBuilder

use of io.fabric8.kubernetes.api.model.batch.v1.JobBuilder in project strimzi-kafka-operator by strimzi.

the class KafkaClients method defaultConsumerStrimzi.

public JobBuilder defaultConsumerStrimzi() {
    if (consumerName == null || consumerName.isEmpty()) {
        throw new InvalidParameterException("Consumer name is not set.");
    }
    Map<String, String> consumerLabels = new HashMap<>();
    consumerLabels.put("app", consumerName);
    consumerLabels.put(Constants.KAFKA_CLIENTS_LABEL_KEY, Constants.KAFKA_CLIENTS_LABEL_VALUE);
    PodSpecBuilder podSpecBuilder = new PodSpecBuilder();
    if (Environment.SYSTEM_TEST_STRIMZI_IMAGE_PULL_SECRET != null && !Environment.SYSTEM_TEST_STRIMZI_IMAGE_PULL_SECRET.isEmpty()) {
        List<LocalObjectReference> imagePullSecrets = Collections.singletonList(new LocalObjectReference(Environment.SYSTEM_TEST_STRIMZI_IMAGE_PULL_SECRET));
        podSpecBuilder.withImagePullSecrets(imagePullSecrets);
    }
    return new JobBuilder().withNewMetadata().withNamespace(this.getNamespaceName()).withLabels(consumerLabels).withName(consumerName).endMetadata().withNewSpec().withBackoffLimit(0).withNewTemplate().withNewMetadata().withLabels(consumerLabels).withNamespace(this.getNamespaceName()).withName(consumerName).endMetadata().withNewSpecLike(podSpecBuilder.build()).withRestartPolicy("Never").withContainers().addNewContainer().withName(consumerName).withImagePullPolicy(Constants.IF_NOT_PRESENT_IMAGE_PULL_POLICY).withImage(Environment.TEST_CONSUMER_IMAGE).addNewEnv().withName("BOOTSTRAP_SERVERS").withValue(this.getBootstrapAddress()).endEnv().addNewEnv().withName("TOPIC").withValue(this.getTopicName()).endEnv().addNewEnv().withName("DELAY_MS").withValue(String.valueOf(delayMs)).endEnv().addNewEnv().withName("LOG_LEVEL").withValue("DEBUG").endEnv().addNewEnv().withName("MESSAGE_COUNT").withValue(String.valueOf(messageCount)).endEnv().addNewEnv().withName("GROUP_ID").withValue(consumerGroup).endEnv().addNewEnv().withName("ADDITIONAL_CONFIG").withValue(this.getAdditionalConfig()).endEnv().endContainer().endSpec().endTemplate().endSpec();
}
Also used : PodSpecBuilder(io.fabric8.kubernetes.api.model.PodSpecBuilder) InvalidParameterException(java.security.InvalidParameterException) HashMap(java.util.HashMap) LocalObjectReference(io.fabric8.kubernetes.api.model.LocalObjectReference) JobBuilder(io.fabric8.kubernetes.api.model.batch.v1.JobBuilder)

Example 12 with JobBuilder

use of io.fabric8.kubernetes.api.model.batch.v1.JobBuilder in project strimzi-kafka-operator by strimzi.

the class KafkaClients method defaultProducerStrimzi.

public JobBuilder defaultProducerStrimzi() {
    if (producerName == null || producerName.isEmpty()) {
        throw new InvalidParameterException("Producer name is not set.");
    }
    Map<String, String> producerLabels = new HashMap<>();
    producerLabels.put("app", producerName);
    producerLabels.put(Constants.KAFKA_CLIENTS_LABEL_KEY, Constants.KAFKA_CLIENTS_LABEL_VALUE);
    PodSpecBuilder podSpecBuilder = new PodSpecBuilder();
    if (Environment.SYSTEM_TEST_STRIMZI_IMAGE_PULL_SECRET != null && !Environment.SYSTEM_TEST_STRIMZI_IMAGE_PULL_SECRET.isEmpty()) {
        List<LocalObjectReference> imagePullSecrets = Collections.singletonList(new LocalObjectReference(Environment.SYSTEM_TEST_STRIMZI_IMAGE_PULL_SECRET));
        podSpecBuilder.withImagePullSecrets(imagePullSecrets);
    }
    return new JobBuilder().withNewMetadata().withNamespace(this.getNamespaceName()).withLabels(producerLabels).withName(producerName).endMetadata().withNewSpec().withBackoffLimit(0).withNewTemplate().withNewMetadata().withName(producerName).withNamespace(this.getNamespaceName()).withLabels(producerLabels).endMetadata().withNewSpecLike(podSpecBuilder.build()).withRestartPolicy("Never").withContainers().addNewContainer().withName(producerName).withImagePullPolicy(Constants.IF_NOT_PRESENT_IMAGE_PULL_POLICY).withImage(Environment.TEST_PRODUCER_IMAGE).addNewEnv().withName("BOOTSTRAP_SERVERS").withValue(this.getBootstrapAddress()).endEnv().addNewEnv().withName("TOPIC").withValue(this.getTopicName()).endEnv().addNewEnv().withName("DELAY_MS").withValue(String.valueOf(delayMs)).endEnv().addNewEnv().withName("LOG_LEVEL").withValue("DEBUG").endEnv().addNewEnv().withName("MESSAGE_COUNT").withValue(String.valueOf(messageCount)).endEnv().addNewEnv().withName("MESSAGE").withValue(message).endEnv().addNewEnv().withName("PRODUCER_ACKS").withValue("all").endEnv().addNewEnv().withName("ADDITIONAL_CONFIG").withValue(this.getAdditionalConfig()).endEnv().addNewEnv().withName("BLOCKING_PRODUCER").withValue("true").endEnv().endContainer().endSpec().endTemplate().endSpec();
}
Also used : PodSpecBuilder(io.fabric8.kubernetes.api.model.PodSpecBuilder) InvalidParameterException(java.security.InvalidParameterException) HashMap(java.util.HashMap) LocalObjectReference(io.fabric8.kubernetes.api.model.LocalObjectReference) JobBuilder(io.fabric8.kubernetes.api.model.batch.v1.JobBuilder)

Example 13 with JobBuilder

use of io.fabric8.kubernetes.api.model.batch.v1.JobBuilder in project hugegraph-computer by hugegraph.

the class ComputerJobDeployer method getJob.

private Job getJob(String crName, ObjectMeta meta, ComputerJobSpec spec, int instances, List<Container> containers) {
    List<Volume> volumes = spec.getVolumes();
    if (volumes == null) {
        volumes = new ArrayList<>();
    } else {
        volumes = Lists.newArrayList(volumes);
    }
    volumes.addAll(this.getConfigMapAndSecretVolumes(spec));
    String configMapName = KubeUtil.configMapName(crName);
    Volume configVolume = this.getComputerConfigVolume(configMapName);
    volumes.add(configVolume);
    // Support PodSpec template
    PodTemplateSpec podTemplateSpec = spec.getPodTemplateSpec();
    if (podTemplateSpec == null) {
        podTemplateSpec = new PodTemplateSpec();
    } else {
        podTemplateSpec = Serialization.clone(podTemplateSpec);
    }
    ObjectMeta metadata = podTemplateSpec.getMetadata();
    if (metadata == null) {
        metadata = new ObjectMeta();
    }
    metadata = new ObjectMetaBuilder(metadata).addToLabels(meta.getLabels()).addToAnnotations(meta.getAnnotations()).build();
    podTemplateSpec.setMetadata(metadata);
    PodSpec podSpec = podTemplateSpec.getSpec();
    if (podSpec == null) {
        podSpec = new PodSpec();
    }
    podSpec.setVolumes(volumes);
    podSpec.setContainers(containers);
    podSpec.setRestartPolicy(JOB_RESTART_POLICY);
    if (podSpec.getTerminationGracePeriodSeconds() == null) {
        podSpec.setTerminationGracePeriodSeconds(TERMINATION_GRACE_PERIOD);
    }
    if (CollectionUtils.isEmpty(podSpec.getImagePullSecrets())) {
        podSpec.setImagePullSecrets(spec.getPullSecrets());
    }
    if (CollectionUtils.isEmpty(podSpec.getTopologySpreadConstraints())) {
        // Pod topology spread constraints default by node
        LabelSelector labelSelector = new LabelSelector();
        labelSelector.setMatchLabels(meta.getLabels());
        TopologySpreadConstraint spreadConstraint = new TopologySpreadConstraint(labelSelector, MAX_SKEW, TOPOLOGY_KEY, SCHEDULE_ANYWAY);
        podSpec.setTopologySpreadConstraints(Lists.newArrayList(spreadConstraint));
    }
    podTemplateSpec.setSpec(podSpec);
    return new JobBuilder().withMetadata(meta).withNewSpec().withParallelism(instances).withCompletions(instances).withBackoffLimit(JOB_BACKOFF_LIMIT).withTemplate(podTemplateSpec).endSpec().build();
}
Also used : ObjectMeta(io.fabric8.kubernetes.api.model.ObjectMeta) PodTemplateSpec(io.fabric8.kubernetes.api.model.PodTemplateSpec) Volume(io.fabric8.kubernetes.api.model.Volume) PodSpec(io.fabric8.kubernetes.api.model.PodSpec) TopologySpreadConstraint(io.fabric8.kubernetes.api.model.TopologySpreadConstraint) JobBuilder(io.fabric8.kubernetes.api.model.batch.v1.JobBuilder) LabelSelector(io.fabric8.kubernetes.api.model.LabelSelector) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder)

Example 14 with JobBuilder

use of io.fabric8.kubernetes.api.model.batch.v1.JobBuilder in project pipelite by enasequence.

the class KubernetesExecutor method submit.

@Override
protected SubmitResult submit(StageExecutorRequest request) {
    KubernetesExecutorParameters executorParams = getExecutorParams();
    context = executorParams.getContext();
    namespace = executorParams.getNamespace() != null ? executorParams.getNamespace() : "default";
    String jobId = createJobId();
    logContext(log.atFine(), request).log("Submitting Kubernetes job " + jobId);
    // Map<String, String> labelMap = new HashMap<>();
    // labelMap.put(..., ...);
    Map<String, Quantity> requestsMap = new HashMap<>();
    requestsMap.put("cpu", executorParams.getMemory());
    requestsMap.put("memory", executorParams.getCpu());
    Map<String, Quantity> limitsMap = new HashMap<>();
    limitsMap.put("cpu", executorParams.getMemoryLimit());
    limitsMap.put("memory", executorParams.getCpuLimit());
    try (KubernetesClient client = kubernetesClient(context)) {
        Job job = new JobBuilder().withApiVersion("batch/v1").withNewMetadata().withName(jobId).endMetadata().withNewSpec().withBackoffLimit(1).withTtlSecondsAfterFinished(KUBERNETES_TTL_SECONDS_AFTER_FINISHED).withNewTemplate().withNewSpec().addNewContainer().withName(jobId).withImage(image).withArgs(imageArgs).withNewResources().withRequests(requestsMap).withLimits(limitsMap).endResources().endContainer().withRestartPolicy("Never").endSpec().endTemplate().endSpec().build();
        RetryTask.DEFAULT.execute(r -> client.batch().v1().jobs().inNamespace(namespace).create(job));
        logContext(log.atInfo(), request).log("Submitted Kubernetes job " + jobId);
    } catch (KubernetesClientException e) {
        throw new PipeliteException("Kubernetes error", e);
    }
    return new SubmitResult(jobId, StageExecutorResult.submitted());
}
Also used : DefaultKubernetesClient(io.fabric8.kubernetes.client.DefaultKubernetesClient) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) Quantity(io.fabric8.kubernetes.api.model.Quantity) PipeliteException(pipelite.exception.PipeliteException) KubernetesExecutorParameters(pipelite.stage.parameters.KubernetesExecutorParameters) KubernetesClientException(io.fabric8.kubernetes.client.KubernetesClientException)

Example 15 with JobBuilder

use of io.fabric8.kubernetes.api.model.batch.v1.JobBuilder in project stackgres by ongres.

the class DbOpsJob method createJob.

@Override
public Job createJob(StackGresDbOpsContext context) {
    final StackGresDbOps dbOps = context.getSource();
    final String retries = String.valueOf(DbOpsUtil.getCurrentRetry(dbOps));
    List<EnvVar> runEnvVars = getRunEnvVars(context);
    List<EnvVar> setResultEnvVars = getSetResultEnvVars(context);
    final String namespace = dbOps.getMetadata().getNamespace();
    final String name = dbOps.getMetadata().getName();
    final Map<String, String> labels = dbOpsLabelFactory.dbOpsPodLabels(context.getSource());
    final String timeout = DbOpsUtil.getTimeout(dbOps);
    return new JobBuilder().withNewMetadata().withNamespace(namespace).withName(jobName(dbOps)).withLabels(labels).endMetadata().withNewSpec().withBackoffLimit(0).withCompletions(1).withParallelism(1).withNewTemplate().withNewMetadata().withNamespace(namespace).withName(jobName(dbOps)).withLabels(labels).endMetadata().withNewSpec().withSecurityContext(podSecurityFactory.createResource(context)).withRestartPolicy("Never").withServiceAccountName(DbOpsRole.roleName(context)).withInitContainers(new ContainerBuilder().withName("set-dbops-running").withImage(getSetResultImage()).withImagePullPolicy("IfNotPresent").withEnv(ImmutableList.<EnvVar>builder().addAll(clusterEnvironmentVariables.listResources(context)).add(new EnvVarBuilder().withName("OP_NAME").withValue(dbOps.getSpec().getOp()).build(), new EnvVarBuilder().withName("NORMALIZED_OP_NAME").withValue(UPPERCASE_PATTERN.matcher(dbOps.getSpec().getOp()).replaceAll(result -> " " + result.group(1).toLowerCase(Locale.US))).build(), new EnvVarBuilder().withName("KEBAB_OP_NAME").withValue(UPPERCASE_PATTERN.matcher(dbOps.getSpec().getOp()).replaceAll(result -> "-" + result.group(1).toLowerCase(Locale.US))).build(), new EnvVarBuilder().withName("CLUSTER_NAMESPACE").withValue(namespace).build(), new EnvVarBuilder().withName("DB_OPS_NAME").withValue(name).build(), new EnvVarBuilder().withName("DB_OPS_CRD_NAME").withValue(CustomResource.getCRDName(StackGresDbOps.class)).build(), new EnvVarBuilder().withName("CURRENT_RETRY").withValue(retries).build()).addAll(Seq.of(DbOpsStatusCondition.values()).map(c -> new EnvVarBuilder().withName("CONDITION_" + c.name()).withValue(conditions.get(c)).build()).toList()).build()).withCommand("/bin/sh", "-ex", ClusterStatefulSetPath.LOCAL_BIN_SET_DBOPS_RUNNING_SH_PATH.path()).withVolumeMounts(ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(ClusterStatefulSetPath.LOCAL_BIN_SET_DBOPS_RUNNING_SH_PATH.filename()).withMountPath(ClusterStatefulSetPath.LOCAL_BIN_SET_DBOPS_RUNNING_SH_PATH.path()).withReadOnly(true)), ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(ClusterStatefulSetPath.LOCAL_BIN_SHELL_UTILS_PATH.filename()).withMountPath(ClusterStatefulSetPath.LOCAL_BIN_SHELL_UTILS_PATH.path()).withReadOnly(true))).build()).withContainers(new ContainerBuilder().withName("run-dbops").withImage(getRunImage(context)).withImagePullPolicy("IfNotPresent").withEnv(ImmutableList.<EnvVar>builder().addAll(clusterEnvironmentVariables.listResources(context)).add(new EnvVarBuilder().withName("OP_NAME").withValue(dbOps.getSpec().getOp()).build(), new EnvVarBuilder().withName("EXCLUSIVE_OP").withValue(String.valueOf(isExclusiveOp())).build(), new EnvVarBuilder().withName("NORMALIZED_OP_NAME").withValue(UPPERCASE_PATTERN.matcher(dbOps.getSpec().getOp()).replaceAll(result -> " " + result.group(1).toLowerCase(Locale.US))).build(), new EnvVarBuilder().withName("KEBAB_OP_NAME").withValue(UPPERCASE_PATTERN.matcher(dbOps.getSpec().getOp()).replaceAll(result -> "-" + result.group(1).toLowerCase(Locale.US))).build(), new EnvVarBuilder().withName("RUN_SCRIPT_PATH").withValue(Optional.ofNullable(getRunScript()).map(ClusterStatefulSetPath::path).orElse("")).build(), new EnvVarBuilder().withName("TIMEOUT").withValue(timeout).build()).addAll(runEnvVars).build()).withCommand("/bin/sh", "-ex", ClusterStatefulSetPath.LOCAL_BIN_RUN_DBOPS_SH_PATH.path()).withVolumeMounts(ClusterStatefulSetVolumeConfig.SHARED.volumeMount(context), ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(ClusterStatefulSetPath.LOCAL_BIN_RUN_DBOPS_SH_PATH.filename()).withMountPath(ClusterStatefulSetPath.LOCAL_BIN_RUN_DBOPS_SH_PATH.path()).withReadOnly(true)), ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(ClusterStatefulSetPath.LOCAL_BIN_SHELL_UTILS_PATH.filename()).withMountPath(ClusterStatefulSetPath.LOCAL_BIN_SHELL_UTILS_PATH.path()).withReadOnly(true)), ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(getRunScript().filename()).withMountPath(getRunScript().path()).withReadOnly(true))).build(), new ContainerBuilder().withName("set-dbops-result").withImage(StackGresComponent.KUBECTL.findLatestImageName()).withImagePullPolicy("IfNotPresent").withEnv(ImmutableList.<EnvVar>builder().addAll(clusterEnvironmentVariables.listResources(context)).add(new EnvVarBuilder().withName("OP_NAME").withValue(dbOps.getSpec().getOp()).build(), new EnvVarBuilder().withName("NORMALIZED_OP_NAME").withValue(UPPERCASE_PATTERN.matcher(dbOps.getSpec().getOp()).replaceAll(result -> " " + result.group(1).toLowerCase(Locale.US))).build(), new EnvVarBuilder().withName("KEBAB_OP_NAME").withValue(UPPERCASE_PATTERN.matcher(dbOps.getSpec().getOp()).replaceAll(result -> "-" + result.group(1).toLowerCase(Locale.US))).build(), new EnvVarBuilder().withName("SET_RESULT_SCRIPT_PATH").withValue(Optional.ofNullable(getSetResultScript()).map(ClusterStatefulSetPath::path).orElse("")).build(), new EnvVarBuilder().withName("CLUSTER_NAMESPACE").withValue(namespace).build(), new EnvVarBuilder().withName("DB_OPS_NAME").withValue(name).build(), new EnvVarBuilder().withName("DB_OPS_CRD_NAME").withValue(CustomResource.getCRDName(StackGresDbOps.class)).build(), new EnvVarBuilder().withName("JOB_POD_LABELS").withValue(Seq.seq(labels).append(Tuple.tuple("job-name", jobName(dbOps))).map(t -> t.v1 + "=" + t.v2).toString(",")).build()).addAll(Seq.of(DbOpsStatusCondition.values()).map(c -> new EnvVarBuilder().withName("CONDITION_" + c.name()).withValue(conditions.get(c)).build()).toList()).addAll(setResultEnvVars).build()).withCommand("/bin/sh", "-ex", ClusterStatefulSetPath.LOCAL_BIN_SET_DBOPS_RESULT_SH_PATH.path()).withVolumeMounts(ClusterStatefulSetVolumeConfig.SHARED.volumeMount(context), ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(ClusterStatefulSetPath.LOCAL_BIN_SET_DBOPS_RESULT_SH_PATH.filename()).withMountPath(ClusterStatefulSetPath.LOCAL_BIN_SET_DBOPS_RESULT_SH_PATH.path()).withReadOnly(true)), ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(ClusterStatefulSetPath.LOCAL_BIN_SHELL_UTILS_PATH.filename()).withMountPath(ClusterStatefulSetPath.LOCAL_BIN_SHELL_UTILS_PATH.path()).withReadOnly(true))).addAllToVolumeMounts(Optional.ofNullable(getSetResultScript()).map(script -> ClusterStatefulSetVolumeConfig.TEMPLATES.volumeMount(context, volumeMountBuilder -> volumeMountBuilder.withSubPath(script.filename()).withMountPath(script.path()).withReadOnly(true))).stream().collect(Collectors.toList())).build()).withVolumes(ClusterStatefulSetVolumeConfig.SHARED.volume(context), new VolumeBuilder(ClusterStatefulSetVolumeConfig.TEMPLATES.volume(context)).editConfigMap().withDefaultMode(// NOPMD
    0555).endConfigMap().build()).endSpec().endTemplate().endSpec().build();
}
Also used : PodSecurityContext(io.fabric8.kubernetes.api.model.PodSecurityContext) EnvVar(io.fabric8.kubernetes.api.model.EnvVar) StackGresCluster(io.stackgres.common.crd.sgcluster.StackGresCluster) Seq(org.jooq.lambda.Seq) StackGresDbOps(io.stackgres.common.crd.sgdbops.StackGresDbOps) Inject(javax.inject.Inject) StackGresDbOpsContext(io.stackgres.operator.conciliation.dbops.StackGresDbOpsContext) Tuple2(org.jooq.lambda.tuple.Tuple2) ImmutableList(com.google.common.collect.ImmutableList) DbOpsEnvironmentVariables(io.stackgres.operator.cluster.factory.DbOpsEnvironmentVariables) ClusterStatefulSetPath(io.stackgres.common.ClusterStatefulSetPath) Locale(java.util.Locale) Map(java.util.Map) LabelFactoryForDbOps(io.stackgres.common.LabelFactoryForDbOps) ContainerBuilder(io.fabric8.kubernetes.api.model.ContainerBuilder) DbOpsUtil(io.stackgres.common.DbOpsUtil) Job(io.fabric8.kubernetes.api.model.batch.v1.Job) ResourceFactory(io.stackgres.operator.conciliation.factory.ResourceFactory) JobBuilder(io.fabric8.kubernetes.api.model.batch.v1.JobBuilder) Unchecked(org.jooq.lambda.Unchecked) ImmutableMap(com.google.common.collect.ImmutableMap) LabelFactoryForCluster(io.stackgres.common.LabelFactoryForCluster) EnvVarBuilder(io.fabric8.kubernetes.api.model.EnvVarBuilder) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) Collectors(java.util.stream.Collectors) JsonMapper(com.fasterxml.jackson.databind.json.JsonMapper) DbOpsStatusCondition(io.stackgres.common.crd.sgdbops.DbOpsStatusCondition) StackGresComponent(io.stackgres.common.StackGresComponent) List(java.util.List) ClusterStatefulSetVolumeConfig(io.stackgres.operator.conciliation.factory.cluster.patroni.ClusterStatefulSetVolumeConfig) Tuple(org.jooq.lambda.tuple.Tuple) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) CustomResource(io.fabric8.kubernetes.client.CustomResource) ContainerBuilder(io.fabric8.kubernetes.api.model.ContainerBuilder) JobBuilder(io.fabric8.kubernetes.api.model.batch.v1.JobBuilder) EnvVar(io.fabric8.kubernetes.api.model.EnvVar) StackGresDbOps(io.stackgres.common.crd.sgdbops.StackGresDbOps) ClusterStatefulSetPath(io.stackgres.common.ClusterStatefulSetPath) VolumeBuilder(io.fabric8.kubernetes.api.model.VolumeBuilder) EnvVarBuilder(io.fabric8.kubernetes.api.model.EnvVarBuilder)

Aggregations

JobBuilder (io.fabric8.kubernetes.api.model.batch.v1.JobBuilder)37 HashMap (java.util.HashMap)13 LocalObjectReference (io.fabric8.kubernetes.api.model.LocalObjectReference)12 PodSpecBuilder (io.fabric8.kubernetes.api.model.PodSpecBuilder)12 Job (io.fabric8.kubernetes.api.model.batch.v1.Job)11 Test (org.junit.jupiter.api.Test)10 ContainerBuilder (io.fabric8.kubernetes.api.model.ContainerBuilder)8 EnvVarBuilder (io.fabric8.kubernetes.api.model.EnvVarBuilder)5 KubernetesListBuilder (io.fabric8.kubernetes.api.model.KubernetesListBuilder)5 LabelSelector (io.fabric8.kubernetes.api.model.LabelSelector)4 StackGresDbOps (io.stackgres.common.crd.sgdbops.StackGresDbOps)4 Test (org.junit.Test)4 Pod (io.fabric8.kubernetes.api.model.Pod)3 PodBuilder (io.fabric8.kubernetes.api.model.PodBuilder)3 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)3 KubernetesClientException (io.fabric8.kubernetes.client.KubernetesClientException)3 InvalidParameterException (java.security.InvalidParameterException)3 Container (io.fabric8.kubernetes.api.model.Container)2 EnvVar (io.fabric8.kubernetes.api.model.EnvVar)2 KubernetesList (io.fabric8.kubernetes.api.model.KubernetesList)2