Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions admissionregistration/v1/mutatingwebhookconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ func UpdateMutatingWebhookCABundle(config *rest.Config, webhookConfigName string

kc := kubernetes.NewForConfigOrDie(config)
lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1().MutatingWebhookConfigurations().List(ctx, options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(ctx, options)
},
Expand Down Expand Up @@ -177,11 +177,11 @@ func SyncMutatingWebhookCABundle(config *rest.Config, webhookConfigName string)

kc := kubernetes.NewForConfigOrDie(config)
lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1().MutatingWebhookConfigurations().List(ctx, options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(ctx, options)
},
Expand Down
8 changes: 4 additions & 4 deletions admissionregistration/v1/validatingwebhookconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ func UpdateValidatingWebhookCABundle(config *rest.Config, webhookConfigName stri

kc := kubernetes.NewForConfigOrDie(config)
lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1().ValidatingWebhookConfigurations().List(ctx, options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(ctx, options)
},
Expand Down Expand Up @@ -177,11 +177,11 @@ func SyncValidatingWebhookCABundle(config *rest.Config, webhookConfigName string

kc := kubernetes.NewForConfigOrDie(config)
lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1().ValidatingWebhookConfigurations().List(ctx, options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(ctx, options)
},
Expand Down
8 changes: 4 additions & 4 deletions admissionregistration/v1beta1/mutatingwebhookconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ func UpdateMutatingWebhookCABundle(config *rest.Config, webhookConfigName string

kc := kubernetes.NewForConfigOrDie(config)
lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().List(ctx, options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(ctx, options)
},
Expand Down Expand Up @@ -177,11 +177,11 @@ func SyncMutatingWebhookCABundle(config *rest.Config, webhookConfigName string)

kc := kubernetes.NewForConfigOrDie(config)
lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().List(ctx, options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(ctx, options)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ func UpdateValidatingWebhookCABundle(config *rest.Config, webhookConfigName stri

kc := kubernetes.NewForConfigOrDie(config)
lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().List(ctx, options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(ctx, options)
},
Expand Down Expand Up @@ -177,11 +177,11 @@ func SyncValidatingWebhookCABundle(config *rest.Config, webhookConfigName string

kc := kubernetes.NewForConfigOrDie(config)
lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().List(ctx, options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, webhookConfigName).String()
return kc.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(ctx, options)
},
Expand Down
4 changes: 2 additions & 2 deletions dynamic/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ func untilHasKey(
}

lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, name).String()
return ri.List(ctx, options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
options.FieldSelector = fields.OneTermEqualSelector(kutil.ObjectNameField, name).String()
return ri.Watch(ctx, options)
},
Expand Down
Loading