public static final class V1.SecurityContext extends com.google.protobuf.GeneratedMessageV3 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| Modifier and Type | Class and Description |
|---|---|
static class |
V1.SecurityContext.Builder
SecurityContext holds security configuration that will be applied to a container.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
ALLOWPRIVILEGEESCALATION_FIELD_NUMBER |
static int |
CAPABILITIES_FIELD_NUMBER |
static com.google.protobuf.Parser<V1.SecurityContext> |
PARSER
Deprecated.
|
static int |
PRIVILEGED_FIELD_NUMBER |
static int |
PROCMOUNT_FIELD_NUMBER |
static int |
READONLYROOTFILESYSTEM_FIELD_NUMBER |
static int |
RUNASGROUP_FIELD_NUMBER |
static int |
RUNASNONROOT_FIELD_NUMBER |
static int |
RUNASUSER_FIELD_NUMBER |
static int |
SELINUXOPTIONS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
getAllowPrivilegeEscalation()
AllowPrivilegeEscalation controls whether a process can gain more
privileges than its parent process.
|
V1.Capabilities |
getCapabilities()
The capabilities to add/drop when running containers.
|
V1.CapabilitiesOrBuilder |
getCapabilitiesOrBuilder()
The capabilities to add/drop when running containers.
|
static V1.SecurityContext |
getDefaultInstance() |
V1.SecurityContext |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Parser<V1.SecurityContext> |
getParserForType() |
boolean |
getPrivileged()
Run container in privileged mode.
|
String |
getProcMount()
procMount denotes the type of proc mount to use for the containers.
|
com.google.protobuf.ByteString |
getProcMountBytes()
procMount denotes the type of proc mount to use for the containers.
|
boolean |
getReadOnlyRootFilesystem()
Whether this container has a read-only root filesystem.
|
long |
getRunAsGroup()
The GID to run the entrypoint of the container process.
|
boolean |
getRunAsNonRoot()
Indicates that the container must run as a non-root user.
|
long |
getRunAsUser()
The UID to run the entrypoint of the container process.
|
V1.SELinuxOptions |
getSeLinuxOptions()
The SELinux context to be applied to the container.
|
V1.SELinuxOptionsOrBuilder |
getSeLinuxOptionsOrBuilder()
The SELinux context to be applied to the container.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasAllowPrivilegeEscalation()
AllowPrivilegeEscalation controls whether a process can gain more
privileges than its parent process.
|
boolean |
hasCapabilities()
The capabilities to add/drop when running containers.
|
int |
hashCode() |
boolean |
hasPrivileged()
Run container in privileged mode.
|
boolean |
hasProcMount()
procMount denotes the type of proc mount to use for the containers.
|
boolean |
hasReadOnlyRootFilesystem()
Whether this container has a read-only root filesystem.
|
boolean |
hasRunAsGroup()
The GID to run the entrypoint of the container process.
|
boolean |
hasRunAsNonRoot()
Indicates that the container must run as a non-root user.
|
boolean |
hasRunAsUser()
The UID to run the entrypoint of the container process.
|
boolean |
hasSeLinuxOptions()
The SELinux context to be applied to the container.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static V1.SecurityContext.Builder |
newBuilder() |
static V1.SecurityContext.Builder |
newBuilder(V1.SecurityContext prototype) |
V1.SecurityContext.Builder |
newBuilderForType() |
protected V1.SecurityContext.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static V1.SecurityContext |
parseDelimitedFrom(InputStream input) |
static V1.SecurityContext |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static V1.SecurityContext |
parseFrom(byte[] data) |
static V1.SecurityContext |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static V1.SecurityContext |
parseFrom(ByteBuffer data) |
static V1.SecurityContext |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static V1.SecurityContext |
parseFrom(com.google.protobuf.ByteString data) |
static V1.SecurityContext |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static V1.SecurityContext |
parseFrom(com.google.protobuf.CodedInputStream input) |
static V1.SecurityContext |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static V1.SecurityContext |
parseFrom(InputStream input) |
static V1.SecurityContext |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<V1.SecurityContext> |
parser() |
V1.SecurityContext.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int CAPABILITIES_FIELD_NUMBER
public static final int PRIVILEGED_FIELD_NUMBER
public static final int SELINUXOPTIONS_FIELD_NUMBER
public static final int RUNASUSER_FIELD_NUMBER
public static final int RUNASGROUP_FIELD_NUMBER
public static final int RUNASNONROOT_FIELD_NUMBER
public static final int READONLYROOTFILESYSTEM_FIELD_NUMBER
public static final int ALLOWPRIVILEGEESCALATION_FIELD_NUMBER
public static final int PROCMOUNT_FIELD_NUMBER
@Deprecated public static final com.google.protobuf.Parser<V1.SecurityContext> PARSER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public boolean hasCapabilities()
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1;hasCapabilities in interface V1.SecurityContextOrBuilderpublic V1.Capabilities getCapabilities()
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1;getCapabilities in interface V1.SecurityContextOrBuilderpublic V1.CapabilitiesOrBuilder getCapabilitiesOrBuilder()
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. +optional
optional .k8s.io.api.core.v1.Capabilities capabilities = 1;getCapabilitiesOrBuilder in interface V1.SecurityContextOrBuilderpublic boolean hasPrivileged()
Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +optional
optional bool privileged = 2;hasPrivileged in interface V1.SecurityContextOrBuilderpublic boolean getPrivileged()
Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. +optional
optional bool privileged = 2;getPrivileged in interface V1.SecurityContextOrBuilderpublic 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. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3;hasSeLinuxOptions in interface V1.SecurityContextOrBuilderpublic V1.SELinuxOptions 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. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3;getSeLinuxOptions in interface V1.SecurityContextOrBuilderpublic V1.SELinuxOptionsOrBuilder 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. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 3;getSeLinuxOptionsOrBuilder in interface V1.SecurityContextOrBuilderpublic 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. +optional
optional int64 runAsUser = 4;hasRunAsUser in interface V1.SecurityContextOrBuilderpublic 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. +optional
optional int64 runAsUser = 4;getRunAsUser in interface V1.SecurityContextOrBuilderpublic 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. +optional
optional int64 runAsGroup = 8;hasRunAsGroup in interface V1.SecurityContextOrBuilderpublic 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. +optional
optional int64 runAsGroup = 8;getRunAsGroup in interface V1.SecurityContextOrBuilderpublic 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;hasRunAsNonRoot in interface V1.SecurityContextOrBuilderpublic 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;getRunAsNonRoot in interface V1.SecurityContextOrBuilderpublic boolean hasReadOnlyRootFilesystem()
Whether this container has a read-only root filesystem. Default is false. +optional
optional bool readOnlyRootFilesystem = 6;hasReadOnlyRootFilesystem in interface V1.SecurityContextOrBuilderpublic boolean getReadOnlyRootFilesystem()
Whether this container has a read-only root filesystem. Default is false. +optional
optional bool readOnlyRootFilesystem = 6;getReadOnlyRootFilesystem in interface V1.SecurityContextOrBuilderpublic 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 +optional
optional bool allowPrivilegeEscalation = 7;hasAllowPrivilegeEscalation in interface V1.SecurityContextOrBuilderpublic 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 +optional
optional bool allowPrivilegeEscalation = 7;getAllowPrivilegeEscalation in interface V1.SecurityContextOrBuilderpublic 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. +optional
optional string procMount = 9;hasProcMount in interface V1.SecurityContextOrBuilderpublic 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. +optional
optional string procMount = 9;getProcMount in interface V1.SecurityContextOrBuilderpublic 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. +optional
optional string procMount = 9;getProcMountBytes in interface V1.SecurityContextOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static V1.SecurityContext parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.SecurityContext parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.SecurityContext parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.SecurityContext parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.SecurityContext parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.SecurityContext parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.SecurityContext parseFrom(InputStream input) throws IOException
IOExceptionpublic static V1.SecurityContext parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static V1.SecurityContext parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static V1.SecurityContext parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static V1.SecurityContext parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static V1.SecurityContext parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic V1.SecurityContext.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static V1.SecurityContext.Builder newBuilder()
public static V1.SecurityContext.Builder newBuilder(V1.SecurityContext prototype)
public V1.SecurityContext.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected V1.SecurityContext.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static V1.SecurityContext getDefaultInstance()
public static com.google.protobuf.Parser<V1.SecurityContext> parser()
public com.google.protobuf.Parser<V1.SecurityContext> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public V1.SecurityContext getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2019. All rights reserved.