Search in sources :

Example 1 with ImageLookupPolicyBuilder

use of io.fabric8.openshift.api.model.ImageLookupPolicyBuilder in project strimzi by strimzi.

the class KafkaConnectS2ICluster method generateSourceImageStream.

/**
 * Generate new source ImageStream
 *
 * @return      Source ImageStream resource definition
 */
public ImageStream generateSourceImageStream() {
    ObjectReference image = new ObjectReference();
    image.setKind("DockerImage");
    image.setName(sourceImageBaseName + ":" + sourceImageTag);
    TagReference sourceTag = new TagReference();
    sourceTag.setName(sourceImageTag);
    sourceTag.setFrom(image);
    ImageStream imageStream = new ImageStreamBuilder().withNewMetadata().withName(getSourceImageStreamName()).withNamespace(namespace).withLabels(getLabelsWithName(getSourceImageStreamName())).endMetadata().withNewSpec().withLookupPolicy(new ImageLookupPolicyBuilder().withLocal(false).build()).withTags(sourceTag).endSpec().build();
    return imageStream;
}
Also used : ImageStreamBuilder(io.fabric8.openshift.api.model.ImageStreamBuilder) ObjectReference(io.fabric8.kubernetes.api.model.ObjectReference) ImageStream(io.fabric8.openshift.api.model.ImageStream) TagReference(io.fabric8.openshift.api.model.TagReference) ImageLookupPolicyBuilder(io.fabric8.openshift.api.model.ImageLookupPolicyBuilder)

Aggregations

ObjectReference (io.fabric8.kubernetes.api.model.ObjectReference)1 ImageLookupPolicyBuilder (io.fabric8.openshift.api.model.ImageLookupPolicyBuilder)1 ImageStream (io.fabric8.openshift.api.model.ImageStream)1 ImageStreamBuilder (io.fabric8.openshift.api.model.ImageStreamBuilder)1 TagReference (io.fabric8.openshift.api.model.TagReference)1