MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / DetectOLM

Function DetectOLM

pkg/utils/discovery.go:236–240  ·  view source on GitHub ↗

DetectOLM looks for the operators.coreos.com operators resource in the current Kubernetes cluster

(client discovery.DiscoveryInterface)

Source from the content-addressed store, hash-verified

234// DetectOLM looks for the operators.coreos.com operators resource in the current
235// Kubernetes cluster
236func DetectOLM(client discovery.DiscoveryInterface) (err error) {
237 olmPlatform = false
238 olmPlatform, err = resourceExist(client, "operators.coreos.com/v1", "operators")
239 return err
240}
241
242// RunningOnOLM returns if we're running over a Kubernetes cluster with OLM support
243func RunningOnOLM() bool {

Callers 1

tryGetOLMReportFunction · 0.92

Calls 1

resourceExistFunction · 0.85

Tested by

no test coverage detected