Repository navigation
📖 GA API shape review (full Go definitions) - #3190
perdasilva wants to merge 2 commits into
Conversation
👷 Deploy request for olmv1 pending review.Visit the deploys page to approve it
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
cac6563 to
023840b
Compare
023840b to
26ec94a
Compare
| // 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 |
There was a problem hiding this comment.
For GA, this needs to be optional, and use the new managed-namespace mode that @nader-ziada completed.
| TypeInstalled = "Installed" | ||
| TypeProgressing = "Progressing" |
There was a problem hiding this comment.
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.
| TypeDeprecated = "Deprecated" | ||
| TypePackageDeprecated = "PackageDeprecated" | ||
| TypeChannelDeprecated = "ChannelDeprecated" | ||
| TypeBundleDeprecated = "BundleDeprecated" |
There was a problem hiding this comment.
Use ClusterExtensionType* for the names of the deprecation type constants to clarify that these are scoped to CEs?
26ec94a to
aaabbae
Compare
| // 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. |
There was a problem hiding this comment.
should this be False?
| // | ||
| // 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 |
There was a problem hiding this comment.
| // are invalid configuration. CRD admission validates only the configuration's | |
| // are invalid configuration. CR admission validates only the configuration's |
?
e379525 to
d6e1e28
Compare
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>
a00bb64 to
43ed9a4
Compare
b3ec0ca to
24287e2
Compare
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>
24287e2 to
2b3deb4
Compare
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) undertmp/, copied from the API work onrefactor/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 outsidetmp/is unchangedmain.See
tmp/README.mdfor provenance and a per-API summary of the differences from the current upstream/main definitions. Highlights:spec.progressDeadlineMinutesremoved; theAvailablecondition 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 reasonsAvailable,Unavailable,Unknown, andNoActiveRevision; conditions documentation restructured per reason.status.unhealthyObjectscount alongsidehealthyObjects; objects with undetermined probe states count as neither healthy nor unhealthy, sohealthy + unhealthymay be less thanpresentObjects.spec.config,spec.progressDeadlineMinutes, andstatus.install.bundle.releaseremoved;spec.namespaceis 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; theAvailablecondition mirrors the managing ClusterObjectDeployment's.spec.progressDeadlineMinutes,spec.config, andstatus.install.bundle.releasewere experimental-only and gated onBoxcutterRuntime, 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.