EntityTopicOperator extends AbstractModel { @Override protected List<EnvVar> getEnvVars() { List<EnvVar> varList = new ArrayList<>(); varList.add(buildEnvVar(ENV_VAR_RESOURCE_LABELS, resourceLabels)); varList.add(buildEnvVar(ENV_VAR_KAFKA_BOOTSTRAP_SERVERS, kafkaBootstrapServers)); varList.add(buildEnvVar(ENV_VAR_ZOOKEEPER_CONNECT, zookeeperConnect)); varList.add(buildEnvVar(ENV_VAR_WATCHED_NAMESPACE, watchedNamespace)); varList.add(buildEnvVar(ENV_VAR_FULL_RECONCILIATION_INTERVAL_MS, Integer.toString(reconciliationIntervalMs))); varList.add(buildEnvVar(ENV_VAR_ZOOKEEPER_SESSION_TIMEOUT_MS, Integer.toString(zookeeperSessionTimeoutMs))); varList.add(buildEnvVar(ENV_VAR_TOPIC_METADATA_MAX_ATTEMPTS, String.valueOf(topicMetadataMaxAttempts))); varList.add(buildEnvVar(ENV_VAR_TLS_ENABLED, Boolean.toString(true))); varList.add(buildEnvVar(ENV_VAR_STRIMZI_GC_LOG_ENABLED, String.valueOf(gcLoggingEnabled))); EntityOperator.javaOptions(varList, getJvmOptions(), javaSystemProperties); varList.addAll(getRequiredEnvVars()); addContainerEnvsToExistingEnvs(varList, templateContainerEnvVars); return varList; } protected  EntityTopicOperator(HasMetadata resource); void setWatchedNamespace(String watchedNamespace); String getWatchedNamespace(); void setResourceLabels(String resourceLabels); String getResourceLabels(); void setReconciliationIntervalMs(int reconciliationIntervalMs); int getReconciliationIntervalMs(); void setZookeeperSessionTimeoutMs(int zookeeperSessionTimeoutMs); int getZookeeperSessionTimeoutMs(); void setKafkaBootstrapServers(String kafkaBootstrapServers); String getKafkaBootstrapServers(); void setTopicMetadataMaxAttempts(int topicMetadataMaxAttempts); int getTopicMetadataMaxAttempts(); void setZookeeperConnect(String zookeeperConnect); String getZookeeperConnect(); static String topicOperatorName(String cluster); static String metricAndLogConfigsName(String cluster); static String roleBindingName(String cluster); @Override String getAncillaryConfigMapKeyLogConfig(); static EntityTopicOperator fromCrd(Kafka kafkaAssembly); List<Volume> getVolumes(); RoleBinding generateRoleBinding(String namespace, String watchedNamespace); void setContainerEnvVars(List<ContainerEnvVar> envVars); void setContainerSecurityContext(SecurityContext securityContext); @Override String createLog4jProperties(OrderedProperties properties); static final String ENV_VAR_RESOURCE_LABELS; static final String ENV_VAR_KAFKA_BOOTSTRAP_SERVERS; static final String ENV_VAR_ZOOKEEPER_CONNECT; static final String ENV_VAR_WATCHED_NAMESPACE; static final String ENV_VAR_FULL_RECONCILIATION_INTERVAL_MS; static final String ENV_VAR_ZOOKEEPER_SESSION_TIMEOUT_MS; static final String ENV_VAR_TOPIC_METADATA_MAX_ATTEMPTS; static final String ENV_VAR_TLS_ENABLED; static final Probe DEFAULT_HEALTHCHECK_OPTIONS; }
@Test public void testEnvVars() { assertThat(entityTopicOperator.getEnvVars(), is(getExpectedEnvVars())); }