Skip to content

Commit a571863

Browse files
authored
Merge pull request #5 from tmshort/latest-comments
Address latest comments
2 parents f1194b1 + ee5db81 commit a571863

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

enhancements/olm/olmv1-deployment-configuration-api.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ authors:
44
- oceanc80
55
- perdasilva
66
- anbhatta
7+
- tshort
78
reviewers:
89
- joelanford
910
approvers:
1011
- joelanford
1112
api-approvers:
1213
- everettraven
1314
creation-date: 2025-12-30
14-
last-updated: 2025-12-30
15+
last-updated: 2026-03-13
16+
status: implementable
1517
tracking-link:
1618
- https://issues.redhat.com/browse/OCPSTRAT-2305
1719
---
@@ -135,7 +137,7 @@ type DeploymentConfig = v1alpha1.SubscriptionConfig
135137

136138
Example inline configuration structure:
137139

138-
```yaml
140+
```json
139141
{
140142
"watchNamespace": "my-namespace",
141143
"deploymentConfig": {
@@ -293,6 +295,11 @@ To prevent the DeploymentConfig from becoming stale as new Kubernetes volume typ
293295

294296
This strategy provides the best of both worlds: runtime stability with a clear, automated path to stay current with Kubernetes API evolution. While the initial implementation uses a static snapshot, the build-time tooling ensures we have an established, low-effort mechanism to refresh the schema when needed, without requiring manual schema authoring or complex runtime generation.
295297

298+
### Investigate Alternative Methods of Validation
299+
300+
The method to validate the `deploymentConfig` is via a JSON schema derived from the OpenAPI specification of the Deployment and Pod APIs; this is based on the OLMv0 implementation. It has been suggested that instead, internal validation via functions like `ValidatePodSpec` be used. The OpenAPI schema may be more or less strict that using internal validation.
301+
302+
The net result of the current method (OpenAPI JSON schema) is that the more strict of the validations (either OpenAPI schema or API server) will prevail. This could mean that errors occur at different layers in the stack.
296303

297304
## Test Plan
298305

@@ -320,14 +327,30 @@ This strategy provides the best of both worlds: runtime stability with a clear,
320327

321328
### Removing a deprecated feature
322329

330+
This section does not apply as it is not removing a deprecated feature.
331+
323332
## Upgrade / Downgrade Strategy
324333

334+
The `deploymentConfig` is defined generically and verified via the OpenAPI-derived JSON schema based on the Deployment and Pod APIs.
335+
325336
### Upgrade
326337

338+
The `deploymentConfig` field is optional. When upgrading to an OpenShift version that introduces this field, the empty field is ignored.
339+
340+
If the Kubernetes definition of the Deployment or Pod APIs changes incompatibly between versions, then that may cause propagation of incorrect deployment configuration or failure to propagate the deplpoyment confguraton. Thus, it may be necessary for the user to update the provided `deploymentConfig` to be compatible with the new JSON schema.
341+
327342
### Downgrade
328343

344+
The `deploymentConfig` field is optional. When downgrading to an OpenShift version that does not contain this field, the presence of the field will cause an error. Thus, it is inadvisable to downgrade a cluster that uses `deploymentConfig` in any ClusterExtensions.
345+
346+
It may be necessary to update the provided `deploymentConfig` to be compatible with the old JSON schema, if the Kubernetes definition of Deployment or Pod has changed between versions.
347+
329348
## Version Skew Strategy
330349

350+
The use of the `deploymentConfig` field is dependent on the Deployment and Pod APIs. It *is* verified by the JSON schema based on OpenAPI definitions. Given Kubetnetes compatibility guarantees, this means that the configuration should be compatible until the next major Kubernetes version where APIs (or portions thereof) may be deprecated or removed.
351+
352+
If a newer version of the OpenAPI JSON schema is used on an older Kubernetes cluster, then the API server may reject the `deploymentConfig`. This may require the contents of the `deploymentConfig` contents to be updated. Or it may mean that the fields are passed to the deployment but are ignored by the API server.
353+
331354
## Operational Aspects of API Extensions
332355

333356
This enhancement does not introduce new API extensions (webhooks, finalizers, aggregated API servers). It extends the existing ClusterExtension inline configuration structure, which is already validated at the API server level.
@@ -351,3 +374,12 @@ This enhancement does not introduce new API extensions (webhooks, finalizers, ag
351374
2. OLM Team
352375

353376
## Support Procedures
377+
378+
- If deployment is not updated with provided configuration:
379+
- Is feature enabled?
380+
- Examine ClusterExtension status.
381+
- Examine ClusterExtensionRevision (if implemented) status.
382+
- Examine logs for related messages and errors.
383+
- Examine resultant deployment; how much of the deployment config is present?
384+
- Examine the JSON schema verification to ensure valid deployment config.
385+
- Remove items from the deployment config until deployment contains the configuration.

0 commit comments

Comments
 (0)