Security context constraints strategies
RunAsUser
  • MustRunAs - Requires a runAsUser to be configured. Uses the configured runAsUser as the default. Validates against the configured runAsUser.

    Example MustRunAs snippet
    ...
    runAsUser:
      type: MustRunAs
      uid: <id>
    ...
  • MustRunAsRange - Requires minimum and maximum values to be defined if not using pre-allocated values. Uses the minimum as the default. Validates against the entire allowable range.

    Example MustRunAsRange snippet
    ...
    runAsUser:
      type: MustRunAsRange
      uidRangeMax: <maxvalue>
      uidRangeMin: <minvalue>
    ...
  • MustRunAsNonRoot - Requires that the pod be submitted with a non-zero runAsUser or have the USER directive defined in the image. No default provided.

    Example MustRunAsNonRoot snippet
    ...
    runAsUser:
      type: MustRunAsNonRoot
    ...
  • RunAsAny - No default provided. Allows any runAsUser to be specified.

    Example RunAsAny snippet
    ...
    runAsUser:
      type: RunAsAny
    ...
SELinuxContext
  • MustRunAs - Requires seLinuxOptions to be configured if not using pre-allocated values. Uses seLinuxOptions as the default. Validates against seLinuxOptions.

  • RunAsAny - No default provided. Allows any seLinuxOptions to be specified.

SupplementalGroups
  • MustRunAs - Requires at least one range to be specified if not using pre-allocated values. Uses the minimum value of the first range as the default. Validates against all ranges.

  • RunAsAny - No default provided. Allows any supplementalGroups to be specified.

FSGroup
  • MustRunAs - Requires at least one range to be specified if not using pre-allocated values. Uses the minimum value of the first range as the default. Validates against the first ID in the first range.

  • RunAsAny - No default provided. Allows any fsGroup ID to be specified.