Skip to content

Commit 81664a2

Browse files
ARTEMIS-6046 Kubernetes LockManager implementation
assisted by Claude AI. I'm responsible for the whole design, Claude provided documentation links (as would google) and a draft of the documentation
1 parent 9054a60 commit 81664a2

27 files changed

Lines changed: 1646 additions & 67 deletions

File tree

artemis-bom/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,16 @@
393393
<artifactId>artemis-lockmanager-ri</artifactId>
394394
<version>${project.version}</version>
395395
</dependency>
396+
<dependency>
397+
<groupId>org.apache.activemq</groupId>
398+
<artifactId>artemis-kube-lock</artifactId>
399+
<version>${project.version}</version>
400+
</dependency>
401+
<dependency>
402+
<groupId>org.apache.activemq</groupId>
403+
<artifactId>artemis-kube-lock-all</artifactId>
404+
<version>${project.version}</version>
405+
</dependency>
396406
<dependency>
397407
<groupId>org.apache.activemq</groupId>
398408
<artifactId>artemis-ra</artifactId>

artemis-distribution/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@
126126
<groupId>org.apache.artemis</groupId>
127127
<artifactId>artemis-lockmanager-ri</artifactId>
128128
</dependency>
129+
<dependency>
130+
<groupId>org.apache.artemis</groupId>
131+
<artifactId>artemis-kube-lock-all</artifactId>
132+
<version>${project.version}</version>
133+
</dependency>
129134

