add qa-upgrade
parent
ffb6f21151
commit
af37425ea2
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,134 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: axonserver-properties
|
||||
data:
|
||||
axonserver.properties: |
|
||||
axoniq.axonserver.name=dev-axonserver
|
||||
axoniq.axonserver.hostname=dev-axonserver
|
||||
axoniq.axonserver.devmode.enabled=false
|
||||
axoniq.axonserver.snapshot.storage=/eventdata
|
||||
axoniq.axonserver.controldb-path=/data
|
||||
axoniq.axonserver.pid-file-location=/data
|
||||
axoniq.axonserver.max-message-size=25000000
|
||||
axoniq.axonserver.accesscontrol.enabled=true
|
||||
axoniq.axonserver.accesscontrol.token=a4338c69-ce24-4d0f-a779-e14c688067ae
|
||||
axoniq.axonserver.accesscontrol.adminToken=a4338c69-ce24-4d0f-a779-e14c688067ae
|
||||
logging.file=/data/axonserver.log
|
||||
logging.file.max-history=10
|
||||
logging.file.max-size=10MB
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: axons
|
||||
labels:
|
||||
app: axons
|
||||
spec:
|
||||
serviceName: axons
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: axons
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: axons
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-10.hetzner.base.beaconfireinc.com
|
||||
containers:
|
||||
- name: axons
|
||||
image: axoniq/axonserver:4.6.11
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: 8124
|
||||
protocol: TCP
|
||||
- name: http
|
||||
containerPort: 8024
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: eventstore
|
||||
mountPath: /eventdata
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- name: config
|
||||
mountPath: /config/axonserver.properties
|
||||
subPath: axonserver.properties
|
||||
readOnly: true
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
port: http
|
||||
path: /actuator/info
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 1
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
port: gui
|
||||
path: /actuator/info
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 1
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: axonserver-properties
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: eventstore
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: axons-gui
|
||||
labels:
|
||||
app: axons
|
||||
spec:
|
||||
ports:
|
||||
- name: gui
|
||||
port: 8024
|
||||
targetPort: 8024
|
||||
# nodePort: 30027
|
||||
selector:
|
||||
app: axons
|
||||
type: NodePort
|
||||
sessionAffinity: ClientIP
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: axons-grpc
|
||||
labels:
|
||||
app: axons
|
||||
spec:
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 8124
|
||||
targetPort: 8124
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: axons
|
|
@ -0,0 +1,180 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: elastic-qa-0
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 30Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic-qa/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-9.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: elastic-qa-1
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 30Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic-qa/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-10.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: elastic-qa-2
|
||||
spec:
|
||||
storageClassName: local-elastic
|
||||
capacity:
|
||||
storage: 30Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/elastic-qa/es_data
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-11.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
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:
|
||||
app.kubernetes.io/name: es-qa
|
||||
initContainers:
|
||||
- name: init
|
||||
image: busybox
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["/bin/sh", "-c", "sysctl -w vm.max_map_count=262144;chown -R 1000:1000 /usr/share/elasticsearch/data"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: elastic-qa
|
||||
mountPath: /usr/share/elasticsearch/data
|
||||
containers:
|
||||
- name: elasticsearch
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
name: restful
|
||||
- containerPort: 9300
|
||||
name: transport
|
||||
env:
|
||||
- name: cluster.name
|
||||
value: bfs-elastic-qa-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: "false"
|
||||
- name: xpack.monitoring.collection.enabled
|
||||
value: "false"
|
||||
- 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: elastic-qa
|
||||
mountPath: /usr/share/elasticsearch/data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: elastic-qa
|
||||
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: 30029
|
||||
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,95 @@
|
|||
---
|
||||
apiVersion: platform.confluent.io/v1beta1
|
||||
kind: Zookeeper
|
||||
metadata:
|
||||
name: zookeeper
|
||||
spec:
|
||||
replicas: 3
|
||||
oneReplicaPerNode: true
|
||||
configOverrides:
|
||||
jvm:
|
||||
- "-Xmx128m"
|
||||
podTemplate:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: app.kubernetes.io/name
|
||||
operator: In
|
||||
values:
|
||||
- es-qa
|
||||
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
|
||||
spec:
|
||||
replicas: 3
|
||||
oneReplicaPerNode: true
|
||||
configOverrides:
|
||||
server:
|
||||
- auto.create.topics.enable=true
|
||||
- default.replication.factor=3
|
||||
jvm:
|
||||
- "-Xmx512m"
|
||||
podTemplate:
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "4G"
|
||||
cpu: "1"
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: app.kubernetes.io/name
|
||||
operator: In
|
||||
values:
|
||||
- es-qa
|
||||
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:
|
||||
# 多个kakfa集群复用zk
|
||||
# zookeeper:
|
||||
# endpoint: zookeeper.common.svc.cluster.local:2181
|
||||
---
|
||||
apiVersion: platform.confluent.io/v1beta1
|
||||
kind: SchemaRegistry
|
||||
metadata:
|
||||
name: schemaregistry
|
||||
spec:
|
||||
replicas: 3
|
||||
oneReplicaPerNode: true
|
||||
configOverrides:
|
||||
jvm:
|
||||
- "-Xmx128m"
|
||||
podTemplate:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: app.kubernetes.io/name
|
||||
operator: In
|
||||
values:
|
||||
- es-qa
|
||||
image:
|
||||
application: confluentinc/cp-schema-registry:7.4.0
|
||||
init: confluentinc/confluent-init-container:2.6.0
|
|
@ -0,0 +1,84 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: mongo-qa-0
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
storageClassName: local-mongo
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/qa/mongo
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: app.kubernetes.io/name
|
||||
operator: In
|
||||
values:
|
||||
- trainer
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-10.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
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: 'root@123'
|
||||
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: 30028
|
||||
type: NodePort
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: mysql
|
||||
labels:
|
||||
name: mysql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
name: mysql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: mysql
|
||||
spec:
|
||||
containers:
|
||||
- name: mysql
|
||||
image: mysql:8.0.33
|
||||
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max_connections=2000 --binlog_expire_logs_seconds=432000
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
volumeMounts:
|
||||
- name: mysql-data-qa
|
||||
mountPath: /var/lib/mysql
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: "----------"
|
||||
- name: MYSQL_DATABASE
|
||||
value: "devops"
|
||||
- name: MYSQL_USER
|
||||
value: "devops"
|
||||
- name: MYSQL_PASSWORD
|
||||
value: "devops"
|
||||
volumes:
|
||||
- name: mysql-data-qa
|
||||
hostPath:
|
||||
path: /data/qa/mysql
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-0-9.hetzner.base.beaconfireinc.com
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mysql
|
||||
labels:
|
||||
name: mysql
|
||||
spec:
|
||||
selector:
|
||||
name: mysql
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 3306
|
||||
targetPort: 3306
|
||||
# nodePort: 30026
|
||||
type: NodePort
|
|
@ -0,0 +1,71 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-stack
|
||||
labels:
|
||||
app: redis-stack
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis-stack
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis-stack
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init
|
||||
image: busybox
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["/bin/sh", "-c", "sysctl -w net.core.somaxconn=1024"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
containers:
|
||||
- name: redis-stack
|
||||
image: redis/redis-stack-server:7.2.0-v0
|
||||
ports:
|
||||
- protocol: TCP
|
||||
containerPort: 8080
|
||||
env:
|
||||
- name: "REDIS_ARGS"
|
||||
value: "--requirepass beaconfire@123"
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
initialDelaySeconds: 300
|
||||
timeoutSeconds: 1
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-stack
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
protocol: TCP
|
||||
targetPort: 6379
|
||||
# nodePort: 30023
|
||||
selector:
|
||||
app: redis-stack
|
||||
type: NodePort
|
|
@ -0,0 +1,96 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: redis-config
|
||||
labels:
|
||||
app: redis
|
||||
data:
|
||||
redis.conf: |-
|
||||
dir /srv
|
||||
port 6379
|
||||
bind 0.0.0.0
|
||||
appendonly yes
|
||||
daemonize no
|
||||
requirepass beaconfire@123
|
||||
pidfile /srv/redis-6379.pid
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init
|
||||
image: busybox
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["/bin/sh", "-c", "sysctl -w net.core.somaxconn=1024"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:6.2.12
|
||||
command:
|
||||
- "sh"
|
||||
- "-c"
|
||||
- "redis-server /usr/local/redis/redis.conf"
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
initialDelaySeconds: 300
|
||||
timeoutSeconds: 1
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /usr/local/redis/redis.conf
|
||||
subPath: redis.conf
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: redis-config
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
protocol: TCP
|
||||
targetPort: 6379
|
||||
# nodePort: 30025
|
||||
selector:
|
||||
app: redis
|
||||
type: NodePort
|
Loading…
Reference in New Issue