67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app: elastic
|
|
name: elastic
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: elastic
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: elastic
|
|
spec:
|
|
securityContext:
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
fsGroup: 1000
|
|
containers:
|
|
- args:
|
|
- /bin/sh
|
|
- -c
|
|
- |-
|
|
chown -R 1000:1000 /usr/share/elasticsearch/data;
|
|
apt-get update && apt-get install -y curl;
|
|
./bin/elasticsearch-plugin list | grep -q ingest-attachment || yes | ./bin/elasticsearch-plugin install --silent ingest-attachment;
|
|
/usr/local/bin/docker-entrypoint.sh eswrapper
|
|
env:
|
|
- name: BITNAMI_DEBUG
|
|
value: "true"
|
|
- name: ELASTICSEARCH_PORT_NUMBER
|
|
value: "9200"
|
|
- name: ES_JAVA_OPTS
|
|
value: -Xms1024m -Xmx1024m
|
|
- name: discovery.type
|
|
value: single-node
|
|
- name: http.cors.allow-origin
|
|
value: http://localhost:8082
|
|
- name: http.cors.enabled
|
|
value: "true"
|
|
image: elasticsearch:7.14.2
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"'
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 20
|
|
failureThreshold: 10
|
|
name: elastic
|
|
ports:
|
|
- containerPort: 9200
|
|
hostPort: 9200
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /usr/share/elasticsearch/data
|
|
name: elastic
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: elastic
|
|
persistentVolumeClaim:
|
|
claimName: elastic |