Class PodSecurityPolicySpec
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.extensions.PodSecurityPolicySpec
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<PodSecurityPolicySpecBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class PodSecurityPolicySpec extends Object implements io.fabric8.kubernetes.api.builder.Editable<PodSecurityPolicySpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResourcePodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PodSecurityPolicySpec()No args constructor for use in serializationPodSecurityPolicySpec(Boolean allowPrivilegeEscalation, List<AllowedCSIDriver> allowedCSIDrivers, List<String> allowedCapabilities, List<AllowedFlexVolume> allowedFlexVolumes, List<AllowedHostPath> allowedHostPaths, List<String> allowedProcMountTypes, List<String> allowedUnsafeSysctls, List<String> defaultAddCapabilities, Boolean defaultAllowPrivilegeEscalation, List<String> forbiddenSysctls, FSGroupStrategyOptions fsGroup, Boolean hostIPC, Boolean hostNetwork, Boolean hostPID, List<HostPortRange> hostPorts, Boolean privileged, Boolean readOnlyRootFilesystem, List<String> requiredDropCapabilities, RunAsGroupStrategyOptions runAsGroup, RunAsUserStrategyOptions runAsUser, RuntimeClassStrategyOptions runtimeClass, SELinuxStrategyOptions seLinux, SupplementalGroupsStrategyOptions supplementalGroups, List<String> volumes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PodSecurityPolicySpecBuilderedit()Map<String,Object>getAdditionalProperties()List<String>getAllowedCapabilities()allowedCapabilities is a list of capabilities that can be requested to add to the container.List<AllowedCSIDriver>getAllowedCSIDrivers()AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec.List<AllowedFlexVolume>getAllowedFlexVolumes()allowedFlexVolumes is a whitelist of allowed Flexvolumes.List<AllowedHostPath>getAllowedHostPaths()allowedHostPaths is a white list of allowed host paths.List<String>getAllowedProcMountTypes()AllowedProcMountTypes is a whitelist of allowed ProcMountTypes.List<String>getAllowedUnsafeSysctls()allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none.BooleangetAllowPrivilegeEscalation()allowPrivilegeEscalation determines if a pod can request to allow privilege escalation.List<String>getDefaultAddCapabilities()defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability.BooleangetDefaultAllowPrivilegeEscalation()defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.List<String>getForbiddenSysctls()forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none.FSGroupStrategyOptionsgetFsGroup()PodSecurityPolicySpec defines the policy enforced.BooleangetHostIPC()hostIPC determines if the policy allows the use of HostIPC in the pod spec.BooleangetHostNetwork()hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.BooleangetHostPID()hostPID determines if the policy allows the use of HostPID in the pod spec.List<HostPortRange>getHostPorts()hostPorts determines which host port ranges are allowed to be exposed.BooleangetPrivileged()privileged determines if a pod can request to be run as privileged.BooleangetReadOnlyRootFilesystem()readOnlyRootFilesystem when set to true will force containers to run with a read only root file system.List<String>getRequiredDropCapabilities()requiredDropCapabilities are the capabilities that will be dropped from the container.RunAsGroupStrategyOptionsgetRunAsGroup()PodSecurityPolicySpec defines the policy enforced.RunAsUserStrategyOptionsgetRunAsUser()PodSecurityPolicySpec defines the policy enforced.RuntimeClassStrategyOptionsgetRuntimeClass()PodSecurityPolicySpec defines the policy enforced.SELinuxStrategyOptionsgetSeLinux()PodSecurityPolicySpec defines the policy enforced.SupplementalGroupsStrategyOptionsgetSupplementalGroups()PodSecurityPolicySpec defines the policy enforced.List<String>getVolumes()volumes is a white list of allowed volume plugins.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetAllowedCapabilities(List<String> allowedCapabilities)allowedCapabilities is a list of capabilities that can be requested to add to the container.voidsetAllowedCSIDrivers(List<AllowedCSIDriver> allowedCSIDrivers)AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec.voidsetAllowedFlexVolumes(List<AllowedFlexVolume> allowedFlexVolumes)allowedFlexVolumes is a whitelist of allowed Flexvolumes.voidsetAllowedHostPaths(List<AllowedHostPath> allowedHostPaths)allowedHostPaths is a white list of allowed host paths.voidsetAllowedProcMountTypes(List<String> allowedProcMountTypes)AllowedProcMountTypes is a whitelist of allowed ProcMountTypes.voidsetAllowedUnsafeSysctls(List<String> allowedUnsafeSysctls)allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none.voidsetAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation)allowPrivilegeEscalation determines if a pod can request to allow privilege escalation.voidsetDefaultAddCapabilities(List<String> defaultAddCapabilities)defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability.voidsetDefaultAllowPrivilegeEscalation(Boolean defaultAllowPrivilegeEscalation)defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.voidsetForbiddenSysctls(List<String> forbiddenSysctls)forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none.voidsetFsGroup(FSGroupStrategyOptions fsGroup)PodSecurityPolicySpec defines the policy enforced.voidsetHostIPC(Boolean hostIPC)hostIPC determines if the policy allows the use of HostIPC in the pod spec.voidsetHostNetwork(Boolean hostNetwork)hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.voidsetHostPID(Boolean hostPID)hostPID determines if the policy allows the use of HostPID in the pod spec.voidsetHostPorts(List<HostPortRange> hostPorts)hostPorts determines which host port ranges are allowed to be exposed.voidsetPrivileged(Boolean privileged)privileged determines if a pod can request to be run as privileged.voidsetReadOnlyRootFilesystem(Boolean readOnlyRootFilesystem)readOnlyRootFilesystem when set to true will force containers to run with a read only root file system.voidsetRequiredDropCapabilities(List<String> requiredDropCapabilities)requiredDropCapabilities are the capabilities that will be dropped from the container.voidsetRunAsGroup(RunAsGroupStrategyOptions runAsGroup)PodSecurityPolicySpec defines the policy enforced.voidsetRunAsUser(RunAsUserStrategyOptions runAsUser)PodSecurityPolicySpec defines the policy enforced.voidsetRuntimeClass(RuntimeClassStrategyOptions runtimeClass)PodSecurityPolicySpec defines the policy enforced.voidsetSeLinux(SELinuxStrategyOptions seLinux)PodSecurityPolicySpec defines the policy enforced.voidsetSupplementalGroups(SupplementalGroupsStrategyOptions supplementalGroups)PodSecurityPolicySpec defines the policy enforced.voidsetVolumes(List<String> volumes)volumes is a white list of allowed volume plugins.PodSecurityPolicySpecBuildertoBuilder()
-
-
-
Constructor Detail
-
PodSecurityPolicySpec
public PodSecurityPolicySpec()
No args constructor for use in serialization
-
PodSecurityPolicySpec
public PodSecurityPolicySpec(Boolean allowPrivilegeEscalation, List<AllowedCSIDriver> allowedCSIDrivers, List<String> allowedCapabilities, List<AllowedFlexVolume> allowedFlexVolumes, List<AllowedHostPath> allowedHostPaths, List<String> allowedProcMountTypes, List<String> allowedUnsafeSysctls, List<String> defaultAddCapabilities, Boolean defaultAllowPrivilegeEscalation, List<String> forbiddenSysctls, FSGroupStrategyOptions fsGroup, Boolean hostIPC, Boolean hostNetwork, Boolean hostPID, List<HostPortRange> hostPorts, Boolean privileged, Boolean readOnlyRootFilesystem, List<String> requiredDropCapabilities, RunAsGroupStrategyOptions runAsGroup, RunAsUserStrategyOptions runAsUser, RuntimeClassStrategyOptions runtimeClass, SELinuxStrategyOptions seLinux, SupplementalGroupsStrategyOptions supplementalGroups, List<String> volumes)
-
-
Method Detail
-
getAllowPrivilegeEscalation
public Boolean getAllowPrivilegeEscalation()
allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.
-
setAllowPrivilegeEscalation
public void setAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation)
allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.
-
getAllowedCSIDrivers
public List<AllowedCSIDriver> getAllowedCSIDrivers()
AllowedCSIDrivers is a whitelist 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.
-
setAllowedCSIDrivers
public void setAllowedCSIDrivers(List<AllowedCSIDriver> allowedCSIDrivers)
AllowedCSIDrivers is a whitelist 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.
-
getAllowedCapabilities
public List<String> getAllowedCapabilities()
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.
-
setAllowedCapabilities
public void setAllowedCapabilities(List<String> 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.
-
getAllowedFlexVolumes
public List<AllowedFlexVolume> getAllowedFlexVolumes()
allowedFlexVolumes is a whitelist of allowed 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.
-
setAllowedFlexVolumes
public void setAllowedFlexVolumes(List<AllowedFlexVolume> allowedFlexVolumes)
allowedFlexVolumes is a whitelist of allowed 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.
-
getAllowedHostPaths
public List<AllowedHostPath> getAllowedHostPaths()
allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.
-
setAllowedHostPaths
public void setAllowedHostPaths(List<AllowedHostPath> allowedHostPaths)
allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.
-
getAllowedProcMountTypes
public List<String> getAllowedProcMountTypes()
AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.
-
setAllowedProcMountTypes
public void setAllowedProcMountTypes(List<String> allowedProcMountTypes)
AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.
-
getAllowedUnsafeSysctls
public List<String> getAllowedUnsafeSysctls()
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 whitelist 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.
-
setAllowedUnsafeSysctls
public void setAllowedUnsafeSysctls(List<String> 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 whitelist 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.
-
getDefaultAddCapabilities
public List<String> getDefaultAddCapabilities()
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.
-
setDefaultAddCapabilities
public void setDefaultAddCapabilities(List<String> 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.
-
getDefaultAllowPrivilegeEscalation
public Boolean getDefaultAllowPrivilegeEscalation()
defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.
-
setDefaultAllowPrivilegeEscalation
public void setDefaultAllowPrivilegeEscalation(Boolean defaultAllowPrivilegeEscalation)
defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.
-
getForbiddenSysctls
public List<String> getForbiddenSysctls()
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.
-
setForbiddenSysctls
public void setForbiddenSysctls(List<String> 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.
-
getFsGroup
public FSGroupStrategyOptions getFsGroup()
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
setFsGroup
public void setFsGroup(FSGroupStrategyOptions fsGroup)
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
getHostIPC
public Boolean getHostIPC()
hostIPC determines if the policy allows the use of HostIPC in the pod spec.
-
setHostIPC
public void setHostIPC(Boolean hostIPC)
hostIPC determines if the policy allows the use of HostIPC in the pod spec.
-
getHostNetwork
public Boolean getHostNetwork()
hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
-
setHostNetwork
public void setHostNetwork(Boolean hostNetwork)
hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
-
getHostPID
public Boolean getHostPID()
hostPID determines if the policy allows the use of HostPID in the pod spec.
-
setHostPID
public void setHostPID(Boolean hostPID)
hostPID determines if the policy allows the use of HostPID in the pod spec.
-
getHostPorts
public List<HostPortRange> getHostPorts()
hostPorts determines which host port ranges are allowed to be exposed.
-
setHostPorts
public void setHostPorts(List<HostPortRange> hostPorts)
hostPorts determines which host port ranges are allowed to be exposed.
-
getPrivileged
public Boolean getPrivileged()
privileged determines if a pod can request to be run as privileged.
-
setPrivileged
public void setPrivileged(Boolean privileged)
privileged determines if a pod can request to be run as privileged.
-
getReadOnlyRootFilesystem
public Boolean getReadOnlyRootFilesystem()
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.
-
setReadOnlyRootFilesystem
public void setReadOnlyRootFilesystem(Boolean 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.
-
getRequiredDropCapabilities
public List<String> getRequiredDropCapabilities()
requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.
-
setRequiredDropCapabilities
public void setRequiredDropCapabilities(List<String> requiredDropCapabilities)
requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.
-
getRunAsGroup
public RunAsGroupStrategyOptions getRunAsGroup()
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
setRunAsGroup
public void setRunAsGroup(RunAsGroupStrategyOptions runAsGroup)
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
getRunAsUser
public RunAsUserStrategyOptions getRunAsUser()
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
setRunAsUser
public void setRunAsUser(RunAsUserStrategyOptions runAsUser)
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
getRuntimeClass
public RuntimeClassStrategyOptions getRuntimeClass()
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
setRuntimeClass
public void setRuntimeClass(RuntimeClassStrategyOptions runtimeClass)
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
getSeLinux
public SELinuxStrategyOptions getSeLinux()
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
setSeLinux
public void setSeLinux(SELinuxStrategyOptions seLinux)
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
getSupplementalGroups
public SupplementalGroupsStrategyOptions getSupplementalGroups()
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
setSupplementalGroups
public void setSupplementalGroups(SupplementalGroupsStrategyOptions supplementalGroups)
PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.
-
getVolumes
public List<String> getVolumes()
volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.
-
setVolumes
public void setVolumes(List<String> volumes)
volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.
-
edit
public PodSecurityPolicySpecBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<PodSecurityPolicySpecBuilder>
-
toBuilder
public PodSecurityPolicySpecBuilder toBuilder()
-
-