use of io.kubernetes.client.models.V1Container in project weblogic-kubernetes-operator by oracle.
the class CreateOperatorGeneratedFilesOptionalFeaturesEnabledTest method getExpectedWeblogicOperatorDeployment.
@Override
public ExtensionsV1beta1Deployment getExpectedWeblogicOperatorDeployment() {
ExtensionsV1beta1Deployment expected = super.getExpectedWeblogicOperatorDeployment();
V1Container operatorContainer = expected.getSpec().getTemplate().getSpec().getContainers().get(0);
operatorContainer.addVolumeMountsItem(newVolumeMount().name("log-dir").mountPath("/logs").readOnly(false)).addEnvItem(newEnvVar().name("REMOTE_DEBUG_PORT").value(getInputs().getInternalDebugHttpPort()));
expected.getSpec().getTemplate().getSpec().addContainersItem(newContainer().name("logstash").image("logstash:5").addArgsItem("-f").addArgsItem("/logs/logstash.conf").addEnvItem(newEnvVar().name("ELASTICSEARCH_HOST").value("elasticsearch.default.svc.cluster.local")).addEnvItem(newEnvVar().name("ELASTICSEARCH_PORT").value("9200")).addVolumeMountsItem(newVolumeMount().name("log-dir").mountPath("/logs"))).addVolumesItem(newVolume().name("log-dir").emptyDir(newEmptyDirVolumeSource().medium("Memory"))).addImagePullSecretsItem(newLocalObjectReference().name(getInputs().getWeblogicOperatorImagePullSecretName()));
return expected;
}
Aggregations