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

Function Architectures

tests/utils/operator/operator.go:315–333  ·  view source on GitHub ↗

Architectures returns all the supported operator architectures

(operatorPod *corev1.Pod)

Source from the content-addressed store, hash-verified

313
314// Architectures returns all the supported operator architectures
315func Architectures(operatorPod *corev1.Pod) ([]string, error) {
316 out, _, err := run.Unchecked(fmt.Sprintf(
317 "kubectl -n %v exec %v -c manager -- /manager debug show-architectures",
318 operatorPod.Namespace,
319 operatorPod.Name,
320 ))
321 if err != nil {
322 return nil, err
323 }
324
325 // `debug show-architectures` will print a JSON object
326 var res []string
327 err = json.Unmarshal([]byte(out), &res)
328 if err != nil {
329 return nil, err
330 }
331
332 return res, err
333}
334
335// GetLeaderInfoFromLease gathers leader holderIdentity from the lease
336func GetLeaderInfoFromLease(

Callers 1

Calls 1

UncheckedFunction · 0.92

Tested by

no test coverage detected