Search in sources :

Example 1 with KafkaConnectTemplateBuilder

use of io.strimzi.api.kafka.model.template.KafkaConnectTemplateBuilder in project debezium by debezium.

the class OcpKafkaConnectDeployer method configurePullSecret.

private void configurePullSecret(KafkaConnectBuilder kcBuilder, Build kcBuild) {
    KafkaConnectTemplate template = kcBuilder.buildSpec().getTemplate();
    KafkaConnectTemplateBuilder templateBuilder = new KafkaConnectTemplateBuilder(template);
    if (kcBuild == null) {
        templateBuilder.withNewPod().addNewImagePullSecret(pullSecretName);
    } else {
        templateBuilder.withNewBuildConfig().withPullSecret(pullSecretName).endBuildConfig();
    }
    kcBuilder.editSpec().withTemplate(templateBuilder.build()).endSpec();
}
Also used : KafkaConnectTemplate(io.strimzi.api.kafka.model.template.KafkaConnectTemplate) KafkaConnectTemplateBuilder(io.strimzi.api.kafka.model.template.KafkaConnectTemplateBuilder)

Aggregations

KafkaConnectTemplate (io.strimzi.api.kafka.model.template.KafkaConnectTemplate)1 KafkaConnectTemplateBuilder (io.strimzi.api.kafka.model.template.KafkaConnectTemplateBuilder)1