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
Rework of the optional manifest enhancement proposal:
- to use group, kind, namespace, name for identifying manifests instead of filenames
- adding graduation criteria
- adding test strategy
- clarifying the case of StatusReasonAlreadyExists
Signed-off-by: Frederic Giloux <[email protected]>
Copy file name to clipboardExpand all lines: enhancements/optional-manifest.md
+31-86Lines changed: 31 additions & 86 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,8 +24,8 @@ superseded-by:
24
24
25
25
-[x] Enhancement is `implementable`
26
26
-[x] Design details are appropriately documented from clear requirements
27
-
-[] Test plan is defined
28
-
-[] Graduation criteria for dev preview, tech preview, GA
27
+
-[x] Test plan is defined
28
+
-[x] Graduation criteria for dev preview, tech preview, GA
29
29
-[ ] User-facing documentation is created in [olm-docs](https://github.com/operator-framework/olm-docs/)
30
30
31
31
## Summary
@@ -52,20 +52,25 @@ ServiceMonitor and VerticalPodAutoscaler are among the supported resources. They
52
52
53
53
A resource can be marked as optional by leveraging [Explicit Bundle Properties](https://github.com/operator-framework/enhancements/blob/master/enhancements/properties.md). Therefore a new file can be added to the bundle metadata directory. The file itself can have any name, but it has to be in the top-level metadata directory of the bundle and to consist of YAML with a top-level `properties` element containing an array of type/value tuples. There should be a single file containing a top-level `properties` element.
54
54
55
-
The property type for optional manifest is `olm.manifests.optional`. Its value field is a `files` structure, which contains a list of optional files.
55
+
The property type for optional manifest is `olm.manifests.optional`. Its value field is a `manifests` structure, which contains a list of optional manifests. These manifests are identified by group, kind, namespace and name. The namespace value is optional. For cluster scoped resources or resources where no namespace is specified in the manifest file the field has to be empty.
56
56
57
57
Example:
58
58
59
59
~~~
60
60
properties:
61
61
- type: 'olm.manifests.optional'
62
62
value:
63
-
files:
64
-
- verticalpodautoscaler.yaml
65
-
- servicemonitor.yaml
63
+
manifests:
64
+
- group: monitoring.coreos.com
65
+
kind: PrometheusRule
66
+
namespace: my-namespace
67
+
name: my-rule
68
+
- group: autoscaling.k8s.io/v1
69
+
kind: VerticalPodAutoscaler
70
+
name: my-vpa
66
71
~~~
67
72
68
-
If a file listed in the property file does not exist in the bundle manifest directory it will be ignored without further hints.
73
+
If a manifest listed in the property file does not exist in the bundle manifest directory it will be ignored without further hints.
69
74
70
75
It does not make sense to list a resource core to OLM (ClusterServiceVersion) or resources shipped with Kubernetes under `olm.manifests.optional` as the availability of the API is a prerequisite for OLM to work. This means that no extra check will be implemented for the following types:
71
76
@@ -171,7 +176,7 @@ When OLM requests the API server to create an optional manifest there are 3 pote
171
176
[1] The logic used in OLM to differentiate when the API is not available from other errors is as follows:
@@ -186,7 +191,6 @@ For optional manifests we will differentiate between errors that are specific to
186
191
- StatusReasonUnauthorized 401
187
192
- StatusReasonForbidden 403
188
193
- StatusReasonNotFound 404
189
-
- StatusReasonAlreadyExists 409
190
194
- StatusReasonInvalid 442
191
195
- StatusReasonNotAcceptable 406
192
196
- StatusReasonUnsupportedMediaType 415
@@ -205,6 +209,8 @@ For optional manifests we will differentiate between errors that are specific to
205
209
- StatusReasonExpired 410
206
210
- StatusReasonServiceUnavailable 503
207
211
212
+
StatusReasonAlreadyExists 409: it is a special case as the error is [caught during object creation](https://github.com/operator-framework/operator-lifecycle-manager/blob/d6346a1c0507c765145a0b6bb18e9f06bc4058c4/pkg/controller/operators/catalog/step_ensurer.go#L307-L325) and an update is performed instead.
213
+
208
214
### Risks and Mitigations
209
215
210
216
The change is very localised so that the risks are low. The interpretation of the property `olm.manifests.optional` is also 100% backward compatible: Resources not listed under it continue to be created and mandatory for the InstallPlan to succeed. Having a file in the optional list and the operator deployed on a cluster with an OLM version not having this enhancement means that the property is just ignored and the previous behaviour stays unchanged.
@@ -217,91 +223,26 @@ The logic in any future solution for bundle distribution, like RukPak, would nee
217
223
218
224
### Test Plan
219
225
220
-
**Note:***Section not required until targeted at a release.*
221
-
222
-
Consider the following in developing a test plan for this enhancement:
223
-
- Will there be e2e and integration tests, in addition to unit tests?
224
-
- How will it be tested in isolation vs with other components?
225
-
226
-
No need to outline all of the test cases, just the general strategy. Anything
227
-
that would count as tricky in the implementation and anything particularly
228
-
challenging to test should be called out.
229
-
230
-
All code is expected to have adequate tests (eventually with coverage
231
-
expectations).
232
-
233
-
### Graduation Criteria
234
-
235
-
**Note:***Section not required until targeted at a release.*
236
-
237
-
Define graduation milestones.
238
-
239
-
These may be defined in terms of API maturity, or as something else. Initial proposal
240
-
should keep this high-level with a focus on what signals will be looked at to
241
-
determine graduation.
242
-
243
-
Consider the following in developing the graduation criteria for this
Code coverage for this enhancement is ensured by two set of unit tests.
251
227
252
-
These are generalized examples to consider, in addition to the aforementioned
253
-
[maturity levels][maturity-levels].
228
+
- Validation that a resource is properly identified as optional based on the Properties that have been configured.
229
+
- Step processing:
230
+
- Validation that a step flagged as optional does not cause the failure of the InstallPlan if it cannot be successfully processed due to one of the API errors listed above as NotCreated.
231
+
- Validation that a step flagged as optional still fails the InstallPlan due to one of the API errors listed above as Failure.
232
+
- Validation that the logic has not changed for non optional steps
254
233
255
-
##### Dev Preview -> Tech Preview
234
+
###Feature gate
256
235
257
-
- Ability to utilize the enhancement end to end
258
-
- End user documentation, relative API stability
259
-
- Sufficient test coverage
260
-
- Gather feedback from users rather than just developers
236
+
The optional manifest feature is currently scheduled to be available in the next release with no feature gate. It will first be provided with no guarantee of API (the configuration through explicite bundle properties) stability and begins to gather users' feedbacks.
261
237
262
-
##### Tech Preview -> GA
238
+
As the feature is being used and evaluated API changes can be made to improve its overall usefulness and user experience. Such changes may not be backward compatible with the first verion of its API.
263
239
264
-
- More testing (upgrade, downgrade, scale)
265
-
- Sufficient time for feedback
266
-
- Available by default
267
-
268
-
**For non-optional features moving to GA, the graduation criteria must include
269
-
end to end tests.**
270
-
271
-
##### Removing a deprecated feature
272
-
273
-
- Announce deprecation and support policy of the existing feature
274
-
- Deprecate the feature
275
-
276
-
### Upgrade / Downgrade Strategy
277
-
278
-
If applicable, how will the component be upgraded and downgraded? Make sure this
279
-
is in the test plan.
280
-
281
-
Consider the following in developing an upgrade/downgrade strategy for this
282
-
enhancement:
283
-
- What changes (in invocations, configurations, API use, etc.) is an existing
284
-
cluster required to make on upgrade in order to keep previous behavior?
285
-
- What changes (in invocations, configurations, API use, etc.) is an existing
286
-
cluster required to make on upgrade in order to make use of the enhancement?
287
-
288
-
### Version Skew Strategy
289
-
290
-
How will the component handle version skew with other components?
291
-
What are the guarantees? Make sure this is in the test plan.
292
-
293
-
Consider the following in developing a version skew strategy for this
294
-
enhancement:
295
-
- During an upgrade, we will always have skew among components, how will this impact your work?
296
-
- Does this enhancement involve coordinating behavior in the control plane and
297
-
in the kubelet? How does an n-2 kubelet without this feature available behave
298
-
when this feature is used?
299
-
- Will any other components on the node change? For example, changes to CSI, CRI
300
-
or CNI may require updating that component before the kubelet.
240
+
If the feature does not see adoption it will be deprecated and get eventually removed.
301
241
302
242
## Implementation History
303
243
304
-
2021.10.06 First draft
244
+
- 2021.10.06 First draft
245
+
- 2022.03.30 Second draft
305
246
306
247
## Drawbacks
307
248
@@ -352,6 +293,10 @@ The reasoning behind the exclusion of the above list is:
352
293
- The list of mandatory or optional resources cannot can be seen in one place.
353
294
- The "Explicit Bundle Properties" mechanism already exists. Using a manifest annotation introduces an additional control mechanism.
354
295
296
+
### Identfication by filenames
297
+
298
+
The approach is similar to the current enhancement proposal with the difference that manifests are identified by filenames instead of /group/kind/namespace/name. This was challenged by the fact that filenames may not be available when the gRPC API is used to process bundles.
299
+
355
300
### Operator dependencies
356
301
357
302
Implementing the support of full blown operator dependencies and forcing implicit dependencies to become explicit. In that case the optionality is defined at the API level rather than at the resource level.
0 commit comments