Skip to content

Commit

Permalink
✨ add default conversion review versions
Browse files Browse the repository at this point in the history
The conversion webhook client config requires a list
of conversion review versions. This change scaffolds the
conversion webhook patch with default conversion review version
of v1.
  • Loading branch information
varshaprasad96 committed May 6, 2021
1 parent 2b857cb commit ef7f789
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/cli/alpha/config-gen/cert-generation-filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ func (c CertFilter) Filter(input []*yaml.RNode) ([]*yaml.RNode, error) {
if err != nil {
return nil, err
}
err = matches[i].PipeE(yaml.LookupCreate(
yaml.ScalarNode, "spec", "conversion", "webhookClientConfig", "conversionReviewVersions"),
yaml.FieldSetter{StringValue: "v1"})
if err != nil {
return nil, err
}
err = matches[i].PipeE(yaml.LookupCreate(
yaml.ScalarNode, "spec", "conversion", "webhookClientConfig", "service", "name"),
yaml.FieldSetter{StringValue: "webhook-service"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
{{- end }}
`
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions: v1

0 comments on commit ef7f789

Please sign in to comment.