File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,8 @@ func (o *WebhookInstallOptions) PrepWithoutInstalling() error {
147
147
148
148
// Install installs specified webhooks to the API server.
149
149
func (o * WebhookInstallOptions ) Install (config * rest.Config ) error {
150
+ defaultWebhookOptions (o )
151
+
150
152
if len (o .LocalServingCAData ) == 0 {
151
153
if err := o .PrepWithoutInstalling (); err != nil {
152
154
return err
@@ -168,6 +170,16 @@ func (o *WebhookInstallOptions) Cleanup() error {
168
170
return nil
169
171
}
170
172
173
+ // defaultWebhookOptions sets the default values for Webhooks.
174
+ func defaultWebhookOptions (o * WebhookInstallOptions ) {
175
+ if o .MaxTime == 0 {
176
+ o .MaxTime = defaultMaxWait
177
+ }
178
+ if o .PollInterval == 0 {
179
+ o .PollInterval = defaultPollInterval
180
+ }
181
+ }
182
+
171
183
// WaitForWebhooks waits for the Webhooks to be available through API server.
172
184
func WaitForWebhooks (config * rest.Config ,
173
185
mutatingWebhooks []* admissionv1.MutatingWebhookConfiguration ,
You can’t perform that action at this time.
0 commit comments