diff --git a/charts/vela-core/templates/defwithtemplate/podsecuritycontext.yaml b/charts/vela-core/templates/defwithtemplate/podsecuritycontext.yaml index 7707a50cf..23aaee5f6 100644 --- a/charts/vela-core/templates/defwithtemplate/podsecuritycontext.yaml +++ b/charts/vela-core/templates/defwithtemplate/podsecuritycontext.yaml @@ -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 } } diff --git a/vela-templates/definitions/internal/trait/podsecuritycontext.cue b/vela-templates/definitions/internal/trait/podsecuritycontext.cue index 09d2ba496..055b987ba 100644 --- a/vela-templates/definitions/internal/trait/podsecuritycontext.cue +++ b/vela-templates/definitions/internal/trait/podsecuritycontext.cue @@ -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 } } }