fix(traitdefinition): podsecuritycontext - Make localhostProfile optional for other types and provide it only for Localhost. Fixes #6772 (#6773)

Signed-off-by: glaxman <508625+glaxman@users.noreply.github.com>
This commit is contained in:
glaxman
2025-05-01 09:29:03 +05:30
committed by GitHub
parent b4f9db4af8
commit edf3be272e
2 changed files with 12 additions and 8 deletions
@@ -39,8 +39,9 @@ spec:
parameter: {
// +usage=Specify the AppArmor profile for the pod
appArmorProfile?: {
type: "RuntimeDefault" | "Unconfined" | "Localhost"
localhostProfile: string
type: "RuntimeDefault" | "Unconfined" | "Localhost"
// +usage: localhostProfile is required when type is 'Localhost'
localhostProfile?: string
}
fsGroup?: int
runAsGroup?: int
@@ -50,8 +51,9 @@ spec:
runAsNonRoot: *true | bool
// +usage=Specify the seccomp profile for the pod
seccompProfile?: {
type: "RuntimeDefault" | "Unconfined" | "Localhost"
localhostProfile: string
type: "RuntimeDefault" | "Unconfined" | "Localhost"
// +usage: localhostProfile is required when type is 'Localhost'
localhostProfile?: string
}
}
@@ -33,8 +33,9 @@ template: {
parameter: {
// +usage=Specify the AppArmor profile for the pod
appArmorProfile?: {
type: "RuntimeDefault" | "Unconfined" | "Localhost"
localhostProfile: string
type: "RuntimeDefault" | "Unconfined" | "Localhost"
// +usage: localhostProfile is required when type is 'Localhost'
localhostProfile?: string
}
fsGroup?: int
runAsGroup?: int
@@ -44,8 +45,9 @@ template: {
runAsNonRoot: *true | bool
// +usage=Specify the seccomp profile for the pod
seccompProfile?: {
type: "RuntimeDefault" | "Unconfined" | "Localhost"
localhostProfile: string
type: "RuntimeDefault" | "Unconfined" | "Localhost"
// +usage: localhostProfile is required when type is 'Localhost'
localhostProfile?: string
}
}
}