-
Notifications
You must be signed in to change notification settings - Fork 1
/
7-statefulset-mule-worker-app.yaml
64 lines (63 loc) · 2.01 KB
/
7-statefulset-mule-worker-app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#########################################
# Worker Mule Application (statefulSet) #
#########################################
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mule-worker-app
namespace: my-mule4-stack
labels:
app: mule-worker-app
spec:
serviceName: mule-worker-app-service
selector:
matchLabels:
app: mule-worker-app
replicas: 2
template:
metadata:
labels:
# allow this container to be part of the load balanced mule-worker-app-service
app: mule-worker-app
# allow remote management by Spring Boot Admin server
spring-boot-managed: "true"
spec:
containers:
- image: docker.hawkore.com/k8s/spring-boot-mule4-runtime-ce:latest
imagePullPolicy: "Never"
name: mule-worker-app
env:
- name: LANG
value: 'C.UTF-8'
- name: USER_JVM_OPTS
value: '-server -Xms128M -Xmx256M
-DIGNITE_QUIET=false
-Dspring.application.name=mule-worker-app
-Dmule.apps=file:/opt/mule/shared/mule-worker-app-1.0.0-mule-application.jar -Dmule.cleanStartup=true'
workingDir: /opt/mule/
ports:
- containerPort: 8081 # default mule HTTP connector port number.
- containerPort: 8888 # Spring Boot management port (actuator)
resources:
limits:
memory: "800Mi"
volumeMounts:
# mount shared volume to load Mule application
- mountPath: /opt/mule/shared
name: shared-storage
readOnly: true
readinessProbe:
tcpSocket:
port: 8888
initialDelaySeconds: 30
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 8888
initialDelaySeconds: 300
periodSeconds: 10
restartPolicy: Always
volumes:
- name: shared-storage
persistentVolumeClaim:
claimName: shared-storage-claim