[fix] system goes in system
This commit is contained in:
parent
c9b7f9f024
commit
b05c246d8f
@ -26,7 +26,7 @@ services:
|
||||
|
||||
app:
|
||||
env_file: .env
|
||||
build: .
|
||||
build: ../
|
||||
image: albancrommer/changelog-server:latest
|
||||
ports:
|
||||
- "3000:3000"
|
65
system/k8s/deployment.yaml
Normal file
65
system/k8s/deployment.yaml
Normal file
@ -0,0 +1,65 @@
|
||||
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"
|
||||
|
||||
|
10
system/k8s/elastic.yaml
Normal file
10
system/k8s/elastic.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
product: k8s-elastic
|
||||
name: elastic-config
|
||||
data:
|
||||
elasticsearch.yaml: |
|
||||
discovery.type: single-node
|
||||
|
13
system/k8s/service.yaml
Normal file
13
system/k8s/service.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: changelog-server
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: www
|
||||
port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: changelog-server
|
43
system/k8s/volumes.yaml
Normal file
43
system/k8s/volumes.yaml
Normal file
@ -0,0 +1,43 @@
|
||||
#apiVersion: v1
|
||||
#kind: PersistentVolume
|
||||
#metadata:
|
||||
# name: changelog-server
|
||||
#spec:
|
||||
# capacity:
|
||||
# storage: 2Mi
|
||||
# volumeMode: Filesystem
|
||||
# accessModes:
|
||||
# - ReadWriteOnce
|
||||
# persistentVolumeReclaimPolicy: Retain
|
||||
|
||||
#---
|
||||
#
|
||||
#apiVersion: v1
|
||||
#kind: PersistentVolume
|
||||
#metadata:
|
||||
# name: changelog-server
|
||||
#spec:
|
||||
# capacity:
|
||||
# storage: 5Gi
|
||||
# volumeMode: Filesystem
|
||||
# accessModes:
|
||||
# - ReadWriteOnce
|
||||
# persistentVolumeReclaimPolicy: Retain
|
||||
# HostPath :
|
||||
# path: /changelog-server-es01data
|
||||
#
|
||||
#
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: changelog-server-esdata
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: "/changelog-server-esdata"
|
Loading…
Reference in New Issue
Block a user