KafkaExporter extends AbstractModel { @Override protected List<EnvVar> getEnvVars() { List<EnvVar> varList = new ArrayList<>(); varList.add(buildEnvVar(ENV_VAR_KAFKA_EXPORTER_LOGGING, logging)); varList.add(buildEnvVar(ENV_VAR_KAFKA_EXPORTER_KAFKA_VERSION, version)); varList.add(buildEnvVar(ENV_VAR_KAFKA_EXPORTER_GROUP_REGEX, groupRegex)); varList.add(buildEnvVar(ENV_VAR_KAFKA_EXPORTER_TOPIC_REGEX, topicRegex)); varList.add(buildEnvVar(ENV_VAR_KAFKA_EXPORTER_KAFKA_SERVER, KafkaCluster.serviceName(cluster) + ":" + KafkaCluster.REPLICATION_PORT)); varList.add(buildEnvVar(ENV_VAR_KAFKA_EXPORTER_ENABLE_SARAMA, String.valueOf(saramaLoggingEnabled))); varList.addAll(getRequiredEnvVars()); addContainerEnvsToExistingEnvs(varList, templateContainerEnvVars); return varList; } protected  KafkaExporter(HasMetadata resource); static KafkaExporter fromCrd(Kafka kafkaAssembly, KafkaVersion.Lookup versions); Deployment generateDeployment(boolean isOpenShift, ImagePullPolicy imagePullPolicy, List<LocalObjectReference> imagePullSecrets); static String kafkaExporterName(String kafkaCluster); static String secretName(String kafkaCluster); static String containerServiceAccountName(String kafkaCluster); Secret generateSecret(ClusterCa clusterCa, boolean isMaintenanceTimeWindowsSatisfied); static final Probe READINESS_PROBE_OPTIONS; }
@Test public void testEnvVars() { assertThat(ke.getEnvVars(), is(getExpectedEnvVars())); }