mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-25 14:41:53 +00:00
Generate code
Kubernetes-commit: 932a4d97249cb79f3041b5d8842425b0ed7275b3
This commit is contained in:
parent
48ca73428a
commit
bbbf092e1d
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
// AuditAnnotationApplyConfiguration represents an declarative configuration of the AuditAnnotation type for use
|
||||||
|
// with apply.
|
||||||
|
type AuditAnnotationApplyConfiguration struct {
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
|
ValueExpression *string `json:"valueExpression,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// AuditAnnotationApplyConfiguration constructs an declarative configuration of the AuditAnnotation type for use with
|
||||||
|
// apply.
|
||||||
|
func AuditAnnotation() *AuditAnnotationApplyConfiguration {
|
||||||
|
return &AuditAnnotationApplyConfiguration{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithKey sets the Key field in the declarative configuration to the given value
|
||||||
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
|
// If called multiple times, the Key field is set to the value of the last call.
|
||||||
|
func (b *AuditAnnotationApplyConfiguration) WithKey(value string) *AuditAnnotationApplyConfiguration {
|
||||||
|
b.Key = &value
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithValueExpression sets the ValueExpression field in the declarative configuration to the given value
|
||||||
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
|
// If called multiple times, the ValueExpression field is set to the value of the last call.
|
||||||
|
func (b *AuditAnnotationApplyConfiguration) WithValueExpression(value string) *AuditAnnotationApplyConfiguration {
|
||||||
|
b.ValueExpression = &value
|
||||||
|
return b
|
||||||
|
}
|
@ -18,12 +18,17 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
// ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use
|
// ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use
|
||||||
// with apply.
|
// with apply.
|
||||||
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
|
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
|
||||||
PolicyName *string `json:"policyName,omitempty"`
|
PolicyName *string `json:"policyName,omitempty"`
|
||||||
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
|
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
|
||||||
MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"`
|
MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"`
|
||||||
|
ValidationActions []admissionregistrationv1alpha1.ValidationAction `json:"validationActions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidatingAdmissionPolicyBindingSpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use with
|
// ValidatingAdmissionPolicyBindingSpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use with
|
||||||
@ -55,3 +60,13 @@ func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResour
|
|||||||
b.MatchResources = value
|
b.MatchResources = value
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithValidationActions adds the given value to the ValidationActions field in the declarative configuration
|
||||||
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||||
|
// If called multiple times, values provided by each call will be appended to the ValidationActions field.
|
||||||
|
func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithValidationActions(values ...admissionregistrationv1alpha1.ValidationAction) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
|
||||||
|
for i := range values {
|
||||||
|
b.ValidationActions = append(b.ValidationActions, values[i])
|
||||||
|
}
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
@ -29,6 +29,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
|
|||||||
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
|
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
|
||||||
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
|
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
|
||||||
FailurePolicy *admissionregistrationv1alpha1.FailurePolicyType `json:"failurePolicy,omitempty"`
|
FailurePolicy *admissionregistrationv1alpha1.FailurePolicyType `json:"failurePolicy,omitempty"`
|
||||||
|
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidatingAdmissionPolicySpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicySpec type for use with
|
// ValidatingAdmissionPolicySpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicySpec type for use with
|
||||||
@ -73,3 +74,16 @@ func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(valu
|
|||||||
b.FailurePolicy = &value
|
b.FailurePolicy = &value
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithAuditAnnotations adds the given value to the AuditAnnotations field in the declarative configuration
|
||||||
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||||
|
// If called multiple times, values provided by each call will be appended to the AuditAnnotations field.
|
||||||
|
func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithAuditAnnotations(values ...*AuditAnnotationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration {
|
||||||
|
for i := range values {
|
||||||
|
if values[i] == nil {
|
||||||
|
panic("nil value passed to WithAuditAnnotations")
|
||||||
|
}
|
||||||
|
b.AuditAnnotations = append(b.AuditAnnotations, *values[i])
|
||||||
|
}
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
@ -225,6 +225,17 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: url
|
- name: url
|
||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
|
- name: io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: key
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
default: ""
|
||||||
|
- name: valueExpression
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
default: ""
|
||||||
- name: io.k8s.api.admissionregistration.v1alpha1.MatchResources
|
- name: io.k8s.api.admissionregistration.v1alpha1.MatchResources
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -353,9 +364,21 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: policyName
|
- name: policyName
|
||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
|
- name: validationActions
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
scalar: string
|
||||||
|
elementRelationship: associative
|
||||||
- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec
|
- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
|
- name: auditAnnotations
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
namedType: io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation
|
||||||
|
elementRelationship: atomic
|
||||||
- name: failurePolicy
|
- name: failurePolicy
|
||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
|
@ -139,6 +139,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &admissionregistrationv1.WebhookClientConfigApplyConfiguration{}
|
return &admissionregistrationv1.WebhookClientConfigApplyConfiguration{}
|
||||||
|
|
||||||
// Group=admissionregistration.k8s.io, Version=v1alpha1
|
// Group=admissionregistration.k8s.io, Version=v1alpha1
|
||||||
|
case v1alpha1.SchemeGroupVersion.WithKind("AuditAnnotation"):
|
||||||
|
return &admissionregistrationv1alpha1.AuditAnnotationApplyConfiguration{}
|
||||||
case v1alpha1.SchemeGroupVersion.WithKind("MatchResources"):
|
case v1alpha1.SchemeGroupVersion.WithKind("MatchResources"):
|
||||||
return &admissionregistrationv1alpha1.MatchResourcesApplyConfiguration{}
|
return &admissionregistrationv1alpha1.MatchResourcesApplyConfiguration{}
|
||||||
case v1alpha1.SchemeGroupVersion.WithKind("NamedRuleWithOperations"):
|
case v1alpha1.SchemeGroupVersion.WithKind("NamedRuleWithOperations"):
|
||||||
|
Loading…
Reference in New Issue
Block a user