@Test public void testDefaultSecurityContext() { Deployment dep = cc.generateDeployment(true, null, null, null); assertThat(dep.getSpec().getTemplate().getSpec().getSecurityContext(), is(nullValue())); }
public Deployment generateDeployment(boolean isOpenShift, Map<String, String> annotations, ImagePullPolicy imagePullPolicy, List<LocalObjectReference> imagePullSecrets) { if (!isDeployed()) { return null; } DeploymentStrategy updateStrategy = new DeploymentStrategyBuilder() .withType("RollingUpdate") .withRollingUpdate(new RollingUpdateDeploymentBuilder() .withMaxSurge(new IntOrString(1)) .withMaxUnavailable(new IntOrString(0)) .build()) .build(); return createDeployment( updateStrategy, Collections.emptyMap(), Collections.emptyMap(), getMergedAffinity(), getInitContainers(imagePullPolicy), getContainers(imagePullPolicy), getVolumes(isOpenShift), imagePullSecrets); }
CruiseControl extends AbstractModel { public Deployment generateDeployment(boolean isOpenShift, Map<String, String> annotations, ImagePullPolicy imagePullPolicy, List<LocalObjectReference> imagePullSecrets) { if (!isDeployed()) { return null; } DeploymentStrategy updateStrategy = new DeploymentStrategyBuilder() .withType("RollingUpdate") .withRollingUpdate(new RollingUpdateDeploymentBuilder() .withMaxSurge(new IntOrString(1)) .withMaxUnavailable(new IntOrString(0)) .build()) .build(); return createDeployment( updateStrategy, Collections.emptyMap(), Collections.emptyMap(), getMergedAffinity(), getInitContainers(imagePullPolicy), getContainers(imagePullPolicy), getVolumes(isOpenShift), imagePullSecrets); } }
CruiseControl extends AbstractModel { public Deployment generateDeployment(boolean isOpenShift, Map<String, String> annotations, ImagePullPolicy imagePullPolicy, List<LocalObjectReference> imagePullSecrets) { if (!isDeployed()) { return null; } DeploymentStrategy updateStrategy = new DeploymentStrategyBuilder() .withType("RollingUpdate") .withRollingUpdate(new RollingUpdateDeploymentBuilder() .withMaxSurge(new IntOrString(1)) .withMaxUnavailable(new IntOrString(0)) .build()) .build(); return createDeployment( updateStrategy, Collections.emptyMap(), Collections.emptyMap(), getMergedAffinity(), getInitContainers(imagePullPolicy), getContainers(imagePullPolicy), getVolumes(isOpenShift), imagePullSecrets); } protected  CruiseControl(HasMetadata resource); }
CruiseControl extends AbstractModel { public Deployment generateDeployment(boolean isOpenShift, Map<String, String> annotations, ImagePullPolicy imagePullPolicy, List<LocalObjectReference> imagePullSecrets) { if (!isDeployed()) { return null; } DeploymentStrategy updateStrategy = new DeploymentStrategyBuilder() .withType("RollingUpdate") .withRollingUpdate(new RollingUpdateDeploymentBuilder() .withMaxSurge(new IntOrString(1)) .withMaxUnavailable(new IntOrString(0)) .build()) .build(); return createDeployment( updateStrategy, Collections.emptyMap(), Collections.emptyMap(), getMergedAffinity(), getInitContainers(imagePullPolicy), getContainers(imagePullPolicy), getVolumes(isOpenShift), imagePullSecrets); } 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); }
CruiseControl extends AbstractModel { public Deployment generateDeployment(boolean isOpenShift, Map<String, String> annotations, ImagePullPolicy imagePullPolicy, List<LocalObjectReference> imagePullSecrets) { if (!isDeployed()) { return null; } DeploymentStrategy updateStrategy = new DeploymentStrategyBuilder() .withType("RollingUpdate") .withRollingUpdate(new RollingUpdateDeploymentBuilder() .withMaxSurge(new IntOrString(1)) .withMaxUnavailable(new IntOrString(0)) .build()) .build(); return createDeployment( updateStrategy, Collections.emptyMap(), Collections.emptyMap(), getMergedAffinity(), getInitContainers(imagePullPolicy), getContainers(imagePullPolicy), getVolumes(isOpenShift), imagePullSecrets); } 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; }