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

Function isDeploymentReady

tests/utils/operator/operator.go:232–239  ·  view source on GitHub ↗

isDeploymentReady returns true if the operator deployment has the expected number of ready pods. It returns an error if there was a problem getting the operator deployment

(ctx context.Context, crudClient client.Client)

Source from the content-addressed store, hash-verified

230// of ready pods.
231// It returns an error if there was a problem getting the operator deployment
232func isDeploymentReady(ctx context.Context, crudClient client.Client) (bool, error) {
233 operatorDeployment, err := GetDeployment(ctx, crudClient)
234 if err != nil {
235 return false, err
236 }
237
238 return deployments.IsReady(operatorDeployment), nil
239}
240
241// ScaleOperatorDeployment will scale the operator to n replicas and return an error in case of failure
242func ScaleOperatorDeployment(

Callers 1

IsReadyFunction · 0.85

Calls 2

IsReadyFunction · 0.92
GetDeploymentFunction · 0.85

Tested by

no test coverage detected