Skip to content

📖 GA API shape review (full Go definitions) - #3190

Draft
perdasilva wants to merge 2 commits into
operator-framework:mainfrom
perdasilva:crd-ga-shape-review
Draft

perdasilva wants to merge 2 commits into
operator-framework:mainfrom
perdasilva:crd-ga-shape-review

Conversation

@perdasilva

@perdasilva perdasilva commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Draft for review only — not intended to merge.

This PR adds the complete Go API type definitions for ClusterObjectDeployment, ClusterObjectSet, and ClusterExtension (plus the shared common_types.go) under tmp/, copied from the API work on refactor/clusterobjectset-status-api. The goal is to review the proposed GA API in its entirety rather than as a diff against the current types. Everything outside tmp/ is unchanged main.

See tmp/README.md for provenance and a per-API summary of the differences from the current upstream/main definitions. Highlights:

  • ClusterObjectDeployment: spec.progressDeadlineMinutes removed; the Available condition is redefined around per-object probe health — a revision is available when every object it declares is present and passes its progression probes, independent of ownership or spec conformance — with reasons Available, Unavailable, Unknown, and NoActiveRevision; conditions documentation restructured per reason.
  • ClusterObjectSet: new status.unhealthyObjects count alongside healthyObjects; objects with undetermined probe states count as neither healthy nor unhealthy, so healthy + unhealthy may be less than presentObjects.
  • ClusterExtension: spec.config, spec.progressDeadlineMinutes, and status.install.bundle.release removed; spec.namespace is optional at GA — when omitted, operator-controller resolves and creates a managed namespace; whether it is set is fixed at creation time, and the value is immutable and DNS-label validated; the Available condition mirrors the managing ClusterObjectDeployment's.

spec.progressDeadlineMinutes, spec.config, and status.install.bundle.release were experimental-only and gated on BoxcutterRuntime, so their removal from the GA shape does not affect standard installs.

Once the shape is agreed, the underlying API changes will come through regular PRs against api/v1.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 19, 2026
@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👷 Deploy request for olmv1 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ddcd681

@openshift-ci

openshift-ci Bot commented Nov 19, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tmshort for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@perdasilva
perdasilva force-pushed the crd-ga-shape-review branch 4 times, most recently from cac6563 to 023840b Compare November 19, 2026 13:59
@perdasilva perdasilva changed the title 📖 GA CRD shape review (full definitions) 📖 GA API shape review (full Go definitions) Nov 19, 2026
Comment thread tmp/clusterextension_types.go Outdated
Comment on lines +47 to +64
// namespace specifies a Kubernetes namespace.
// It designates the default namespace where namespace-scoped resources for the extension are applied to the cluster.
// Some extensions may contain namespace-scoped resources to be applied in other namespaces.
// This namespace must exist.
//
// The namespace field is required, immutable, and follows the DNS label standard as defined in [RFC 1123].
// It must contain only lowercase alphanumeric characters or hyphens (-), start and end with an alphanumeric character,
// and be no longer than 63 characters.
//
// [RFC 1123]: https://tools.ietf.org/html/rfc1123
//
// <opcon:standard:validation:XValidation:rule="self == oldSelf",message="namespace is immutable">
// <opcon:standard:validation:XValidation:rule="self.matches("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$")",message="namespace must be a valid DNS1123 label">
// <opcon:experimental:validation:XValidation:rule="self == oldSelf",message="namespace is immutable">
// <opcon:experimental:validation:XValidation:rule="self.matches("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$")",message="namespace must be a valid DNS1123 label">
//
// +kubebuilder:validation:MaxLength:=63
// +required

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For GA, this needs to be optional, and use the new managed-namespace mode that @nader-ziada completed.

Comment thread tmp/common_types.go Outdated
Comment on lines +20 to +21
TypeInstalled = "Installed"
TypeProgressing = "Progressing"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we drop common types and instead use <Kind>Type<Condition> and <Kind>Reason<Reason> to help make it immediately clear which types/reasons go with which APIs?

