- This commit changes the internal config to have fewer number of optional parameters. It changes the types to match the ones that are already present in https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/v1/conversion.go so that custom converters do not have to be written for types "int" and "float32". Signed-off-by: Cody W. Eilar <ecody@vmware.com>
195 lines
9.8 KiB
Go
195 lines
9.8 KiB
Go
//go:build !ignore_autogenerated
|
|
// +build !ignore_autogenerated
|
|
|
|
/*
|
|
Copyright 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 conversion-gen. DO NOT EDIT.
|
|
|
|
package v1alpha1
|
|
|
|
import (
|
|
time "time"
|
|
unsafe "unsafe"
|
|
|
|
controller "github.com/cert-manager/cert-manager/internal/apis/config/controller"
|
|
v1alpha1 "github.com/cert-manager/cert-manager/pkg/apis/config/controller/v1alpha1"
|
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
conversion "k8s.io/apimachinery/pkg/conversion"
|
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
apiv1 "k8s.io/component-base/logs/api/v1"
|
|
)
|
|
|
|
func init() {
|
|
localSchemeBuilder.Register(RegisterConversions)
|
|
}
|
|
|
|
// RegisterConversions adds conversion functions to the given scheme.
|
|
// Public to allow building arbitrary schemes.
|
|
func RegisterConversions(s *runtime.Scheme) error {
|
|
if err := s.AddGeneratedConversionFunc((*v1alpha1.ControllerConfiguration)(nil), (*controller.ControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
|
return Convert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration(a.(*v1alpha1.ControllerConfiguration), b.(*controller.ControllerConfiguration), scope)
|
|
}); err != nil {
|
|
return err
|
|
}
|
|
if err := s.AddGeneratedConversionFunc((*controller.ControllerConfiguration)(nil), (*v1alpha1.ControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
|
return Convert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(a.(*controller.ControllerConfiguration), b.(*v1alpha1.ControllerConfiguration), scope)
|
|
}); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func autoConvert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration(in *v1alpha1.ControllerConfiguration, out *controller.ControllerConfiguration, s conversion.Scope) error {
|
|
out.APIServerHost = in.APIServerHost
|
|
out.KubeConfig = in.KubeConfig
|
|
if err := v1.Convert_Pointer_float64_To_float64(&in.KubernetesAPIQPS, &out.KubernetesAPIQPS, s); err != nil {
|
|
return err
|
|
}
|
|
if err := v1.Convert_Pointer_int32_To_int32(&in.KubernetesAPIBurst, &out.KubernetesAPIBurst, s); err != nil {
|
|
return err
|
|
}
|
|
out.ClusterResourceNamespace = in.ClusterResourceNamespace
|
|
out.Namespace = in.Namespace
|
|
if err := v1.Convert_Pointer_bool_To_bool(&in.LeaderElect, &out.LeaderElect, s); err != nil {
|
|
return err
|
|
}
|
|
out.LeaderElectionNamespace = in.LeaderElectionNamespace
|
|
out.LeaderElectionLeaseDuration = time.Duration(in.LeaderElectionLeaseDuration)
|
|
out.LeaderElectionRenewDeadline = time.Duration(in.LeaderElectionRenewDeadline)
|
|
out.LeaderElectionRetryPeriod = time.Duration(in.LeaderElectionRetryPeriod)
|
|
out.Controllers = *(*[]string)(unsafe.Pointer(&in.Controllers))
|
|
out.ACMEHTTP01SolverImage = in.ACMEHTTP01SolverImage
|
|
out.ACMEHTTP01SolverResourceRequestCPU = in.ACMEHTTP01SolverResourceRequestCPU
|
|
out.ACMEHTTP01SolverResourceRequestMemory = in.ACMEHTTP01SolverResourceRequestMemory
|
|
out.ACMEHTTP01SolverResourceLimitsCPU = in.ACMEHTTP01SolverResourceLimitsCPU
|
|
out.ACMEHTTP01SolverResourceLimitsMemory = in.ACMEHTTP01SolverResourceLimitsMemory
|
|
if err := v1.Convert_Pointer_bool_To_bool(&in.ACMEHTTP01SolverRunAsNonRoot, &out.ACMEHTTP01SolverRunAsNonRoot, s); err != nil {
|
|
return err
|
|
}
|
|
out.ACMEHTTP01SolverNameservers = *(*[]string)(unsafe.Pointer(&in.ACMEHTTP01SolverNameservers))
|
|
if err := v1.Convert_Pointer_bool_To_bool(&in.ClusterIssuerAmbientCredentials, &out.ClusterIssuerAmbientCredentials, s); err != nil {
|
|
return err
|
|
}
|
|
if err := v1.Convert_Pointer_bool_To_bool(&in.IssuerAmbientCredentials, &out.IssuerAmbientCredentials, s); err != nil {
|
|
return err
|
|
}
|
|
out.DefaultIssuerName = in.DefaultIssuerName
|
|
out.DefaultIssuerKind = in.DefaultIssuerKind
|
|
out.DefaultIssuerGroup = in.DefaultIssuerGroup
|
|
out.DefaultAutoCertificateAnnotations = *(*[]string)(unsafe.Pointer(&in.DefaultAutoCertificateAnnotations))
|
|
out.DNS01RecursiveNameservers = *(*[]string)(unsafe.Pointer(&in.DNS01RecursiveNameservers))
|
|
if err := v1.Convert_Pointer_bool_To_bool(&in.DNS01RecursiveNameserversOnly, &out.DNS01RecursiveNameserversOnly, s); err != nil {
|
|
return err
|
|
}
|
|
if err := v1.Convert_Pointer_bool_To_bool(&in.EnableCertificateOwnerRef, &out.EnableCertificateOwnerRef, s); err != nil {
|
|
return err
|
|
}
|
|
if err := v1.Convert_Pointer_int32_To_int32(&in.NumberOfConcurrentWorkers, &out.NumberOfConcurrentWorkers, s); err != nil {
|
|
return err
|
|
}
|
|
if err := v1.Convert_Pointer_int32_To_int32(&in.MaxConcurrentChallenges, &out.MaxConcurrentChallenges, s); err != nil {
|
|
return err
|
|
}
|
|
out.MetricsListenAddress = in.MetricsListenAddress
|
|
out.HealthzListenAddress = in.HealthzListenAddress
|
|
out.HealthzLeaderElectionTimeout = time.Duration(in.HealthzLeaderElectionTimeout)
|
|
out.PprofAddress = in.PprofAddress
|
|
if err := v1.Convert_Pointer_bool_To_bool(&in.EnablePprof, &out.EnablePprof, s); err != nil {
|
|
return err
|
|
}
|
|
out.Logging = (*apiv1.LoggingConfiguration)(unsafe.Pointer(in.Logging))
|
|
out.DNS01CheckRetryPeriod = time.Duration(in.DNS01CheckRetryPeriod)
|
|
out.CopiedAnnotationPrefixes = *(*[]string)(unsafe.Pointer(&in.CopiedAnnotationPrefixes))
|
|
out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates))
|
|
return nil
|
|
}
|
|
|
|
// Convert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration is an autogenerated conversion function.
|
|
func Convert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration(in *v1alpha1.ControllerConfiguration, out *controller.ControllerConfiguration, s conversion.Scope) error {
|
|
return autoConvert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration(in, out, s)
|
|
}
|
|
|
|
func autoConvert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(in *controller.ControllerConfiguration, out *v1alpha1.ControllerConfiguration, s conversion.Scope) error {
|
|
out.APIServerHost = in.APIServerHost
|
|
out.KubeConfig = in.KubeConfig
|
|
if err := v1.Convert_float64_To_Pointer_float64(&in.KubernetesAPIQPS, &out.KubernetesAPIQPS, s); err != nil {
|
|
return err
|
|
}
|
|
if err := v1.Convert_int32_To_Pointer_int32(&in.KubernetesAPIBurst, &out.KubernetesAPIBurst, s); err != nil {
|
|
return err
|
|
}
|
|
out.ClusterResourceNamespace = in.ClusterResourceNamespace
|
|
out.Namespace = in.Namespace
|
|
if err := v1.Convert_bool_To_Pointer_bool(&in.LeaderElect, &out.LeaderElect, s); err != nil {
|
|
return err
|
|
}
|
|
out.LeaderElectionNamespace = in.LeaderElectionNamespace
|
|
out.LeaderElectionLeaseDuration = time.Duration(in.LeaderElectionLeaseDuration)
|
|
out.LeaderElectionRenewDeadline = time.Duration(in.LeaderElectionRenewDeadline)
|
|
out.LeaderElectionRetryPeriod = time.Duration(in.LeaderElectionRetryPeriod)
|
|
out.Controllers = *(*[]string)(unsafe.Pointer(&in.Controllers))
|
|
out.ACMEHTTP01SolverImage = in.ACMEHTTP01SolverImage
|
|
out.ACMEHTTP01SolverResourceRequestCPU = in.ACMEHTTP01SolverResourceRequestCPU
|
|
out.ACMEHTTP01SolverResourceRequestMemory = in.ACMEHTTP01SolverResourceRequestMemory
|
|
out.ACMEHTTP01SolverResourceLimitsCPU = in.ACMEHTTP01SolverResourceLimitsCPU
|
|
out.ACMEHTTP01SolverResourceLimitsMemory = in.ACMEHTTP01SolverResourceLimitsMemory
|
|
if err := v1.Convert_bool_To_Pointer_bool(&in.ACMEHTTP01SolverRunAsNonRoot, &out.ACMEHTTP01SolverRunAsNonRoot, s); err != nil {
|
|
return err
|
|
}
|
|
out.ACMEHTTP01SolverNameservers = *(*[]string)(unsafe.Pointer(&in.ACMEHTTP01SolverNameservers))
|
|
if err := v1.Convert_bool_To_Pointer_bool(&in.ClusterIssuerAmbientCredentials, &out.ClusterIssuerAmbientCredentials, s); err != nil {
|
|
return err
|
|
}
|
|
if err := v1.Convert_bool_To_Pointer_bool(&in.IssuerAmbientCredentials, &out.IssuerAmbientCredentials, s); err != nil {
|
|
return err
|
|
}
|
|
out.DefaultIssuerName = in.DefaultIssuerName
|
|
out.DefaultIssuerKind = in.DefaultIssuerKind
|
|
out.DefaultIssuerGroup = in.DefaultIssuerGroup
|
|
out.DefaultAutoCertificateAnnotations = *(*[]string)(unsafe.Pointer(&in.DefaultAutoCertificateAnnotations))
|
|
out.DNS01RecursiveNameservers = *(*[]string)(unsafe.Pointer(&in.DNS01RecursiveNameservers))
|
|
if err := v1.Convert_bool_To_Pointer_bool(&in.DNS01RecursiveNameserversOnly, &out.DNS01RecursiveNameserversOnly, s); err != nil {
|
|
return err
|
|
}
|
|
if err := v1.Convert_bool_To_Pointer_bool(&in.EnableCertificateOwnerRef, &out.EnableCertificateOwnerRef, s); err != nil {
|
|
return err
|
|
}
|
|
if err := v1.Convert_int32_To_Pointer_int32(&in.NumberOfConcurrentWorkers, &out.NumberOfConcurrentWorkers, s); err != nil {
|
|
return err
|
|
}
|
|
if err := v1.Convert_int32_To_Pointer_int32(&in.MaxConcurrentChallenges, &out.MaxConcurrentChallenges, s); err != nil {
|
|
return err
|
|
}
|
|
out.MetricsListenAddress = in.MetricsListenAddress
|
|
out.HealthzListenAddress = in.HealthzListenAddress
|
|
out.HealthzLeaderElectionTimeout = time.Duration(in.HealthzLeaderElectionTimeout)
|
|
out.PprofAddress = in.PprofAddress
|
|
if err := v1.Convert_bool_To_Pointer_bool(&in.EnablePprof, &out.EnablePprof, s); err != nil {
|
|
return err
|
|
}
|
|
out.Logging = (*apiv1.LoggingConfiguration)(unsafe.Pointer(in.Logging))
|
|
out.DNS01CheckRetryPeriod = time.Duration(in.DNS01CheckRetryPeriod)
|
|
out.CopiedAnnotationPrefixes = *(*[]string)(unsafe.Pointer(&in.CopiedAnnotationPrefixes))
|
|
out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates))
|
|
return nil
|
|
}
|
|
|
|
// Convert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration is an autogenerated conversion function.
|
|
func Convert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(in *controller.ControllerConfiguration, out *v1alpha1.ControllerConfiguration, s conversion.Scope) error {
|
|
return autoConvert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(in, out, s)
|
|
}
|