MCPcopy
hub / github.com/operator-framework/operator-sdk / getCRDs

Function getCRDs

internal/olm/operator/uninstall.go:240–254  ·  view source on GitHub ↗

getCRDs returns the list of CRDs required by a CSV.

(csv *v1alpha1.ClusterServiceVersion)

Source from the content-addressed store, hash-verified

238
239// getCRDs returns the list of CRDs required by a CSV.
240func getCRDs(csv *v1alpha1.ClusterServiceVersion) (crds []client.Object) {
241 for _, resource := range csv.Status.RequirementStatus {
242 if resource.Kind == crdKind {
243 obj := &unstructured.Unstructured{}
244 obj.SetGroupVersionKind(schema.GroupVersionKind{
245 Group: resource.Group,
246 Version: resource.Version,
247 Kind: resource.Kind,
248 })
249 obj.SetName(resource.Name)
250 crds = append(crds, obj)
251 }
252 }
253 return
254}

Callers 1

RunMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected