Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion api/v1/clusterobjectset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,17 @@ type ClusterObjectSetStatus struct {
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`

// objectCounts reports aggregate object counts across all phases.
// Values are sums of the per-phase counts in observedPhases.
// +optional
ObjectCounts ObjectCounts `json:"objectCounts,omitempty"`

// observedPhases records the content hashes of resolved phases
// at first successful reconciliation. This is used to detect if
// referenced object sources were deleted and recreated with
// different content. Each entry covers all fully-resolved object
// manifests within a phase, making it source-agnostic.
//
// +kubebuilder:validation:XValidation:rule="self == oldSelf || oldSelf.size() == 0",message="observedPhases is immutable"
// +kubebuilder:validation:MaxItems=20
// +listType=map
// +listMapKey=name
Expand Down Expand Up @@ -553,10 +557,47 @@ type ObservedPhase struct {
// at first successful resolution, in the format "<algorithm>:<hex>".
//
// +required
// +kubebuilder:validation:XValidation:rule="self == oldSelf || oldSelf.size() == 0",message="digest is immutable"
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=256
// +kubebuilder:validation:XValidation:rule=`self.matches('^[a-z0-9]+:[a-f0-9]+$')`,message="digest must be in the format '<algorithm>:<hex>'"
Digest string `json:"digest"`

// objectCounts reports the number of objects in this phase by state.
// +required
ObjectCounts ObjectCounts `json:"objectCounts"`
}

// ObjectCounts reports the number of objects in a ClusterObjectSet or phase by state.
type ObjectCounts struct {
// total is the number of objects in this phase.
// +required
// +kubebuilder:validation:Minimum:=0
// +kubebuilder:validation:Maximum:=1000
Total int64 `json:"total"`

// present is the number of objects in this phase that exist on the
// cluster. During reconcile, this counts objects that the controller
// has found or created. During teardown, this decrements toward zero
// as objects are deleted.
// +optional
// +kubebuilder:validation:Minimum:=0
// +kubebuilder:validation:Maximum:=1000
Present int64 `json:"present,omitempty"`

// synced is the number of objects in this phase whose cluster state
// matches the desired state.
// +optional
// +kubebuilder:validation:Minimum:=0
// +kubebuilder:validation:Maximum:=1000
Synced int64 `json:"synced,omitempty"`

// ready is the number of objects in this phase that are synced
// and pass their assertions.
// +optional
// +kubebuilder:validation:Minimum:=0
// +kubebuilder:validation:Maximum:=1000
Ready int64 `json:"ready,omitempty"`
}

// +genclient
Expand Down
17 changes: 17 additions & 0 deletions api/v1/zz_generated.deepcopy.go

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

11 changes: 11 additions & 0 deletions applyconfigurations/api/v1/clusterobjectsetstatus.go

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

77 changes: 77 additions & 0 deletions applyconfigurations/api/v1/objectcounts.go

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

10 changes: 10 additions & 0 deletions applyconfigurations/api/v1/observedphase.go

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

21 changes: 21 additions & 0 deletions applyconfigurations/internal/internal.go

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

2 changes: 2 additions & 0 deletions applyconfigurations/utils.go

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

2 changes: 2 additions & 0 deletions docs/api-reference/olmv1-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ _Appears in:_
| `pollIntervalMinutes` _integer_ | pollIntervalMinutes is an optional field that sets the interval, in minutes, at which the image source is polled for new content.<br />You cannot specify pollIntervalMinutes when ref is a digest-based reference.<br />When omitted, the image is not polled for new content. | | Minimum: 1 <br />Optional: \{\} <br /> |



Comment thread
perdasilva marked this conversation as resolved.

#### ObjectSelector


Expand Down
Loading
Loading