KafkaConnectCluster extends AbstractModel { @Override protected List<EnvVar> getEnvVars() { List<EnvVar> varList = new ArrayList<>(); varList.add(buildEnvVar(ENV_VAR_KAFKA_CONNECT_CONFIGURATION, configuration.getConfiguration())); varList.add(buildEnvVar(ENV_VAR_KAFKA_CONNECT_METRICS_ENABLED, String.valueOf(isMetricsEnabled))); varList.add(buildEnvVar(ENV_VAR_KAFKA_CONNECT_BOOTSTRAP_SERVERS, bootstrapServers)); varList.add(buildEnvVar(ENV_VAR_STRIMZI_KAFKA_GC_LOG_ENABLED, String.valueOf(gcLoggingEnabled))); if (javaSystemProperties != null) { varList.add(buildEnvVar(ENV_VAR_STRIMZI_JAVA_SYSTEM_PROPERTIES, ModelUtils.getJavaSystemPropertiesToString(javaSystemProperties))); } heapOptions(varList, 1.0, 0L); jvmPerformanceOptions(varList); if (tls != null) { populateTLSEnvVars(varList); } AuthenticationUtils.configureClientAuthenticationEnvVars(authentication, varList, name -> ENV_VAR_PREFIX + name); if (tracing != null) { varList.add(buildEnvVar(ENV_VAR_STRIMZI_TRACING, tracing.getType())); } varList.addAll(getRequiredEnvVars()); varList.addAll(getExternalConfigurationEnvVars()); addContainerEnvsToExistingEnvs(varList, templateContainerEnvVars); return varList; } protected  KafkaConnectCluster(HasMetadata resource); protected  KafkaConnectCluster(HasMetadata resource, String applicationName); static KafkaConnectCluster fromCrd(KafkaConnect kafkaConnect, KafkaVersion.Lookup versions); Service generateService(); Deployment generateDeployment(Map<String, String> annotations, boolean isOpenShift, ImagePullPolicy imagePullPolicy, List<LocalObjectReference> imagePullSecrets); PodDisruptionBudget generatePodDisruptionBudget(); @Override String getServiceAccountName(); NetworkPolicy generateNetworkPolicy(boolean namespaceAndPodSelectorNetworkPolicySupported, boolean connectorOperatorEnabled); Tracing getTracing(); ClusterRoleBinding generateClusterRoleBinding(); static final int REST_API_PORT; static final Probe DEFAULT_HEALTHCHECK_OPTIONS; }
@Test public void testEnvVars() { assertThat(kc.getEnvVars(), is(getExpectedEnvVars())); }