feat(k8s-pipeline): support configuring seccompProfile for k8s#27801
feat(k8s-pipeline): support configuring seccompProfile for k8s#27801BenStokmans wants to merge 3 commits intoopen-metadata:mainfrom
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
There was a problem hiding this comment.
Pull request overview
This PR extends the Kubernetes Pipeline Service client configuration to support setting a seccompProfileType, enabling deployments in clusters/namespaces enforcing the Pod Security Standard “restricted”.
Changes:
- Add
seccompProfileTypetoK8sPipelineClientConfigparsing and validation. - Apply the configured seccomp profile to both pod and container security contexts when building K8s job specs.
- Update default config templates (OpenMetadata config + distributed-test docker configs) and add unit tests for the new config behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-service/src/main/java/org/openmetadata/service/clients/pipeline/k8s/K8sPipelineClientConfig.java | Adds seccompProfileType param handling and validation. |
| openmetadata-service/src/main/java/org/openmetadata/service/clients/pipeline/k8s/K8sPipelineClient.java | Sets seccompProfile on pod/container security contexts based on config. |
| openmetadata-service/src/test/java/org/openmetadata/service/clients/pipeline/k8s/K8sPipelineClientConfigTest.java | Adds coverage for default/blank/invalid seccompProfileType. |
| conf/openmetadata.yaml | Exposes K8S_SECCOMP_PROFILE_TYPE in default server config. |
| docker/development/distributed-test/local/server1.yaml | Exposes K8S_SECCOMP_PROFILE_TYPE for distributed-test server config. |
| docker/development/distributed-test/local/server2.yaml | Exposes K8S_SECCOMP_PROFILE_TYPE for distributed-test server config. |
| docker/development/distributed-test/local/server3.yaml | Exposes K8S_SECCOMP_PROFILE_TYPE for distributed-test server config. |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ Approved 1 resolved / 1 findingsEnables seccompProfile configuration for Kubernetes pipelines, resolving the issue where localhost profiles were accepted without a corresponding file path. ✅ 1 resolved✅ Bug: "Localhost" seccomp profile type accepted but localhostProfile path never set
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
Describe your changes:
This PR expands the configuration of the K8S pipeline client, adding the property
seccompProfileTypeallowing the user to set it to one ofRuntimeDefault,Localhostor Unconfined. This is needed when the pipeline is created in a namespace where the pod security standard is set to "restricted".Along with the
seccompProfileType, I have also addedseccompLocalhostProfileto configure the path to the local host profile.buildAutomationJob()andbuildApplicationJob()previously skippedsecurityContextentirely on both the pod and the container, meaning automations and applications would be rejected in anyrestrictednamespace regardless of howrunAsUser/runAsNonRootwere configured. They now use the samebuildPodSecurityContext()/buildContainerSecurityContext()helpers as ingestion Jobs, picking uprunAsUser,runAsGroup,fsGroup,runAsNonRoot,allowPrivilegeEscalation: false,capabilities: drop ALL, and the newseccompProfile.To go along with this PR I have also created a PR in the helm charts repo: !506
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>-->