Repository navigation
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
|
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=63 | ||
| // +kubebuilder:validation:XValidation:rule=`self.matches('^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$')`,message="kind must start with a letter and contain only letters, digits, or hyphens, ending with an alphanumeric character" | ||
| Kind string `json:"kind,omitempty"` |
There was a problem hiding this comment.
There was a problem hiding this comment.
That's for object references? Not the actual object definition?
There was a problem hiding this comment.
The linked convention applies to references to API resources. These entries store manifest content, with an identity header describing the object inside the payload, so I kept apiVersion and kind. This lets publishers describe the manifest directly without mapping its GVK to a REST resource through discovery. The current API validates the envelope only; comparing the decoded payload with that header remains follow-up work.
There was a problem hiding this comment.
I think we need to know how object-controller uses these fields in order to decide if they are references. Do we have a matching PR that incorporates and uses this API yet?
There was a problem hiding this comment.
fwiw, I landed on APIVersion and Kind in my orb-operator prototype: https://github.com/joelanford/orb-operator/blob/76c7c2316efdacf9a3eeb8a68719df9781dacf1e/api/v1alpha1/types_clusterobjectslice.go#L50-L65
But that might be because I was speed-running it. I'll find my orb-operator usage of it to see if we ever need to translate it to GVR.
There was a problem hiding this comment.
All I can find in orb-operator is that we need a key that matches between the phase defintion's reference and the COSL's object key. This could literally be whatever we want it to be as long as uniqueness is guaranteed per object.
So I think APIVersion/Kind/Name/Namespace and Group/Resource/Kind/Name/Namespace both equally satisfy that requirement.
| require.Equal(t, tc.wantObjectController, objects["CustomResourceDefinition/clusterobjectsets.olm.operatorframework.io"] != nil) | ||
| require.Equal(t, tc.wantObjectController, objects["CustomResourceDefinition/clusterobjectslices.olm.operatorframework.io"] != nil) |
There was a problem hiding this comment.
It appears the cluserobjectdeployments is missing from this list?
There was a problem hiding this comment.
Done. Added the missing ClusterObjectDeployment CRD assertion alongside the ClusterObjectSet and ClusterObjectSlice checks. It verifies presence or absence according to wantObjectController across all chart configurations in the test.
Start the OPRUN-4850 discussion with a minimal content-storage contract, validation boundaries, ownership expectations, and incremental follow-ups. Include the generated API reference alongside the design document. Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
Introduce experimental immutable manifest storage with ClusterObjectSliceEntry values. Validate the envelope through schema and CEL rules and add API tests and experimental chart wiring. Deep payload admission, consumer integration, and retention remain separate follow-ups for OPRUN-4850. Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
Generate the experimental CRD, deep-copy methods, apply configurations, and experimental installation manifests from the initial ClusterObjectSlice API definition. The generated API reference is in the documentation commit. Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
9d3bec8 to
538f69c
Compare
Copy the ClusterObjectSlice Go types from operator-framework#3195 into tmp so the GA shape review covers the slice API alongside the ClusterObjectSet objectSliceRef that consumes it. Cross-reference the entry identity fields from ObjectSliceEntryRef to ClusterObjectSliceEntry. Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
Add complete Go API type definitions under tmp/ for the proposed GA shape of ClusterObjectDeployment, ClusterObjectSet, ClusterExtension, and ClusterObjectSlice, for review in its entirety rather than as a diff against the current types. ClusterObjectSet: - Group the object counts under status.objectCounts (total, present, synced, superseded, colliding); drop the health counts. - Replace status.observedPhases with status.phases: pinned contentDigest, lifecycle status, machine-readable reason, and sparse per-object diagnostics categorized by reason; object entries are identified by apiVersion, kind, name, and namespace, matching the spec's object references. - Replace secretRef object sources with objectSliceRef: a slice name plus entry identity selecting a manifest in a cluster-scoped ClusterObjectSlice. - Per-object progressionProbes supporting ConditionEqual and CEL rules; conditions and phase-status documentation use progression probes terminology and kind-scoped reason constants. - Mark the phase status, reason, message, and lastTransitionTime fields experimental; the standard channel omits them. ClusterObjectDeployment: - Rename the Available condition to Ready, defined around the active revision's own Ready condition: True when the single active revision is Ready, False when it is not or no active revision is controlled, Unknown while more than one active revision exists or readiness is undetermined. ClusterExtension: - Mirror the managing ClusterObjectDeployment's Ready condition in place of Available. - Document the serviceAccount field's historic role and fail-open behavior. - Retain spec.config, spec.progressDeadlineMinutes, and status.install.bundle.release as experimental. ClusterObjectSlice (started from operator-framework#3195, reworked): - Spec is a discriminated union with a single content type, InlineManifests, whose manifests list stores embedded Kubernetes manifests inline, each carrying its own target identity. Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
Description
Start the OPRUN-4850 design discussion with documentation and an initial experimental
ClusterObjectSliceAPI for storing rendered manifests independently of rollout intent. Existing inline and Secret-backed content paths continue to work as they do today.JSON/GzipJSONpayloads. Schema and CEL validate the storage envelope; payload parsing, decompression, and identity comparison remain follow-up work.This draft is a conversation starter. Readable manifests, deeper admission validation, COD/COS references, digests, and retention coordination remain open for incremental proposals. Creating a slice stores content without applying objects or reporting rollout readiness.
Documentation is in one commit, followed by separate commits for API source/tests and generated code/manifests.
Related issue: https://redhat.atlassian.net/browse/OPRUN-4850
Validation
make test-unitmake lint lint-helmmake lint-api-diff— no new issues; 32 pre-existing issuesmake verifyReviewer Checklist
Always review AI generated responses prior to use.
AI-assisted response via openshift-developer plugin