ARTEMIS-6046 Kubernetes LockManager implementation#6409
Conversation
c557799 to
361bcf9
Compare
2345717 to
de9eeb9
Compare
gtully
left a comment
There was a problem hiding this comment.
This is great, but I think we need to reduce the dependencies, with cve's popping up all over the place, we need to be reducing our surface area dependencies as much as possible.
Peek at the http client in the oidcloginmodule for inspiration, or the token review calls in the kubelogin module.
see: 98b24f02ae#diff-c0c7084d3381d18956a831a896c9124b9636a297630fa138513d3fc720560f45
|
I will try. There are date operations here that are not easy to manage. |
|
Mostly havent looked at this, but would follow Gary's comment on the deps/shading-thereof, seem horrid, as likely could be maintaining the shading going forward (and the 12 seconds it takes isnt ideal either). With all the deps (at least some of which seem like dupes) I'd guess its not tiny either, so if its large I'm not necessarily seeing it as obvious we should add it to the distribution. I cant comment on the actual lines, as GitHub is having an outage preventing new code comments on PRs lol, but... The bom changes are broken. The entries are in the relocations/old-modules section of the bom, and as brand new modules these ones would not be expected to have any relocations (indeed you didnt add any, so the GAVs listed there wont ever exist and are just junk entries, which can break things inspecting them). As the only changes to the bom that also means that there are no bom entries for the actual module GAVs either, which means you must have have put the version fields in place elsewhere in the build instead of relying on the bom-managed entries (doing which would point out that the bom is currently broken). |
|
@gemmellr I will see if I can connect directly to REST bits.. The kubernetes client has a few dependencies. and that's I am bringing. I could also "fork" the code for what I need.. since all the kubernetes client does on this is to execute rest calls. The difficult part here is the dates operation and initial certificate validation. Let me see what I can do and i will come back here. |
0390a9d to
e0fc2b2
Compare
d67a963 to
dc8faa6
Compare
dc8faa6 to
9d6d1c2
Compare
51f4d4c to
78eaf1b
Compare
741d125 to
b7997cb
Compare
| } | ||
|
|
||
| public static JsonObject createLease(String namespace, String id, String holderIdentity, String acquireTime, String renewTime, int leaseDurationSeconds) throws Exception { | ||
| String renewLeaseJson = buildLease(id, namespace, null, holderIdentity, acquireTime, renewTime, leaseDurationSeconds); |
There was a problem hiding this comment.
rename variable as newLeas (not renewLease)
efcecb1 to
af861a8
Compare
This commit introduces a Kubernetes-based distributed lock implementation using a generic HTTP REST client abstracted from KubernetesLoginModule. Key changes: - Extracted reusable Kubernetes HTTP client to artemis-commons - Implemented KubernetesLockManager using Kubernetes Lease API - Implemented KubeMutableLong using Kubernetes ConfigMap for distributed counters - Moved PemSupport and extracted KeyStoreSupport to artemis-commons to avoid circular dependencies - Added AbstractDistributedLockManager base class with parameter validation - Added tests using LockCoordinatorTest against real Kubernetes (via Minikube) and FakeMinikube MockServer - Added user manual documentation with RBAC configuration examples - Added smoke test configurations for Kubernetes-based dual-mirror setup Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
af861a8 to
ab02f0a
Compare
Uh oh!
There was an error while loading. Please reload this page.