I think that would help humans (and bots) easily spot mistakes where types/reasons are used in unexpected places, which seems like it would be really easy to do without scoped types/reasons.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread tmp/clusterextension_types.go Outdated
TypeDeprecated = "Deprecated"
TypePackageDeprecated = "PackageDeprecated"
TypeChannelDeprecated = "ChannelDeprecated"
TypeBundleDeprecated = "BundleDeprecated"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ClusterExtensionType* for the names of the deprecation type constants to clarify that these are scoped to CEs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed #3205

Comment thread tmp/clusterobjectdeployment_types.go Resolved
Comment thread tmp/clusterextension_types.go Resolved
Comment thread tmp/clusterextension_types.go Resolved
Comment thread tmp/clusterextension_types.go Resolved
Comment thread tmp/clusterextension_types.go Resolved
Comment thread tmp/clusterextension_types.go Resolved
Comment thread tmp/clusterobjectdeployment_types.go Outdated
// active revision remains.
// - Unknown, Unknown: the deployment has a single active revision, but its
// readiness is not yet determined.
// - Unknown, NoActiveRevision: the deployment controls no active revision.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be False?

Comment thread tmp/clusterobjectset_types.go Outdated
//
// The controller compiles and type-checks rule before evaluation. Its inferred
// result type must be boolean; compilation failures and non-boolean result types
// are invalid configuration. CRD admission validates only the configuration's

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// are invalid configuration. CRD admission validates only the configuration's
// are invalid configuration. CR admission validates only the configuration's

?

@perdasilva
perdasilva force-pushed the crd-ga-shape-review branch 4 times, most recently from e379525 to d6e1e28 Compare November 26, 2026 15:35
Verbatim copy of api/v1/clusterextension_types.go from main, with
deviations decided outside this shape review: .spec.config is moved
out of experimental, and the condition constants reflect the Ready
condition (ClusterExtensionTypeReady replaces
ClusterExtensionTypeAvailable; ClusterExtensionReasonProbesSucceeded
and ClusterExtensionReasonProgressDeadlineExceeded are removed).

Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
@perdasilva
perdasilva force-pushed the crd-ga-shape-review branch 2 times, most recently from a00bb64 to 43ed9a4 Compare November 27, 2026 12:50
Comment thread tmp/clusterobjectdeployment_types.go Outdated
// <opcon:experimental>
ProgressDeadlineMinutes int32 `json:"progressDeadlineMinutes,omitempty"`

// template is the desired content of newly created ClusterObjectSets.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use revision verbiage (ok to call out that a revision is a ClusterObjectSet object)

Comment thread tmp/clusterobjectdeployment_types.go Outdated

