Skip to content

Commit

Permalink
make fields optional on webhook options (#818)
Browse files Browse the repository at this point in the history
Signed-off-by: aerosouund <[email protected]>
  • Loading branch information
aerosouund authored Mar 11, 2025
1 parent 86f8d25 commit 6fd5acf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
12 changes: 0 additions & 12 deletions config/crds/policyreporter.kyverno.io_targetconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,7 @@ spec:
webhook:
type: string
required:
- certificate
- channel
- headers
- skipTLS
- webhook
type: object
sources:
Expand All @@ -337,9 +334,6 @@ spec:
webhook:
type: string
required:
- certificate
- headers
- skipTLS
- webhook
type: object
telegram:
Expand All @@ -359,10 +353,7 @@ spec:
webhook:
type: string
required:
- certificate
- chatId
- headers
- skipTLS
- token
- webhook
type: object
Expand All @@ -379,9 +370,6 @@ spec:
webhook:
type: string
required:
- certificate
- headers
- skipTLS
- webhook
type: object
type: object
Expand Down
11 changes: 7 additions & 4 deletions pkg/crd/api/targetconfig/v1alpha1/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ type AWSConfig struct {
}

type WebhookOptions struct {
Webhook string `mapstructure:"webhook" json:"webhook"`
SkipTLS bool `mapstructure:"skipTLS" json:"skipTLS"`
Certificate string `mapstructure:"certificate" json:"certificate"`
Headers map[string]string `mapstructure:"headers" json:"headers"`
Webhook string `mapstructure:"webhook" json:"webhook"`
// +optional
SkipTLS bool `mapstructure:"skipTLS" json:"skipTLS"`
// +optional
Certificate string `mapstructure:"certificate" json:"certificate"`
// +optional
Headers map[string]string `mapstructure:"headers" json:"headers"`
}

type HostOptions struct {
Expand Down

0 comments on commit 6fd5acf

Please sign in to comment.