Search in sources :

Example 6 with V1Container

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;
}
Also used : V1Container(io.kubernetes.client.models.V1Container) ExtensionsV1beta1Deployment(io.kubernetes.client.models.ExtensionsV1beta1Deployment)

Aggregations

V1Container (io.kubernetes.client.models.V1Container)6 IntOrString (io.kubernetes.client.custom.IntOrString)2 ExtensionsV1beta1Deployment (io.kubernetes.client.models.ExtensionsV1beta1Deployment)2 V1EnvVar (io.kubernetes.client.models.V1EnvVar)2 V1EnvVarSource (io.kubernetes.client.models.V1EnvVarSource)2 V1ObjectFieldSelector (io.kubernetes.client.models.V1ObjectFieldSelector)2 V1PodSpec (io.kubernetes.client.models.V1PodSpec)2 V1ResourceRequirements (io.kubernetes.client.models.V1ResourceRequirements)2 HashMap (java.util.HashMap)2 Config (com.twitter.heron.spi.common.Config)1 V1ContainerPort (io.kubernetes.client.models.V1ContainerPort)1 V1EmptyDirVolumeSource (io.kubernetes.client.models.V1EmptyDirVolumeSource)1 V1ObjectMeta (io.kubernetes.client.models.V1ObjectMeta)1 V1PodTemplateSpec (io.kubernetes.client.models.V1PodTemplateSpec)1 V1Volume (io.kubernetes.client.models.V1Volume)1 V1VolumeMount (io.kubernetes.client.models.V1VolumeMount)1 ArrayList (java.util.ArrayList)1