Skip to content

Allow configuration of appArmorProfile on securityContext in CRD #6617

Closed
@jnoordsij

Description

@jnoordsij

Component(s)

No response

What is missing? Please describe.

As of Kubernetes 1.30, AppArmor can be configured through the securityContext field of a pod or container (which was previously done through annotations). However, when passing such a value to a Prometheus CRD object, e.g.

securityContext:
  appArmorProfile:
    type: RuntimeDefault

Kubernetes errs with a message unknown field "spec.securityContext.appArmorProfile". If the CRD is updated to allow this key/value in a correct manner, this error should disappear. I'm not sure if any further action w.r.t. handling the value internally is required.

See also https://kubernetes.io/docs/tutorials/security/apparmor/#securing-a-pod.

Describe alternatives you've considered.

N/A

Environment Information.

Environment

Kubernetes Version: 1.30.1(-do.0)
Prometheus-Operator Version: v0.73.2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions