PodSecurityPolicySpec

case class PodSecurityPolicySpec(allowPrivilegeEscalation: Optional[Boolean], allowedCSIDrivers: Optional[Vector[AllowedCSIDriver]], allowedCapabilities: Optional[Vector[String]], allowedFlexVolumes: Optional[Vector[AllowedFlexVolume]], allowedHostPaths: Optional[Vector[AllowedHostPath]], allowedProcMountTypes: Optional[Vector[String]], allowedUnsafeSysctls: Optional[Vector[String]], defaultAddCapabilities: Optional[Vector[String]], defaultAllowPrivilegeEscalation: Optional[Boolean], forbiddenSysctls: Optional[Vector[String]], fsGroup: FSGroupStrategyOptions, hostIPC: Optional[Boolean], hostNetwork: Optional[Boolean], hostPID: Optional[Boolean], hostPorts: Optional[Vector[HostPortRange]], privileged: Optional[Boolean], readOnlyRootFilesystem: Optional[Boolean], requiredDropCapabilities: Optional[Vector[String]], runAsGroup: Optional[RunAsGroupStrategyOptions], runAsUser: RunAsUserStrategyOptions, runtimeClass: Optional[RuntimeClassStrategyOptions], seLinux: SELinuxStrategyOptions, supplementalGroups: SupplementalGroupsStrategyOptions, volumes: Optional[Vector[String]])

PodSecurityPolicySpec defines the policy enforced.

Value Params
allowPrivilegeEscalation

allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.

allowedCSIDrivers

AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate.

allowedCapabilities

allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.

allowedFlexVolumes

allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "volumes" field.

allowedHostPaths

allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.

allowedProcMountTypes

AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.

allowedUnsafeSysctls

allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection. Examples: e.g. "foo/" allows "foo/bar", "foo/baz", etc. e.g. "foo.*" allows "foo.bar", "foo.baz", etc.

defaultAddCapabilities

defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.

defaultAllowPrivilegeEscalation

defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.

forbiddenSysctls

forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. Examples: e.g. "foo/" forbids "foo/bar", "foo/baz", etc. e.g. "foo.*" forbids "foo.bar", "foo.baz", etc.

hostIPC

hostIPC determines if the policy allows the use of HostIPC in the pod spec.

hostNetwork

hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.

hostPID

hostPID determines if the policy allows the use of HostPID in the pod spec.

hostPorts

hostPorts determines which host port ranges are allowed to be exposed.

privileged

privileged determines if a pod can request to be run as privileged.

readOnlyRootFilesystem

readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.

requiredDropCapabilities

requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.

volumes

volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.

Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.

allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate.

AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getAllowedCapabilities: IO[K8sFailure, Vector[String]]

allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.

allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "volumes" field.

allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "volumes" field.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.

allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getAllowedProcMountTypes: IO[K8sFailure, Vector[String]]

AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.

AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getAllowedUnsafeSysctls: IO[K8sFailure, Vector[String]]

allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection.

allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection.

Examples: e.g. "foo/" allows "foo/bar", "foo/baz", etc. e.g. "foo." allows "foo.bar", "foo.baz", etc.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getDefaultAddCapabilities: IO[K8sFailure, Vector[String]]

defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.

defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.

defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getForbiddenSysctls: IO[K8sFailure, Vector[String]]

forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.

forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.

Examples: e.g. "foo/" forbids "foo/bar", "foo/baz", etc. e.g. "foo." forbids "foo.bar", "foo.baz", etc.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

Gets fsGroup.

Gets fsGroup.

This effect always succeeds, it is safe to use the field fsGroup directly.

def getHostIPC: IO[K8sFailure, Boolean]

hostIPC determines if the policy allows the use of HostIPC in the pod spec.

hostIPC determines if the policy allows the use of HostIPC in the pod spec.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getHostNetwork: IO[K8sFailure, Boolean]

hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.

hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getHostPID: IO[K8sFailure, Boolean]

hostPID determines if the policy allows the use of HostPID in the pod spec.

hostPID determines if the policy allows the use of HostPID in the pod spec.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

hostPorts determines which host port ranges are allowed to be exposed.

hostPorts determines which host port ranges are allowed to be exposed.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getPrivileged: IO[K8sFailure, Boolean]

privileged determines if a pod can request to be run as privileged.

privileged determines if a pod can request to be run as privileged.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.

readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getRequiredDropCapabilities: IO[K8sFailure, Vector[String]]

requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.

requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

Gets runAsGroup.

Gets runAsGroup.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

Gets runAsUser.

Gets runAsUser.

This effect always succeeds, it is safe to use the field runAsUser directly.

Gets runtimeClass.

Gets runtimeClass.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

Gets seLinux.

Gets seLinux.

This effect always succeeds, it is safe to use the field seLinux directly.

Gets supplementalGroups.

Gets supplementalGroups.

This effect always succeeds, it is safe to use the field supplementalGroups directly.

def getVolumes: IO[K8sFailure, Vector[String]]

volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.

volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product