use of io.strimzi.operator.cluster.model.UnsupportedVersionException 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;
}
use of io.strimzi.operator.cluster.model.UnsupportedVersionException 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;
}
Aggregations