OKR/trainer-upgrade/axons/axons.yaml

120 lines
2.4 KiB
YAML
Raw Normal View History

2023-05-31 16:33:13 +08:00
---
apiVersion: v1
kind: ConfigMap
metadata:
name: axonserver-properties
data:
axonserver.properties: |
axoniq.axonserver.name=Axon Server Node 1
axoniq.axonserver.hostname=localhost
axoniq.axonserver.devmode.enabled=true
axoniq.axonserver.snapshot.storage=/eventdata
axoniq.axonserver.controldb-path=/data
axoniq.axonserver.pid-file-location=/data
axoniq.axonserver.max-message-size=25000000
logging.file=/data/axonserver.log
logging.file.max-history=10
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
2023-06-01 19:28:28 +08:00
name: axons
2023-05-31 16:33:13 +08:00
labels:
2023-06-01 19:28:28 +08:00
app: axons
2023-05-31 16:33:13 +08:00
spec:
2023-06-01 19:28:28 +08:00
serviceName: axons
2023-05-31 16:33:13 +08:00
replicas: 1
selector:
matchLabels:
2023-06-01 19:28:28 +08:00
app: axons
2023-05-31 16:33:13 +08:00
template:
metadata:
labels:
2023-06-01 19:28:28 +08:00
app: axons
2023-05-31 16:33:13 +08:00
spec:
containers:
2023-06-01 19:28:28 +08:00
- name: axons
2023-05-31 16:33:13 +08:00
image: axoniq/axonserver
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
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:
2023-06-01 19:28:28 +08:00
name: axons-gui
2023-05-31 16:33:13 +08:00
labels:
2023-06-01 19:28:28 +08:00
app: axons
2023-05-31 16:33:13 +08:00
spec:
ports:
- name: gui
port: 8024
targetPort: 8024
2023-06-01 19:28:28 +08:00
nodePort: 30026
2023-05-31 16:33:13 +08:00
selector:
2023-06-01 19:28:28 +08:00
app: axons
type: NodePort
2023-05-31 16:33:13 +08:00
sessionAffinity: ClientIP
---
apiVersion: v1
kind: Service
metadata:
2023-06-01 19:28:28 +08:00
name: axons-grpc
2023-05-31 16:33:13 +08:00
labels:
2023-06-01 19:28:28 +08:00
app: axons
2023-05-31 16:33:13 +08:00
spec:
ports:
- name: grpc
port: 8124
targetPort: 8124
clusterIP: None
selector:
2023-06-01 19:28:28 +08:00
app: axons