public static final class V1.PodSecurityContext.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder> implements V1.PodSecurityContextOrBuilder
PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.Protobuf type
k8s.io.api.core.v1.PodSecurityContext| Modifier and Type | Method and Description |
|---|---|
V1.PodSecurityContext.Builder |
addAllSupplementalGroups(Iterable<? extends Long> values)
A list of groups applied to the first process run in each container, in addition
to the container's primary GID.
|
V1.PodSecurityContext.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
V1.PodSecurityContext.Builder |
addSupplementalGroups(long value)
A list of groups applied to the first process run in each container, in addition
to the container's primary GID.
|
V1.PodSecurityContext |
build() |
V1.PodSecurityContext |
buildPartial() |
V1.PodSecurityContext.Builder |
clear() |
V1.PodSecurityContext.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
V1.PodSecurityContext.Builder |
clearFsGroup()
A special supplemental group that applies to all containers in a pod.
|
V1.PodSecurityContext.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
V1.PodSecurityContext.Builder |
clearRunAsNonRoot()
Indicates that the container must run as a non-root user.
|
V1.PodSecurityContext.Builder |
clearRunAsUser()
The UID to run the entrypoint of the container process.
|
V1.PodSecurityContext.Builder |
clearSeLinuxOptions()
The SELinux context to be applied to all containers.
|
V1.PodSecurityContext.Builder |
clearSupplementalGroups()
A list of groups applied to the first process run in each container, in addition
to the container's primary GID.
|
V1.PodSecurityContext.Builder |
clone() |
V1.PodSecurityContext |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
long |
getFsGroup()
A special supplemental group that applies to all containers in a pod.
|
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 all containers.
|
V1.SELinuxOptions.Builder |
getSeLinuxOptionsBuilder()
The SELinux context to be applied to all containers.
|
V1.SELinuxOptionsOrBuilder |
getSeLinuxOptionsOrBuilder()
The SELinux context to be applied to all containers.
|
long |
getSupplementalGroups(int index)
A list of groups applied to the first process run in each container, in addition
to the container's primary GID.
|
int |
getSupplementalGroupsCount()
A list of groups applied to the first process run in each container, in addition
to the container's primary GID.
|
List<Long> |
getSupplementalGroupsList()
A list of groups applied to the first process run in each container, in addition
to the container's primary GID.
|
boolean |
hasFsGroup()
A special supplemental group that applies to all containers in a pod.
|
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 all containers.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
V1.PodSecurityContext.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
V1.PodSecurityContext.Builder |
mergeFrom(com.google.protobuf.Message other) |
V1.PodSecurityContext.Builder |
mergeFrom(V1.PodSecurityContext other) |
V1.PodSecurityContext.Builder |
mergeSeLinuxOptions(V1.SELinuxOptions value)
The SELinux context to be applied to all containers.
|
V1.PodSecurityContext.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
V1.PodSecurityContext.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
V1.PodSecurityContext.Builder |
setFsGroup(long value)
A special supplemental group that applies to all containers in a pod.
|
V1.PodSecurityContext.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
V1.PodSecurityContext.Builder |
setRunAsNonRoot(boolean value)
Indicates that the container must run as a non-root user.
|
V1.PodSecurityContext.Builder |
setRunAsUser(long value)
The UID to run the entrypoint of the container process.
|
V1.PodSecurityContext.Builder |
setSeLinuxOptions(V1.SELinuxOptions.Builder builderForValue)
The SELinux context to be applied to all containers.
|
V1.PodSecurityContext.Builder |
setSeLinuxOptions(V1.SELinuxOptions value)
The SELinux context to be applied to all containers.
|
V1.PodSecurityContext.Builder |
setSupplementalGroups(int index,
long value)
A list of groups applied to the first process run in each container, in addition
to the container's primary GID.
|
V1.PodSecurityContext.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public V1.PodSecurityContext.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public V1.PodSecurityContext getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic V1.PodSecurityContext build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic V1.PodSecurityContext buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic V1.PodSecurityContext.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public V1.PodSecurityContext.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public V1.PodSecurityContext.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public V1.PodSecurityContext.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public V1.PodSecurityContext.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public V1.PodSecurityContext.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public V1.PodSecurityContext.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<V1.PodSecurityContext.Builder>public V1.PodSecurityContext.Builder mergeFrom(V1.PodSecurityContext other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public V1.PodSecurityContext.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<V1.PodSecurityContext.Builder>IOExceptionpublic boolean hasSeLinuxOptions()
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 1;hasSeLinuxOptions in interface V1.PodSecurityContextOrBuilderpublic V1.SELinuxOptions getSeLinuxOptions()
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 1;getSeLinuxOptions in interface V1.PodSecurityContextOrBuilderpublic V1.PodSecurityContext.Builder setSeLinuxOptions(V1.SELinuxOptions value)
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 1;public V1.PodSecurityContext.Builder setSeLinuxOptions(V1.SELinuxOptions.Builder builderForValue)
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 1;public V1.PodSecurityContext.Builder mergeSeLinuxOptions(V1.SELinuxOptions value)
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 1;public V1.PodSecurityContext.Builder clearSeLinuxOptions()
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 1;public V1.SELinuxOptions.Builder getSeLinuxOptionsBuilder()
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 1;public V1.SELinuxOptionsOrBuilder getSeLinuxOptionsOrBuilder()
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 1;getSeLinuxOptionsOrBuilder in interface V1.PodSecurityContextOrBuilderpublic 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 SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional int64 runAsUser = 2;hasRunAsUser in interface V1.PodSecurityContextOrBuilderpublic 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 SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional int64 runAsUser = 2;getRunAsUser in interface V1.PodSecurityContextOrBuilderpublic V1.PodSecurityContext.Builder setRunAsUser(long value)
The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional int64 runAsUser = 2;public V1.PodSecurityContext.Builder 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 SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +optional
optional int64 runAsUser = 2;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 SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. +optional
optional bool runAsNonRoot = 3;hasRunAsNonRoot in interface V1.PodSecurityContextOrBuilderpublic 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 SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. +optional
optional bool runAsNonRoot = 3;getRunAsNonRoot in interface V1.PodSecurityContextOrBuilderpublic V1.PodSecurityContext.Builder setRunAsNonRoot(boolean value)
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 SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. +optional
optional bool runAsNonRoot = 3;public V1.PodSecurityContext.Builder 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 SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. +optional
optional bool runAsNonRoot = 3;public List<Long> getSupplementalGroupsList()
A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +optional
repeated int64 supplementalGroups = 4;getSupplementalGroupsList in interface V1.PodSecurityContextOrBuilderpublic int getSupplementalGroupsCount()
A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +optional
repeated int64 supplementalGroups = 4;getSupplementalGroupsCount in interface V1.PodSecurityContextOrBuilderpublic long getSupplementalGroups(int index)
A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +optional
repeated int64 supplementalGroups = 4;getSupplementalGroups in interface V1.PodSecurityContextOrBuilderpublic V1.PodSecurityContext.Builder setSupplementalGroups(int index, long value)
A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +optional
repeated int64 supplementalGroups = 4;public V1.PodSecurityContext.Builder addSupplementalGroups(long value)
A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +optional
repeated int64 supplementalGroups = 4;public V1.PodSecurityContext.Builder addAllSupplementalGroups(Iterable<? extends Long> values)
A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +optional
repeated int64 supplementalGroups = 4;public V1.PodSecurityContext.Builder clearSupplementalGroups()
A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. +optional
repeated int64 supplementalGroups = 4;public boolean hasFsGroup()
A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- If unset, the Kubelet will not modify the ownership and permissions of any volume. +optional
optional int64 fsGroup = 5;hasFsGroup in interface V1.PodSecurityContextOrBuilderpublic long getFsGroup()
A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- If unset, the Kubelet will not modify the ownership and permissions of any volume. +optional
optional int64 fsGroup = 5;getFsGroup in interface V1.PodSecurityContextOrBuilderpublic V1.PodSecurityContext.Builder setFsGroup(long value)
A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- If unset, the Kubelet will not modify the ownership and permissions of any volume. +optional
optional int64 fsGroup = 5;public V1.PodSecurityContext.Builder clearFsGroup()
A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- If unset, the Kubelet will not modify the ownership and permissions of any volume. +optional
optional int64 fsGroup = 5;public final V1.PodSecurityContext.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>public final V1.PodSecurityContext.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<V1.PodSecurityContext.Builder>Copyright © 2018. All rights reserved.