66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: changelog-server
|
||
|
labels:
|
||
|
app: changelog-server
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: changelog-server
|
||
|
# strategy:
|
||
|
# type: RollingUpdate
|
||
|
# rollingUpdate:
|
||
|
# maxSurge: 1
|
||
|
# maxUnavailable: 1
|
||
|
replicas: 1
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: changelog-server
|
||
|
spec:
|
||
|
|
||
|
initContainers:
|
||
|
- name: set-vm-sync-limit
|
||
|
image: busybox
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
command: ["sysctl", "-w", "vm.max_map_count=262144"]
|
||
|
securityContext:
|
||
|
privileged: true
|
||
|
volumes:
|
||
|
- name: changelog-server-esdata
|
||
|
hostPath:
|
||
|
# directory location on host
|
||
|
path: /data
|
||
|
# this field is optional
|
||
|
type: Directory
|
||
|
containers:
|
||
|
- name: app
|
||
|
image: albancrommer/changelog-server:latest
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
protocol: TCP
|
||
|
- name: es
|
||
|
image: blacktop/elasticsearch:7.7
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
ports:
|
||
|
- containerPort: 9200
|
||
|
protocol: TCP
|
||
|
volumeMounts:
|
||
|
# - name: elastic-config
|
||
|
# mountPath: /etc/elasticsearch/elasticsearch.yaml
|
||
|
# subPath: elasticsearch.yaml
|
||
|
- name : changelog-server-esdata
|
||
|
mountPath: /usr/share/elasticsearch/data
|
||
|
env:
|
||
|
- name: node.name
|
||
|
value: "es01"
|
||
|
- name: cluster.name
|
||
|
value: "es-docker-cluster"
|
||
|
- name: bootstrap.memory_lock
|
||
|
value: "true"
|
||
|
- name: ES_JAVA_OPTS
|
||
|
value: "-Xms512m -Xmx512m"
|
||
|
|
||
|
|