Package net.stickycode.kuuty.model.v18
Class IoK8sApiCoreV1SecurityContext
- java.lang.Object
-
- net.stickycode.kuuty.model.v18.IoK8sApiCoreV1SecurityContext
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2020-11-26T11:01:11.402583+13:00[Pacific/Auckland]") public class IoK8sApiCoreV1SecurityContext extends Object
SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ALLOW_PRIVILEGE_ESCALATIONstatic StringJSON_PROPERTY_CAPABILITIESstatic StringJSON_PROPERTY_PRIVILEGEDstatic StringJSON_PROPERTY_PROC_MOUNTstatic StringJSON_PROPERTY_READ_ONLY_ROOT_FILESYSTEMstatic StringJSON_PROPERTY_RUN_AS_GROUPstatic StringJSON_PROPERTY_RUN_AS_NON_ROOTstatic StringJSON_PROPERTY_RUN_AS_USERstatic StringJSON_PROPERTY_SE_LINUX_OPTIONSstatic StringJSON_PROPERTY_WINDOWS_OPTIONS
-
Constructor Summary
Constructors Constructor Description IoK8sApiCoreV1SecurityContext()
-
Method Summary
-
-
-
Field Detail
-
JSON_PROPERTY_ALLOW_PRIVILEGE_ESCALATION
public static final String JSON_PROPERTY_ALLOW_PRIVILEGE_ESCALATION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CAPABILITIES
public static final String JSON_PROPERTY_CAPABILITIES
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PRIVILEGED
public static final String JSON_PROPERTY_PRIVILEGED
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PROC_MOUNT
public static final String JSON_PROPERTY_PROC_MOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_READ_ONLY_ROOT_FILESYSTEM
public static final String JSON_PROPERTY_READ_ONLY_ROOT_FILESYSTEM
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RUN_AS_GROUP
public static final String JSON_PROPERTY_RUN_AS_GROUP
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RUN_AS_NON_ROOT
public static final String JSON_PROPERTY_RUN_AS_NON_ROOT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RUN_AS_USER
public static final String JSON_PROPERTY_RUN_AS_USER
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SE_LINUX_OPTIONS
public static final String JSON_PROPERTY_SE_LINUX_OPTIONS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_WINDOWS_OPTIONS
public static final String JSON_PROPERTY_WINDOWS_OPTIONS
- See Also:
- Constant Field Values
-
-
Method Detail
-
allowPrivilegeEscalation
public IoK8sApiCoreV1SecurityContext allowPrivilegeEscalation(Boolean allowPrivilegeEscalation)
-
getAllowPrivilegeEscalation
@Nullable public Boolean getAllowPrivilegeEscalation()
AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN- Returns:
- allowPrivilegeEscalation
-
setAllowPrivilegeEscalation
public void setAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation)
-
capabilities
public IoK8sApiCoreV1SecurityContext capabilities(IoK8sApiCoreV1Capabilities capabilities)
-
getCapabilities
@Nullable public IoK8sApiCoreV1Capabilities getCapabilities()
Get capabilities- Returns:
- capabilities
-
setCapabilities
public void setCapabilities(IoK8sApiCoreV1Capabilities capabilities)
-
privileged
public IoK8sApiCoreV1SecurityContext privileged(Boolean privileged)
-
getPrivileged
@Nullable public Boolean getPrivileged()
Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.- Returns:
- privileged
-
setPrivileged
public void setPrivileged(Boolean privileged)
-
procMount
public IoK8sApiCoreV1SecurityContext procMount(String procMount)
-
getProcMount
@Nullable public String getProcMount()
procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled.- Returns:
- procMount
-
setProcMount
public void setProcMount(String procMount)
-
readOnlyRootFilesystem
public IoK8sApiCoreV1SecurityContext readOnlyRootFilesystem(Boolean readOnlyRootFilesystem)
-
getReadOnlyRootFilesystem
@Nullable public Boolean getReadOnlyRootFilesystem()
Whether this container has a read-only root filesystem. Default is false.- Returns:
- readOnlyRootFilesystem
-
setReadOnlyRootFilesystem
public void setReadOnlyRootFilesystem(Boolean readOnlyRootFilesystem)
-
runAsGroup
public IoK8sApiCoreV1SecurityContext runAsGroup(Long runAsGroup)
-
getRunAsGroup
@Nullable public Long getRunAsGroup()
The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.- Returns:
- runAsGroup
-
setRunAsGroup
public void setRunAsGroup(Long runAsGroup)
-
runAsNonRoot
public IoK8sApiCoreV1SecurityContext runAsNonRoot(Boolean runAsNonRoot)
-
getRunAsNonRoot
@Nullable public Boolean getRunAsNonRoot()
Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.- Returns:
- runAsNonRoot
-
setRunAsNonRoot
public void setRunAsNonRoot(Boolean runAsNonRoot)
-
runAsUser
public IoK8sApiCoreV1SecurityContext runAsUser(Long runAsUser)
-
getRunAsUser
@Nullable public Long getRunAsUser()
The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.- Returns:
- runAsUser
-
setRunAsUser
public void setRunAsUser(Long runAsUser)
-
seLinuxOptions
public IoK8sApiCoreV1SecurityContext seLinuxOptions(IoK8sApiCoreV1SELinuxOptions seLinuxOptions)
-
getSeLinuxOptions
@Nullable public IoK8sApiCoreV1SELinuxOptions getSeLinuxOptions()
Get seLinuxOptions- Returns:
- seLinuxOptions
-
setSeLinuxOptions
public void setSeLinuxOptions(IoK8sApiCoreV1SELinuxOptions seLinuxOptions)
-
windowsOptions
public IoK8sApiCoreV1SecurityContext windowsOptions(IoK8sApiCoreV1WindowsSecurityContextOptions windowsOptions)
-
getWindowsOptions
@Nullable public IoK8sApiCoreV1WindowsSecurityContextOptions getWindowsOptions()
Get windowsOptions- Returns:
- windowsOptions
-
setWindowsOptions
public void setWindowsOptions(IoK8sApiCoreV1WindowsSecurityContextOptions windowsOptions)
-
-