Package io.kubernetes.client.proto
Class V1.SecurityContext.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
io.kubernetes.client.proto.V1.SecurityContext.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,V1.SecurityContextOrBuilder,Cloneable
- Enclosing class:
- V1.SecurityContext
public static final class V1.SecurityContext.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
implements V1.SecurityContextOrBuilder
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.Protobuf type
k8s.io.api.core.v1.SecurityContext-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process.The capabilities to add/drop when running containers.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Run container in privileged mode.procMount denotes the type of proc mount to use for the containers.Whether this container has a read-only root filesystem.The GID to run the entrypoint of the container process.Indicates that the container must run as a non-root user.The UID to run the entrypoint of the container process.The seccomp options to use by this container.The SELinux context to be applied to the container.The Windows specific settings applied to all containers.clone()booleanAllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process.The capabilities to add/drop when running containers.The capabilities to add/drop when running containers.The capabilities to add/drop when running containers.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanRun container in privileged mode.procMount denotes the type of proc mount to use for the containers.com.google.protobuf.ByteStringprocMount denotes the type of proc mount to use for the containers.booleanWhether this container has a read-only root filesystem.longThe GID to run the entrypoint of the container process.booleanIndicates that the container must run as a non-root user.longThe UID to run the entrypoint of the container process.The seccomp options to use by this container.The seccomp options to use by this container.The seccomp options to use by this container.The SELinux context to be applied to the container.The SELinux context to be applied to the container.The SELinux context to be applied to the container.The Windows specific settings applied to all containers.The Windows specific settings applied to all containers.The Windows specific settings applied to all containers.booleanAllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process.booleanThe capabilities to add/drop when running containers.booleanRun container in privileged mode.booleanprocMount denotes the type of proc mount to use for the containers.booleanWhether this container has a read-only root filesystem.booleanThe GID to run the entrypoint of the container process.booleanIndicates that the container must run as a non-root user.booleanThe UID to run the entrypoint of the container process.booleanThe seccomp options to use by this container.booleanThe SELinux context to be applied to the container.booleanThe Windows specific settings applied to all containers.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeCapabilities(V1.Capabilities value) The capabilities to add/drop when running containers.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(V1.SecurityContext other) The seccomp options to use by this container.The SELinux context to be applied to the container.mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) The Windows specific settings applied to all containers.setAllowPrivilegeEscalation(boolean value) AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process.setCapabilities(V1.Capabilities value) The capabilities to add/drop when running containers.setCapabilities(V1.Capabilities.Builder builderForValue) The capabilities to add/drop when running containers.setPrivileged(boolean value) Run container in privileged mode.setProcMount(String value) procMount denotes the type of proc mount to use for the containers.setProcMountBytes(com.google.protobuf.ByteString value) procMount denotes the type of proc mount to use for the containers.setReadOnlyRootFilesystem(boolean value) Whether this container has a read-only root filesystem.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setRunAsGroup(long value) The GID to run the entrypoint of the container process.setRunAsNonRoot(boolean value) Indicates that the container must run as a non-root user.setRunAsUser(long value) The UID to run the entrypoint of the container process.The seccomp options to use by this container.setSeccompProfile(V1.SeccompProfile.Builder builderForValue) The seccomp options to use by this container.The SELinux context to be applied to the container.setSeLinuxOptions(V1.SELinuxOptions.Builder builderForValue) The SELinux context to be applied to the container.setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) The Windows specific settings applied to all containers.setWindowsOptions(V1.WindowsSecurityContextOptions.Builder builderForValue) The Windows specific settings applied to all containers.Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
setField
public V1.SecurityContext.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
setRepeatedField
public V1.SecurityContext.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
addRepeatedField
public V1.SecurityContext.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<V1.SecurityContext.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
mergeFrom
public V1.SecurityContext.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<V1.SecurityContext.Builder>- Throws:
IOException
-
hasCapabilities
public boolean hasCapabilities()The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1;- Specified by:
hasCapabilitiesin interfaceV1.SecurityContextOrBuilder
-
getCapabilities
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1;- Specified by:
getCapabilitiesin interfaceV1.SecurityContextOrBuilder
-
setCapabilities
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1; -
setCapabilities
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1; -
mergeCapabilities
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1; -
clearCapabilities
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1; -
getCapabilitiesBuilder
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1; -
getCapabilitiesOrBuilder
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1;- Specified by:
getCapabilitiesOrBuilderin interfaceV1.SecurityContextOrBuilder
-
hasPrivileged
public boolean hasPrivileged()Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. +optional
optional bool privileged = 2;- Specified by:
hasPrivilegedin interfaceV1.SecurityContextOrBuilder
-
getPrivileged
public boolean getPrivileged()Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. +optional
optional bool privileged = 2;- Specified by:
getPrivilegedin interfaceV1.SecurityContextOrBuilder
-
setPrivileged
Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. +optional
optional bool privileged = 2; -
clearPrivileged
Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. +optional
optional bool privileged = 2; -
hasSeLinuxOptions
public boolean hasSeLinuxOptions()The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3;- Specified by:
hasSeLinuxOptionsin interfaceV1.SecurityContextOrBuilder
-
getSeLinuxOptions
The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3;- Specified by:
getSeLinuxOptionsin interfaceV1.SecurityContextOrBuilder
-
setSeLinuxOptions
The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3; -
setSeLinuxOptions
The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3; -
mergeSeLinuxOptions
The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3; -
clearSeLinuxOptions
The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3; -
getSeLinuxOptionsBuilder
The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3; -
getSeLinuxOptionsOrBuilder
The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3;- Specified by:
getSeLinuxOptionsOrBuilderin interfaceV1.SecurityContextOrBuilder
-
hasWindowsOptions
public boolean hasWindowsOptions()The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +optional
optional .k8s.io.api.core.v1.WindowsSecurityContextOptions windowsOptions = 10;- Specified by:
hasWindowsOptionsin interfaceV1.SecurityContextOrBuilder
-
getWindowsOptions
The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +optional
optional .k8s.io.api.core.v1.WindowsSecurityContextOptions windowsOptions = 10;- Specified by:
getWindowsOptionsin interfaceV1.SecurityContextOrBuilder
-
setWindowsOptions
The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +optional
optional .k8s.io.api.core.v1.WindowsSecurityContextOptions windowsOptions = 10; -
setWindowsOptions
public V1.SecurityContext.Builder setWindowsOptions(V1.WindowsSecurityContextOptions.Builder builderForValue) The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +optional
optional .k8s.io.api.core.v1.WindowsSecurityContextOptions windowsOptions = 10; -
mergeWindowsOptions
The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +optional
optional .k8s.io.api.core.v1.WindowsSecurityContextOptions windowsOptions = 10; -
clearWindowsOptions
The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +optional
optional .k8s.io.api.core.v1.WindowsSecurityContextOptions windowsOptions = 10; -
getWindowsOptionsBuilder
The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +optional
optional .k8s.io.api.core.v1.WindowsSecurityContextOptions windowsOptions = 10; -
getWindowsOptionsOrBuilder
The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +optional
optional .k8s.io.api.core.v1.WindowsSecurityContextOptions windowsOptions = 10;- Specified by:
getWindowsOptionsOrBuilderin interfaceV1.SecurityContextOrBuilder
-
hasRunAsUser
public boolean hasRunAsUser()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. Note that this field cannot be set when spec.os.name is windows. +optional
optional int64 runAsUser = 4;- Specified by:
hasRunAsUserin interfaceV1.SecurityContextOrBuilder
-
getRunAsUser
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. Note that this field cannot be set when spec.os.name is windows. +optional
optional int64 runAsUser = 4;- Specified by:
getRunAsUserin interfaceV1.SecurityContextOrBuilder
-
setRunAsUser
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. Note that this field cannot be set when spec.os.name is windows. +optional
optional int64 runAsUser = 4; -
clearRunAsUser
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. Note that this field cannot be set when spec.os.name is windows. +optional
optional int64 runAsUser = 4; -
hasRunAsGroup
public boolean hasRunAsGroup()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. Note that this field cannot be set when spec.os.name is windows. +optional
optional int64 runAsGroup = 8;- Specified by:
hasRunAsGroupin interfaceV1.SecurityContextOrBuilder
-
getRunAsGroup
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. Note that this field cannot be set when spec.os.name is windows. +optional
optional int64 runAsGroup = 8;- Specified by:
getRunAsGroupin interfaceV1.SecurityContextOrBuilder
-
setRunAsGroup
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. Note that this field cannot be set when spec.os.name is windows. +optional
optional int64 runAsGroup = 8; -
clearRunAsGroup
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. Note that this field cannot be set when spec.os.name is windows. +optional
optional int64 runAsGroup = 8; -
hasRunAsNonRoot
public boolean hasRunAsNonRoot()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. +optional
optional bool runAsNonRoot = 5;- Specified by:
hasRunAsNonRootin interfaceV1.SecurityContextOrBuilder
-
getRunAsNonRoot
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. +optional
optional bool runAsNonRoot = 5;- Specified by:
getRunAsNonRootin interfaceV1.SecurityContextOrBuilder
-
setRunAsNonRoot
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. +optional
optional bool runAsNonRoot = 5; -
clearRunAsNonRoot
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. +optional
optional bool runAsNonRoot = 5; -
hasReadOnlyRootFilesystem
public boolean hasReadOnlyRootFilesystem()Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. +optional
optional bool readOnlyRootFilesystem = 6;- Specified by:
hasReadOnlyRootFilesystemin interfaceV1.SecurityContextOrBuilder
-
getReadOnlyRootFilesystem
public boolean getReadOnlyRootFilesystem()Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. +optional
optional bool readOnlyRootFilesystem = 6;- Specified by:
getReadOnlyRootFilesystemin interfaceV1.SecurityContextOrBuilder
-
setReadOnlyRootFilesystem
Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. +optional
optional bool readOnlyRootFilesystem = 6; -
clearReadOnlyRootFilesystem
Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. +optional
optional bool readOnlyRootFilesystem = 6; -
hasAllowPrivilegeEscalation
public boolean hasAllowPrivilegeEscalation()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 Note that this field cannot be set when spec.os.name is windows. +optional
optional bool allowPrivilegeEscalation = 7;- Specified by:
hasAllowPrivilegeEscalationin interfaceV1.SecurityContextOrBuilder
-
getAllowPrivilegeEscalation
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 Note that this field cannot be set when spec.os.name is windows. +optional
optional bool allowPrivilegeEscalation = 7;- Specified by:
getAllowPrivilegeEscalationin interfaceV1.SecurityContextOrBuilder
-
setAllowPrivilegeEscalation
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 Note that this field cannot be set when spec.os.name is windows. +optional
optional bool allowPrivilegeEscalation = 7; -
clearAllowPrivilegeEscalation
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 Note that this field cannot be set when spec.os.name is windows. +optional
optional bool allowPrivilegeEscalation = 7; -
hasProcMount
public boolean hasProcMount()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. Note that this field cannot be set when spec.os.name is windows. +optional
optional string procMount = 9;- Specified by:
hasProcMountin interfaceV1.SecurityContextOrBuilder
-
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. Note that this field cannot be set when spec.os.name is windows. +optional
optional string procMount = 9;- Specified by:
getProcMountin interfaceV1.SecurityContextOrBuilder
-
getProcMountBytes
public com.google.protobuf.ByteString getProcMountBytes()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. Note that this field cannot be set when spec.os.name is windows. +optional
optional string procMount = 9;- Specified by:
getProcMountBytesin interfaceV1.SecurityContextOrBuilder
-
setProcMount
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. Note that this field cannot be set when spec.os.name is windows. +optional
optional string procMount = 9; -
clearProcMount
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. Note that this field cannot be set when spec.os.name is windows. +optional
optional string procMount = 9; -
setProcMountBytes
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. Note that this field cannot be set when spec.os.name is windows. +optional
optional string procMount = 9; -
hasSeccompProfile
public boolean hasSeccompProfile()The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SeccompProfile seccompProfile = 11;- Specified by:
hasSeccompProfilein interfaceV1.SecurityContextOrBuilder
-
getSeccompProfile
The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SeccompProfile seccompProfile = 11;- Specified by:
getSeccompProfilein interfaceV1.SecurityContextOrBuilder
-
setSeccompProfile
The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SeccompProfile seccompProfile = 11; -
setSeccompProfile
The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SeccompProfile seccompProfile = 11; -
mergeSeccompProfile
The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SeccompProfile seccompProfile = 11; -
clearSeccompProfile
The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SeccompProfile seccompProfile = 11; -
getSeccompProfileBuilder
The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SeccompProfile seccompProfile = 11; -
getSeccompProfileOrBuilder
The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +optional
optional .k8s.io.api.core.v1.SeccompProfile seccompProfile = 11;- Specified by:
getSeccompProfileOrBuilderin interfaceV1.SecurityContextOrBuilder
-
setUnknownFields
public final V1.SecurityContext.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-
mergeUnknownFields
public final V1.SecurityContext.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<V1.SecurityContext.Builder>
-