130135
<!--TODO: no other modules seem to use this, is it equivalent to something else they do use ? -->
131136
<dependency>
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
18+
<modelVersion>4.0.0</modelVersion>
19+
20+
<parent>
21+
<groupId>org.apache.artemis</groupId>
22+
<artifactId>artemis-lockmanager</artifactId>
23+
<version>2.54.0-SNAPSHOT</version>
24+
</parent>
25+
26+
<artifactId>artemis-kube-lock-all</artifactId>
27+
<packaging>jar</packaging>
28+
<name>Kube Lock Manager (all dependencies)</name>
29+
30+
<properties>
31+
<activemq.basedir>${project.basedir}/../..</activemq.basedir>
32+
</properties>
33+
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.apache.artemis</groupId>
37+
<artifactId>artemis-kube-lock</artifactId>
38+
<version>${project.version}</version>
39+
<optional>true</optional>
40+
</dependency>
41+
42+
<!-- BouncyCastle - needed for certificate authentication -->
43+
<dependency>
44+
<groupId>org.bouncycastle</groupId>
45+
<artifactId>bcpkix-jdk18on</artifactId>
46+
<version>${bc-java-version}</version>
47+
<scope>compile</scope>
48+
</dependency>
49+
<dependency>
50+
<groupId>org.bouncycastle</groupId>
51+
<artifactId>bcprov-jdk18on</artifactId>
52+
<version>${bc-java-version}</version>
53+
<scope>compile</scope>
54+
</dependency>
55+
</dependencies>
56+
57+
<build>
58+
<plugins>
59+
<plugin>
60+
<groupId>org.apache.maven.plugins</groupId>
61+
<artifactId>maven-shade-plugin</artifactId>
62+
<executions>
63+
<execution>
64+
<phase>package</phase>
65+
<goals>
66+
<goal>shade</goal>
67+
</goals>
68+
<configuration>
69+
<createDependencyReducedPom>true</createDependencyReducedPom>
70+
<createSourcesJar>false</createSourcesJar>
71+
<shadedArtifactAttached>false</shadedArtifactAttached>
72+
<artifactSet>
73+
<includes>
74+
<include>*:*</include>
75+
</includes>
76+
<excludes>
77+
<!-- Exclude only the Artemis Lock Manager API from shading -->
78+
<exclude>org.apache.artemis:artemis-lockmanager-api</exclude>
79+
</excludes>
80+
</artifactSet>
81+
<relocations>
82+
<!-- Shade all third-party dependencies -->
83+
<relocation>
84+
<pattern>io.kubernetes</pattern>
85+
<shadedPattern>artemis.kube.shade.io.kubernetes</shadedPattern>
86+
</relocation>
87+
<relocation>
88+
<pattern>io.swagger</pattern>
89+
<shadedPattern>artemis.kube.shade.io.swagger</shadedPattern>
90+
</relocation>
91+
<relocation>
92+
<pattern>io.gapi</pattern>
93+
<shadedPattern>artemis.kube.shade.io.gapi</shadedPattern>
94+
</relocation>
95+
<relocation>
96+
<pattern>io.sundr</pattern>
97+
<shadedPattern>artemis.kube.shade.io.sundr</shadedPattern>
98+
</relocation>
99+
<relocation>
100+
<pattern>io.gsonfire</pattern>
101+
<shadedPattern>artemis.kube.shade.io.gsonfire</shadedPattern>
102+
</relocation>
103+
<relocation>
104+
<pattern>com.google</pattern>
105+
<shadedPattern>artemis.kube.shade.com.google</shadedPattern>
106+
</relocation>
107+
<relocation>
108+
<pattern>com.squareup</pattern>
109+
<shadedPattern>artemis.kube.shade.com.squareup</shadedPattern>
110+
</relocation>
111+
<relocation>
112+
<pattern>com.fasterxml</pattern>
113+
<shadedPattern>artemis.kube.shade.com.fasterxml</shadedPattern>
114+
</relocation>
115+
<relocation>
116+
<pattern>okhttp3</pattern>
117+
<shadedPattern>artemis.kube.shade.okhttp3</shadedPattern>
118+
</relocation>
119+
<relocation>
120+
<pattern>okio</pattern>
121+
<shadedPattern>artemis.kube.shade.okio</shadedPattern>
122+
</relocation>
123+
<relocation>
124+
<pattern>org.yaml</pattern>
125+
<shadedPattern>artemis.kube.shade.org.yaml</shadedPattern>
126+
</relocation>
127+
<relocation>
128+
<pattern>org.joda</pattern>
129+
<shadedPattern>artemis.kube.shade.org.joda</shadedPattern>
130+
</relocation>
131+
<relocation>
132+
<pattern>org.threeten</pattern>
133+
<shadedPattern>artemis.kube.shade.org.threeten</shadedPattern>
134+
</relocation>
135+
<relocation>
136+
<pattern>org.checkerframework</pattern>
137+
<shadedPattern>artemis.kube.shade.org.checkerframework</shadedPattern>
138+
</relocation>
139+
<relocation>
140+
<pattern>javax.annotation</pattern>
141+
<shadedPattern>artemis.kube.shade.javax.annotation</shadedPattern>
142+
</relocation>
143+
<relocation>
144+
<pattern>kotlin</pattern>
145+
<shadedPattern>artemis.kube.shade.kotlin</shadedPattern>
146+
</relocation>
147+
<relocation>
148+
<pattern>org.jetbrains</pattern>
149+
<shadedPattern>artemis.kube.shade.org.jetbrains</shadedPattern>
150+
</relocation>
151+
<relocation>
152+
<pattern>org.intellij</pattern>
153+
<shadedPattern>artemis.kube.shade.org.intellij</shadedPattern>
154+
</relocation>
155+
<relocation>
156+
<pattern>org.apache.commons</pattern>
157+
<shadedPattern>artemis.kube.shade.org.apache.commons</shadedPattern>
158+
</relocation>
159+
<relocation>
160+
<pattern>org.slf4j</pattern>
161+
<shadedPattern>artemis.kube.shade.org.slf4j</shadedPattern>
162+
</relocation>
163+
<relocation>
164+
<pattern>jakarta</pattern>
165+
<shadedPattern>artemis.kube.shade.jakarta</shadedPattern>
166+
</relocation>
167+
<relocation>
168+
<pattern>org.jose4j</pattern>
169+
<shadedPattern>artemis.kube.shade.org.jose4j</shadedPattern>
170+
</relocation>
171+
<relocation>
172+
<pattern>com.github</pattern>
173+
<shadedPattern>artemis.kube.shade.com.github</shadedPattern>
174+
</relocation>
175+
<relocation>
176+
<pattern>io.github</pattern>
177+
<shadedPattern>artemis.kube.shade.io.github</shadedPattern>
178+
</relocation>
179+
<relocation>
180+
<pattern>org.jspecify</pattern>
181+
<shadedPattern>artemis.kube.shade.org.jspecify</shadedPattern>
182+
</relocation>
183+
<relocation>
184+
<pattern>org.bouncycastle</pattern>
185+
<shadedPattern>artemis.kube.shade.org.bouncycastle</shadedPattern>
186+
</relocation>
187+
</relocations>
188+
<transformers>
189+
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
190+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
191+
</transformers>
192+
<filters>
193+
<filter>
194+
<artifact>*:*</artifact>
195+
<excludes>
196+
<exclude>META-INF/*.SF</exclude>
197+
<exclude>META-INF/*.DSA</exclude>
198+
<exclude>META-INF/*.RSA</exclude>
199+
</excludes>
200+
</filter>
201+
</filters>
202+
</configuration>
203+
</execution>
204+
</executions>
205+
</plugin>
206+
</plugins>
207+
</build>
208+
209+
</project>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
18+
<modelVersion>4.0.0</modelVersion>
19+
20+
<parent>
21+
<groupId>org.apache.artemis</groupId>
22+
<artifactId>artemis-lockmanager</artifactId>
23+
<version>2.54.0-SNAPSHOT</version>
24+
</parent>
25+
26+
<artifactId>artemis-kube-lock</artifactId>
27+
<packaging>bundle</packaging>
28+
<name>Kubernetes Lock Manager</name>
29+
30+
<properties>
31+
<activemq.basedir>${project.basedir}/../..</activemq.basedir>
32+
</properties>
33+
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.apache.artemis</groupId>
37+
<artifactId>artemis-lockmanager-api</artifactId>
38+
</dependency>
39+
<!-- Kubernetes Java Client - Core -->
40+
<dependency>
41+
<groupId>io.kubernetes</groupId>
42+
<artifactId>client-java</artifactId>
43+
<version>${kubernetes.client.version}</version>
44+
</dependency>
45+
46+
<!-- Kubernetes Java Client - Extended (includes LeaderElection) -->
47+
<dependency>
48+
<groupId>io.kubernetes</groupId>
49+
<artifactId>client-java-extended</artifactId>
50+
<version>${kubernetes.client.version}</version>
51+
</dependency>
52+
53+
<!-- BouncyCastle - needed for certificate authentication, marked as test in client-java but required at runtime -->
54+
<dependency>
55+
<groupId>org.bouncycastle</groupId>
56+
<artifactId>bcpkix-jdk18on</artifactId>
57+
<version>1.84</version>
58+
<scope>compile</scope>
59+
</dependency>
60+
</dependencies>
61+
62+
63+
</project>

0 commit comments

Comments
 (0)