// ClusterObjectDeploymentTemplate describes the caller-controlled part of a revision.
type ClusterObjectDeploymentTemplate struct {
// metadata contains labels and annotations propagated to each ClusterObjectSet

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ClusterObjectSet verbiage

Comment thread tmp/clusterobjectdeployment_types.go Resolved
Comment thread tmp/clusterobjectdeployment_types.go Outdated
// rollout within spec.progressDeadlineMinutes.
// </opcon:experimental:description>
// - True, PreconditionsNotMet: the latest revision is waiting on
// preconditions that are not yet met, such as RBAC or a CRD that has not yet

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not clear what CRD that has not yet propagated means exactly...tune language to make examples easy to grok.

Comment thread tmp/clusterobjectdeployment_types.go Outdated
// - False, InvalidSpecification: the revision content is invalid, either
// because spec.template.metadata contains labels or annotations that are
// not valid on a ClusterObjectSet, or because objects in the latest
// revision are invalid. In both cases, correct spec.template to resume.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"or because objects in the latest revision are invalid" maybe an example of what invalid might be?

Comment thread tmp/clusterobjectdeployment_types.go Outdated
type ClusterObjectDeploymentStatus struct {
// conditions describes the rollout state and readiness of the deployment.
//
// Progressing reports the rollout of the current revision spec. Once the

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not clear that the current revision spec == the latest revision - maybe tune the language a bit?

Comment thread tmp/clusterobjectdeployment_types.go Outdated
// controller. Remove it, or restore its
// app.kubernetes.io/managed-by=object-controller label, to resume.
//
// Ready reports whether the deployment's objects are at the desired state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of "the deployment's objects" maybe we should say "the latest revision"? or "defined in the condition generation's template" or something like that?

Comment thread tmp/clusterobjectset_types.go Resolved
Comment thread tmp/clusterobjectset_types.go Outdated

// lifecycleState specifies the lifecycle state of the ClusterObjectSet.
//
// When set to "Active", the revision is actively managed and reconciled.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove the revision verbiage from the doc strings (with the exception of .spec.revision)

Comment thread tmp/clusterobjectset_types.go Outdated
// +kubebuilder:validation:XValidation:rule="self.collisionProtection == oldSelf.collisionProtection",message="collisionProtection is immutable"
type ClusterObjectSetSpec struct {
// group is a required, immutable identifier that links related revisions together.
// All revisions sharing the same group form an ordered sequence, regardless of owner references.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove the revision verbiage (in the sense of using ClusterObjectSet and revision interchangeably - we should point out that the order comes from their .spec.revision

Comment thread tmp/clusterobjectset_types.go Outdated
//
// Once a revision is set to "Archived", it cannot be un-archived.
//
// More than one revision may be "Active" during a rollout. For revisions owned

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove revision verbiage

Comment thread tmp/clusterobjectset_types.go Outdated
}

// ClusterObjectSetContent holds the revision content shared between
// ClusterObjectSet.spec and a ClusterObjectDeployment's template spec.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can probably do without the "shared between ClusterObjectSet.spec and ClusterObjectDeployment's template spec. This is an implementation detail...?

Comment thread tmp/clusterobjectset_types.go Outdated
// phases is a required list of phases that group objects to be applied together.
//
// All objects in a phase are applied in no particular order.
// The revision progresses to the next phase only after all objects in the current phase pass their progression probes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"...phase pass their progression probes" we should add "if any are defined" or something like that to call out that not all objects will have progression probes.

Comment thread tmp/clusterobjectset_types.go Outdated
// strategy for all objects in this content. Individual phases or objects can override this value.
//
// This value is used as the default for any phase or object that does not explicitly specify
// its own collisionProtection. The resolution order is: object > phase > content.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe, "object, then phase, then content"? the ">" could be interpreted as a greater than, which mean e.g. the object takes precedence over phase. Or maybe arrow "->""? just a nit

Comment thread tmp/clusterobjectset_types.go Outdated
CollisionProtection CollisionProtection `json:"collisionProtection,omitempty"`
}

// ProbeType defines the type of progression probe.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move to "ProbeType defines the type of object status probe.

Comment thread tmp/clusterobjectset_types.go Outdated
ProbeTypeCEL ProbeType = "CEL"
)

// Probe is a discriminated union defining a progression check for an object.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move away from progression verbiage for the probe documentation. The same probes could be used for other means later on. Progression probe verbiage should only appear in the progressionProbes set on the objects in the phase.

Comment thread tmp/clusterobjectset_types.go Outdated
InlineManifest unstructured.Unstructured `json:"inlineManifest,omitempty,omitzero"`

// objectSliceRef is an optional reference to an object manifest within a
// cluster-scoped ClusterObjectSlice. No namespace is needed for this reference.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can drop "No namespace is needed for this reference."

Comment thread tmp/clusterobjectset_types.go Outdated
InlineManifest unstructured.Unstructured `json:"inlineManifest,omitempty,omitzero"`

