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 2b3deb4

@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
@perdasilva
perdasilva force-pushed the crd-ga-shape-review branch 4 times, most recently from b3ec0ca to 24287e2 Compare November 27, 2026 13:44
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