mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Change default matchPolicy to Equivalent in v1
This commit is contained in:
parent
e050590182
commit
08433067c3
@ -33,7 +33,7 @@ func SetDefaults_ValidatingWebhook(obj *admissionregistrationv1.ValidatingWebhoo
|
|||||||
obj.FailurePolicy = &policy
|
obj.FailurePolicy = &policy
|
||||||
}
|
}
|
||||||
if obj.MatchPolicy == nil {
|
if obj.MatchPolicy == nil {
|
||||||
policy := admissionregistrationv1.Exact
|
policy := admissionregistrationv1.Equivalent
|
||||||
obj.MatchPolicy = &policy
|
obj.MatchPolicy = &policy
|
||||||
}
|
}
|
||||||
if obj.NamespaceSelector == nil {
|
if obj.NamespaceSelector == nil {
|
||||||
@ -65,7 +65,7 @@ func SetDefaults_MutatingWebhook(obj *admissionregistrationv1.MutatingWebhook) {
|
|||||||
obj.FailurePolicy = &policy
|
obj.FailurePolicy = &policy
|
||||||
}
|
}
|
||||||
if obj.MatchPolicy == nil {
|
if obj.MatchPolicy == nil {
|
||||||
policy := admissionregistrationv1.Exact
|
policy := admissionregistrationv1.Equivalent
|
||||||
obj.MatchPolicy = &policy
|
obj.MatchPolicy = &policy
|
||||||
}
|
}
|
||||||
if obj.NamespaceSelector == nil {
|
if obj.NamespaceSelector == nil {
|
||||||
|
@ -209,7 +209,7 @@ type ValidatingWebhook struct {
|
|||||||
// and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
|
// and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
|
||||||
// a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
|
// a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
|
||||||
//
|
//
|
||||||
// Defaults to "Exact"
|
// Defaults to "Equivalent"
|
||||||
// +optional
|
// +optional
|
||||||
MatchPolicy *MatchPolicyType `json:"matchPolicy,omitempty" protobuf:"bytes,9,opt,name=matchPolicy,casttype=MatchPolicyType"`
|
MatchPolicy *MatchPolicyType `json:"matchPolicy,omitempty" protobuf:"bytes,9,opt,name=matchPolicy,casttype=MatchPolicyType"`
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ type MutatingWebhook struct {
|
|||||||
// and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
|
// and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
|
||||||
// a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
|
// a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
|
||||||
//
|
//
|
||||||
// Defaults to "Exact"
|
// Defaults to "Equivalent"
|
||||||
// +optional
|
// +optional
|
||||||
MatchPolicy *MatchPolicyType `json:"matchPolicy,omitempty" protobuf:"bytes,9,opt,name=matchPolicy,casttype=MatchPolicyType"`
|
MatchPolicy *MatchPolicyType `json:"matchPolicy,omitempty" protobuf:"bytes,9,opt,name=matchPolicy,casttype=MatchPolicyType"`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user