@@ -44,10 +44,10 @@ type WebhookInstallOptions struct {
44
44
Paths []string
45
45
46
46
// MutatingWebhooks is a list of MutatingWebhookConfigurations to install
47
- MutatingWebhooks []runtime .Object
47
+ MutatingWebhooks []client .Object
48
48
49
49
// ValidatingWebhooks is a list of ValidatingWebhookConfigurations to install
50
- ValidatingWebhooks []runtime .Object
50
+ ValidatingWebhooks []client .Object
51
51
52
52
// IgnoreErrorIfPathMissing will ignore an error if a DirectoryPath does not exist when set to true
53
53
IgnoreErrorIfPathMissing bool
@@ -195,8 +195,8 @@ func (o *WebhookInstallOptions) Cleanup() error {
195
195
196
196
// WaitForWebhooks waits for the Webhooks to be available through API server
197
197
func WaitForWebhooks (config * rest.Config ,
198
- mutatingWebhooks []runtime .Object ,
199
- validatingWebhooks []runtime .Object ,
198
+ mutatingWebhooks []client .Object ,
199
+ validatingWebhooks []client .Object ,
200
200
options WebhookInstallOptions ) error {
201
201
202
202
waitingFor := map [schema.GroupVersionKind ]* sets.String {}
@@ -293,7 +293,7 @@ func (o *WebhookInstallOptions) setupCA() ([]byte, error) {
293
293
return certData , nil
294
294
}
295
295
296
- func createWebhooks (config * rest.Config , mutHooks []runtime .Object , valHooks []runtime .Object ) error {
296
+ func createWebhooks (config * rest.Config , mutHooks []client .Object , valHooks []client .Object ) error {
297
297
cs , err := client .New (config , client.Options {})
298
298
if err != nil {
299
299
return err
@@ -360,7 +360,7 @@ func parseWebhook(options *WebhookInstallOptions) error {
360
360
361
361
// readWebhooks reads the Webhooks from files and Unmarshals them into structs
362
362
// returns slice of mutating and validating webhook configurations
363
- func readWebhooks (path string ) ([]runtime .Object , []runtime .Object , error ) {
363
+ func readWebhooks (path string ) ([]client .Object , []client .Object , error ) {
364
364
// Get the webhook files
365
365
var files []os.FileInfo
366
366
var err error
@@ -380,8 +380,8 @@ func readWebhooks(path string) ([]runtime.Object, []runtime.Object, error) {
380
380
// file extensions that may contain Webhooks
381
381
resourceExtensions := sets .NewString (".json" , ".yaml" , ".yml" )
382
382
383
- var mutHooks []runtime .Object
384
- var valHooks []runtime .Object
383
+ var mutHooks []client .Object
384
+ var valHooks []client .Object
385
385
for _ , file := range files {
386
386
// Only parse allowlisted file types
387
387
if ! resourceExtensions .Has (filepath .Ext (file .Name ())) {
@@ -433,7 +433,7 @@ func readWebhooks(path string) ([]runtime.Object, []runtime.Object, error) {
433
433
return mutHooks , valHooks , nil
434
434
}
435
435
436
- func runtimeListToUnstructured (l []runtime .Object ) []* unstructured.Unstructured {
436
+ func runtimeListToUnstructured (l []client .Object ) []* unstructured.Unstructured {
437
437
res := []* unstructured.Unstructured {}
438
438
for _ , obj := range l {
439
439
m , err := runtime .DefaultUnstructuredConverter .ToUnstructured (obj .DeepCopyObject ())
0 commit comments