add configOverride
parent
7c49652969
commit
d1c1239840
|
@ -14,15 +14,6 @@ spec:
|
|||
labels:
|
||||
name: axon-mysql
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-6.hetzner.base.beaconfireinc.com
|
||||
containers:
|
||||
- name: axon-mysql
|
||||
image: mysql:8.0.33
|
||||
|
@ -40,6 +31,16 @@ spec:
|
|||
- name: mysql-data-staff-axon
|
||||
hostPath:
|
||||
path: /data/staff-axon/mysql
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-6.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
|
|
@ -14,15 +14,6 @@ spec:
|
|||
labels:
|
||||
name: drill-mysql
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-8.hetzner.base.beaconfireinc.com
|
||||
containers:
|
||||
- name: drill-mysql
|
||||
image: mysql:8.0.33
|
||||
|
@ -40,6 +31,15 @@ spec:
|
|||
- name: mysql-data-staff-axon
|
||||
hostPath:
|
||||
path: /data/staff-axon/mysql
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-8.hetzner.base.beaconfireinc.com
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
|
|
@ -19,22 +19,22 @@ data:
|
|||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: axonserver
|
||||
name: axons
|
||||
labels:
|
||||
app: axonserver
|
||||
app: axons
|
||||
spec:
|
||||
serviceName: axonserver
|
||||
serviceName: axons
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: axonserver
|
||||
app: axons
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: axonserver
|
||||
app: axons
|
||||
spec:
|
||||
containers:
|
||||
- name: axonserver
|
||||
- name: axons
|
||||
image: axoniq/axonserver
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
|
@ -90,25 +90,26 @@ spec:
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: axonserver-gui
|
||||
name: axons-gui
|
||||
labels:
|
||||
app: axonserver
|
||||
app: axons
|
||||
spec:
|
||||
ports:
|
||||
- name: gui
|
||||
port: 8024
|
||||
targetPort: 8024
|
||||
nodePort: 30026
|
||||
selector:
|
||||
app: axonserver
|
||||
type: LoadBalancer
|
||||
app: axons
|
||||
type: NodePort
|
||||
sessionAffinity: ClientIP
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: axonserver-grpc
|
||||
name: axons-grpc
|
||||
labels:
|
||||
app: axonserver
|
||||
app: axons
|
||||
spec:
|
||||
ports:
|
||||
- name: grpc
|
||||
|
@ -116,4 +117,4 @@ spec:
|
|||
targetPort: 8124
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: axonserver
|
||||
app: axons
|
|
@ -0,0 +1,110 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: elastic
|
||||
spec:
|
||||
serviceName: elastic
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: elastic
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: elastic
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 100
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64
|
||||
initContainers:
|
||||
- name: init
|
||||
image: busybox
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["/bin/sh", "-c", "sysctl -w vm.max_map_count=262144"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
containers:
|
||||
- name: elasticsearch
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
name: restful
|
||||
- containerPort: 9300
|
||||
name: transport
|
||||
env:
|
||||
- name: cluster.name
|
||||
value: bfs-elastic-1
|
||||
- name: network.host
|
||||
value: 0.0.0.0
|
||||
- name: node.name
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: discovery.seed_hosts
|
||||
value: "elastic-0.elastic,elastic-1.elastic,elastic-2.elastic"
|
||||
- name: cluster.initial_master_nodes
|
||||
value: "elastic-0,elastic-1,elastic-2"
|
||||
- name: xpack.security.enabled
|
||||
value: "true"
|
||||
- name: xpack.monitoring.collection.enabled
|
||||
value: "true"
|
||||
- name: ES_JAVA_OPTS
|
||||
value: "-Xms256m -Xmx256m"
|
||||
- name: ELASTIC_PASSWORD
|
||||
value: "changeme"
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
volumeMounts:
|
||||
- name: es-data
|
||||
mountPath: /usr/share/elasticsearch/data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: es-data
|
||||
spec:
|
||||
accessModes: ['ReadWriteOnce']
|
||||
storageClassName: "local-elastic"
|
||||
resources:
|
||||
requests:
|
||||
storage: 30Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: elastic-internel
|
||||
labels:
|
||||
app: elastic
|
||||
spec:
|
||||
ports:
|
||||
- name: restful
|
||||
port: 9200
|
||||
targetPort: 9200
|
||||
nodePort: 30020
|
||||
type: NodePort
|
||||
selector:
|
||||
app: elastic
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: elastic
|
||||
labels:
|
||||
app: elastic
|
||||
spec:
|
||||
ports:
|
||||
- name: restful
|
||||
port: 9200
|
||||
- name: transport
|
||||
port: 9300
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: elastic
|
|
@ -0,0 +1,74 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: local-elastic-0
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-6.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: local-elastic-1
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-7.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: local-elastic-2
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-8.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: local-elastic
|
||||
provisioner: openebs.io/local
|
||||
allowVolumeExpansion: true
|
||||
volumeBindingMode: WaitForFirstConsumer
|
|
@ -0,0 +1,91 @@
|
|||
# deployment
|
||||
---
|
||||
apiVersion: platform.confluent.io/v1beta1
|
||||
kind: Zookeeper
|
||||
metadata:
|
||||
name: zookeeper
|
||||
namespace: basic
|
||||
spec:
|
||||
replicas: 3
|
||||
configOverrides:
|
||||
jvm:
|
||||
- "-Xmx128m"
|
||||
podTemplate:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- zookeeper
|
||||
topologyKey: kubernetes.io/hostname
|
||||
image:
|
||||
application: confluentinc/cp-zookeeper:7.4.0
|
||||
init: confluentinc/confluent-init-container:2.6.0
|
||||
dataVolumeCapacity: 10Gi
|
||||
logVolumeCapacity: 10Gi
|
||||
storageClass:
|
||||
name: local-kafka
|
||||
---
|
||||
apiVersion: platform.confluent.io/v1beta1
|
||||
kind: Kafka
|
||||
metadata:
|
||||
name: kafka
|
||||
namespace: basic
|
||||
spec:
|
||||
replicas: 3
|
||||
configOverrides:
|
||||
server:
|
||||
- auto.create.topics.enable=true
|
||||
- default.replication.factor=3
|
||||
jvm:
|
||||
- "-Xmx512m"
|
||||
podTemplate:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- kafka
|
||||
topologyKey: kubernetes.io/hostname
|
||||
image:
|
||||
application: confluentinc/cp-server:7.4.0
|
||||
init: confluentinc/confluent-init-container:2.6.0
|
||||
dataVolumeCapacity: 20Gi
|
||||
storageClass:
|
||||
name: local-kafka
|
||||
metricReporter:
|
||||
enabled: true
|
||||
dependencies:
|
||||
zookeeper:
|
||||
endpoint: zookeeper.basic.svc.cluster.local:2181
|
||||
---
|
||||
apiVersion: platform.confluent.io/v1beta1
|
||||
kind: SchemaRegistry
|
||||
metadata:
|
||||
name: schemaregistry
|
||||
namespace: basic
|
||||
spec:
|
||||
replicas: 3
|
||||
configOverrides:
|
||||
jvm:
|
||||
- "-Xmx128m"
|
||||
podTemplate:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- schemaregistry
|
||||
topologyKey: kubernetes.io/hostname
|
||||
image:
|
||||
application: confluentinc/cp-schema-registry:7.4.0
|
||||
init: confluentinc/confluent-init-container:2.6.0
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: kafka-local
|
||||
provisioner: openebs.io/local
|
||||
reclaimPolicy: Retain
|
||||
allowVolumeExpansion: true
|
||||
volumeBindingMode: WaitForFirstConsumer
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: mongo
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: mongo
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mongo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mongo
|
||||
spec:
|
||||
containers:
|
||||
- name: mongo
|
||||
image: mongo:6.0.6
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: MONGO_INITDB_ROOT_USERNAME
|
||||
value: root
|
||||
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||
value: 'beaconfire123'
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
volumeMounts:
|
||||
- name: mongo-data
|
||||
mountPath: /data/db
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: mongo-data
|
||||
spec:
|
||||
accessModes: ['ReadWriteOnce']
|
||||
storageClassName: "local-mongo"
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mongo
|
||||
spec:
|
||||
selector:
|
||||
app: mongo
|
||||
ports:
|
||||
- name: mongo
|
||||
protocol: TCP
|
||||
port: 27017
|
||||
targetPort: 27017
|
||||
nodePort: 30018
|
||||
type: NodePort
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: local-mongo
|
||||
provisioner: kubernetes.io/no-provisioner
|
||||
allowVolumeExpansion: true
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: local-mongo-0
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
storageClassName: local-mongo
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/mongo
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-7.hetzner.base.beaconfireinc.com
|
|
@ -0,0 +1,60 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: mysql-axons
|
||||
namespace: basic
|
||||
labels:
|
||||
name: mysql-axons
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
name: mysql-axons
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: mysql-axons
|
||||
spec:
|
||||
containers:
|
||||
- name: mysql-axons
|
||||
image: mysql:8.0.33
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
volumeMounts:
|
||||
- name: data-axons
|
||||
mountPath: /var/lib/mysql
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: "Beaconfire@2099"
|
||||
- name: MYSQL_DATABASE
|
||||
value: "event_store"
|
||||
volumes:
|
||||
- name: data-axons
|
||||
hostPath:
|
||||
path: /data/staff-axon/mysql
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-6.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mysql-axons
|
||||
namespace: basic
|
||||
labels:
|
||||
name: mysql-axons
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 3306
|
||||
targetPort: 3306
|
||||
nodePort: 30016
|
||||
selector:
|
||||
name: mysql-axons
|
||||
type: NodePort
|
|
@ -0,0 +1,57 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: mysql-drill
|
||||
namespace: basic
|
||||
labels:
|
||||
name: mysql-drill
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
name: mysql-drill
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: mysql-drill
|
||||
spec:
|
||||
containers:
|
||||
- name: mysql-drill
|
||||
image: mysql:8.0.33
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
volumeMounts:
|
||||
- name: data-drill
|
||||
mountPath: /var/lib/mysql
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: "Beaconfire@2099"
|
||||
volumes:
|
||||
- name: data-drill
|
||||
hostPath:
|
||||
path: /data/staff-axon/mysql
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-8.hetzner.base.beaconfireinc.com
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mysql-drill
|
||||
namespace: basic
|
||||
labels:
|
||||
name: mysql-drill
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 3306
|
||||
targetPort: 3306
|
||||
nodePort: 30017
|
||||
selector:
|
||||
name: mysql-drill
|
||||
type: NodePort
|
Loading…
Reference in New Issue