-
Notifications
You must be signed in to change notification settings - Fork 2
/
deployment.yaml
179 lines (166 loc) · 4.25 KB
/
deployment.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
apiVersion: v1
kind: Secret
metadata:
name: artemis-activemq
namespace: artemis
labels:
app: activemq-artemis
type: Opaque
data:
artemis-password: "YXJ0ZW1pcw=="
---
apiVersion: v1
kind: Service
metadata:
name: artemis-activemq
namespace: artemis
labels:
app: activemq-artemis
spec:
ports:
- name: http
port: 8161
targetPort: http
- name: core
port: 61616
targetPort: core
- name: amqp
port: 5672
targetPort: amqp
- name: jmx
port: 9494
targetPort: jmxexporter
- name: grpc
port: 5050
targetPort: grpc
selector:
app: activemq-artemis
---
apiVersion: v1
kind: ConfigMap
metadata:
name: artemis-activemq-cm
namespace: artemis
data:
broker-00.xml: |
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
<core xmlns="urn:activemq:core" xsi:schemaLocation="urn:activemq:core ">
<addresses>
<address name="test">
<anycast>
<queue name="test"/>
</anycast>
</address>
</addresses>
</core>
</configuration>
configure-cluster.sh: |
set -e
echo Copying common configuration
cp /data/etc-override/*.xml /var/lib/artemis/etc-override/broker-10.xml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: artemis-activemq
namespace: artemis
labels:
app: activemq-artemis
spec:
replicas: 1
revisionHistoryLimit: 1
selector:
matchLabels:
app: activemq-artemis
template:
metadata:
name: artemis-activemq-artemis
labels:
app: activemq-artemis
spec:
initContainers:
- name: configure-cluster
image: docker.io/vromero/activemq-artemis:2.15.0
command: ["/bin/sh", "/data/etc-override/configure-cluster.sh"]
volumeMounts:
- name: config-override
mountPath: /var/lib/artemis/etc-override
- name: configmap-override
mountPath: /data/etc-override/
containers:
- name: artemis-activemq-metrics-provider
image: balchu/artemis-ext-scaler:d83d80b-dirty
args: ["--port","5050","--broker","$(POD_NAME)","--user", "$(ARTEMIS_USERNAME)","--password","$(ARTEMIS_PASSWORD)"]
imagePullPolicy: Always
resources:
requests:
cpu: 100m
memory: 10Mi
env:
- name: ARTEMIS_PASSWORD
valueFrom:
secretKeyRef:
name: artemis-activemq
key: artemis-password
- name: ARTEMIS_USERNAME
value: "artemis"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
ports:
- name: grpc
containerPort: 5050
- name: artemis-activemq-artemis
image: docker.io/vromero/activemq-artemis:2.15.0
imagePullPolicy:
resources:
requests:
cpu: 100m
memory: 256Mi
env:
- name: ARTEMIS_PASSWORD
valueFrom:
secretKeyRef:
name: artemis-activemq
key: artemis-password
- name: ARTEMIS_USERNAME
value: "artemis"
- name: ARTEMIS_PERF_JOURNAL
value: "AUTO"
- name: ENABLE_JMX_EXPORTER
value: "true"
ports:
- name: http
containerPort: 8161
- name: core
containerPort: 61616
- name: amqp
containerPort: 5672
- name: jmxexporter
containerPort: 9404
livenessProbe:
tcpSocket:
port: http
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
tcpSocket:
port: core
initialDelaySeconds: 10
periodSeconds: 10
volumeMounts:
- name: data
mountPath: /var/lib/artemis/data
- name: config-override
mountPath: /var/lib/artemis/etc-override
volumes:
- name: data
emptyDir: {}
- name: config-override
emptyDir: {}
- name: configmap-override
configMap:
name: artemis-activemq-cm