mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
* chore: refactor Signed-off-by: ShutingZhao <shuting@nirmata.com> * feat: add foreach for generate.daya to api Signed-off-by: ShutingZhao <shuting@nirmata.com> * chore: refactor generator Signed-off-by: ShutingZhao <shuting@nirmata.com> * chore: linter Signed-off-by: ShutingZhao <shuting@nirmata.com> * feat: update rule validation Signed-off-by: ShutingZhao <shuting@nirmata.com> * feat: update rule validation -2 Signed-off-by: ShutingZhao <shuting@nirmata.com> * feat: support foreach.data Signed-off-by: ShutingZhao <shuting@nirmata.com> * fix: policy validation Signed-off-by: ShutingZhao <shuting@nirmata.com> * fix: context variables Signed-off-by: ShutingZhao <shuting@nirmata.com> * chore: add a chainsaw test Signed-off-by: ShutingZhao <shuting@nirmata.com> * fix: sync on policy deletion Signed-off-by: ShutingZhao <shuting@nirmata.com> * chore: enable new chainsaw tests in CI Signed-off-by: ShutingZhao <shuting@nirmata.com> * chore: update code-gen Signed-off-by: ShutingZhao <shuting@nirmata.com> * fix: validate targets scope for ns-policies Signed-off-by: ShutingZhao <shuting@nirmata.com> * chore: add missing files Signed-off-by: ShutingZhao <shuting@nirmata.com> * chore: remove unreasonable test Signed-off-by: ShutingZhao <shuting@nirmata.com> * chore: update docs Signed-off-by: ShutingZhao <shuting@nirmata.com> * chore: update install.yaml Signed-off-by: ShutingZhao <shuting@nirmata.com> --------- Signed-off-by: ShutingZhao <shuting@nirmata.com> Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
114 lines
5.2 KiB
Go
114 lines
5.2 KiB
Go
/*
|
|
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 v1
|
|
|
|
import (
|
|
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
|
types "k8s.io/apimachinery/pkg/types"
|
|
)
|
|
|
|
// GeneratePatternsApplyConfiguration represents an declarative configuration of the GeneratePatterns type for use
|
|
// with apply.
|
|
type GeneratePatternsApplyConfiguration struct {
|
|
*ResourceSpecApplyConfiguration `json:"ResourceSpec,omitempty"`
|
|
RawData *apiextensionsv1.JSON `json:"data,omitempty"`
|
|
Clone *CloneFromApplyConfiguration `json:"clone,omitempty"`
|
|
CloneList *CloneListApplyConfiguration `json:"cloneList,omitempty"`
|
|
}
|
|
|
|
// GeneratePatternsApplyConfiguration constructs an declarative configuration of the GeneratePatterns type for use with
|
|
// apply.
|
|
func GeneratePatterns() *GeneratePatternsApplyConfiguration {
|
|
return &GeneratePatternsApplyConfiguration{}
|
|
}
|
|
|
|
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
|
|
func (b *GeneratePatternsApplyConfiguration) WithAPIVersion(value string) *GeneratePatternsApplyConfiguration {
|
|
b.ensureResourceSpecApplyConfigurationExists()
|
|
b.APIVersion = &value
|
|
return b
|
|
}
|
|
|
|
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
|
|
func (b *GeneratePatternsApplyConfiguration) WithKind(value string) *GeneratePatternsApplyConfiguration {
|
|
b.ensureResourceSpecApplyConfigurationExists()
|
|
b.Kind = &value
|
|
return b
|
|
}
|
|
|
|
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
|
|
func (b *GeneratePatternsApplyConfiguration) WithNamespace(value string) *GeneratePatternsApplyConfiguration {
|
|
b.ensureResourceSpecApplyConfigurationExists()
|
|
b.Namespace = &value
|
|
return b
|
|
}
|
|
|
|
// WithName sets the Name 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 Name field is set to the value of the last call.
|
|
func (b *GeneratePatternsApplyConfiguration) WithName(value string) *GeneratePatternsApplyConfiguration {
|
|
b.ensureResourceSpecApplyConfigurationExists()
|
|
b.Name = &value
|
|
return b
|
|
}
|
|
|
|
// WithUID sets the UID 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 UID field is set to the value of the last call.
|
|
func (b *GeneratePatternsApplyConfiguration) WithUID(value types.UID) *GeneratePatternsApplyConfiguration {
|
|
b.ensureResourceSpecApplyConfigurationExists()
|
|
b.UID = &value
|
|
return b
|
|
}
|
|
|
|
func (b *GeneratePatternsApplyConfiguration) ensureResourceSpecApplyConfigurationExists() {
|
|
if b.ResourceSpecApplyConfiguration == nil {
|
|
b.ResourceSpecApplyConfiguration = &ResourceSpecApplyConfiguration{}
|
|
}
|
|
}
|
|
|
|
// WithRawData sets the RawData 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 RawData field is set to the value of the last call.
|
|
func (b *GeneratePatternsApplyConfiguration) WithRawData(value apiextensionsv1.JSON) *GeneratePatternsApplyConfiguration {
|
|
b.RawData = &value
|
|
return b
|
|
}
|
|
|
|
// WithClone sets the Clone 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 Clone field is set to the value of the last call.
|
|
func (b *GeneratePatternsApplyConfiguration) WithClone(value *CloneFromApplyConfiguration) *GeneratePatternsApplyConfiguration {
|
|
b.Clone = value
|
|
return b
|
|
}
|
|
|
|
// WithCloneList sets the CloneList 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 CloneList field is set to the value of the last call.
|
|
func (b *GeneratePatternsApplyConfiguration) WithCloneList(value *CloneListApplyConfiguration) *GeneratePatternsApplyConfiguration {
|
|
b.CloneList = value
|
|
return b
|
|
}
|