Skip to content

Commit

Permalink
add FailedResourcePlacements field to binding status (Azure#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvindthiru authored Mar 21, 2024
1 parent 747406e commit 200f939
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apis/placement/v1beta1/binding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ const (

// ResourceBindingStatus represents the current status of a ClusterResourceBinding.
type ResourceBindingStatus struct {
// +kubebuilder:validation:MaxItems=100

// FailedPlacements is a list of all the resources failed to be placed to the given cluster or the resource is unavailable.
// Note that we only include 100 failed resource placements even if there are more than 100.
// +optional
FailedPlacements []FailedResourcePlacement `json:"failedPlacements,omitempty"`

// +patchMergeKey=type
// +patchStrategy=merge
// +listType=map
Expand Down
7 changes: 7 additions & 0 deletions apis/placement/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,119 @@ spec:
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
failedPlacements:
description: FailedPlacements is a list of all the resources failed
to be placed to the given cluster or the resource is unavailable.
Note that we only include 100 failed resource placements even if
there are more than 100.
items:
description: FailedResourcePlacement contains the failure details
of a failed resource placement.
properties:
condition:
description: The failed condition status.
properties:
lastTransitionTime:
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be
when the underlying condition changed. If that is not
known, then using the time when the API field changed
is acceptable.
format: date-time
type: string
message:
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if
.metadata.generation is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the
current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values
and meanings for this field, and whether the values are
considered a guaranteed API. The value should be a CamelCase
string. This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False,
Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across
resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability
to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
envelope:
description: Envelope identifies the envelope object that contains
this resource.
properties:
name:
description: Name of the envelope object.
type: string
namespace:
description: Namespace is the namespace of the envelope
object. Empty if the envelope object is cluster scoped.
type: string
type:
default: ConfigMap
description: Type of the envelope object.
enum:
- ConfigMap
type: string
required:
- name
type: object
group:
description: Group is the group name of the selected resource.
type: string
kind:
description: Kind represents the Kind of the selected resources.
type: string
name:
description: Name of the target resource.
type: string
namespace:
description: Namespace is the namespace of the resource. Empty
if the resource is cluster scoped.
type: string
version:
description: Version is the version of the selected resource.
type: string
required:
- condition
- kind
- name
- version
type: object
maxItems: 100
type: array
type: object
required:
- spec
Expand Down

0 comments on commit 200f939

Please sign in to comment.