diff --git a/documentation/domains/Cluster.json b/documentation/domains/Cluster.json index 7cd09cb2819..f0852a4d4b4 100644 --- a/documentation/domains/Cluster.json +++ b/documentation/domains/Cluster.json @@ -407,11 +407,11 @@ "type": "object", "properties": { "nodeTaintsPolicy": { - "description": "NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a alpha-level feature enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.", + "description": "NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.", "type": "string" }, "whenUnsatisfiable": { - "description": "WhenUnsatisfiable indicates how to deal with a pod if it doesn\u0027t 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\u0027t make it *more* imbalanced. It\u0027s a required field. ", + "description": "WhenUnsatisfiable indicates how to deal with a pod if it doesn\u0027t 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\u0027t make it *more* imbalanced. It\u0027s a required field.", "type": "string" }, "maxSkew": { @@ -419,7 +419,7 @@ "type": "integer" }, "nodeAffinityPolicy": { - "description": "NodeAffinityPolicy indicates how we will treat Pod\u0027s nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a alpha-level feature enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.", + "description": "NodeAffinityPolicy indicates how we will treat Pod\u0027s nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.", "type": "string" }, "labelSelector": { @@ -435,7 +435,7 @@ "type": "string" }, "matchLabelKeys": { - "description": "MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. Keys that don\u0027t exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector.", + "description": "MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn\u0027t set. Keys that don\u0027t exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).", "type": "array", "items": { "type": "string" diff --git a/documentation/domains/Cluster.md b/documentation/domains/Cluster.md index b6576e2699e..fd14bd3814a 100644 --- a/documentation/domains/Cluster.md +++ b/documentation/domains/Cluster.md @@ -125,10 +125,10 @@ TopologySpreadConstraint specifies how to spread matching pods among the given t | Name | Type | Description | | --- | --- | --- | | `labelSelector` | [Label Selector](k8s1.13.5.md#label-selector) | A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. | -| `matchLabelKeys` | Array of string | MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. | +| `matchLabelKeys` | Array of string | MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). | | `maxSkew` | integer | 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. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) 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. | | `minDomains` | integer | MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default). | -| `nodeAffinityPolicy` | string | NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a alpha-level feature enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. | -| `nodeTaintsPolicy` | string | NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a alpha-level feature enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. | +| `nodeAffinityPolicy` | string | NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. | +| `nodeTaintsPolicy` | string | NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. | | `topologyKey` | string | 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 as a "bucket", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. It's a required field. | -| `whenUnsatisfiable` | string | 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. | \ No newline at end of file +| `whenUnsatisfiable` | string | 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. | \ No newline at end of file diff --git a/documentation/domains/Domain.json b/documentation/domains/Domain.json index bc64bf8e881..a192c79ad69 100644 --- a/documentation/domains/Domain.json +++ b/documentation/domains/Domain.json @@ -1238,11 +1238,11 @@ "type": "object", "properties": { "nodeTaintsPolicy": { - "description": "NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a alpha-level feature enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.", + "description": "NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.", "type": "string" }, "whenUnsatisfiable": { - "description": "WhenUnsatisfiable indicates how to deal with a pod if it doesn\u0027t 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\u0027t make it *more* imbalanced. It\u0027s a required field. ", + "description": "WhenUnsatisfiable indicates how to deal with a pod if it doesn\u0027t 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\u0027t make it *more* imbalanced. It\u0027s a required field.", "type": "string" }, "maxSkew": { @@ -1250,7 +1250,7 @@ "type": "integer" }, "nodeAffinityPolicy": { - "description": "NodeAffinityPolicy indicates how we will treat Pod\u0027s nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a alpha-level feature enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.", + "description": "NodeAffinityPolicy indicates how we will treat Pod\u0027s nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.", "type": "string" }, "labelSelector": { @@ -1266,7 +1266,7 @@ "type": "string" }, "matchLabelKeys": { - "description": "MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. Keys that don\u0027t exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector.", + "description": "MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn\u0027t set. Keys that don\u0027t exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).", "type": "array", "items": { "type": "string" diff --git a/documentation/domains/Domain.md b/documentation/domains/Domain.md index 5b61d9cf7e7..6b6605f612a 100644 --- a/documentation/domains/Domain.md +++ b/documentation/domains/Domain.md @@ -288,13 +288,13 @@ TopologySpreadConstraint specifies how to spread matching pods among the given t | Name | Type | Description | | --- | --- | --- | | `labelSelector` | [Label Selector](k8s1.13.5.md#label-selector) | A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. | -| `matchLabelKeys` | Array of string | MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. | +| `matchLabelKeys` | Array of string | MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). | | `maxSkew` | integer | 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. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) 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. | | `minDomains` | integer | MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default). | -| `nodeAffinityPolicy` | string | NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a alpha-level feature enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. | -| `nodeTaintsPolicy` | string | NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a alpha-level feature enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. | +| `nodeAffinityPolicy` | string | NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. | +| `nodeTaintsPolicy` | string | NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. | | `topologyKey` | string | 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 as a "bucket", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. It's a required field. | -| `whenUnsatisfiable` | string | 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. | +| `whenUnsatisfiable` | string | 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. | ### Cluster Condition diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java index 7867fad8ca0..b41fe6c104f 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java @@ -116,6 +116,7 @@ public class Kubernetes { private static final Boolean ALLOW_WATCH_BOOKMARKS = false; private static final String RESOURCE_VERSION = ""; private static final String RESOURCE_VERSION_MATCH_UNSET = null; + private static final Boolean SEND_INITIAL_EVENTS_UNSET = null; private static final Integer TIMEOUT_SECONDS = 5; private static final String DOMAIN_GROUP = "weblogic.oracle"; private static final String CLUSTER_GROUP = "weblogic.oracle"; @@ -411,6 +412,7 @@ public static V1DeploymentList listDeployments(String namespace) throws ApiExcep null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list call. Boolean.FALSE // Boolean | Watch for changes to the described resources. ); @@ -794,6 +796,7 @@ public static V1PodList listPods(String namespace, String labelSelectors) throws null, // maximum number of responses to return for a list call. null, // shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events null, // Timeout for the list/watch call. Boolean.FALSE // Watch for changes to the described resources. ); @@ -825,6 +828,7 @@ public static V1PodDisruptionBudgetList listPodDisruptionBudgets(String namespac null, // maximum number of responses to return for a list call. null, // shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events null, // Timeout for the list/watch call. Boolean.FALSE // Watch for changes to the described resources. ); @@ -1075,6 +1079,7 @@ public static List listNamespaces(String labelSelector) throws ApiExcept null, // maximum number of responses to return for a list call RESOURCE_VERSION, // shows changes that occur after that particular version of a resource RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Timeout for the list/watch call false // Watch for changes to the described resources ); @@ -1107,6 +1112,7 @@ public static V1NamespaceList listNamespacesAsObjects() throws ApiException { null, // maximum number of responses to return for a list call RESOURCE_VERSION, // shows changes that occur after that particular version of a resource RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Timeout for the list/watch call false // Watch for changes to the described resources ); @@ -1135,6 +1141,7 @@ public static V1Namespace getNamespace(String name) throws ApiException { null, // maximum number of responses to return for a list call RESOURCE_VERSION, // shows changes that occur after that particular version of a resource RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Timeout for the list/watch call false // Watch for changes to the described resources ); @@ -1221,6 +1228,7 @@ public static List listNamespacedEvents(String namespace) throws Ap null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list call. Boolean.FALSE // Boolean | Watch for changes to the described resources. ); @@ -1255,6 +1263,7 @@ public static List listOpGeneratedNamespacedEvents(String namespace null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list call. Boolean.FALSE // Boolean | Watch for changes to the described resources. ); @@ -2061,6 +2070,7 @@ public static V1ConfigMapList listConfigMaps(String namespace) throws ApiExcepti null, // maximum number of responses to return for a list call RESOURCE_VERSION, // shows changes that occur after that particular version of a resource RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Timeout for the list/watch call false // Watch for changes to the described resources ); @@ -2375,6 +2385,7 @@ public static V1PersistentVolumeList listPersistentVolumes(String labels) throws null, // maximum number of responses to return for a list call RESOURCE_VERSION, // shows changes that occur after that particular version of a resource RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Timeout for the list/watch call false // Watch for changes to the described resources ); @@ -2769,6 +2780,7 @@ public static V1JobList listJobs(String namespace) throws ApiException { null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list/watch call. Boolean.FALSE // Boolean | Watch for changes to the described resources ); @@ -2850,6 +2862,7 @@ public static V1ReplicaSetList listReplicaSets(String namespace) throws ApiExcep null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list call. Boolean.FALSE // Boolean | Watch for changes to the described resources. ); @@ -3006,6 +3019,7 @@ public static V1RoleBindingList listRoleBindingForAllNamespaces(String labelSele PRETTY, // String | If true, then the output is pretty printed. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list/watch call. Boolean.FALSE // Boolean | Watch for changes to the described resources ); @@ -3035,6 +3049,7 @@ public static V1ClusterRoleBindingList listClusterRoleBindings(String labelSelec null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list/watch call. Boolean.FALSE // Boolean | Watch for changes to the described resources ); @@ -3094,6 +3109,7 @@ public static V1RoleBindingList listNamespacedRoleBinding(String namespace) null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list call. Boolean.FALSE // Boolean | Watch for changes to the described resources. ); @@ -3124,6 +3140,7 @@ public static V1ValidatingWebhookConfigurationList listValidatingWebhookConfigur null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list call. Boolean.FALSE // Boolean | Watch for changes to the described resources. ); @@ -3180,6 +3197,7 @@ public static V1ClusterRoleList listClusterRoles(String labelSelector) throws Ap null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list call. Boolean.FALSE // Boolean | Watch for changes to the described resources. ); @@ -3237,6 +3255,7 @@ public static V1RoleList listNamespacedRoles(String namespace) throws ApiExcepti null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list call. Boolean.FALSE // Boolean | Watch for changes to the described resources. ); @@ -3310,6 +3329,7 @@ public static V1IngressList listNamespacedIngresses(String namespace) throws Api null, // Integer | limit is a maximum number of responses to return for a list call. RESOURCE_VERSION, // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events TIMEOUT_SECONDS, // Integer | Timeout for the list/watch call. ALLOW_WATCH_BOOKMARKS // Boolean | Watch for changes to the described resources. ); diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/assertions/impl/Kubernetes.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/assertions/impl/Kubernetes.java index d47d97fa610..8ba1a5e28be 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/assertions/impl/Kubernetes.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/assertions/impl/Kubernetes.java @@ -1,4 +1,4 @@ -// Copyright (c) 2020, 2022, Oracle and/or its affiliates. +// Copyright (c) 2020, 2023, Oracle and/or its affiliates. // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. package oracle.weblogic.kubernetes.assertions.impl; @@ -52,6 +52,7 @@ public class Kubernetes { private static final String OPERATOR_NAME = "weblogic-operator-"; private static final String RESOURCE_VERSION_MATCH_UNSET = null; + private static final Boolean SEND_INITIAL_EVENTS_UNSET = null; private static ApiClient apiClient = null; private static CoreV1Api coreV1Api = null; @@ -472,6 +473,7 @@ public static V1Pod getPod(String namespace, String labelSelector, String podNam null, // maximum number of responses to return for a list call. null, // shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events null, // Timeout for the list/watch call. Boolean.FALSE // Watch for changes to the described resources. ); @@ -570,6 +572,7 @@ public static V1Service getService( Boolean.FALSE.toString(), // pretty print output. null, // shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events null, // Timeout for the list/watch call. Boolean.FALSE // Watch for changes to the described resources. ); @@ -686,6 +689,7 @@ public static V1PodList listPods(String namespace, String labelSelectors) throws null, // maximum number of responses to return for a list call. null, // shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events null, // Timeout for the list/watch call. Boolean.FALSE // Watch for changes to the described resources. ); @@ -711,6 +715,7 @@ public static void listServices(String namespace, String labelSelectors) throws Boolean.FALSE.toString(), // pretty print output. null, // shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events null, // Timeout for the list/watch call. Boolean.FALSE // Watch for changes to the described resources. ); @@ -758,6 +763,7 @@ public static V1JobList listJobs(String namespace, String labelSelectors) { null, // Integer | limit is a maximum number of responses to return for a list call. "", // String | Shows changes that occur after that particular version of a resource. RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events 5, // Integer | Timeout for the list/watch call. Boolean.FALSE // Boolean | Watch for changes to the described resources ); @@ -878,6 +884,7 @@ public static V1PersistentVolumeList listPersistentVolumes(String labels) throws null, // maximum number of responses to return for a list call "", // shows changes that occur after that particular version of a resource RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events 5, // Timeout for the list/watch call false // Watch for changes to the described resources ); @@ -907,6 +914,7 @@ public static V1PersistentVolumeClaimList listPersistentVolumeClaims(String name null, // maximum number of responses to return for a list call "", // shows changes that occur after that particular version of a resource RESOURCE_VERSION_MATCH_UNSET, // String | how to match resource version, leave unset + SEND_INITIAL_EVENTS_UNSET, // Boolean | if to send initial events 5, // Timeout for the list/watch call false // Watch for changes to the described resources ); diff --git a/kubernetes/crd/cluster-crd.yaml b/kubernetes/crd/cluster-crd.yaml index bc1f0799850..ea44f182559 100644 --- a/kubernetes/crd/cluster-crd.yaml +++ b/kubernetes/crd/cluster-crd.yaml @@ -5,7 +5,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - weblogic.sha256: b9b8b684b833f5b9b59d9f71771c402679ff3dd43931a0bd0381c5220ea6099f + weblogic.sha256: 9ac551460201264f4eb69fabd7c54120c2e30492143ad81f47965567f2a7ae79 name: clusters.weblogic.oracle spec: group: weblogic.oracle @@ -632,6 +632,8 @@ spec: type: string name: type: string + namespace: + type: string required: - kind - name @@ -640,6 +642,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -1205,6 +1216,15 @@ spec: description: Memory and CPU minimum requirements and limits for the WebLogic Server instance. See `kubectl explain pods.spec.containers.resources`. properties: + claims: + items: + type: object + properties: + name: + type: string + required: + - name + type: array requests: additionalProperties: type: string @@ -1388,6 +1408,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -1781,6 +1810,18 @@ spec: - value required: - port + resizePolicy: + type: array + items: + type: object + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy stdinOnce: type: boolean envFrom: @@ -1905,6 +1946,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -2298,6 +2348,18 @@ spec: - value required: - port + resizePolicy: + type: array + items: + type: object + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy stdinOnce: type: boolean envFrom: diff --git a/kubernetes/crd/domain-crd.yaml b/kubernetes/crd/domain-crd.yaml index 746d9b0c78c..82cee41b156 100644 --- a/kubernetes/crd/domain-crd.yaml +++ b/kubernetes/crd/domain-crd.yaml @@ -5,7 +5,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - weblogic.sha256: 131a41dd6f18122586bbab5494259760dee4a40e7b5c1e4354e3505b60f93768 + weblogic.sha256: 4e9bc302cc90c693067e0645995c734147ca2d17a652e8755d2ff41e56b8b0fb name: domains.weblogic.oracle spec: group: weblogic.oracle @@ -77,6 +77,15 @@ spec: description: Memory and CPU minimum requirements and limits for the Monitoring exporter sidecar. See `kubectl explain pods.spec.containers.resources`. properties: + claims: + items: + type: object + properties: + name: + type: string + required: + - name + type: array requests: additionalProperties: type: string @@ -466,6 +475,15 @@ spec: ResourceRequirements describes the compute resource requirements. properties: + claims: + items: + type: object + properties: + name: + type: string + required: + - name + type: array requests: additionalProperties: type: string @@ -771,6 +789,15 @@ spec: description: Memory and CPU minimum requirements and limits for the fluentd container. See `kubectl explain pods.spec.containers.resources`. properties: + claims: + items: + type: object + properties: + name: + type: string + required: + - name + type: array requests: additionalProperties: type: string @@ -1545,6 +1572,8 @@ spec: type: string name: type: string + namespace: + type: string required: - kind - name @@ -1553,6 +1582,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -2118,6 +2156,15 @@ spec: description: Memory and CPU minimum requirements and limits for the WebLogic Server instance. See `kubectl explain pods.spec.containers.resources`. properties: + claims: + items: + type: object + properties: + name: + type: string + required: + - name + type: array requests: additionalProperties: type: string @@ -2302,6 +2349,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -2695,6 +2751,18 @@ spec: - value required: - port + resizePolicy: + type: array + items: + type: object + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy stdinOnce: type: boolean envFrom: @@ -2819,6 +2887,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -3212,6 +3289,18 @@ spec: - value required: - port + resizePolicy: + type: array + items: + type: object + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy stdinOnce: type: boolean envFrom: @@ -3803,6 +3892,15 @@ spec: description: Memory and CPU minimum requirements and limits for the Introspector Job Pod. See `kubectl explain pods.spec.containers.resources`. properties: + claims: + items: + type: object + properties: + name: + type: string + required: + - name + type: array requests: additionalProperties: type: string @@ -4558,6 +4656,8 @@ spec: type: string name: type: string + namespace: + type: string required: - kind - name @@ -4566,6 +4666,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -5131,6 +5240,15 @@ spec: description: Memory and CPU minimum requirements and limits for the WebLogic Server instance. See `kubectl explain pods.spec.containers.resources`. properties: + claims: + items: + type: object + properties: + name: + type: string + required: + - name + type: array requests: additionalProperties: type: string @@ -5314,6 +5432,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -5707,6 +5834,18 @@ spec: - value required: - port + resizePolicy: + type: array + items: + type: object + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy stdinOnce: type: boolean envFrom: @@ -5831,6 +5970,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -6224,6 +6372,18 @@ spec: - value required: - port + resizePolicy: + type: array + items: + type: object + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy stdinOnce: type: boolean envFrom: @@ -7235,6 +7395,8 @@ spec: type: string name: type: string + namespace: + type: string required: - kind - name @@ -7243,6 +7405,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -7809,6 +7980,15 @@ spec: pods.spec.containers.resources`. type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -7993,6 +8173,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -8386,6 +8575,18 @@ spec: - value required: - port + resizePolicy: + type: array + items: + type: object + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy stdinOnce: type: boolean envFrom: @@ -8510,6 +8711,15 @@ spec: resources: type: object properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name requests: additionalProperties: type: string @@ -8903,6 +9113,18 @@ spec: - value required: - port + resizePolicy: + type: array + items: + type: object + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy stdinOnce: type: boolean envFrom: diff --git a/operator/src/main/java/oracle/kubernetes/operator/authentication/Helpers.java b/operator/src/main/java/oracle/kubernetes/operator/authentication/Helpers.java index 226f6d9ef68..d8473dae1ca 100644 --- a/operator/src/main/java/oracle/kubernetes/operator/authentication/Helpers.java +++ b/operator/src/main/java/oracle/kubernetes/operator/authentication/Helpers.java @@ -1,4 +1,4 @@ -// Copyright (c) 2017, 2022, Oracle and/or its affiliates. +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. package oracle.kubernetes.operator.authentication; @@ -27,6 +27,7 @@ public class Helpers { private final CoreV1Api coreApi; private static final String RESOURCE_VERSION_MATCH_UNSET = null; + private static final Boolean SEND_INITIAL_EVENTS_UNSET = null; /** * Construct helpers. @@ -112,6 +113,7 @@ protected V1ServiceAccountList getAllServiceAccounts() throws ApiException { "false", // pretty "", // resourceVersion RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, 0, // timeout (seconds) Boolean.FALSE // watch indicator ); diff --git a/operator/src/main/java/oracle/kubernetes/operator/builders/WatchBuilder.java b/operator/src/main/java/oracle/kubernetes/operator/builders/WatchBuilder.java index 0d67d8d2b45..d8d4a7aea7f 100644 --- a/operator/src/main/java/oracle/kubernetes/operator/builders/WatchBuilder.java +++ b/operator/src/main/java/oracle/kubernetes/operator/builders/WatchBuilder.java @@ -1,4 +1,4 @@ -// Copyright (c) 2018, 2022, Oracle and/or its affiliates. +// Copyright (c) 2018, 2023, Oracle and/or its affiliates. // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. package oracle.kubernetes.operator.builders; @@ -36,6 +36,7 @@ public class WatchBuilder { private static final Boolean ALLOW_BOOKMARKS = true; private static final String RESOURCE_VERSION_MATCH_UNSET = null; + private static final Boolean SEND_INITIAL_EVENTS_UNSET = null; private final CallParamsImpl callParams = new CallParamsImpl(); @@ -229,6 +230,7 @@ public Call apply(ApiClient client, CallParams callParams) { callParams.getLimit(), callParams.getResourceVersion(), RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, callParams.getTimeoutSeconds(), WATCH, null); @@ -266,6 +268,7 @@ public Call apply(ApiClient client, CallParams callParams) { callParams.getLimit(), callParams.getResourceVersion(), RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, callParams.getTimeoutSeconds(), WATCH, null); @@ -298,6 +301,7 @@ public Call apply(ApiClient client, CallParams callParams) { callParams.getLimit(), callParams.getResourceVersion(), RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, callParams.getTimeoutSeconds(), WATCH, null); @@ -330,6 +334,7 @@ public Call apply(ApiClient client, CallParams callParams) { callParams.getLimit(), callParams.getResourceVersion(), RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, callParams.getTimeoutSeconds(), WATCH, null); @@ -362,6 +367,7 @@ public Call apply(ApiClient client, CallParams callParams) { callParams.getLimit(), callParams.getResourceVersion(), RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, callParams.getTimeoutSeconds(), WATCH, null); @@ -454,6 +460,7 @@ public Call apply(ApiClient client, CallParams callParams) { callParams.getLimit(), callParams.getResourceVersion(), RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, callParams.getTimeoutSeconds(), WATCH, null); @@ -480,6 +487,7 @@ public Call apply(ApiClient client, CallParams callParams) { callParams.getLimit(), callParams.getResourceVersion(), RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, callParams.getTimeoutSeconds(), WATCH, null); diff --git a/operator/src/main/java/oracle/kubernetes/operator/helpers/CallBuilder.java b/operator/src/main/java/oracle/kubernetes/operator/helpers/CallBuilder.java index e19a2e7106f..b480200b0c2 100644 --- a/operator/src/main/java/oracle/kubernetes/operator/helpers/CallBuilder.java +++ b/operator/src/main/java/oracle/kubernetes/operator/helpers/CallBuilder.java @@ -89,6 +89,8 @@ public class CallBuilder { private static final LoggingFacade LOGGER = LoggingFactory.getLogger("Operator", "Operator"); private static final String RESOURCE_VERSION_MATCH_UNSET = null; + private static final Boolean SEND_INITIAL_EVENTS_UNSET = null; + private String container; private static final SynchronousCallDispatcher DEFAULT_DISPATCHER = @@ -1194,6 +1196,7 @@ private Call listConfigMapsAsync( limit, RESOURCE_VERSION, RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, timeoutSeconds, WATCH, callback); @@ -1417,6 +1420,7 @@ private Call listPodAsync( limit, RESOURCE_VERSION, RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, timeoutSeconds, WATCH, callback); @@ -1650,6 +1654,7 @@ private Call deleteCollectionPodAsync( PROPAGATION_POLICY, RESOURCE_VERSION, RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, timeoutSeconds, deleteOptions, callback); @@ -1683,6 +1688,7 @@ private Call listJobAsync( limit, RESOURCE_VERSION, RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, timeoutSeconds, WATCH, callback); @@ -1802,6 +1808,7 @@ private Call listServiceAsync( limit, RESOURCE_VERSION, RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, timeoutSeconds, WATCH, callback); @@ -1921,6 +1928,7 @@ private Call listPodDisruptionBudgetAsync( limit, RESOURCE_VERSION, RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, timeoutSeconds, WATCH, callback); @@ -2168,6 +2176,7 @@ private Call listEventAsync( limit, RESOURCE_VERSION, RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, timeoutSeconds, WATCH, callback); @@ -2284,6 +2293,7 @@ private Call listNamespaceAsync( limit, RESOURCE_VERSION, RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, timeoutSeconds, WATCH, callback); @@ -2337,6 +2347,7 @@ private Call listSecretsAsync( limit, RESOURCE_VERSION, RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, timeoutSeconds, WATCH, callback); @@ -2428,6 +2439,7 @@ private Call listValidatingWebhookConfigurationAsync( limit, RESOURCE_VERSION, RESOURCE_VERSION_MATCH_UNSET, + SEND_INITIAL_EVENTS_UNSET, timeoutSeconds, WATCH, callback); diff --git a/pom.xml b/pom.xml index 0e923b5db49..eb9df458911 100644 --- a/pom.xml +++ b/pom.xml @@ -677,9 +677,9 @@ 3.24.2 2.14.0 4.2.0 - 18.0.1 + 19.0.0 1.9.10 - 4.11.0 + 4.12.0 3.6.0 1.76 5.10.0 @@ -691,8 +691,8 @@ 4.0.0 6.0.0 0.16.0 - 2.15.2 - 2.15.2 + 2.15.3 + 2.15.3 2.2 2.10.1 8.4.0 @@ -703,7 +703,7 @@ ${project.basedir}/swagger/domain.json false false - 0.8.10 + 0.8.11 4.9.10 2.70.0 2.5.1