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
feat: add new validator to only check the usage of deprecate apis (openshift#156)
* feat: add new validator to only check the usage of deprecate apis
* applying review sugesstions
Upstream-repository: api
Upstream-commit: e2541569a535e6421048bfaee00b781bb3dc092f
// We only raise an error when the version >= 1.22 was informed via
214
-
// the k8s key/value option or is specifically defined in the CSV
215
-
msg:=fmt.Errorf("this bundle is using APIs which were deprecated and removed in v1.22. More info: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22. Migrate the API(s) for %s", deprecatedAPIsMessage)
216
-
ifisUnsupported {
217
-
errs=append(errs, msg)
218
-
} else {
219
-
warns=append(warns, msg)
220
-
}
221
-
}
222
-
}
223
-
224
-
returnerrs, warns
225
-
}
226
-
227
148
// validateHubCSVSpec will check the CSV against the criteria to publish an
// We only raise an error when the version >= 1.22 was informed via
134
+
// the k8s key/value option or is specifically defined in the CSV
135
+
msg:=fmt.Errorf("this bundle is using APIs which were deprecated and removed in v1.22. More info: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22. Migrate the API(s) for %s", deprecatedAPIsMessage)
136
+
ifisUnsupported {
137
+
errs=append(errs, msg)
138
+
} else {
139
+
warns=append(warns, msg)
140
+
}
141
+
}
142
+
}
143
+
144
+
returnerrs, warns
145
+
}
12
146
13
147
// generateMessageWithDeprecatedAPIs will return a list with the kind and the name
14
148
// of the resource which were found and required to be upgraded
0 commit comments