public static final class V1.TopologySpreadConstraint extends com.google.protobuf.GeneratedMessageV3 implements V1.TopologySpreadConstraintOrBuilder
TopologySpreadConstraint specifies how to spread matching pods among the given topology.Protobuf type
k8s.io.api.core.v1.TopologySpreadConstraint| Modifier and Type | Class and Description |
|---|---|
static class |
V1.TopologySpreadConstraint.Builder
TopologySpreadConstraint specifies how to spread matching pods among the given topology.
|
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, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
LABELSELECTOR_FIELD_NUMBER |
static int |
MAXSKEW_FIELD_NUMBER |
static com.google.protobuf.Parser<V1.TopologySpreadConstraint> |
PARSER
Deprecated.
|
static int |
TOPOLOGYKEY_FIELD_NUMBER |
static int |
WHENUNSATISFIABLE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static V1.TopologySpreadConstraint |
getDefaultInstance() |
V1.TopologySpreadConstraint |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Meta.LabelSelector |
getLabelSelector()
LabelSelector is used to find matching pods.
|
Meta.LabelSelectorOrBuilder |
getLabelSelectorOrBuilder()
LabelSelector is used to find matching pods.
|
int |
getMaxSkew()
MaxSkew describes the degree to which pods may be unevenly distributed.
|
com.google.protobuf.Parser<V1.TopologySpreadConstraint> |
getParserForType() |
int |
getSerializedSize() |
String |
getTopologyKey()
TopologyKey is the key of node labels.
|
com.google.protobuf.ByteString |
getTopologyKeyBytes()
TopologyKey is the key of node labels.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
String |
getWhenUnsatisfiable()
WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy
the spread constraint.
|
com.google.protobuf.ByteString |
getWhenUnsatisfiableBytes()
WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy
the spread constraint.
|
int |
hashCode() |
boolean |
hasLabelSelector()
LabelSelector is used to find matching pods.
|
boolean |
hasMaxSkew()
MaxSkew describes the degree to which pods may be unevenly distributed.
|
boolean |
hasTopologyKey()
TopologyKey is the key of node labels.
|
boolean |
hasWhenUnsatisfiable()
WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy
the spread constraint.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static V1.TopologySpreadConstraint.Builder |
newBuilder() |
static V1.TopologySpreadConstraint.Builder |
newBuilder(V1.TopologySpreadConstraint prototype) |
V1.TopologySpreadConstraint.Builder |
newBuilderForType() |
protected V1.TopologySpreadConstraint.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static V1.TopologySpreadConstraint |
parseDelimitedFrom(InputStream input) |
static V1.TopologySpreadConstraint |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static V1.TopologySpreadConstraint |
parseFrom(byte[] data) |
static V1.TopologySpreadConstraint |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static V1.TopologySpreadConstraint |
parseFrom(ByteBuffer data) |
static V1.TopologySpreadConstraint |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static V1.TopologySpreadConstraint |
parseFrom(com.google.protobuf.ByteString data) |
static V1.TopologySpreadConstraint |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static V1.TopologySpreadConstraint |
parseFrom(com.google.protobuf.CodedInputStream input) |
static V1.TopologySpreadConstraint |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static V1.TopologySpreadConstraint |
parseFrom(InputStream input) |
static V1.TopologySpreadConstraint |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<V1.TopologySpreadConstraint> |
parser() |
V1.TopologySpreadConstraint.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newInstance, newIntList, newLongList, 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 MAXSKEW_FIELD_NUMBER
public static final int TOPOLOGYKEY_FIELD_NUMBER
public static final int WHENUNSATISFIABLE_FIELD_NUMBER
public static final int LABELSELECTOR_FIELD_NUMBER
@Deprecated public static final com.google.protobuf.Parser<V1.TopologySpreadConstraint> 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 hasMaxSkew()
MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: +-------+-------+-------+ | zone1 | zone2 | zone3 | +-------+-------+-------+ | P | P | | +-------+-------+-------+ - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.
optional int32 maxSkew = 1;hasMaxSkew in interface V1.TopologySpreadConstraintOrBuilderpublic int getMaxSkew()
MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: +-------+-------+-------+ | zone1 | zone2 | zone3 | +-------+-------+-------+ | P | P | | +-------+-------+-------+ - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.
optional int32 maxSkew = 1;getMaxSkew in interface V1.TopologySpreadConstraintOrBuilderpublic boolean hasTopologyKey()
TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each <key, value> as a "bucket", and try to put balanced number of pods into each bucket. It's a required field.
optional string topologyKey = 2;hasTopologyKey in interface V1.TopologySpreadConstraintOrBuilderpublic String getTopologyKey()
TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each <key, value> as a "bucket", and try to put balanced number of pods into each bucket. It's a required field.
optional string topologyKey = 2;getTopologyKey in interface V1.TopologySpreadConstraintOrBuilderpublic com.google.protobuf.ByteString getTopologyKeyBytes()
TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each <key, value> as a "bucket", and try to put balanced number of pods into each bucket. It's a required field.
optional string topologyKey = 2;getTopologyKeyBytes in interface V1.TopologySpreadConstraintOrBuilderpublic boolean hasWhenUnsatisfiable()
WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: +-------+-------+-------+ | zone1 | zone2 | zone3 | +-------+-------+-------+ | P P P | P | P | +-------+-------+-------+ If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.
optional string whenUnsatisfiable = 3;hasWhenUnsatisfiable in interface V1.TopologySpreadConstraintOrBuilderpublic String getWhenUnsatisfiable()
WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: +-------+-------+-------+ | zone1 | zone2 | zone3 | +-------+-------+-------+ | P P P | P | P | +-------+-------+-------+ If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.
optional string whenUnsatisfiable = 3;getWhenUnsatisfiable in interface V1.TopologySpreadConstraintOrBuilderpublic com.google.protobuf.ByteString getWhenUnsatisfiableBytes()
WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: +-------+-------+-------+ | zone1 | zone2 | zone3 | +-------+-------+-------+ | P P P | P | P | +-------+-------+-------+ If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.
optional string whenUnsatisfiable = 3;getWhenUnsatisfiableBytes in interface V1.TopologySpreadConstraintOrBuilderpublic boolean hasLabelSelector()
LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 4;hasLabelSelector in interface V1.TopologySpreadConstraintOrBuilderpublic Meta.LabelSelector getLabelSelector()
LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 4;getLabelSelector in interface V1.TopologySpreadConstraintOrBuilderpublic Meta.LabelSelectorOrBuilder getLabelSelectorOrBuilder()
LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 4;getLabelSelectorOrBuilder in interface V1.TopologySpreadConstraintOrBuilderpublic 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.TopologySpreadConstraint parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.TopologySpreadConstraint parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.TopologySpreadConstraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.TopologySpreadConstraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.TopologySpreadConstraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.TopologySpreadConstraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static V1.TopologySpreadConstraint parseFrom(InputStream input) throws IOException
IOExceptionpublic static V1.TopologySpreadConstraint parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static V1.TopologySpreadConstraint parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static V1.TopologySpreadConstraint parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static V1.TopologySpreadConstraint parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static V1.TopologySpreadConstraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic V1.TopologySpreadConstraint.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static V1.TopologySpreadConstraint.Builder newBuilder()
public static V1.TopologySpreadConstraint.Builder newBuilder(V1.TopologySpreadConstraint prototype)
public V1.TopologySpreadConstraint.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected V1.TopologySpreadConstraint.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static V1.TopologySpreadConstraint getDefaultInstance()
public static com.google.protobuf.Parser<V1.TopologySpreadConstraint> parser()
public com.google.protobuf.Parser<V1.TopologySpreadConstraint> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public V1.TopologySpreadConstraint getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2023. All rights reserved.