You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: enhancements/olm/olmv1-deployment-configuration-api.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,16 @@ authors:
4
4
- oceanc80
5
5
- perdasilva
6
6
- anbhatta
7
+
- tshort
7
8
reviewers:
8
9
- joelanford
9
10
approvers:
10
11
- joelanford
11
12
api-approvers:
12
13
- everettraven
13
14
creation-date: 2025-12-30
14
-
last-updated: 2025-12-30
15
+
last-updated: 2026-03-13
16
+
status: implementable
15
17
tracking-link:
16
18
- https://issues.redhat.com/browse/OCPSTRAT-2305
17
19
---
@@ -135,7 +137,7 @@ type DeploymentConfig = v1alpha1.SubscriptionConfig
135
137
136
138
Example inline configuration structure:
137
139
138
-
```yaml
140
+
```json
139
141
{
140
142
"watchNamespace": "my-namespace",
141
143
"deploymentConfig": {
@@ -293,6 +295,11 @@ To prevent the DeploymentConfig from becoming stale as new Kubernetes volume typ
293
295
294
296
Thisstrategyprovidesthebestofbothworlds: 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.
295
297
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.
296
303
297
304
## Test Plan
298
305
@@ -320,14 +327,30 @@ This strategy provides the best of both worlds: runtime stability with a clear,
320
327
321
328
### Removing a deprecated feature
322
329
330
+
This section does not apply as it is not removing a deprecated feature.
331
+
323
332
## Upgrade / Downgrade Strategy
324
333
334
+
The `deploymentConfig` is defined generically and verified via the OpenAPI-derived JSON schema based on the Deployment and Pod APIs.
335
+
325
336
### Upgrade
326
337
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
+
327
342
### Downgrade
328
343
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
+
329
348
## Version Skew Strategy
330
349
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
+
331
354
## Operational Aspects of API Extensions
332
355
333
356
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
0 commit comments