public static class LinuxSecurityContext.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
LinuxSecurityContext |
build() |
LinuxSecurityContext.Builder |
capabilities(ContainerCapabilities capabilities) |
LinuxSecurityContext.Builder |
copy(LinuxSecurityContext model) |
LinuxSecurityContext.Builder |
isNonRootUserCheckEnabled(Boolean isNonRootUserCheckEnabled)
Indicates if the container must run as a non-root user.
|
LinuxSecurityContext.Builder |
isRootFileSystemReadonly(Boolean isRootFileSystemReadonly)
Determines if the container will have a read-only root file system.
|
LinuxSecurityContext.Builder |
runAsGroup(Integer runAsGroup)
The group ID (GID) to run the entrypoint process of the container.
|
LinuxSecurityContext.Builder |
runAsUser(Integer runAsUser)
The user ID (UID) to run the entrypoint process of the container.
|
public LinuxSecurityContext.Builder runAsUser(Integer runAsUser)
The user ID (UID) to run the entrypoint process of the container. Defaults to user specified UID in container image metadata if not provided. This must be provided if runAsGroup is provided.
runAsUser
- the value to setpublic LinuxSecurityContext.Builder runAsGroup(Integer runAsGroup)
The group ID (GID) to run the entrypoint process of the container. Uses runtime default if not provided.
runAsGroup
- the value to setpublic LinuxSecurityContext.Builder isNonRootUserCheckEnabled(Boolean isNonRootUserCheckEnabled)
Indicates if the container must run as a non-root user. If true, the service validates the container image at runtime to ensure that it is not going to run with UID 0 (root) and fails the container instance creation if the validation fails.
isNonRootUserCheckEnabled
- the value to setpublic LinuxSecurityContext.Builder isRootFileSystemReadonly(Boolean isRootFileSystemReadonly)
Determines if the container will have a read-only root file system. Default value is false.
isRootFileSystemReadonly
- the value to setpublic LinuxSecurityContext.Builder capabilities(ContainerCapabilities capabilities)
public LinuxSecurityContext build()
public LinuxSecurityContext.Builder copy(LinuxSecurityContext model)
Copyright © 2016–2024. All rights reserved.