Bump sigs.k8s.io/controller-runtime to v0.14.4 (#5507)
* Bump sigs.k8s.io/controller-runtime to v0.14.4 * Update gofmt
This commit is contained in:
14
vendor/sigs.k8s.io/controller-runtime/pkg/envtest/crd.go
generated
vendored
14
vendor/sigs.k8s.io/controller-runtime/pkg/envtest/crd.go
generated
vendored
@@ -84,8 +84,10 @@ type CRDInstallOptions struct {
|
||||
WebhookOptions WebhookInstallOptions
|
||||
}
|
||||
|
||||
const defaultPollInterval = 100 * time.Millisecond
|
||||
const defaultMaxWait = 10 * time.Second
|
||||
const (
|
||||
defaultPollInterval = 100 * time.Millisecond
|
||||
defaultMaxWait = 10 * time.Second
|
||||
)
|
||||
|
||||
// InstallCRDs installs a collection of CRDs into a cluster by reading the crd yaml files from a directory.
|
||||
func InstallCRDs(config *rest.Config, options CRDInstallOptions) ([]*apiextensionsv1.CustomResourceDefinition, error) {
|
||||
@@ -142,7 +144,7 @@ func defaultCRDOptions(o *CRDInstallOptions) {
|
||||
// WaitForCRDs waits for the CRDs to appear in discovery.
|
||||
func WaitForCRDs(config *rest.Config, crds []*apiextensionsv1.CustomResourceDefinition, options CRDInstallOptions) error {
|
||||
// Add each CRD to a map of GroupVersion to Resource
|
||||
waitingFor := map[schema.GroupVersion]*sets.String{}
|
||||
waitingFor := map[schema.GroupVersion]*sets.Set[string]{}
|
||||
for _, crd := range crds {
|
||||
gvs := []schema.GroupVersion{}
|
||||
for _, version := range crd.Spec.Versions {
|
||||
@@ -155,7 +157,7 @@ func WaitForCRDs(config *rest.Config, crds []*apiextensionsv1.CustomResourceDefi
|
||||
log.V(1).Info("adding API in waitlist", "GV", gv)
|
||||
if _, found := waitingFor[gv]; !found {
|
||||
// Initialize the set
|
||||
waitingFor[gv] = &sets.String{}
|
||||
waitingFor[gv] = &sets.Set[string]{}
|
||||
}
|
||||
// Add the Resource
|
||||
waitingFor[gv].Insert(crd.Spec.Names.Plural)
|
||||
@@ -173,7 +175,7 @@ type poller struct {
|
||||
config *rest.Config
|
||||
|
||||
// waitingFor is the map of resources keyed by group version that have not yet been found in discovery
|
||||
waitingFor map[schema.GroupVersion]*sets.String
|
||||
waitingFor map[schema.GroupVersion]*sets.Set[string]
|
||||
}
|
||||
|
||||
// poll checks if all the resources have been found in discovery, and returns false if not.
|
||||
@@ -362,7 +364,7 @@ func modifyConversionWebhooks(crds []*apiextensionsv1.CustomResourceDefinition,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
url := pointer.StringPtr(fmt.Sprintf("https://%s/convert", hostPort))
|
||||
url := pointer.String(fmt.Sprintf("https://%s/convert", hostPort))
|
||||
|
||||
for i := range crds {
|
||||
// Continue if we're preserving unknown fields.
|
||||
|
||||
Reference in New Issue
Block a user