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

Function getCluster

internal/cmd/plugin/maintenance/maintenance.go:120–128  ·  view source on GitHub ↗
(ctx context.Context, clusterName string)

Source from the content-addressed store, hash-verified

118}
119
120func getCluster(ctx context.Context, clusterName string) (apiv1.ClusterList, error) {
121 var clusterList apiv1.ClusterList
122 var cluster apiv1.Cluster
123 err := plugin.Client.Get(ctx, client.ObjectKey{Namespace: plugin.Namespace, Name: clusterName}, &cluster)
124 if err == nil {
125 clusterList.Items = append(clusterList.Items, cluster)
126 }
127 return clusterList, err
128}
129
130func patchNodeMaintenanceWindow(
131 ctx context.Context,

Callers 1

MaintenanceFunction · 0.70

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected