CruiseControl extends AbstractModel { @Override protected List<EnvVar> getEnvVars() { List<EnvVar> varList = new ArrayList<>(); varList.add(buildEnvVar(ENV_VAR_CRUISE_CONTROL_METRICS_ENABLED, String.valueOf(isMetricsEnabled))); varList.add(buildEnvVar(ENV_VAR_STRIMZI_KAFKA_BOOTSTRAP_SERVERS, String.valueOf(defaultBootstrapServers(cluster)))); varList.add(buildEnvVar(ENV_VAR_STRIMZI_KAFKA_GC_LOG_ENABLED, String.valueOf(gcLoggingEnabled))); varList.add(buildEnvVar(ENV_VAR_MIN_INSYNC_REPLICAS, String.valueOf(minInsyncReplicas))); varList.add(buildEnvVar(ENV_VAR_BROKER_DISK_MIB_CAPACITY, String.valueOf(brokerDiskMiBCapacity))); varList.add(buildEnvVar(ENV_VAR_BROKER_CPU_UTILIZATION_CAPACITY, String.valueOf(brokerCpuUtilizationCapacity))); varList.add(buildEnvVar(ENV_VAR_BROKER_INBOUND_NETWORK_KIB_PER_SECOND_CAPACITY, String.valueOf(brokerInboundNetworkKiBPerSecondCapacity))); varList.add(buildEnvVar(ENV_VAR_BROKER_OUTBOUND_NETWORK_KIB_PER_SECOND_CAPACITY, String.valueOf(brokerOuboundNetworkKiBPerSecondCapacity))); heapOptions(varList, 1.0, 0L); jvmPerformanceOptions(varList); if (configuration != null && !configuration.getConfiguration().isEmpty()) { varList.add(buildEnvVar(ENV_VAR_CRUISE_CONTROL_CONFIGURATION, configuration.getConfiguration())); } varList.addAll(getRequiredEnvVars()); addContainerEnvsToExistingEnvs(varList, templateCruiseControlContainerEnvVars); return varList; } protected  CruiseControl(HasMetadata resource); static String metricAndLogConfigsName(String cluster); static CruiseControl fromCrd(Kafka kafkaAssembly, KafkaVersion.Lookup versions); static CruiseControl updateConfiguration(CruiseControlSpec spec, CruiseControl cruiseControl); static void checkGoals(CruiseControlConfiguration configuration); static CruiseControl updateTemplate(CruiseControlSpec spec, CruiseControl cruiseControl); static String cruiseControlName(String cluster); static String cruiseControlServiceName(String cluster); Service generateService(); Deployment generateDeployment(boolean isOpenShift, Map<String, String> annotations, ImagePullPolicy imagePullPolicy, List<LocalObjectReference> imagePullSecrets); PodDisruptionBudget generatePodDisruptionBudget(); static String cruiseControlServiceAccountName(String cluster); static String secretName(String kafkaCluster); Secret generateSecret(ClusterCa clusterCa, boolean isMaintenanceTimeWindowsSatisfied); static String policyName(String cluster); NetworkPolicy generateNetworkPolicy(boolean namespaceAndPodSelectorNetworkPolicySupported); static final String CRUISE_CONTROL_METRIC_REPORTER; static final String ANNO_STRIMZI_IO_LOGGING; static final String ENV_VAR_CRUISE_CONTROL_METRICS_ENABLED; static final boolean DEFAULT_CRUISE_CONTROL_METRICS_ENABLED; static final Probe DEFAULT_HEALTHCHECK_OPTIONS; static final String REST_API_PORT_NAME; static final int REST_API_PORT; static final String MIN_INSYNC_REPLICAS; }
@Test public void testEnvVars() { assertThat(cc.getEnvVars(), is(getExpectedEnvVars())); }