diff --git a/go.mod b/go.mod index a50524d0d..a686a739c 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,6 @@ require ( k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 sigs.k8s.io/controller-runtime v0.20.4 sigs.k8s.io/structured-merge-diff v1.0.2 - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 software.sslmate.com/src/go-pkcs12 v0.5.0 ) @@ -93,5 +92,6 @@ require ( sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect sigs.k8s.io/kustomize/api v0.18.0 // indirect sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/pkg/applyconfigurations/internal/internal.go b/pkg/applyconfigurations/internal/internal.go deleted file mode 100644 index 6b0d7b2db..000000000 --- a/pkg/applyconfigurations/internal/internal.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 internal - -import ( - "fmt" - "sync" - - typed "sigs.k8s.io/structured-merge-diff/v4/typed" -) - -func Parser() *typed.Parser { - parserOnce.Do(func() { - var err error - parser, err = typed.NewParser(schemaYAML) - if err != nil { - panic(fmt.Sprintf("Failed to parse schema: %v", err)) - } - }) - return parser -} - -var parserOnce sync.Once -var parser *typed.Parser -var schemaYAML = typed.YAMLObject(`types: -- name: __untyped_atomic_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic -- name: __untyped_deduced_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -`) diff --git a/pkg/applyconfigurations/trust/v1alpha1/additionalformats.go b/pkg/applyconfigurations/trust/v1alpha1/additionalformats.go deleted file mode 100644 index 0e75c4a96..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/additionalformats.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -// AdditionalFormatsApplyConfiguration represents an declarative configuration of the AdditionalFormats type for use -// with apply. -type AdditionalFormatsApplyConfiguration struct { - JKS *JKSApplyConfiguration `json:"jks,omitempty"` - PKCS12 *PKCS12ApplyConfiguration `json:"pkcs12,omitempty"` -} - -// AdditionalFormatsApplyConfiguration constructs an declarative configuration of the AdditionalFormats type for use with -// apply. -func AdditionalFormats() *AdditionalFormatsApplyConfiguration { - return &AdditionalFormatsApplyConfiguration{} -} - -// WithJKS sets the JKS 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 JKS field is set to the value of the last call. -func (b *AdditionalFormatsApplyConfiguration) WithJKS(value *JKSApplyConfiguration) *AdditionalFormatsApplyConfiguration { - b.JKS = value - return b -} - -// WithPKCS12 sets the PKCS12 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 PKCS12 field is set to the value of the last call. -func (b *AdditionalFormatsApplyConfiguration) WithPKCS12(value *PKCS12ApplyConfiguration) *AdditionalFormatsApplyConfiguration { - b.PKCS12 = value - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/bundle.go b/pkg/applyconfigurations/trust/v1alpha1/bundle.go deleted file mode 100644 index 50408c1a0..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/bundle.go +++ /dev/null @@ -1,218 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// BundleApplyConfiguration represents an declarative configuration of the Bundle type for use -// with apply. -type BundleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *BundleSpecApplyConfiguration `json:"spec,omitempty"` - Status *BundleStatusApplyConfiguration `json:"status,omitempty"` -} - -// Bundle constructs an declarative configuration of the Bundle type for use with -// apply. -func Bundle(name string) *BundleApplyConfiguration { - b := &BundleApplyConfiguration{} - b.WithName(name) - b.WithKind("Bundle") - b.WithAPIVersion("trust.cert-manager.io/v1alpha1") - 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 *BundleApplyConfiguration) WithKind(value string) *BundleApplyConfiguration { - b.Kind = &value - return b -} - -// 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 *BundleApplyConfiguration) WithAPIVersion(value string) *BundleApplyConfiguration { - b.APIVersion = &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 *BundleApplyConfiguration) WithName(value string) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value - return b -} - -// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. -func (b *BundleApplyConfiguration) WithGenerateName(value string) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &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 *BundleApplyConfiguration) WithNamespace(value string) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &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 *BundleApplyConfiguration) WithUID(value types.UID) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. -func (b *BundleApplyConfiguration) WithResourceVersion(value string) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. -func (b *BundleApplyConfiguration) WithGeneration(value int64) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. -func (b *BundleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. -func (b *BundleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *BundleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *BundleApplyConfiguration) WithLabels(entries map[string]string) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *BundleApplyConfiguration) WithAnnotations(entries map[string]string) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. -func (b *BundleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers 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 Finalizers field. -func (b *BundleApplyConfiguration) WithFinalizers(values ...string) *BundleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) - } - return b -} - -func (b *BundleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec 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 Spec field is set to the value of the last call. -func (b *BundleApplyConfiguration) WithSpec(value *BundleSpecApplyConfiguration) *BundleApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status 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 Status field is set to the value of the last call. -func (b *BundleApplyConfiguration) WithStatus(value *BundleStatusApplyConfiguration) *BundleApplyConfiguration { - b.Status = value - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/bundlecondition.go b/pkg/applyconfigurations/trust/v1alpha1/bundlecondition.go deleted file mode 100644 index b8eb20cd4..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/bundlecondition.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// BundleConditionApplyConfiguration represents an declarative configuration of the BundleCondition type for use -// with apply. -type BundleConditionApplyConfiguration struct { - Type *string `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` -} - -// BundleConditionApplyConfiguration constructs an declarative configuration of the BundleCondition type for use with -// apply. -func BundleCondition() *BundleConditionApplyConfiguration { - return &BundleConditionApplyConfiguration{} -} - -// WithType sets the Type 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 Type field is set to the value of the last call. -func (b *BundleConditionApplyConfiguration) WithType(value string) *BundleConditionApplyConfiguration { - b.Type = &value - return b -} - -// WithStatus sets the Status 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 Status field is set to the value of the last call. -func (b *BundleConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *BundleConditionApplyConfiguration { - b.Status = &value - return b -} - -// WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call. -func (b *BundleConditionApplyConfiguration) WithLastTransitionTime(value v1.Time) *BundleConditionApplyConfiguration { - b.LastTransitionTime = &value - return b -} - -// WithReason sets the Reason 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 Reason field is set to the value of the last call. -func (b *BundleConditionApplyConfiguration) WithReason(value string) *BundleConditionApplyConfiguration { - b.Reason = &value - return b -} - -// WithMessage sets the Message 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 Message field is set to the value of the last call. -func (b *BundleConditionApplyConfiguration) WithMessage(value string) *BundleConditionApplyConfiguration { - b.Message = &value - return b -} - -// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call. -func (b *BundleConditionApplyConfiguration) WithObservedGeneration(value int64) *BundleConditionApplyConfiguration { - b.ObservedGeneration = &value - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/bundlesource.go b/pkg/applyconfigurations/trust/v1alpha1/bundlesource.go deleted file mode 100644 index 8a73193ed..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/bundlesource.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -// BundleSourceApplyConfiguration represents an declarative configuration of the BundleSource type for use -// with apply. -type BundleSourceApplyConfiguration struct { - ConfigMap *SourceObjectKeySelectorApplyConfiguration `json:"configMap,omitempty"` - Secret *SourceObjectKeySelectorApplyConfiguration `json:"secret,omitempty"` - InLine *string `json:"inLine,omitempty"` - UseDefaultCAs *bool `json:"useDefaultCAs,omitempty"` -} - -// BundleSourceApplyConfiguration constructs an declarative configuration of the BundleSource type for use with -// apply. -func BundleSource() *BundleSourceApplyConfiguration { - return &BundleSourceApplyConfiguration{} -} - -// WithConfigMap sets the ConfigMap 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 ConfigMap field is set to the value of the last call. -func (b *BundleSourceApplyConfiguration) WithConfigMap(value *SourceObjectKeySelectorApplyConfiguration) *BundleSourceApplyConfiguration { - b.ConfigMap = value - return b -} - -// WithSecret sets the Secret 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 Secret field is set to the value of the last call. -func (b *BundleSourceApplyConfiguration) WithSecret(value *SourceObjectKeySelectorApplyConfiguration) *BundleSourceApplyConfiguration { - b.Secret = value - return b -} - -// WithInLine sets the InLine 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 InLine field is set to the value of the last call. -func (b *BundleSourceApplyConfiguration) WithInLine(value string) *BundleSourceApplyConfiguration { - b.InLine = &value - return b -} - -// WithUseDefaultCAs sets the UseDefaultCAs 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 UseDefaultCAs field is set to the value of the last call. -func (b *BundleSourceApplyConfiguration) WithUseDefaultCAs(value bool) *BundleSourceApplyConfiguration { - b.UseDefaultCAs = &value - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/bundlespec.go b/pkg/applyconfigurations/trust/v1alpha1/bundlespec.go deleted file mode 100644 index 8892097e8..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/bundlespec.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -// BundleSpecApplyConfiguration represents an declarative configuration of the BundleSpec type for use -// with apply. -type BundleSpecApplyConfiguration struct { - Sources []BundleSourceApplyConfiguration `json:"sources,omitempty"` - Target *BundleTargetApplyConfiguration `json:"target,omitempty"` -} - -// BundleSpecApplyConfiguration constructs an declarative configuration of the BundleSpec type for use with -// apply. -func BundleSpec() *BundleSpecApplyConfiguration { - return &BundleSpecApplyConfiguration{} -} - -// WithSources adds the given value to the Sources 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 Sources field. -func (b *BundleSpecApplyConfiguration) WithSources(values ...*BundleSourceApplyConfiguration) *BundleSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithSources") - } - b.Sources = append(b.Sources, *values[i]) - } - return b -} - -// WithTarget sets the Target 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 Target field is set to the value of the last call. -func (b *BundleSpecApplyConfiguration) WithTarget(value *BundleTargetApplyConfiguration) *BundleSpecApplyConfiguration { - b.Target = value - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/bundlestatus.go b/pkg/applyconfigurations/trust/v1alpha1/bundlestatus.go deleted file mode 100644 index 790e2993b..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/bundlestatus.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -// BundleStatusApplyConfiguration represents an declarative configuration of the BundleStatus type for use -// with apply. -type BundleStatusApplyConfiguration struct { - Conditions []BundleConditionApplyConfiguration `json:"conditions,omitempty"` - DefaultCAPackageVersion *string `json:"defaultCAVersion,omitempty"` -} - -// BundleStatusApplyConfiguration constructs an declarative configuration of the BundleStatus type for use with -// apply. -func BundleStatus() *BundleStatusApplyConfiguration { - return &BundleStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions 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 Conditions field. -func (b *BundleStatusApplyConfiguration) WithConditions(values ...*BundleConditionApplyConfiguration) *BundleStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithDefaultCAPackageVersion sets the DefaultCAPackageVersion 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 DefaultCAPackageVersion field is set to the value of the last call. -func (b *BundleStatusApplyConfiguration) WithDefaultCAPackageVersion(value string) *BundleStatusApplyConfiguration { - b.DefaultCAPackageVersion = &value - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/bundletarget.go b/pkg/applyconfigurations/trust/v1alpha1/bundletarget.go deleted file mode 100644 index 6372e4129..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/bundletarget.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -// BundleTargetApplyConfiguration represents an declarative configuration of the BundleTarget type for use -// with apply. -type BundleTargetApplyConfiguration struct { - ConfigMap *KeySelectorApplyConfiguration `json:"configMap,omitempty"` - Secret *KeySelectorApplyConfiguration `json:"secret,omitempty"` - AdditionalFormats *AdditionalFormatsApplyConfiguration `json:"additionalFormats,omitempty"` - NamespaceSelector *NamespaceSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` -} - -// BundleTargetApplyConfiguration constructs an declarative configuration of the BundleTarget type for use with -// apply. -func BundleTarget() *BundleTargetApplyConfiguration { - return &BundleTargetApplyConfiguration{} -} - -// WithConfigMap sets the ConfigMap 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 ConfigMap field is set to the value of the last call. -func (b *BundleTargetApplyConfiguration) WithConfigMap(value *KeySelectorApplyConfiguration) *BundleTargetApplyConfiguration { - b.ConfigMap = value - return b -} - -// WithSecret sets the Secret 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 Secret field is set to the value of the last call. -func (b *BundleTargetApplyConfiguration) WithSecret(value *KeySelectorApplyConfiguration) *BundleTargetApplyConfiguration { - b.Secret = value - return b -} - -// WithAdditionalFormats sets the AdditionalFormats 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 AdditionalFormats field is set to the value of the last call. -func (b *BundleTargetApplyConfiguration) WithAdditionalFormats(value *AdditionalFormatsApplyConfiguration) *BundleTargetApplyConfiguration { - b.AdditionalFormats = value - return b -} - -// WithNamespaceSelector sets the NamespaceSelector 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 NamespaceSelector field is set to the value of the last call. -func (b *BundleTargetApplyConfiguration) WithNamespaceSelector(value *NamespaceSelectorApplyConfiguration) *BundleTargetApplyConfiguration { - b.NamespaceSelector = value - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/jks.go b/pkg/applyconfigurations/trust/v1alpha1/jks.go deleted file mode 100644 index f61fb44f5..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/jks.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -// JKSApplyConfiguration represents an declarative configuration of the JKS type for use -// with apply. -type JKSApplyConfiguration struct { - KeySelectorApplyConfiguration `json:",inline"` - Password *string `json:"password,omitempty"` -} - -// JKSApplyConfiguration constructs an declarative configuration of the JKS type for use with -// apply. -func JKS() *JKSApplyConfiguration { - return &JKSApplyConfiguration{} -} - -// 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 *JKSApplyConfiguration) WithKey(value string) *JKSApplyConfiguration { - b.Key = &value - return b -} - -// WithPassword sets the Password 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 Password field is set to the value of the last call. -func (b *JKSApplyConfiguration) WithPassword(value string) *JKSApplyConfiguration { - b.Password = &value - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/keyselector.go b/pkg/applyconfigurations/trust/v1alpha1/keyselector.go deleted file mode 100644 index 17351730a..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/keyselector.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -// KeySelectorApplyConfiguration represents an declarative configuration of the KeySelector type for use -// with apply. -type KeySelectorApplyConfiguration struct { - Key *string `json:"key,omitempty"` -} - -// KeySelectorApplyConfiguration constructs an declarative configuration of the KeySelector type for use with -// apply. -func KeySelector() *KeySelectorApplyConfiguration { - return &KeySelectorApplyConfiguration{} -} - -// 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 *KeySelectorApplyConfiguration) WithKey(value string) *KeySelectorApplyConfiguration { - b.Key = &value - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/namespaceselector.go b/pkg/applyconfigurations/trust/v1alpha1/namespaceselector.go deleted file mode 100644 index c15af2c45..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/namespaceselector.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -// NamespaceSelectorApplyConfiguration represents an declarative configuration of the NamespaceSelector type for use -// with apply. -type NamespaceSelectorApplyConfiguration struct { - MatchLabels map[string]string `json:"matchLabels,omitempty"` -} - -// NamespaceSelectorApplyConfiguration constructs an declarative configuration of the NamespaceSelector type for use with -// apply. -func NamespaceSelector() *NamespaceSelectorApplyConfiguration { - return &NamespaceSelectorApplyConfiguration{} -} - -// WithMatchLabels puts the entries into the MatchLabels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the MatchLabels field, -// overwriting an existing map entries in MatchLabels field with the same key. -func (b *NamespaceSelectorApplyConfiguration) WithMatchLabels(entries map[string]string) *NamespaceSelectorApplyConfiguration { - if b.MatchLabels == nil && len(entries) > 0 { - b.MatchLabels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.MatchLabels[k] = v - } - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/pkcs12.go b/pkg/applyconfigurations/trust/v1alpha1/pkcs12.go deleted file mode 100644 index a960047a6..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/pkcs12.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -// PKCS12ApplyConfiguration represents an declarative configuration of the PKCS12 type for use -// with apply. -type PKCS12ApplyConfiguration struct { - KeySelectorApplyConfiguration `json:",inline"` - Password *string `json:"password,omitempty"` -} - -// PKCS12ApplyConfiguration constructs an declarative configuration of the PKCS12 type for use with -// apply. -func PKCS12() *PKCS12ApplyConfiguration { - return &PKCS12ApplyConfiguration{} -} - -// 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 *PKCS12ApplyConfiguration) WithKey(value string) *PKCS12ApplyConfiguration { - b.Key = &value - return b -} - -// WithPassword sets the Password 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 Password field is set to the value of the last call. -func (b *PKCS12ApplyConfiguration) WithPassword(value string) *PKCS12ApplyConfiguration { - b.Password = &value - return b -} diff --git a/pkg/applyconfigurations/trust/v1alpha1/sourceobjectkeyselector.go b/pkg/applyconfigurations/trust/v1alpha1/sourceobjectkeyselector.go deleted file mode 100644 index 4c8bbafcd..000000000 --- a/pkg/applyconfigurations/trust/v1alpha1/sourceobjectkeyselector.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// SourceObjectKeySelectorApplyConfiguration represents an declarative configuration of the SourceObjectKeySelector type for use -// with apply. -type SourceObjectKeySelectorApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Selector *v1.LabelSelector `json:"selector,omitempty"` - KeySelectorApplyConfiguration `json:",inline"` -} - -// SourceObjectKeySelectorApplyConfiguration constructs an declarative configuration of the SourceObjectKeySelector type for use with -// apply. -func SourceObjectKeySelector() *SourceObjectKeySelectorApplyConfiguration { - return &SourceObjectKeySelectorApplyConfiguration{} -} - -// 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 *SourceObjectKeySelectorApplyConfiguration) WithName(value string) *SourceObjectKeySelectorApplyConfiguration { - b.Name = &value - return b -} - -// WithSelector sets the Selector 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 Selector field is set to the value of the last call. -func (b *SourceObjectKeySelectorApplyConfiguration) WithSelector(value v1.LabelSelector) *SourceObjectKeySelectorApplyConfiguration { - b.Selector = &value - return b -} - -// 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 *SourceObjectKeySelectorApplyConfiguration) WithKey(value string) *SourceObjectKeySelectorApplyConfiguration { - b.Key = &value - return b -} diff --git a/pkg/applyconfigurations/utils.go b/pkg/applyconfigurations/utils.go deleted file mode 100644 index 452f40ceb..000000000 --- a/pkg/applyconfigurations/utils.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2023 The cert-manager 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 applyconfigurations - -import ( - v1alpha1 "github.com/cert-manager/trust-manager/pkg/apis/trust/v1alpha1" - trustv1alpha1 "github.com/cert-manager/trust-manager/pkg/applyconfigurations/trust/v1alpha1" - schema "k8s.io/apimachinery/pkg/runtime/schema" -) - -// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no -// apply configuration type exists for the given GroupVersionKind. -func ForKind(kind schema.GroupVersionKind) interface{} { - switch kind { - // Group=trust.cert-manager.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithKind("AdditionalFormats"): - return &trustv1alpha1.AdditionalFormatsApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("Bundle"): - return &trustv1alpha1.BundleApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("BundleCondition"): - return &trustv1alpha1.BundleConditionApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("BundleSource"): - return &trustv1alpha1.BundleSourceApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("BundleSpec"): - return &trustv1alpha1.BundleSpecApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("BundleStatus"): - return &trustv1alpha1.BundleStatusApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("BundleTarget"): - return &trustv1alpha1.BundleTargetApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("JKS"): - return &trustv1alpha1.JKSApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("KeySelector"): - return &trustv1alpha1.KeySelectorApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("NamespaceSelector"): - return &trustv1alpha1.NamespaceSelectorApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("PKCS12"): - return &trustv1alpha1.PKCS12ApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("SourceObjectKeySelector"): - return &trustv1alpha1.SourceObjectKeySelectorApplyConfiguration{} - - } - return nil -}