123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- apiVersion: "v1"
- kind: "DeploymentConfig"
- metadata:
- name: "{{deploy_name}}"
- labels:
- provider: openshift
- component: "{{component}}"
- deployment: "{{deploy_name}}"
- logging-infra: "{{logging_component}}"
- spec:
- replicas: {{replicas|default(0)}}
- selector:
- provider: openshift
- component: "{{component}}"
- deployment: "{{deploy_name}}"
- logging-infra: "{{logging_component}}"
- strategy:
- type: Recreate
- template:
- metadata:
- name: "{{deploy_name}}"
- labels:
- logging-infra: "{{logging_component}}"
- provider: openshift
- component: "{{component}}"
- deployment: "{{deploy_name}}"
- spec:
- terminationGracePeriod: 600
- serviceAccountName: aggregated-logging-elasticsearch
- securityContext:
- supplementalGroups:
- - {{openshift_logging_es_storage_group}}
- {% if es_node_selector is iterable and es_node_selector | length > 0 %}
- nodeSelector:
- {% for key, value in es_node_selector.iteritems() %}
- {{key}}: "{{value}}"
- {% endfor %}
- {% endif %}
- containers:
- -
- name: "elasticsearch"
- image: {{image}}
- imagePullPolicy: Always
- resources:
- limits:
- memory: "{{es_memory_limit}}"
- {% if es_cpu_limit is defined and es_cpu_limit is not none %}
- cpu: "{{es_cpu_limit}}"
- {% endif %}
- requests:
- memory: "512Mi"
- ports:
- -
- containerPort: 9200
- name: "restapi"
- -
- containerPort: 9300
- name: "cluster"
- env:
- -
- name: "NAMESPACE"
- valueFrom:
- fieldRef:
- fieldPath: metadata.namespace
- -
- name: "KUBERNETES_TRUST_CERT"
- value: "true"
- -
- name: "SERVICE_DNS"
- value: "logging-{{es_cluster_name}}-cluster"
- -
- name: "CLUSTER_NAME"
- value: "logging-{{es_cluster_name}}"
- -
- name: "INSTANCE_RAM"
- value: "{{openshift_logging_es_memory_limit}}"
- -
- name: "NODE_QUORUM"
- value: "{{es_node_quorum | int}}"
- -
- name: "RECOVER_EXPECTED_NODES"
- value: "{{es_recover_expected_nodes}}"
- -
- name: "RECOVER_AFTER_TIME"
- value: "{{openshift_logging_es_recover_after_time}}"
- volumeMounts:
- - name: elasticsearch
- mountPath: /etc/elasticsearch/secret
- readOnly: true
- - name: elasticsearch-config
- mountPath: /usr/share/java/elasticsearch/config
- readOnly: true
- - name: elasticsearch-storage
- mountPath: /elasticsearch/persistent
- readinessProbe:
- exec:
- command:
- - "/usr/share/elasticsearch/probe/readiness.sh"
- initialDelaySeconds: 5
- timeoutSeconds: 4
- periodSeconds: 5
- volumes:
- - name: elasticsearch
- secret:
- secretName: logging-elasticsearch
- - name: elasticsearch-config
- configMap:
- name: logging-elasticsearch
- - name: elasticsearch-storage
- {% include 'es-storage-'+ es_storage['kind'] + '.partial' %}
|