Search in sources :

Example 1 with NoImageException

use of io.strimzi.operator.cluster.model.NoImageException in project strimzi by strimzi.

the class ClusterOperatorConfig method parseKafkaVersions.

private static KafkaVersion.Lookup parseKafkaVersions(String kafkaImages, String connectImages, String mirrorMakerImages, String mirrorMaker2Images) {
    KafkaVersion.Lookup lookup = new KafkaVersion.Lookup(Util.parseMap(kafkaImages), Util.parseMap(connectImages), Util.parseMap(mirrorMakerImages), Util.parseMap(mirrorMaker2Images));
    String image = "";
    String envVar = "";
    try {
        image = "Kafka";
        envVar = STRIMZI_KAFKA_IMAGES;
        lookup.validateKafkaImages(lookup.supportedVersions());
        image = "Kafka Connect";
        envVar = STRIMZI_KAFKA_CONNECT_IMAGES;
        lookup.validateKafkaConnectImages(lookup.supportedVersions());
        image = "Kafka Mirror Maker";
        envVar = STRIMZI_KAFKA_MIRROR_MAKER_IMAGES;
        lookup.validateKafkaMirrorMakerImages(lookup.supportedVersions());
        image = "Kafka Mirror Maker 2";
        envVar = STRIMZI_KAFKA_MIRROR_MAKER_2_IMAGES;
        lookup.validateKafkaMirrorMaker2Images(lookup.supportedVersionsForFeature("kafkaMirrorMaker2"));
    } catch (NoImageException | UnsupportedVersionException e) {
        throw new InvalidConfigurationException("Failed to parse default container image configuration for " + image + " from environment variable " + envVar, e);
    }
    return lookup;
}
Also used : KafkaVersion(io.strimzi.operator.cluster.model.KafkaVersion) NoImageException(io.strimzi.operator.cluster.model.NoImageException) UnsupportedVersionException(io.strimzi.operator.cluster.model.UnsupportedVersionException) InvalidConfigurationException(io.strimzi.operator.common.InvalidConfigurationException)

Example 2 with NoImageException

use of io.strimzi.operator.cluster.model.NoImageException in project strimzi-kafka-operator by strimzi.

the class ClusterOperatorConfig method parseKafkaVersions.

private static KafkaVersion.Lookup parseKafkaVersions(String kafkaImages, String connectImages, String mirrorMakerImages, String mirrorMaker2Images) {
    KafkaVersion.Lookup lookup = new KafkaVersion.Lookup(Util.parseMap(kafkaImages), Util.parseMap(connectImages), Util.parseMap(mirrorMakerImages), Util.parseMap(mirrorMaker2Images));
    String image = "";
    String envVar = "";
    try {
        image = "Kafka";
        envVar = STRIMZI_KAFKA_IMAGES;
        lookup.validateKafkaImages(lookup.supportedVersions());
        image = "Kafka Connect";
        envVar = STRIMZI_KAFKA_CONNECT_IMAGES;
        lookup.validateKafkaConnectImages(lookup.supportedVersions());
        image = "Kafka Mirror Maker";
        envVar = STRIMZI_KAFKA_MIRROR_MAKER_IMAGES;
        lookup.validateKafkaMirrorMakerImages(lookup.supportedVersions());
        image = "Kafka Mirror Maker 2";
        envVar = STRIMZI_KAFKA_MIRROR_MAKER_2_IMAGES;
        lookup.validateKafkaMirrorMaker2Images(lookup.supportedVersionsForFeature("kafkaMirrorMaker2"));
    } catch (NoImageException | UnsupportedVersionException e) {
        throw new InvalidConfigurationException("Failed to parse default container image configuration for " + image + " from environment variable " + envVar, e);
    }
    return lookup;
}
Also used : KafkaVersion(io.strimzi.operator.cluster.model.KafkaVersion) NoImageException(io.strimzi.operator.cluster.model.NoImageException) UnsupportedVersionException(io.strimzi.operator.cluster.model.UnsupportedVersionException) InvalidConfigurationException(io.strimzi.operator.common.InvalidConfigurationException)

Aggregations

KafkaVersion (io.strimzi.operator.cluster.model.KafkaVersion)2 NoImageException (io.strimzi.operator.cluster.model.NoImageException)2 UnsupportedVersionException (io.strimzi.operator.cluster.model.UnsupportedVersionException)2 InvalidConfigurationException (io.strimzi.operator.common.InvalidConfigurationException)2