Repository navigation
Fixes #33319: clean up OMJob pods after their TTL - #35513
Conversation
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Fixing OMJob TTL selection and deleting recorded pods could remove finished-run pods and their logs once the configured TTL expires. Fixes OMJob pod cleanup so finished runs past their TTL are deleted again by selecting pods only on the operator-set OMJob name label, with a fallback to pod names recorded in status and a warning when that fallback is used. The operator pod-identity label contract is now recorded in a decision record referenced from ✅ 1 closed✅ Quality: Operator pod-identity label contract is not recorded in docs/decisions
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
The operator's TTL-cleanup tests (#35513) start an in-memory Kubernetes API on MockWebServer, pinned at mockwebserver 4.12.0, while #35557 moved okhttp to 5.5.0 through the root okhttp-bom. The explicit pin beat the BOM, so mockwebserver 4 ran against okhttp 5 core and every test that starts the fixture failed with NoClassDefFoundError: okhttp3/internal/Util. The two PRs merged an hour apart on 2026-10-15, and the operator unit-test job is path-filtered, so main stayed red until a PR touched openmetadata-k8s-operator. Drop the version so the BOM holds mockwebserver on 5.5.0 with okhttp-jvm.
… JDKs (open-metadata#36087) * fix(security): drop the emSign roots behind CVE-2026-91403 from image JDKs eMudhra's compromised intermediates (CVE-2026-91403) chain to emSign ECC Root CA - G3, emSign ECC Root CA - C3 and emSign Root CA - C1. Temurin 21.0.13 removes those roots from cacerts, but eclipse-temurin:21-jdk and 21-jre-alpine are still on 21.0.12.1, which trusts the compromised chains. Delete the three roots by SHA-256 from the server images' jlink runtime and from the k8s operator's JRE, and fail the build if any is still trusted. Once the base images ship 21.0.13 the step deletes nothing. * fix(security): record the emSign-root decision and cover the pinned JDKs Review follow-up. The reason the step deletes roots instead of adding the advisory's fingerprints to blocked.certs was only in the PR description: an ECDSA signature re-encoded as (r, n-s) gives an intermediate a new fingerprint that still verifies. Record it as ADR:2026-10-23-image-jdks-distrust-compromised-cas-by-deleting-roots, cite it from each step, and note why the operator keeps java as its entrypoint. docker/olivaw and docker/oss-scanner run Maven on a Temurin 21.0.11 base pinned by digest, so they never pick up 21.0.13 on their own; give them the same step. * fix(deps): let the okhttp BOM manage the operator's mockwebserver The operator's TTL-cleanup tests (open-metadata#35513) start an in-memory Kubernetes API on MockWebServer, pinned at mockwebserver 4.12.0, while open-metadata#35557 moved okhttp to 5.5.0 through the root okhttp-bom. The explicit pin beat the BOM, so mockwebserver 4 ran against okhttp 5 core and every test that starts the fixture failed with NoClassDefFoundError: okhttp3/internal/Util. The two PRs merged an hour apart on 2026-10-15, and the operator unit-test job is path-filtered, so main stayed red until a PR touched openmetadata-k8s-operator. Drop the version so the BOM holds mockwebserver on 5.5.0 with okhttp-jvm.
…37047) * fix(k8s): backport operator pod label safety Required by the Kubernetes resource metadata backport (#36354). Backport of #35513, commit 263d763. * feat(k8s): backport pipeline pod metadata Backport #36354 to 2.0 using the original feature and test commits: 5a317d0 eb8484e Skip Kubernetes initialization in the existing bot-token unit tests so JWT assertions do not depend on a local cluster.
Fixes #33319
Problem
With the OMJob operator, pods of finished ingestion runs are never deleted, whatever
ttlSecondsAfterFinishedsays. They pile up in the namespace for as long as the cluster runs, and restarting the operator does not help.Why it happened
The operator finds a run's pods with a label selector that included
app.kubernetes.io/managed-by=omjob-operator. The operator does set that label, but it then copies the labels the server puts in the OMJob spec on top, and the server always sendsmanaged-by=openmetadata. So no pod ever matched. TTL cleanup ran on time, deleted nothing, and still published aResourcesCleanedUpevent. The lookups that find a run's main and exit handler pods missed in the same way; they kept working only because they fall back to the pod name stored in the OMJob status.#26971 fixed the selector and #27143 brought it back two days later, most likely in a merge conflict. Every 2.0 release has it; 1.13 does not. No test caught it: the unit tests mock the Kubernetes client, and the real-cluster TTL test is disabled.
What this PR changes
managed-bykeeps the server's value, as today.ResourcesCleanedUpevent is published only when pods were deleted, and says how many.What users will notice
preserveFailedPodssetting has never been read by the operator.How it was tested
Not in this PR