Skip to content

Commit 6fd5acf

Browse files
authored
make fields optional on webhook options (#818)
Signed-off-by: aerosouund <[email protected]>
1 parent 86f8d25 commit 6fd5acf

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

config/crds/policyreporter.kyverno.io_targetconfigs.yaml

-12
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,7 @@ spec:
314314
webhook:
315315
type: string
316316
required:
317-
- certificate
318317
- channel
319-
- headers
320-
- skipTLS
321318
- webhook
322319
type: object
323320
sources:
@@ -337,9 +334,6 @@ spec:
337334
webhook:
338335
type: string
339336
required:
340-
- certificate
341-
- headers
342-
- skipTLS
343337
- webhook
344338
type: object
345339
telegram:
@@ -359,10 +353,7 @@ spec:
359353
webhook:
360354
type: string
361355
required:
362-
- certificate
363356
- chatId
364-
- headers
365-
- skipTLS
366357
- token
367358
- webhook
368359
type: object
@@ -379,9 +370,6 @@ spec:
379370
webhook:
380371
type: string
381372
required:
382-
- certificate
383-
- headers
384-
- skipTLS
385373
- webhook
386374
type: object
387375
type: object

pkg/crd/api/targetconfig/v1alpha1/configs.go

+7-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ type AWSConfig struct {
1212
}
1313

1414
type WebhookOptions struct {
15-
Webhook string `mapstructure:"webhook" json:"webhook"`
16-
SkipTLS bool `mapstructure:"skipTLS" json:"skipTLS"`
17-
Certificate string `mapstructure:"certificate" json:"certificate"`
18-
Headers map[string]string `mapstructure:"headers" json:"headers"`
15+
Webhook string `mapstructure:"webhook" json:"webhook"`
16+
// +optional
17+
SkipTLS bool `mapstructure:"skipTLS" json:"skipTLS"`
18+
// +optional
19+
Certificate string `mapstructure:"certificate" json:"certificate"`
20+
// +optional
21+
Headers map[string]string `mapstructure:"headers" json:"headers"`
1922
}
2023

2124
type HostOptions struct {

0 commit comments

Comments
 (0)