Skip to content

Commit 8a57a84

Browse files
camilamacedo86awgreene
authored andcommitted
add some extra clarifications (openshift#222)
Upstream-repository: api Upstream-commit: 2e47b5a3bedaab35db362dff3ecb56133af16af7
1 parent a53ec04 commit 8a57a84

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

staging/api/pkg/validation/internal/removed_apis.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ var K8sVersionsSupportedByValidator = []string{"1.22.0", "1.25.0", "1.26.0"}
4040
// - 1.25 : https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-25
4141
//
4242
// - 1.26 : https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-26
43+
//
44+
// IMPORTANT: Note that in the case scenarios of 1.25 and 1.26 it is very unlikely the OperatorAuthors
45+
// add manifests on the bundle using these APIs. On top of that some Kinds such as the CronJob
46+
// are not currently a valid/supported by OLM and never would to be added to bundle.
47+
// See: https://github.com/operator-framework/operator-registry/blob/v1.19.5/pkg/lib/bundle/supported_resources.go#L3-L23
4348
var AlphaDeprecatedAPIsValidator interfaces.Validator = interfaces.ValidatorFunc(validateDeprecatedAPIsValidator)
4449

4550
func validateDeprecatedAPIsValidator(objs ...interface{}) (results []errors.ManifestResult) {
@@ -277,6 +282,11 @@ func getRemovedAPIsOn1_22From(bundle *manifests.Bundle) map[string][]string {
277282

278283
// getRemovedAPIsOn1_25From return the list of resources which were deprecated
279284
// and are no longer be supported in 1.25. More info: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-25
285+
//
286+
// IMPORTANT: Note that in the case scenarios of 1.25 and 1.26 it is very unlikely the OperatorAuthors
287+
// add manifests on the bundle using these APIs. On top of that some Kinds such as the CronJob
288+
// are not currently a valid/supported by OLM and never would to be added to bundle.
289+
// See: https://github.com/operator-framework/operator-registry/blob/v1.19.5/pkg/lib/bundle/supported_resources.go#L3-L23
280290
func getRemovedAPIsOn1_25From(bundle *manifests.Bundle) map[string][]string {
281291
deprecatedAPIs := make(map[string][]string)
282292
for _, obj := range bundle.Objects {
@@ -315,6 +325,11 @@ func getRemovedAPIsOn1_25From(bundle *manifests.Bundle) map[string][]string {
315325

316326
// getRemovedAPIsOn1_26From return the list of resources which were deprecated
317327
// and are no longer be supported in 1.26. More info: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-26
328+
//
329+
// IMPORTANT: Note that in the case scenarios of 1.25 and 1.26 it is very unlikely the OperatorAuthors
330+
// add manifests on the bundle using these APIs. On top of that some Kinds such as the CronJob
331+
// are not currently a valid/supported by OLM and never would to be added to bundle.
332+
// See: https://github.com/operator-framework/operator-registry/blob/v1.19.5/pkg/lib/bundle/supported_resources.go#L3-L23
318333
func getRemovedAPIsOn1_26From(bundle *manifests.Bundle) map[string][]string {
319334
deprecatedAPIs := make(map[string][]string)
320335
for _, obj := range bundle.Objects {

vendor/github.com/operator-framework/api/pkg/validation/internal/removed_apis.go

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)