// objectSliceRef is an optional reference to an object manifest within a
// cluster-scoped ClusterObjectSlice. No namespace is needed for this reference.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can drop "cluster-scoped"

Comment thread tmp/clusterobjectset_types.go Outdated
ObjectSliceRef ObjectSliceSourceRef `json:"objectSliceRef,omitzero"`

// progressionProbes is an optional list of checks evaluated against this
// object's live state, regardless of the desired manifest's source.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we could clarify "regardless of the desired manifest's source".

Comment thread tmp/clusterobjectset_types.go Outdated
// progressionProbes is an optional list of checks evaluated against this
// object's live state, regardless of the desired manifest's source.
// All configured probes must pass for the object to satisfy its progression
// requirements. Failed or unknown results may block advancement to later phases.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"may block" -> "block"

Comment thread tmp/clusterobjectset_types.go Outdated
// at admission.
//
// +required
Entry ObjectSliceEntryRef `json:"entry,omitzero"`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename the field and type to ObjectRef

Comment thread tmp/clusterobjectset_types.go Outdated
// conditions is an optional list of status conditions describing the state of the
// ClusterObjectSet.
//
// The Ready condition represents the state of the revision.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move away from revision verbiage

Comment thread tmp/clusterobjectset_types.go Outdated
// ClusterObjectSet.
//
// The Ready condition represents the state of the revision.
// True means this revision's desired state is realized and its progression

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's expand on desired state or reword to make clear that the criteria is that all objects:

  • are managed by the ClusterObjectSet
  • are passing their progression probes (if any are defined)
  • are at the desired spec defined in the ClusterObjectSet

(polish the language above)

Comment thread tmp/clusterobjectset_types.go Outdated
// - False with reason ObjectsNotReady: one or more objects are still being applied or have not yet passed their progression probes during rollout.
// - False with reason Superseded: one or more objects have been adopted by a newer revision of the object set.
// - False with reason ObjectCollision: one or more objects are controlled by another owner, or are unowned while collision protection prevents adoption, so this revision cannot take ownership of them.
// - False with reason PreconditionsNotMet: a precondition for applying the revision is not yet satisfied (referenced object content is unavailable, invalid, or changed, or a preflight dry-run was rejected, e.g. an immutable field, a conflicting object, or RBAC/dependency CRDs not yet propagated); the revision keeps retrying and recovers once the precondition is met.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRDs not yet propagated isn't clear

Comment thread tmp/clusterobjectset_types.go Outdated
// +optional
Present *int64 `json:"present,omitempty"`

// synced is the number of objects controlled by this revision whose observed

@perdasilva perdasilva Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

desired state for sync'ed means desired spec (i.e. don't include probes). We should make this clear.

Comment thread tmp/clusterobjectset_types.go Outdated
Synced *int64 `json:"synced,omitempty"`

// superseded is the number of objects observed under the control of a
// recognized sibling with a higher revision number. During reconciliation,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should call out in the group description (if we already don't) what a recognized sibling is.

@perdasilva
perdasilva force-pushed the crd-ga-shape-review branch 2 times, most recently from 210b960 to 0669c81 Compare December 1, 2026 12:53
ClusterExtension: optional namespace with managed-namespace mode,
serviceAccount historic role and fail-open documentation, Ready
condition mirroring the managing ClusterObjectDeployment, and
experimental retention of spec.progressDeadlineMinutes and
status.install.bundle.release.

ClusterObjectDeployment (new): condition constants and the Ready
condition defined around the active revision's own readiness.

ClusterObjectSet (new): grouped objectCounts without health counts,
status.phases with pinned contentDigest and sparse per-object
diagnostics identified by target identity, objectSliceRef object
sources, per-object progressionProbes with ConditionEqual and CEL
rules, and experimental phase status fields.

ClusterObjectSlice (new): discriminated-union spec with the
InlineManifests content type storing embedded manifests inline.

Signed-off-by: Per G. da Silva <pegoncal@redhat.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants