diff --git a/Makefile b/Makefile index 0bd6391ea..cc5d68850 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ all: verify test build @go get -d github.com/kubernetes/repo-infra || true # Once k8s.io/kube-gen is live, we should be able to remove this dependency # on k8s.io/kubernetes. https://github.com/kubernetes/kubernetes/pull/49114 - cd ${GOPATH}/src/k8s.io/kubernetes; git checkout 25d3523359ff17dda6deb867a7c3dd6c8b7ea705; + cd ${GOPATH}/src/k8s.io/kubernetes @touch $@ .hack_verify: .generate_exes @@ -126,23 +126,8 @@ endif $(BINDIR)/informer-gen touch $@ -$(BINDIR)/defaulter-gen: - go build -o $@ k8s.io/kubernetes/cmd/libs/go2idl/defaulter-gen - -$(BINDIR)/deepcopy-gen: - go build -o $@ k8s.io/kubernetes/cmd/libs/go2idl/deepcopy-gen - -$(BINDIR)/conversion-gen: - go build -o $@ k8s.io/kubernetes/cmd/libs/go2idl/conversion-gen - -$(BINDIR)/client-gen: - go build -o $@ k8s.io/kubernetes/cmd/libs/go2idl/client-gen - -$(BINDIR)/lister-gen: - go build -o $@ k8s.io/kubernetes/cmd/libs/go2idl/lister-gen - -$(BINDIR)/informer-gen: - go build -o $@ k8s.io/kubernetes/cmd/libs/go2idl/informer-gen +$(BINDIR)/%: + go build -o $@ k8s.io/kubernetes/staging/src/k8s.io/code-generator/cmd/$* # Regenerate all files if the gen exes changed or any "types.go" files changed .generate_files: .generate_exes $(TYPES_FILES) @@ -150,25 +135,15 @@ $(BINDIR)/informer-gen: $(BINDIR)/defaulter-gen \ --v 1 --logtostderr \ --go-header-file "$${GOPATH}/src/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" \ - --input-dirs "$(PACKAGE_NAME)/pkg/apis/certmanager" \ --input-dirs "$(PACKAGE_NAME)/pkg/apis/certmanager/v1alpha1" \ - --extra-peer-dirs "$(PACKAGE_NAME)/pkg/apis/certmanager" \ --extra-peer-dirs "$(PACKAGE_NAME)/pkg/apis/certmanager/v1alpha1" \ --output-file-base "zz_generated.defaults" # Generate deep copies $(BINDIR)/deepcopy-gen \ --v 1 --logtostderr \ --go-header-file "$${GOPATH}/src/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" \ - --input-dirs "$(PACKAGE_NAME)/pkg/apis/certmanager" \ --input-dirs "$(PACKAGE_NAME)/pkg/apis/certmanager/v1alpha1" \ --bounding-dirs "github.com/openshift/open-service-broker-sdk" \ --output-file-base zz_generated.deepcopy - # Generate conversions - $(BINDIR)/conversion-gen \ - --v 1 --logtostderr \ - --go-header-file "$${GOPATH}/src/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" \ - --input-dirs "$(PACKAGE_NAME)/pkg/apis/certmanager" \ - --input-dirs "$(PACKAGE_NAME)/pkg/apis/certmanager/v1alpha1" \ - --output-file-base zz_generated.conversion # generate all pkg/client contents $(HACK_DIR)/update-client-gen.sh diff --git a/hack/update-client-gen.sh b/hack/update-client-gen.sh index 13c9d6ab3..d7bf5624f 100755 --- a/hack/update-client-gen.sh +++ b/hack/update-client-gen.sh @@ -9,13 +9,6 @@ set -o pipefail REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. BINDIR=${REPO_ROOT}/bin -# Generate the internal clientset (pkg/client/clientset_generated/internalclientset) -${BINDIR}/client-gen "$@" \ - --input-base "github.com/jetstack-experimental/cert-manager/pkg/apis/" \ - --input "certmanager/" \ - --clientset-path "github.com/jetstack-experimental/cert-manager/pkg/client/" \ - --clientset-name internalclientset \ - --go-header-file "${GOPATH}/src/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" # Generate the versioned clientset (pkg/client/clientset_generated/clientset) ${BINDIR}/client-gen "$@" \ --input-base "github.com/jetstack-experimental/cert-manager/pkg/apis/" \ @@ -25,16 +18,13 @@ ${BINDIR}/client-gen "$@" \ --go-header-file "${GOPATH}/src/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" # generate lister ${BINDIR}/lister-gen "$@" \ - --input-dirs="github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" \ --input-dirs="github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager/v1alpha1" \ --output-package "github.com/jetstack-experimental/cert-manager/pkg/listers" \ --go-header-file "${GOPATH}/src/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" # generate informer ${BINDIR}/informer-gen "$@" \ --go-header-file "${GOPATH}/src/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" \ - --input-dirs "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" \ --input-dirs "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager/v1alpha1" \ - --internal-clientset-package "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset" \ --versioned-clientset-package "github.com/jetstack-experimental/cert-manager/pkg/client" \ --listers-package "github.com/jetstack-experimental/cert-manager/pkg/listers" \ --output-package "github.com/jetstack-experimental/cert-manager/pkg/informers" diff --git a/pkg/apis/certmanager/doc.go b/pkg/apis/certmanager/doc.go index 962e3582d..f00a36990 100644 --- a/pkg/apis/certmanager/doc.go +++ b/pkg/apis/certmanager/doc.go @@ -14,8 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register // +groupName=certmanager.k8s.io // Package certmanager is the internal version of the API. package certmanager + +const GroupName = "certmanager.k8s.io" diff --git a/pkg/apis/certmanager/install/install.go b/pkg/apis/certmanager/install/install.go index 3f9e9b583..8c6b10154 100644 --- a/pkg/apis/certmanager/install/install.go +++ b/pkg/apis/certmanager/install/install.go @@ -28,10 +28,9 @@ import ( func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ - GroupName: certmanager.GroupName, - VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, - ImportPrefix: "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager", - AddInternalObjectsToScheme: certmanager.AddToScheme, + GroupName: certmanager.GroupName, + VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, + ImportPrefix: "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager", }, announced.VersionToSchemeFunc{ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, diff --git a/pkg/apis/certmanager/register.go b/pkg/apis/certmanager/register.go deleted file mode 100644 index 528f2a6ea..000000000 --- a/pkg/apis/certmanager/register.go +++ /dev/null @@ -1,38 +0,0 @@ -package certmanager - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupName is the group name use in this package -const GroupName = "certmanager.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Certificate{}, - &CertificateList{}, - &Issuer{}, - &IssuerList{}, - ) - return nil -} diff --git a/pkg/apis/certmanager/types.go b/pkg/apis/certmanager/types.go deleted file mode 100644 index 4366631e6..000000000 --- a/pkg/apis/certmanager/types.go +++ /dev/null @@ -1,194 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package certmanager - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type Issuer struct { - metav1.TypeMeta - metav1.ObjectMeta - - Spec IssuerSpec - Status IssuerStatus -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IssuerList is a list of Issuers -type IssuerList struct { - metav1.TypeMeta - metav1.ListMeta - - Items []Issuer -} - -type IssuerSpec struct { - ACME *ACMEIssuer -} - -type IssuerStatus struct { - Ready bool - ACME *ACMEIssuerStatus -} - -type ACMEIssuerStatus struct { - // URI is the unique account identifier, which can also be used to retrieve - // account details from the CA - URI string -} - -type ACMEIssuer struct { - // Email is the email for this account - Email string - // Server is the ACME server URL - Server string - // PrivateKey is the name of a secret containing the private key for this - // user account. - PrivateKey string - // DNS-01 config - DNS01 *ACMEIssuerDNS01Config -} - -// ACMEIssuerDNS01Config is a structure containing the ACME DNS configuration -// option. One and only one of the fields within it should be set, when the -// ACME challenge type is set to dns-01 -type ACMEIssuerDNS01Config struct { - Providers []ACMEIssuerDNS01Provider -} - -type ACMEIssuerDNS01Provider struct { - Name string - - CloudDNS *ACMEIssuerDNS01ProviderCloudDNS - Cloudflare *ACMEIssuerDNS01ProviderCloudflare - Route53 *ACMEIssuerDNS01ProviderRoute53 -} - -// ACMEIssuerDNS01ProviderCloudDNS is a structure containing the DNS -// configuration for Google Cloud DNS -type ACMEIssuerDNS01ProviderCloudDNS struct { - ServiceAccount SecretKeySelector - Project string -} - -// ACMEIssuerDNS01ProviderCloudflare is a structure containing the DNS -// configuration for Cloudflare -type ACMEIssuerDNS01ProviderCloudflare struct { - Email string - APIKey SecretKeySelector -} - -// ACMEIssuerDNS01ProviderRoute53 is a structure containing the Route 53 -// configuration for AWS -type ACMEIssuerDNS01ProviderRoute53 struct { - AccessKeyID string - SecretAccessKey SecretKeySelector - // these following parameters are optional - HostedZoneID string - Region string -} - -// +genclient=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Certificate is a type to represent a Certificate from ACME -type Certificate struct { - metav1.TypeMeta - metav1.ObjectMeta - - Spec CertificateSpec - Status CertificateStatus -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CertificateList is a list of certificates -type CertificateList struct { - metav1.TypeMeta - metav1.ListMeta - - Items []Certificate -} - -// CertificateSpec defines the desired state of Certificate -type CertificateSpec struct { - // Domains is a list of domains to obtain a certificate for - Domains []string - // SecretName is the name of the secret resource to store this secret in - SecretName string - // Issuer is the name of the issuer resource to use to obtain this - // certificate - Issuer string - - ACME *ACMECertificateConfig -} - -// ACMEConfig contains the configuration for the ACME certificate provider -type ACMECertificateConfig struct { - Config []ACMECertificateDomainConfig -} - -type ACMECertificateDomainConfig struct { - Domains []string - HTTP01 *ACMECertificateHTTP01Config - DNS01 *ACMECertificateDNS01Config -} - -type ACMECertificateHTTP01Config struct { - Ingress string - IngressClass *string -} - -type ACMECertificateDNS01Config struct { - Provider string -} - -// CertificateStatus defines the observed state of Certificate -type CertificateStatus struct { - ACME *CertificateACMEStatus -} - -// CertificateACMEStatus holds the status for an ACME issuer -type CertificateACMEStatus struct { - Authorizations []ACMEDomainAuthorization -} - -// ACMEDomainAuthorization holds information about an ACME issuers domain -// authorization -type ACMEDomainAuthorization struct { - Domain string - URI string -} - -type LocalObjectReference struct { - // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // TODO: Add other useful fields. apiVersion, kind, uid? - Name string -} - -type SecretKeySelector struct { - // The name of the secret in the pod's namespace to select from. - LocalObjectReference - // The key of the secret to select from. Must be a valid secret key. - Key string -} diff --git a/pkg/apis/certmanager/v1alpha1/types.go b/pkg/apis/certmanager/v1alpha1/types.go index c9a967f12..2d065855a 100644 --- a/pkg/apis/certmanager/v1alpha1/types.go +++ b/pkg/apis/certmanager/v1alpha1/types.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// +genclient=true +// +genclient // +k8s:openapi-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +resource:path=issuers @@ -130,7 +130,7 @@ type ACMEIssuerDNS01ProviderRoute53 struct { Region string `json:"region"` } -// +genclient=true +// +genclient // +k8s:openapi-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +resource:path=certificates diff --git a/pkg/apis/certmanager/v1alpha1/zz_generated.conversion.go b/pkg/apis/certmanager/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index d95675310..000000000 --- a/pkg/apis/certmanager/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,657 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2017 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. -*/ - -// This file was autogenerated by conversion-gen. Do not edit it manually! - -package v1alpha1 - -import ( - certmanager "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - unsafe "unsafe" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_ACMECertificateConfig_To_certmanager_ACMECertificateConfig, - Convert_certmanager_ACMECertificateConfig_To_v1alpha1_ACMECertificateConfig, - Convert_v1alpha1_ACMECertificateDNS01Config_To_certmanager_ACMECertificateDNS01Config, - Convert_certmanager_ACMECertificateDNS01Config_To_v1alpha1_ACMECertificateDNS01Config, - Convert_v1alpha1_ACMECertificateDomainConfig_To_certmanager_ACMECertificateDomainConfig, - Convert_certmanager_ACMECertificateDomainConfig_To_v1alpha1_ACMECertificateDomainConfig, - Convert_v1alpha1_ACMECertificateHTTP01Config_To_certmanager_ACMECertificateHTTP01Config, - Convert_certmanager_ACMECertificateHTTP01Config_To_v1alpha1_ACMECertificateHTTP01Config, - Convert_v1alpha1_ACMEDomainAuthorization_To_certmanager_ACMEDomainAuthorization, - Convert_certmanager_ACMEDomainAuthorization_To_v1alpha1_ACMEDomainAuthorization, - Convert_v1alpha1_ACMEIssuer_To_certmanager_ACMEIssuer, - Convert_certmanager_ACMEIssuer_To_v1alpha1_ACMEIssuer, - Convert_v1alpha1_ACMEIssuerDNS01Config_To_certmanager_ACMEIssuerDNS01Config, - Convert_certmanager_ACMEIssuerDNS01Config_To_v1alpha1_ACMEIssuerDNS01Config, - Convert_v1alpha1_ACMEIssuerDNS01Provider_To_certmanager_ACMEIssuerDNS01Provider, - Convert_certmanager_ACMEIssuerDNS01Provider_To_v1alpha1_ACMEIssuerDNS01Provider, - Convert_v1alpha1_ACMEIssuerDNS01ProviderCloudDNS_To_certmanager_ACMEIssuerDNS01ProviderCloudDNS, - Convert_certmanager_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha1_ACMEIssuerDNS01ProviderCloudDNS, - Convert_v1alpha1_ACMEIssuerDNS01ProviderCloudflare_To_certmanager_ACMEIssuerDNS01ProviderCloudflare, - Convert_certmanager_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha1_ACMEIssuerDNS01ProviderCloudflare, - Convert_v1alpha1_ACMEIssuerDNS01ProviderRoute53_To_certmanager_ACMEIssuerDNS01ProviderRoute53, - Convert_certmanager_ACMEIssuerDNS01ProviderRoute53_To_v1alpha1_ACMEIssuerDNS01ProviderRoute53, - Convert_v1alpha1_ACMEIssuerStatus_To_certmanager_ACMEIssuerStatus, - Convert_certmanager_ACMEIssuerStatus_To_v1alpha1_ACMEIssuerStatus, - Convert_v1alpha1_Certificate_To_certmanager_Certificate, - Convert_certmanager_Certificate_To_v1alpha1_Certificate, - Convert_v1alpha1_CertificateACMEStatus_To_certmanager_CertificateACMEStatus, - Convert_certmanager_CertificateACMEStatus_To_v1alpha1_CertificateACMEStatus, - Convert_v1alpha1_CertificateList_To_certmanager_CertificateList, - Convert_certmanager_CertificateList_To_v1alpha1_CertificateList, - Convert_v1alpha1_CertificateSpec_To_certmanager_CertificateSpec, - Convert_certmanager_CertificateSpec_To_v1alpha1_CertificateSpec, - Convert_v1alpha1_CertificateStatus_To_certmanager_CertificateStatus, - Convert_certmanager_CertificateStatus_To_v1alpha1_CertificateStatus, - Convert_v1alpha1_Issuer_To_certmanager_Issuer, - Convert_certmanager_Issuer_To_v1alpha1_Issuer, - Convert_v1alpha1_IssuerList_To_certmanager_IssuerList, - Convert_certmanager_IssuerList_To_v1alpha1_IssuerList, - Convert_v1alpha1_IssuerSpec_To_certmanager_IssuerSpec, - Convert_certmanager_IssuerSpec_To_v1alpha1_IssuerSpec, - Convert_v1alpha1_IssuerStatus_To_certmanager_IssuerStatus, - Convert_certmanager_IssuerStatus_To_v1alpha1_IssuerStatus, - Convert_v1alpha1_LocalObjectReference_To_certmanager_LocalObjectReference, - Convert_certmanager_LocalObjectReference_To_v1alpha1_LocalObjectReference, - Convert_v1alpha1_SecretKeySelector_To_certmanager_SecretKeySelector, - Convert_certmanager_SecretKeySelector_To_v1alpha1_SecretKeySelector, - ) -} - -func autoConvert_v1alpha1_ACMECertificateConfig_To_certmanager_ACMECertificateConfig(in *ACMECertificateConfig, out *certmanager.ACMECertificateConfig, s conversion.Scope) error { - out.Config = *(*[]certmanager.ACMECertificateDomainConfig)(unsafe.Pointer(&in.Config)) - return nil -} - -// Convert_v1alpha1_ACMECertificateConfig_To_certmanager_ACMECertificateConfig is an autogenerated conversion function. -func Convert_v1alpha1_ACMECertificateConfig_To_certmanager_ACMECertificateConfig(in *ACMECertificateConfig, out *certmanager.ACMECertificateConfig, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMECertificateConfig_To_certmanager_ACMECertificateConfig(in, out, s) -} - -func autoConvert_certmanager_ACMECertificateConfig_To_v1alpha1_ACMECertificateConfig(in *certmanager.ACMECertificateConfig, out *ACMECertificateConfig, s conversion.Scope) error { - if in.Config == nil { - out.Config = make([]ACMECertificateDomainConfig, 0) - } else { - out.Config = *(*[]ACMECertificateDomainConfig)(unsafe.Pointer(&in.Config)) - } - return nil -} - -// Convert_certmanager_ACMECertificateConfig_To_v1alpha1_ACMECertificateConfig is an autogenerated conversion function. -func Convert_certmanager_ACMECertificateConfig_To_v1alpha1_ACMECertificateConfig(in *certmanager.ACMECertificateConfig, out *ACMECertificateConfig, s conversion.Scope) error { - return autoConvert_certmanager_ACMECertificateConfig_To_v1alpha1_ACMECertificateConfig(in, out, s) -} - -func autoConvert_v1alpha1_ACMECertificateDNS01Config_To_certmanager_ACMECertificateDNS01Config(in *ACMECertificateDNS01Config, out *certmanager.ACMECertificateDNS01Config, s conversion.Scope) error { - out.Provider = in.Provider - return nil -} - -// Convert_v1alpha1_ACMECertificateDNS01Config_To_certmanager_ACMECertificateDNS01Config is an autogenerated conversion function. -func Convert_v1alpha1_ACMECertificateDNS01Config_To_certmanager_ACMECertificateDNS01Config(in *ACMECertificateDNS01Config, out *certmanager.ACMECertificateDNS01Config, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMECertificateDNS01Config_To_certmanager_ACMECertificateDNS01Config(in, out, s) -} - -func autoConvert_certmanager_ACMECertificateDNS01Config_To_v1alpha1_ACMECertificateDNS01Config(in *certmanager.ACMECertificateDNS01Config, out *ACMECertificateDNS01Config, s conversion.Scope) error { - out.Provider = in.Provider - return nil -} - -// Convert_certmanager_ACMECertificateDNS01Config_To_v1alpha1_ACMECertificateDNS01Config is an autogenerated conversion function. -func Convert_certmanager_ACMECertificateDNS01Config_To_v1alpha1_ACMECertificateDNS01Config(in *certmanager.ACMECertificateDNS01Config, out *ACMECertificateDNS01Config, s conversion.Scope) error { - return autoConvert_certmanager_ACMECertificateDNS01Config_To_v1alpha1_ACMECertificateDNS01Config(in, out, s) -} - -func autoConvert_v1alpha1_ACMECertificateDomainConfig_To_certmanager_ACMECertificateDomainConfig(in *ACMECertificateDomainConfig, out *certmanager.ACMECertificateDomainConfig, s conversion.Scope) error { - out.Domains = *(*[]string)(unsafe.Pointer(&in.Domains)) - out.HTTP01 = (*certmanager.ACMECertificateHTTP01Config)(unsafe.Pointer(in.HTTP01)) - out.DNS01 = (*certmanager.ACMECertificateDNS01Config)(unsafe.Pointer(in.DNS01)) - return nil -} - -// Convert_v1alpha1_ACMECertificateDomainConfig_To_certmanager_ACMECertificateDomainConfig is an autogenerated conversion function. -func Convert_v1alpha1_ACMECertificateDomainConfig_To_certmanager_ACMECertificateDomainConfig(in *ACMECertificateDomainConfig, out *certmanager.ACMECertificateDomainConfig, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMECertificateDomainConfig_To_certmanager_ACMECertificateDomainConfig(in, out, s) -} - -func autoConvert_certmanager_ACMECertificateDomainConfig_To_v1alpha1_ACMECertificateDomainConfig(in *certmanager.ACMECertificateDomainConfig, out *ACMECertificateDomainConfig, s conversion.Scope) error { - if in.Domains == nil { - out.Domains = make([]string, 0) - } else { - out.Domains = *(*[]string)(unsafe.Pointer(&in.Domains)) - } - out.HTTP01 = (*ACMECertificateHTTP01Config)(unsafe.Pointer(in.HTTP01)) - out.DNS01 = (*ACMECertificateDNS01Config)(unsafe.Pointer(in.DNS01)) - return nil -} - -// Convert_certmanager_ACMECertificateDomainConfig_To_v1alpha1_ACMECertificateDomainConfig is an autogenerated conversion function. -func Convert_certmanager_ACMECertificateDomainConfig_To_v1alpha1_ACMECertificateDomainConfig(in *certmanager.ACMECertificateDomainConfig, out *ACMECertificateDomainConfig, s conversion.Scope) error { - return autoConvert_certmanager_ACMECertificateDomainConfig_To_v1alpha1_ACMECertificateDomainConfig(in, out, s) -} - -func autoConvert_v1alpha1_ACMECertificateHTTP01Config_To_certmanager_ACMECertificateHTTP01Config(in *ACMECertificateHTTP01Config, out *certmanager.ACMECertificateHTTP01Config, s conversion.Scope) error { - out.Ingress = in.Ingress - out.IngressClass = (*string)(unsafe.Pointer(in.IngressClass)) - return nil -} - -// Convert_v1alpha1_ACMECertificateHTTP01Config_To_certmanager_ACMECertificateHTTP01Config is an autogenerated conversion function. -func Convert_v1alpha1_ACMECertificateHTTP01Config_To_certmanager_ACMECertificateHTTP01Config(in *ACMECertificateHTTP01Config, out *certmanager.ACMECertificateHTTP01Config, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMECertificateHTTP01Config_To_certmanager_ACMECertificateHTTP01Config(in, out, s) -} - -func autoConvert_certmanager_ACMECertificateHTTP01Config_To_v1alpha1_ACMECertificateHTTP01Config(in *certmanager.ACMECertificateHTTP01Config, out *ACMECertificateHTTP01Config, s conversion.Scope) error { - out.Ingress = in.Ingress - out.IngressClass = (*string)(unsafe.Pointer(in.IngressClass)) - return nil -} - -// Convert_certmanager_ACMECertificateHTTP01Config_To_v1alpha1_ACMECertificateHTTP01Config is an autogenerated conversion function. -func Convert_certmanager_ACMECertificateHTTP01Config_To_v1alpha1_ACMECertificateHTTP01Config(in *certmanager.ACMECertificateHTTP01Config, out *ACMECertificateHTTP01Config, s conversion.Scope) error { - return autoConvert_certmanager_ACMECertificateHTTP01Config_To_v1alpha1_ACMECertificateHTTP01Config(in, out, s) -} - -func autoConvert_v1alpha1_ACMEDomainAuthorization_To_certmanager_ACMEDomainAuthorization(in *ACMEDomainAuthorization, out *certmanager.ACMEDomainAuthorization, s conversion.Scope) error { - out.Domain = in.Domain - out.URI = in.URI - return nil -} - -// Convert_v1alpha1_ACMEDomainAuthorization_To_certmanager_ACMEDomainAuthorization is an autogenerated conversion function. -func Convert_v1alpha1_ACMEDomainAuthorization_To_certmanager_ACMEDomainAuthorization(in *ACMEDomainAuthorization, out *certmanager.ACMEDomainAuthorization, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMEDomainAuthorization_To_certmanager_ACMEDomainAuthorization(in, out, s) -} - -func autoConvert_certmanager_ACMEDomainAuthorization_To_v1alpha1_ACMEDomainAuthorization(in *certmanager.ACMEDomainAuthorization, out *ACMEDomainAuthorization, s conversion.Scope) error { - out.Domain = in.Domain - out.URI = in.URI - return nil -} - -// Convert_certmanager_ACMEDomainAuthorization_To_v1alpha1_ACMEDomainAuthorization is an autogenerated conversion function. -func Convert_certmanager_ACMEDomainAuthorization_To_v1alpha1_ACMEDomainAuthorization(in *certmanager.ACMEDomainAuthorization, out *ACMEDomainAuthorization, s conversion.Scope) error { - return autoConvert_certmanager_ACMEDomainAuthorization_To_v1alpha1_ACMEDomainAuthorization(in, out, s) -} - -func autoConvert_v1alpha1_ACMEIssuer_To_certmanager_ACMEIssuer(in *ACMEIssuer, out *certmanager.ACMEIssuer, s conversion.Scope) error { - out.Email = in.Email - out.Server = in.Server - out.PrivateKey = in.PrivateKey - out.DNS01 = (*certmanager.ACMEIssuerDNS01Config)(unsafe.Pointer(in.DNS01)) - return nil -} - -// Convert_v1alpha1_ACMEIssuer_To_certmanager_ACMEIssuer is an autogenerated conversion function. -func Convert_v1alpha1_ACMEIssuer_To_certmanager_ACMEIssuer(in *ACMEIssuer, out *certmanager.ACMEIssuer, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMEIssuer_To_certmanager_ACMEIssuer(in, out, s) -} - -func autoConvert_certmanager_ACMEIssuer_To_v1alpha1_ACMEIssuer(in *certmanager.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error { - out.Email = in.Email - out.Server = in.Server - out.PrivateKey = in.PrivateKey - out.DNS01 = (*ACMEIssuerDNS01Config)(unsafe.Pointer(in.DNS01)) - return nil -} - -// Convert_certmanager_ACMEIssuer_To_v1alpha1_ACMEIssuer is an autogenerated conversion function. -func Convert_certmanager_ACMEIssuer_To_v1alpha1_ACMEIssuer(in *certmanager.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error { - return autoConvert_certmanager_ACMEIssuer_To_v1alpha1_ACMEIssuer(in, out, s) -} - -func autoConvert_v1alpha1_ACMEIssuerDNS01Config_To_certmanager_ACMEIssuerDNS01Config(in *ACMEIssuerDNS01Config, out *certmanager.ACMEIssuerDNS01Config, s conversion.Scope) error { - out.Providers = *(*[]certmanager.ACMEIssuerDNS01Provider)(unsafe.Pointer(&in.Providers)) - return nil -} - -// Convert_v1alpha1_ACMEIssuerDNS01Config_To_certmanager_ACMEIssuerDNS01Config is an autogenerated conversion function. -func Convert_v1alpha1_ACMEIssuerDNS01Config_To_certmanager_ACMEIssuerDNS01Config(in *ACMEIssuerDNS01Config, out *certmanager.ACMEIssuerDNS01Config, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMEIssuerDNS01Config_To_certmanager_ACMEIssuerDNS01Config(in, out, s) -} - -func autoConvert_certmanager_ACMEIssuerDNS01Config_To_v1alpha1_ACMEIssuerDNS01Config(in *certmanager.ACMEIssuerDNS01Config, out *ACMEIssuerDNS01Config, s conversion.Scope) error { - if in.Providers == nil { - out.Providers = make([]ACMEIssuerDNS01Provider, 0) - } else { - out.Providers = *(*[]ACMEIssuerDNS01Provider)(unsafe.Pointer(&in.Providers)) - } - return nil -} - -// Convert_certmanager_ACMEIssuerDNS01Config_To_v1alpha1_ACMEIssuerDNS01Config is an autogenerated conversion function. -func Convert_certmanager_ACMEIssuerDNS01Config_To_v1alpha1_ACMEIssuerDNS01Config(in *certmanager.ACMEIssuerDNS01Config, out *ACMEIssuerDNS01Config, s conversion.Scope) error { - return autoConvert_certmanager_ACMEIssuerDNS01Config_To_v1alpha1_ACMEIssuerDNS01Config(in, out, s) -} - -func autoConvert_v1alpha1_ACMEIssuerDNS01Provider_To_certmanager_ACMEIssuerDNS01Provider(in *ACMEIssuerDNS01Provider, out *certmanager.ACMEIssuerDNS01Provider, s conversion.Scope) error { - out.Name = in.Name - out.CloudDNS = (*certmanager.ACMEIssuerDNS01ProviderCloudDNS)(unsafe.Pointer(in.CloudDNS)) - out.Cloudflare = (*certmanager.ACMEIssuerDNS01ProviderCloudflare)(unsafe.Pointer(in.Cloudflare)) - out.Route53 = (*certmanager.ACMEIssuerDNS01ProviderRoute53)(unsafe.Pointer(in.Route53)) - return nil -} - -// Convert_v1alpha1_ACMEIssuerDNS01Provider_To_certmanager_ACMEIssuerDNS01Provider is an autogenerated conversion function. -func Convert_v1alpha1_ACMEIssuerDNS01Provider_To_certmanager_ACMEIssuerDNS01Provider(in *ACMEIssuerDNS01Provider, out *certmanager.ACMEIssuerDNS01Provider, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMEIssuerDNS01Provider_To_certmanager_ACMEIssuerDNS01Provider(in, out, s) -} - -func autoConvert_certmanager_ACMEIssuerDNS01Provider_To_v1alpha1_ACMEIssuerDNS01Provider(in *certmanager.ACMEIssuerDNS01Provider, out *ACMEIssuerDNS01Provider, s conversion.Scope) error { - out.Name = in.Name - out.CloudDNS = (*ACMEIssuerDNS01ProviderCloudDNS)(unsafe.Pointer(in.CloudDNS)) - out.Cloudflare = (*ACMEIssuerDNS01ProviderCloudflare)(unsafe.Pointer(in.Cloudflare)) - out.Route53 = (*ACMEIssuerDNS01ProviderRoute53)(unsafe.Pointer(in.Route53)) - return nil -} - -// Convert_certmanager_ACMEIssuerDNS01Provider_To_v1alpha1_ACMEIssuerDNS01Provider is an autogenerated conversion function. -func Convert_certmanager_ACMEIssuerDNS01Provider_To_v1alpha1_ACMEIssuerDNS01Provider(in *certmanager.ACMEIssuerDNS01Provider, out *ACMEIssuerDNS01Provider, s conversion.Scope) error { - return autoConvert_certmanager_ACMEIssuerDNS01Provider_To_v1alpha1_ACMEIssuerDNS01Provider(in, out, s) -} - -func autoConvert_v1alpha1_ACMEIssuerDNS01ProviderCloudDNS_To_certmanager_ACMEIssuerDNS01ProviderCloudDNS(in *ACMEIssuerDNS01ProviderCloudDNS, out *certmanager.ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - if err := Convert_v1alpha1_SecretKeySelector_To_certmanager_SecretKeySelector(&in.ServiceAccount, &out.ServiceAccount, s); err != nil { - return err - } - out.Project = in.Project - return nil -} - -// Convert_v1alpha1_ACMEIssuerDNS01ProviderCloudDNS_To_certmanager_ACMEIssuerDNS01ProviderCloudDNS is an autogenerated conversion function. -func Convert_v1alpha1_ACMEIssuerDNS01ProviderCloudDNS_To_certmanager_ACMEIssuerDNS01ProviderCloudDNS(in *ACMEIssuerDNS01ProviderCloudDNS, out *certmanager.ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMEIssuerDNS01ProviderCloudDNS_To_certmanager_ACMEIssuerDNS01ProviderCloudDNS(in, out, s) -} - -func autoConvert_certmanager_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha1_ACMEIssuerDNS01ProviderCloudDNS(in *certmanager.ACMEIssuerDNS01ProviderCloudDNS, out *ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - if err := Convert_certmanager_SecretKeySelector_To_v1alpha1_SecretKeySelector(&in.ServiceAccount, &out.ServiceAccount, s); err != nil { - return err - } - out.Project = in.Project - return nil -} - -// Convert_certmanager_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha1_ACMEIssuerDNS01ProviderCloudDNS is an autogenerated conversion function. -func Convert_certmanager_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha1_ACMEIssuerDNS01ProviderCloudDNS(in *certmanager.ACMEIssuerDNS01ProviderCloudDNS, out *ACMEIssuerDNS01ProviderCloudDNS, s conversion.Scope) error { - return autoConvert_certmanager_ACMEIssuerDNS01ProviderCloudDNS_To_v1alpha1_ACMEIssuerDNS01ProviderCloudDNS(in, out, s) -} - -func autoConvert_v1alpha1_ACMEIssuerDNS01ProviderCloudflare_To_certmanager_ACMEIssuerDNS01ProviderCloudflare(in *ACMEIssuerDNS01ProviderCloudflare, out *certmanager.ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - out.Email = in.Email - if err := Convert_v1alpha1_SecretKeySelector_To_certmanager_SecretKeySelector(&in.APIKey, &out.APIKey, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_ACMEIssuerDNS01ProviderCloudflare_To_certmanager_ACMEIssuerDNS01ProviderCloudflare is an autogenerated conversion function. -func Convert_v1alpha1_ACMEIssuerDNS01ProviderCloudflare_To_certmanager_ACMEIssuerDNS01ProviderCloudflare(in *ACMEIssuerDNS01ProviderCloudflare, out *certmanager.ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMEIssuerDNS01ProviderCloudflare_To_certmanager_ACMEIssuerDNS01ProviderCloudflare(in, out, s) -} - -func autoConvert_certmanager_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha1_ACMEIssuerDNS01ProviderCloudflare(in *certmanager.ACMEIssuerDNS01ProviderCloudflare, out *ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - out.Email = in.Email - if err := Convert_certmanager_SecretKeySelector_To_v1alpha1_SecretKeySelector(&in.APIKey, &out.APIKey, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha1_ACMEIssuerDNS01ProviderCloudflare is an autogenerated conversion function. -func Convert_certmanager_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha1_ACMEIssuerDNS01ProviderCloudflare(in *certmanager.ACMEIssuerDNS01ProviderCloudflare, out *ACMEIssuerDNS01ProviderCloudflare, s conversion.Scope) error { - return autoConvert_certmanager_ACMEIssuerDNS01ProviderCloudflare_To_v1alpha1_ACMEIssuerDNS01ProviderCloudflare(in, out, s) -} - -func autoConvert_v1alpha1_ACMEIssuerDNS01ProviderRoute53_To_certmanager_ACMEIssuerDNS01ProviderRoute53(in *ACMEIssuerDNS01ProviderRoute53, out *certmanager.ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - out.AccessKeyID = in.AccessKeyID - if err := Convert_v1alpha1_SecretKeySelector_To_certmanager_SecretKeySelector(&in.SecretAccessKey, &out.SecretAccessKey, s); err != nil { - return err - } - out.HostedZoneID = in.HostedZoneID - out.Region = in.Region - return nil -} - -// Convert_v1alpha1_ACMEIssuerDNS01ProviderRoute53_To_certmanager_ACMEIssuerDNS01ProviderRoute53 is an autogenerated conversion function. -func Convert_v1alpha1_ACMEIssuerDNS01ProviderRoute53_To_certmanager_ACMEIssuerDNS01ProviderRoute53(in *ACMEIssuerDNS01ProviderRoute53, out *certmanager.ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMEIssuerDNS01ProviderRoute53_To_certmanager_ACMEIssuerDNS01ProviderRoute53(in, out, s) -} - -func autoConvert_certmanager_ACMEIssuerDNS01ProviderRoute53_To_v1alpha1_ACMEIssuerDNS01ProviderRoute53(in *certmanager.ACMEIssuerDNS01ProviderRoute53, out *ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - out.AccessKeyID = in.AccessKeyID - if err := Convert_certmanager_SecretKeySelector_To_v1alpha1_SecretKeySelector(&in.SecretAccessKey, &out.SecretAccessKey, s); err != nil { - return err - } - out.HostedZoneID = in.HostedZoneID - out.Region = in.Region - return nil -} - -// Convert_certmanager_ACMEIssuerDNS01ProviderRoute53_To_v1alpha1_ACMEIssuerDNS01ProviderRoute53 is an autogenerated conversion function. -func Convert_certmanager_ACMEIssuerDNS01ProviderRoute53_To_v1alpha1_ACMEIssuerDNS01ProviderRoute53(in *certmanager.ACMEIssuerDNS01ProviderRoute53, out *ACMEIssuerDNS01ProviderRoute53, s conversion.Scope) error { - return autoConvert_certmanager_ACMEIssuerDNS01ProviderRoute53_To_v1alpha1_ACMEIssuerDNS01ProviderRoute53(in, out, s) -} - -func autoConvert_v1alpha1_ACMEIssuerStatus_To_certmanager_ACMEIssuerStatus(in *ACMEIssuerStatus, out *certmanager.ACMEIssuerStatus, s conversion.Scope) error { - out.URI = in.URI - return nil -} - -// Convert_v1alpha1_ACMEIssuerStatus_To_certmanager_ACMEIssuerStatus is an autogenerated conversion function. -func Convert_v1alpha1_ACMEIssuerStatus_To_certmanager_ACMEIssuerStatus(in *ACMEIssuerStatus, out *certmanager.ACMEIssuerStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_ACMEIssuerStatus_To_certmanager_ACMEIssuerStatus(in, out, s) -} - -func autoConvert_certmanager_ACMEIssuerStatus_To_v1alpha1_ACMEIssuerStatus(in *certmanager.ACMEIssuerStatus, out *ACMEIssuerStatus, s conversion.Scope) error { - out.URI = in.URI - return nil -} - -// Convert_certmanager_ACMEIssuerStatus_To_v1alpha1_ACMEIssuerStatus is an autogenerated conversion function. -func Convert_certmanager_ACMEIssuerStatus_To_v1alpha1_ACMEIssuerStatus(in *certmanager.ACMEIssuerStatus, out *ACMEIssuerStatus, s conversion.Scope) error { - return autoConvert_certmanager_ACMEIssuerStatus_To_v1alpha1_ACMEIssuerStatus(in, out, s) -} - -func autoConvert_v1alpha1_Certificate_To_certmanager_Certificate(in *Certificate, out *certmanager.Certificate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_CertificateSpec_To_certmanager_CertificateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_CertificateStatus_To_certmanager_CertificateStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_Certificate_To_certmanager_Certificate is an autogenerated conversion function. -func Convert_v1alpha1_Certificate_To_certmanager_Certificate(in *Certificate, out *certmanager.Certificate, s conversion.Scope) error { - return autoConvert_v1alpha1_Certificate_To_certmanager_Certificate(in, out, s) -} - -func autoConvert_certmanager_Certificate_To_v1alpha1_Certificate(in *certmanager.Certificate, out *Certificate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_CertificateSpec_To_v1alpha1_CertificateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_CertificateStatus_To_v1alpha1_CertificateStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_Certificate_To_v1alpha1_Certificate is an autogenerated conversion function. -func Convert_certmanager_Certificate_To_v1alpha1_Certificate(in *certmanager.Certificate, out *Certificate, s conversion.Scope) error { - return autoConvert_certmanager_Certificate_To_v1alpha1_Certificate(in, out, s) -} - -func autoConvert_v1alpha1_CertificateACMEStatus_To_certmanager_CertificateACMEStatus(in *CertificateACMEStatus, out *certmanager.CertificateACMEStatus, s conversion.Scope) error { - out.Authorizations = *(*[]certmanager.ACMEDomainAuthorization)(unsafe.Pointer(&in.Authorizations)) - return nil -} - -// Convert_v1alpha1_CertificateACMEStatus_To_certmanager_CertificateACMEStatus is an autogenerated conversion function. -func Convert_v1alpha1_CertificateACMEStatus_To_certmanager_CertificateACMEStatus(in *CertificateACMEStatus, out *certmanager.CertificateACMEStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateACMEStatus_To_certmanager_CertificateACMEStatus(in, out, s) -} - -func autoConvert_certmanager_CertificateACMEStatus_To_v1alpha1_CertificateACMEStatus(in *certmanager.CertificateACMEStatus, out *CertificateACMEStatus, s conversion.Scope) error { - if in.Authorizations == nil { - out.Authorizations = make([]ACMEDomainAuthorization, 0) - } else { - out.Authorizations = *(*[]ACMEDomainAuthorization)(unsafe.Pointer(&in.Authorizations)) - } - return nil -} - -// Convert_certmanager_CertificateACMEStatus_To_v1alpha1_CertificateACMEStatus is an autogenerated conversion function. -func Convert_certmanager_CertificateACMEStatus_To_v1alpha1_CertificateACMEStatus(in *certmanager.CertificateACMEStatus, out *CertificateACMEStatus, s conversion.Scope) error { - return autoConvert_certmanager_CertificateACMEStatus_To_v1alpha1_CertificateACMEStatus(in, out, s) -} - -func autoConvert_v1alpha1_CertificateList_To_certmanager_CertificateList(in *CertificateList, out *certmanager.CertificateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]certmanager.Certificate)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_CertificateList_To_certmanager_CertificateList is an autogenerated conversion function. -func Convert_v1alpha1_CertificateList_To_certmanager_CertificateList(in *CertificateList, out *certmanager.CertificateList, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateList_To_certmanager_CertificateList(in, out, s) -} - -func autoConvert_certmanager_CertificateList_To_v1alpha1_CertificateList(in *certmanager.CertificateList, out *CertificateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items == nil { - out.Items = make([]Certificate, 0) - } else { - out.Items = *(*[]Certificate)(unsafe.Pointer(&in.Items)) - } - return nil -} - -// Convert_certmanager_CertificateList_To_v1alpha1_CertificateList is an autogenerated conversion function. -func Convert_certmanager_CertificateList_To_v1alpha1_CertificateList(in *certmanager.CertificateList, out *CertificateList, s conversion.Scope) error { - return autoConvert_certmanager_CertificateList_To_v1alpha1_CertificateList(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSpec_To_certmanager_CertificateSpec(in *CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error { - out.Domains = *(*[]string)(unsafe.Pointer(&in.Domains)) - out.SecretName = in.SecretName - out.Issuer = in.Issuer - out.ACME = (*certmanager.ACMECertificateConfig)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_v1alpha1_CertificateSpec_To_certmanager_CertificateSpec is an autogenerated conversion function. -func Convert_v1alpha1_CertificateSpec_To_certmanager_CertificateSpec(in *CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSpec_To_certmanager_CertificateSpec(in, out, s) -} - -func autoConvert_certmanager_CertificateSpec_To_v1alpha1_CertificateSpec(in *certmanager.CertificateSpec, out *CertificateSpec, s conversion.Scope) error { - if in.Domains == nil { - out.Domains = make([]string, 0) - } else { - out.Domains = *(*[]string)(unsafe.Pointer(&in.Domains)) - } - out.SecretName = in.SecretName - out.Issuer = in.Issuer - out.ACME = (*ACMECertificateConfig)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_certmanager_CertificateSpec_To_v1alpha1_CertificateSpec is an autogenerated conversion function. -func Convert_certmanager_CertificateSpec_To_v1alpha1_CertificateSpec(in *certmanager.CertificateSpec, out *CertificateSpec, s conversion.Scope) error { - return autoConvert_certmanager_CertificateSpec_To_v1alpha1_CertificateSpec(in, out, s) -} - -func autoConvert_v1alpha1_CertificateStatus_To_certmanager_CertificateStatus(in *CertificateStatus, out *certmanager.CertificateStatus, s conversion.Scope) error { - out.ACME = (*certmanager.CertificateACMEStatus)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_v1alpha1_CertificateStatus_To_certmanager_CertificateStatus is an autogenerated conversion function. -func Convert_v1alpha1_CertificateStatus_To_certmanager_CertificateStatus(in *CertificateStatus, out *certmanager.CertificateStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateStatus_To_certmanager_CertificateStatus(in, out, s) -} - -func autoConvert_certmanager_CertificateStatus_To_v1alpha1_CertificateStatus(in *certmanager.CertificateStatus, out *CertificateStatus, s conversion.Scope) error { - out.ACME = (*CertificateACMEStatus)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_certmanager_CertificateStatus_To_v1alpha1_CertificateStatus is an autogenerated conversion function. -func Convert_certmanager_CertificateStatus_To_v1alpha1_CertificateStatus(in *certmanager.CertificateStatus, out *CertificateStatus, s conversion.Scope) error { - return autoConvert_certmanager_CertificateStatus_To_v1alpha1_CertificateStatus(in, out, s) -} - -func autoConvert_v1alpha1_Issuer_To_certmanager_Issuer(in *Issuer, out *certmanager.Issuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_IssuerSpec_To_certmanager_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_IssuerStatus_To_certmanager_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_Issuer_To_certmanager_Issuer is an autogenerated conversion function. -func Convert_v1alpha1_Issuer_To_certmanager_Issuer(in *Issuer, out *certmanager.Issuer, s conversion.Scope) error { - return autoConvert_v1alpha1_Issuer_To_certmanager_Issuer(in, out, s) -} - -func autoConvert_certmanager_Issuer_To_v1alpha1_Issuer(in *certmanager.Issuer, out *Issuer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_certmanager_IssuerSpec_To_v1alpha1_IssuerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certmanager_IssuerStatus_To_v1alpha1_IssuerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_certmanager_Issuer_To_v1alpha1_Issuer is an autogenerated conversion function. -func Convert_certmanager_Issuer_To_v1alpha1_Issuer(in *certmanager.Issuer, out *Issuer, s conversion.Scope) error { - return autoConvert_certmanager_Issuer_To_v1alpha1_Issuer(in, out, s) -} - -func autoConvert_v1alpha1_IssuerList_To_certmanager_IssuerList(in *IssuerList, out *certmanager.IssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]certmanager.Issuer)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_IssuerList_To_certmanager_IssuerList is an autogenerated conversion function. -func Convert_v1alpha1_IssuerList_To_certmanager_IssuerList(in *IssuerList, out *certmanager.IssuerList, s conversion.Scope) error { - return autoConvert_v1alpha1_IssuerList_To_certmanager_IssuerList(in, out, s) -} - -func autoConvert_certmanager_IssuerList_To_v1alpha1_IssuerList(in *certmanager.IssuerList, out *IssuerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items == nil { - out.Items = make([]Issuer, 0) - } else { - out.Items = *(*[]Issuer)(unsafe.Pointer(&in.Items)) - } - return nil -} - -// Convert_certmanager_IssuerList_To_v1alpha1_IssuerList is an autogenerated conversion function. -func Convert_certmanager_IssuerList_To_v1alpha1_IssuerList(in *certmanager.IssuerList, out *IssuerList, s conversion.Scope) error { - return autoConvert_certmanager_IssuerList_To_v1alpha1_IssuerList(in, out, s) -} - -func autoConvert_v1alpha1_IssuerSpec_To_certmanager_IssuerSpec(in *IssuerSpec, out *certmanager.IssuerSpec, s conversion.Scope) error { - out.ACME = (*certmanager.ACMEIssuer)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_v1alpha1_IssuerSpec_To_certmanager_IssuerSpec is an autogenerated conversion function. -func Convert_v1alpha1_IssuerSpec_To_certmanager_IssuerSpec(in *IssuerSpec, out *certmanager.IssuerSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_IssuerSpec_To_certmanager_IssuerSpec(in, out, s) -} - -func autoConvert_certmanager_IssuerSpec_To_v1alpha1_IssuerSpec(in *certmanager.IssuerSpec, out *IssuerSpec, s conversion.Scope) error { - out.ACME = (*ACMEIssuer)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_certmanager_IssuerSpec_To_v1alpha1_IssuerSpec is an autogenerated conversion function. -func Convert_certmanager_IssuerSpec_To_v1alpha1_IssuerSpec(in *certmanager.IssuerSpec, out *IssuerSpec, s conversion.Scope) error { - return autoConvert_certmanager_IssuerSpec_To_v1alpha1_IssuerSpec(in, out, s) -} - -func autoConvert_v1alpha1_IssuerStatus_To_certmanager_IssuerStatus(in *IssuerStatus, out *certmanager.IssuerStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.ACME = (*certmanager.ACMEIssuerStatus)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_v1alpha1_IssuerStatus_To_certmanager_IssuerStatus is an autogenerated conversion function. -func Convert_v1alpha1_IssuerStatus_To_certmanager_IssuerStatus(in *IssuerStatus, out *certmanager.IssuerStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_IssuerStatus_To_certmanager_IssuerStatus(in, out, s) -} - -func autoConvert_certmanager_IssuerStatus_To_v1alpha1_IssuerStatus(in *certmanager.IssuerStatus, out *IssuerStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.ACME = (*ACMEIssuerStatus)(unsafe.Pointer(in.ACME)) - return nil -} - -// Convert_certmanager_IssuerStatus_To_v1alpha1_IssuerStatus is an autogenerated conversion function. -func Convert_certmanager_IssuerStatus_To_v1alpha1_IssuerStatus(in *certmanager.IssuerStatus, out *IssuerStatus, s conversion.Scope) error { - return autoConvert_certmanager_IssuerStatus_To_v1alpha1_IssuerStatus(in, out, s) -} - -func autoConvert_v1alpha1_LocalObjectReference_To_certmanager_LocalObjectReference(in *LocalObjectReference, out *certmanager.LocalObjectReference, s conversion.Scope) error { - out.Name = in.Name - return nil -} - -// Convert_v1alpha1_LocalObjectReference_To_certmanager_LocalObjectReference is an autogenerated conversion function. -func Convert_v1alpha1_LocalObjectReference_To_certmanager_LocalObjectReference(in *LocalObjectReference, out *certmanager.LocalObjectReference, s conversion.Scope) error { - return autoConvert_v1alpha1_LocalObjectReference_To_certmanager_LocalObjectReference(in, out, s) -} - -func autoConvert_certmanager_LocalObjectReference_To_v1alpha1_LocalObjectReference(in *certmanager.LocalObjectReference, out *LocalObjectReference, s conversion.Scope) error { - out.Name = in.Name - return nil -} - -// Convert_certmanager_LocalObjectReference_To_v1alpha1_LocalObjectReference is an autogenerated conversion function. -func Convert_certmanager_LocalObjectReference_To_v1alpha1_LocalObjectReference(in *certmanager.LocalObjectReference, out *LocalObjectReference, s conversion.Scope) error { - return autoConvert_certmanager_LocalObjectReference_To_v1alpha1_LocalObjectReference(in, out, s) -} - -func autoConvert_v1alpha1_SecretKeySelector_To_certmanager_SecretKeySelector(in *SecretKeySelector, out *certmanager.SecretKeySelector, s conversion.Scope) error { - if err := Convert_v1alpha1_LocalObjectReference_To_certmanager_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { - return err - } - out.Key = in.Key - return nil -} - -// Convert_v1alpha1_SecretKeySelector_To_certmanager_SecretKeySelector is an autogenerated conversion function. -func Convert_v1alpha1_SecretKeySelector_To_certmanager_SecretKeySelector(in *SecretKeySelector, out *certmanager.SecretKeySelector, s conversion.Scope) error { - return autoConvert_v1alpha1_SecretKeySelector_To_certmanager_SecretKeySelector(in, out, s) -} - -func autoConvert_certmanager_SecretKeySelector_To_v1alpha1_SecretKeySelector(in *certmanager.SecretKeySelector, out *SecretKeySelector, s conversion.Scope) error { - if err := Convert_certmanager_LocalObjectReference_To_v1alpha1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { - return err - } - out.Key = in.Key - return nil -} - -// Convert_certmanager_SecretKeySelector_To_v1alpha1_SecretKeySelector is an autogenerated conversion function. -func Convert_certmanager_SecretKeySelector_To_v1alpha1_SecretKeySelector(in *certmanager.SecretKeySelector, out *SecretKeySelector, s conversion.Scope) error { - return autoConvert_certmanager_SecretKeySelector_To_v1alpha1_SecretKeySelector(in, out, s) -} diff --git a/pkg/apis/certmanager/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/certmanager/v1alpha1/zz_generated.deepcopy.go index 543d40e43..a8d5ac9c7 100644 --- a/pkg/apis/certmanager/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/certmanager/v1alpha1/zz_generated.deepcopy.go @@ -26,13 +26,14 @@ import ( reflect "reflect" ) -// Deprecated: register deep-copy functions. func init() { SchemeBuilder.Register(RegisterDeepCopies) } -// Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // to allow building arbitrary schemes. +// +// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented. func RegisterDeepCopies(scheme *runtime.Scheme) error { return scheme.AddGeneratedDeepCopyFuncs( conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { @@ -143,13 +144,13 @@ func (in *ACMECertificateConfig) DeepCopyInto(out *ACMECertificateConfig) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateConfig. -func (x *ACMECertificateConfig) DeepCopy() *ACMECertificateConfig { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateConfig. +func (in *ACMECertificateConfig) DeepCopy() *ACMECertificateConfig { + if in == nil { return nil } out := new(ACMECertificateConfig) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -159,13 +160,13 @@ func (in *ACMECertificateDNS01Config) DeepCopyInto(out *ACMECertificateDNS01Conf return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateDNS01Config. -func (x *ACMECertificateDNS01Config) DeepCopy() *ACMECertificateDNS01Config { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateDNS01Config. +func (in *ACMECertificateDNS01Config) DeepCopy() *ACMECertificateDNS01Config { + if in == nil { return nil } out := new(ACMECertificateDNS01Config) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -198,13 +199,13 @@ func (in *ACMECertificateDomainConfig) DeepCopyInto(out *ACMECertificateDomainCo return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateDomainConfig. -func (x *ACMECertificateDomainConfig) DeepCopy() *ACMECertificateDomainConfig { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateDomainConfig. +func (in *ACMECertificateDomainConfig) DeepCopy() *ACMECertificateDomainConfig { + if in == nil { return nil } out := new(ACMECertificateDomainConfig) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -223,13 +224,13 @@ func (in *ACMECertificateHTTP01Config) DeepCopyInto(out *ACMECertificateHTTP01Co return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateHTTP01Config. -func (x *ACMECertificateHTTP01Config) DeepCopy() *ACMECertificateHTTP01Config { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateHTTP01Config. +func (in *ACMECertificateHTTP01Config) DeepCopy() *ACMECertificateHTTP01Config { + if in == nil { return nil } out := new(ACMECertificateHTTP01Config) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -239,13 +240,13 @@ func (in *ACMEDomainAuthorization) DeepCopyInto(out *ACMEDomainAuthorization) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEDomainAuthorization. -func (x *ACMEDomainAuthorization) DeepCopy() *ACMEDomainAuthorization { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEDomainAuthorization. +func (in *ACMEDomainAuthorization) DeepCopy() *ACMEDomainAuthorization { + if in == nil { return nil } out := new(ACMEDomainAuthorization) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -264,13 +265,13 @@ func (in *ACMEIssuer) DeepCopyInto(out *ACMEIssuer) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuer. -func (x *ACMEIssuer) DeepCopy() *ACMEIssuer { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuer. +func (in *ACMEIssuer) DeepCopy() *ACMEIssuer { + if in == nil { return nil } out := new(ACMEIssuer) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -287,13 +288,13 @@ func (in *ACMEIssuerDNS01Config) DeepCopyInto(out *ACMEIssuerDNS01Config) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01Config. -func (x *ACMEIssuerDNS01Config) DeepCopy() *ACMEIssuerDNS01Config { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01Config. +func (in *ACMEIssuerDNS01Config) DeepCopy() *ACMEIssuerDNS01Config { + if in == nil { return nil } out := new(ACMEIssuerDNS01Config) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -330,13 +331,13 @@ func (in *ACMEIssuerDNS01Provider) DeepCopyInto(out *ACMEIssuerDNS01Provider) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01Provider. -func (x *ACMEIssuerDNS01Provider) DeepCopy() *ACMEIssuerDNS01Provider { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01Provider. +func (in *ACMEIssuerDNS01Provider) DeepCopy() *ACMEIssuerDNS01Provider { + if in == nil { return nil } out := new(ACMEIssuerDNS01Provider) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -347,13 +348,13 @@ func (in *ACMEIssuerDNS01ProviderCloudDNS) DeepCopyInto(out *ACMEIssuerDNS01Prov return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudDNS. -func (x *ACMEIssuerDNS01ProviderCloudDNS) DeepCopy() *ACMEIssuerDNS01ProviderCloudDNS { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudDNS. +func (in *ACMEIssuerDNS01ProviderCloudDNS) DeepCopy() *ACMEIssuerDNS01ProviderCloudDNS { + if in == nil { return nil } out := new(ACMEIssuerDNS01ProviderCloudDNS) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -364,13 +365,13 @@ func (in *ACMEIssuerDNS01ProviderCloudflare) DeepCopyInto(out *ACMEIssuerDNS01Pr return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudflare. -func (x *ACMEIssuerDNS01ProviderCloudflare) DeepCopy() *ACMEIssuerDNS01ProviderCloudflare { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudflare. +func (in *ACMEIssuerDNS01ProviderCloudflare) DeepCopy() *ACMEIssuerDNS01ProviderCloudflare { + if in == nil { return nil } out := new(ACMEIssuerDNS01ProviderCloudflare) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -397,13 +398,13 @@ func (in *ACMEIssuerStatus) DeepCopyInto(out *ACMEIssuerStatus) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerStatus. -func (x *ACMEIssuerStatus) DeepCopy() *ACMEIssuerStatus { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerStatus. +func (in *ACMEIssuerStatus) DeepCopy() *ACMEIssuerStatus { + if in == nil { return nil } out := new(ACMEIssuerStatus) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -417,19 +418,19 @@ func (in *Certificate) DeepCopyInto(out *Certificate) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Certificate. -func (x *Certificate) DeepCopy() *Certificate { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Certificate. +func (in *Certificate) DeepCopy() *Certificate { + if in == nil { return nil } out := new(Certificate) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (x *Certificate) DeepCopyObject() runtime.Object { - if c := x.DeepCopy(); c != nil { +func (in *Certificate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { return c } else { return nil @@ -447,13 +448,13 @@ func (in *CertificateACMEStatus) DeepCopyInto(out *CertificateACMEStatus) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new CertificateACMEStatus. -func (x *CertificateACMEStatus) DeepCopy() *CertificateACMEStatus { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateACMEStatus. +func (in *CertificateACMEStatus) DeepCopy() *CertificateACMEStatus { + if in == nil { return nil } out := new(CertificateACMEStatus) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -472,19 +473,19 @@ func (in *CertificateList) DeepCopyInto(out *CertificateList) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new CertificateList. -func (x *CertificateList) DeepCopy() *CertificateList { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateList. +func (in *CertificateList) DeepCopy() *CertificateList { + if in == nil { return nil } out := new(CertificateList) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (x *CertificateList) DeepCopyObject() runtime.Object { - if c := x.DeepCopy(); c != nil { +func (in *CertificateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { return c } else { return nil @@ -511,13 +512,13 @@ func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSpec. -func (x *CertificateSpec) DeepCopy() *CertificateSpec { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSpec. +func (in *CertificateSpec) DeepCopy() *CertificateSpec { + if in == nil { return nil } out := new(CertificateSpec) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -536,13 +537,13 @@ func (in *CertificateStatus) DeepCopyInto(out *CertificateStatus) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new CertificateStatus. -func (x *CertificateStatus) DeepCopy() *CertificateStatus { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateStatus. +func (in *CertificateStatus) DeepCopy() *CertificateStatus { + if in == nil { return nil } out := new(CertificateStatus) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -556,19 +557,19 @@ func (in *Issuer) DeepCopyInto(out *Issuer) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Issuer. -func (x *Issuer) DeepCopy() *Issuer { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Issuer. +func (in *Issuer) DeepCopy() *Issuer { + if in == nil { return nil } out := new(Issuer) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (x *Issuer) DeepCopyObject() runtime.Object { - if c := x.DeepCopy(); c != nil { +func (in *Issuer) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { return c } else { return nil @@ -590,19 +591,19 @@ func (in *IssuerList) DeepCopyInto(out *IssuerList) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new IssuerList. -func (x *IssuerList) DeepCopy() *IssuerList { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerList. +func (in *IssuerList) DeepCopy() *IssuerList { + if in == nil { return nil } out := new(IssuerList) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (x *IssuerList) DeepCopyObject() runtime.Object { - if c := x.DeepCopy(); c != nil { +func (in *IssuerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { return c } else { return nil @@ -624,13 +625,13 @@ func (in *IssuerSpec) DeepCopyInto(out *IssuerSpec) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new IssuerSpec. -func (x *IssuerSpec) DeepCopy() *IssuerSpec { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerSpec. +func (in *IssuerSpec) DeepCopy() *IssuerSpec { + if in == nil { return nil } out := new(IssuerSpec) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -649,13 +650,13 @@ func (in *IssuerStatus) DeepCopyInto(out *IssuerStatus) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new IssuerStatus. -func (x *IssuerStatus) DeepCopy() *IssuerStatus { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerStatus. +func (in *IssuerStatus) DeepCopy() *IssuerStatus { + if in == nil { return nil } out := new(IssuerStatus) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -665,13 +666,13 @@ func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference. -func (x *LocalObjectReference) DeepCopy() *LocalObjectReference { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference. +func (in *LocalObjectReference) DeepCopy() *LocalObjectReference { + if in == nil { return nil } out := new(LocalObjectReference) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } @@ -682,12 +683,12 @@ func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector) { return } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector. -func (x *SecretKeySelector) DeepCopy() *SecretKeySelector { - if x == nil { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector. +func (in *SecretKeySelector) DeepCopy() *SecretKeySelector { + if in == nil { return nil } out := new(SecretKeySelector) - x.DeepCopyInto(out) + in.DeepCopyInto(out) return out } diff --git a/pkg/apis/certmanager/zz_generated.deepcopy.go b/pkg/apis/certmanager/zz_generated.deepcopy.go deleted file mode 100644 index eaffc9c19..000000000 --- a/pkg/apis/certmanager/zz_generated.deepcopy.go +++ /dev/null @@ -1,693 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2017 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. -*/ - -// This file was autogenerated by deepcopy-gen. Do not edit it manually! - -package certmanager - -import ( - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - reflect "reflect" -) - -// Deprecated: register deep-copy functions. -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMECertificateConfig).DeepCopyInto(out.(*ACMECertificateConfig)) - return nil - }, InType: reflect.TypeOf(&ACMECertificateConfig{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMECertificateDNS01Config).DeepCopyInto(out.(*ACMECertificateDNS01Config)) - return nil - }, InType: reflect.TypeOf(&ACMECertificateDNS01Config{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMECertificateDomainConfig).DeepCopyInto(out.(*ACMECertificateDomainConfig)) - return nil - }, InType: reflect.TypeOf(&ACMECertificateDomainConfig{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMECertificateHTTP01Config).DeepCopyInto(out.(*ACMECertificateHTTP01Config)) - return nil - }, InType: reflect.TypeOf(&ACMECertificateHTTP01Config{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMEDomainAuthorization).DeepCopyInto(out.(*ACMEDomainAuthorization)) - return nil - }, InType: reflect.TypeOf(&ACMEDomainAuthorization{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMEIssuer).DeepCopyInto(out.(*ACMEIssuer)) - return nil - }, InType: reflect.TypeOf(&ACMEIssuer{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMEIssuerDNS01Config).DeepCopyInto(out.(*ACMEIssuerDNS01Config)) - return nil - }, InType: reflect.TypeOf(&ACMEIssuerDNS01Config{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMEIssuerDNS01Provider).DeepCopyInto(out.(*ACMEIssuerDNS01Provider)) - return nil - }, InType: reflect.TypeOf(&ACMEIssuerDNS01Provider{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMEIssuerDNS01ProviderCloudDNS).DeepCopyInto(out.(*ACMEIssuerDNS01ProviderCloudDNS)) - return nil - }, InType: reflect.TypeOf(&ACMEIssuerDNS01ProviderCloudDNS{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMEIssuerDNS01ProviderCloudflare).DeepCopyInto(out.(*ACMEIssuerDNS01ProviderCloudflare)) - return nil - }, InType: reflect.TypeOf(&ACMEIssuerDNS01ProviderCloudflare{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMEIssuerDNS01ProviderRoute53).DeepCopyInto(out.(*ACMEIssuerDNS01ProviderRoute53)) - return nil - }, InType: reflect.TypeOf(&ACMEIssuerDNS01ProviderRoute53{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ACMEIssuerStatus).DeepCopyInto(out.(*ACMEIssuerStatus)) - return nil - }, InType: reflect.TypeOf(&ACMEIssuerStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*Certificate).DeepCopyInto(out.(*Certificate)) - return nil - }, InType: reflect.TypeOf(&Certificate{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*CertificateACMEStatus).DeepCopyInto(out.(*CertificateACMEStatus)) - return nil - }, InType: reflect.TypeOf(&CertificateACMEStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*CertificateList).DeepCopyInto(out.(*CertificateList)) - return nil - }, InType: reflect.TypeOf(&CertificateList{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*CertificateSpec).DeepCopyInto(out.(*CertificateSpec)) - return nil - }, InType: reflect.TypeOf(&CertificateSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*CertificateStatus).DeepCopyInto(out.(*CertificateStatus)) - return nil - }, InType: reflect.TypeOf(&CertificateStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*Issuer).DeepCopyInto(out.(*Issuer)) - return nil - }, InType: reflect.TypeOf(&Issuer{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*IssuerList).DeepCopyInto(out.(*IssuerList)) - return nil - }, InType: reflect.TypeOf(&IssuerList{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*IssuerSpec).DeepCopyInto(out.(*IssuerSpec)) - return nil - }, InType: reflect.TypeOf(&IssuerSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*IssuerStatus).DeepCopyInto(out.(*IssuerStatus)) - return nil - }, InType: reflect.TypeOf(&IssuerStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*LocalObjectReference).DeepCopyInto(out.(*LocalObjectReference)) - return nil - }, InType: reflect.TypeOf(&LocalObjectReference{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*SecretKeySelector).DeepCopyInto(out.(*SecretKeySelector)) - return nil - }, InType: reflect.TypeOf(&SecretKeySelector{})}, - ) -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMECertificateConfig) DeepCopyInto(out *ACMECertificateConfig) { - *out = *in - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = make([]ACMECertificateDomainConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateConfig. -func (x *ACMECertificateConfig) DeepCopy() *ACMECertificateConfig { - if x == nil { - return nil - } - out := new(ACMECertificateConfig) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMECertificateDNS01Config) DeepCopyInto(out *ACMECertificateDNS01Config) { - *out = *in - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateDNS01Config. -func (x *ACMECertificateDNS01Config) DeepCopy() *ACMECertificateDNS01Config { - if x == nil { - return nil - } - out := new(ACMECertificateDNS01Config) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMECertificateDomainConfig) DeepCopyInto(out *ACMECertificateDomainConfig) { - *out = *in - if in.Domains != nil { - in, out := &in.Domains, &out.Domains - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.HTTP01 != nil { - in, out := &in.HTTP01, &out.HTTP01 - if *in == nil { - *out = nil - } else { - *out = new(ACMECertificateHTTP01Config) - (*in).DeepCopyInto(*out) - } - } - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - if *in == nil { - *out = nil - } else { - *out = new(ACMECertificateDNS01Config) - **out = **in - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateDomainConfig. -func (x *ACMECertificateDomainConfig) DeepCopy() *ACMECertificateDomainConfig { - if x == nil { - return nil - } - out := new(ACMECertificateDomainConfig) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMECertificateHTTP01Config) DeepCopyInto(out *ACMECertificateHTTP01Config) { - *out = *in - if in.IngressClass != nil { - in, out := &in.IngressClass, &out.IngressClass - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMECertificateHTTP01Config. -func (x *ACMECertificateHTTP01Config) DeepCopy() *ACMECertificateHTTP01Config { - if x == nil { - return nil - } - out := new(ACMECertificateHTTP01Config) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEDomainAuthorization) DeepCopyInto(out *ACMEDomainAuthorization) { - *out = *in - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEDomainAuthorization. -func (x *ACMEDomainAuthorization) DeepCopy() *ACMEDomainAuthorization { - if x == nil { - return nil - } - out := new(ACMEDomainAuthorization) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuer) DeepCopyInto(out *ACMEIssuer) { - *out = *in - if in.DNS01 != nil { - in, out := &in.DNS01, &out.DNS01 - if *in == nil { - *out = nil - } else { - *out = new(ACMEIssuerDNS01Config) - (*in).DeepCopyInto(*out) - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuer. -func (x *ACMEIssuer) DeepCopy() *ACMEIssuer { - if x == nil { - return nil - } - out := new(ACMEIssuer) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01Config) DeepCopyInto(out *ACMEIssuerDNS01Config) { - *out = *in - if in.Providers != nil { - in, out := &in.Providers, &out.Providers - *out = make([]ACMEIssuerDNS01Provider, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01Config. -func (x *ACMEIssuerDNS01Config) DeepCopy() *ACMEIssuerDNS01Config { - if x == nil { - return nil - } - out := new(ACMEIssuerDNS01Config) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01Provider) DeepCopyInto(out *ACMEIssuerDNS01Provider) { - *out = *in - if in.CloudDNS != nil { - in, out := &in.CloudDNS, &out.CloudDNS - if *in == nil { - *out = nil - } else { - *out = new(ACMEIssuerDNS01ProviderCloudDNS) - **out = **in - } - } - if in.Cloudflare != nil { - in, out := &in.Cloudflare, &out.Cloudflare - if *in == nil { - *out = nil - } else { - *out = new(ACMEIssuerDNS01ProviderCloudflare) - **out = **in - } - } - if in.Route53 != nil { - in, out := &in.Route53, &out.Route53 - if *in == nil { - *out = nil - } else { - *out = new(ACMEIssuerDNS01ProviderRoute53) - **out = **in - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01Provider. -func (x *ACMEIssuerDNS01Provider) DeepCopy() *ACMEIssuerDNS01Provider { - if x == nil { - return nil - } - out := new(ACMEIssuerDNS01Provider) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderCloudDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderCloudDNS) { - *out = *in - out.ServiceAccount = in.ServiceAccount - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudDNS. -func (x *ACMEIssuerDNS01ProviderCloudDNS) DeepCopy() *ACMEIssuerDNS01ProviderCloudDNS { - if x == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderCloudDNS) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderCloudflare) DeepCopyInto(out *ACMEIssuerDNS01ProviderCloudflare) { - *out = *in - out.APIKey = in.APIKey - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderCloudflare. -func (x *ACMEIssuerDNS01ProviderCloudflare) DeepCopy() *ACMEIssuerDNS01ProviderCloudflare { - if x == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderCloudflare) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerDNS01ProviderRoute53) DeepCopyInto(out *ACMEIssuerDNS01ProviderRoute53) { - *out = *in - out.SecretAccessKey = in.SecretAccessKey - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerDNS01ProviderRoute53. -func (x *ACMEIssuerDNS01ProviderRoute53) DeepCopy() *ACMEIssuerDNS01ProviderRoute53 { - if x == nil { - return nil - } - out := new(ACMEIssuerDNS01ProviderRoute53) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ACMEIssuerStatus) DeepCopyInto(out *ACMEIssuerStatus) { - *out = *in - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ACMEIssuerStatus. -func (x *ACMEIssuerStatus) DeepCopy() *ACMEIssuerStatus { - if x == nil { - return nil - } - out := new(ACMEIssuerStatus) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Certificate) DeepCopyInto(out *Certificate) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Certificate. -func (x *Certificate) DeepCopy() *Certificate { - if x == nil { - return nil - } - out := new(Certificate) - x.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (x *Certificate) DeepCopyObject() runtime.Object { - if c := x.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateACMEStatus) DeepCopyInto(out *CertificateACMEStatus) { - *out = *in - if in.Authorizations != nil { - in, out := &in.Authorizations, &out.Authorizations - *out = make([]ACMEDomainAuthorization, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new CertificateACMEStatus. -func (x *CertificateACMEStatus) DeepCopy() *CertificateACMEStatus { - if x == nil { - return nil - } - out := new(CertificateACMEStatus) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateList) DeepCopyInto(out *CertificateList) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Certificate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new CertificateList. -func (x *CertificateList) DeepCopy() *CertificateList { - if x == nil { - return nil - } - out := new(CertificateList) - x.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (x *CertificateList) DeepCopyObject() runtime.Object { - if c := x.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec) { - *out = *in - if in.Domains != nil { - in, out := &in.Domains, &out.Domains - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - if *in == nil { - *out = nil - } else { - *out = new(ACMECertificateConfig) - (*in).DeepCopyInto(*out) - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSpec. -func (x *CertificateSpec) DeepCopy() *CertificateSpec { - if x == nil { - return nil - } - out := new(CertificateSpec) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateStatus) DeepCopyInto(out *CertificateStatus) { - *out = *in - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - if *in == nil { - *out = nil - } else { - *out = new(CertificateACMEStatus) - (*in).DeepCopyInto(*out) - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new CertificateStatus. -func (x *CertificateStatus) DeepCopy() *CertificateStatus { - if x == nil { - return nil - } - out := new(CertificateStatus) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Issuer) DeepCopyInto(out *Issuer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Issuer. -func (x *Issuer) DeepCopy() *Issuer { - if x == nil { - return nil - } - out := new(Issuer) - x.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (x *Issuer) DeepCopyObject() runtime.Object { - if c := x.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerList) DeepCopyInto(out *IssuerList) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Issuer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new IssuerList. -func (x *IssuerList) DeepCopy() *IssuerList { - if x == nil { - return nil - } - out := new(IssuerList) - x.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (x *IssuerList) DeepCopyObject() runtime.Object { - if c := x.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerSpec) DeepCopyInto(out *IssuerSpec) { - *out = *in - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - if *in == nil { - *out = nil - } else { - *out = new(ACMEIssuer) - (*in).DeepCopyInto(*out) - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new IssuerSpec. -func (x *IssuerSpec) DeepCopy() *IssuerSpec { - if x == nil { - return nil - } - out := new(IssuerSpec) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IssuerStatus) DeepCopyInto(out *IssuerStatus) { - *out = *in - if in.ACME != nil { - in, out := &in.ACME, &out.ACME - if *in == nil { - *out = nil - } else { - *out = new(ACMEIssuerStatus) - **out = **in - } - } - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new IssuerStatus. -func (x *IssuerStatus) DeepCopy() *IssuerStatus { - if x == nil { - return nil - } - out := new(IssuerStatus) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference) { - *out = *in - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference. -func (x *LocalObjectReference) DeepCopy() *LocalObjectReference { - if x == nil { - return nil - } - out := new(LocalObjectReference) - x.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector) { - *out = *in - out.LocalObjectReference = in.LocalObjectReference - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector. -func (x *SecretKeySelector) DeepCopy() *SecretKeySelector { - if x == nil { - return nil - } - out := new(SecretKeySelector) - x.DeepCopyInto(out) - return out -} diff --git a/pkg/apis/certmanager/zz_generated.defaults.go b/pkg/apis/certmanager/zz_generated.defaults.go deleted file mode 100644 index b4ab2d968..000000000 --- a/pkg/apis/certmanager/zz_generated.defaults.go +++ /dev/null @@ -1,32 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2017 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. -*/ - -// This file was autogenerated by defaulter-gen. Do not edit it manually! - -package certmanager - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/pkg/client/clientset.go b/pkg/client/clientset.go index 9a8c04347..c92db02a8 100644 --- a/pkg/client/clientset.go +++ b/pkg/client/clientset.go @@ -35,24 +35,18 @@ type Interface interface { // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - *certmanagerv1alpha1.CertmanagerV1alpha1Client + certmanagerV1alpha1 *certmanagerv1alpha1.CertmanagerV1alpha1Client } // CertmanagerV1alpha1 retrieves the CertmanagerV1alpha1Client func (c *Clientset) CertmanagerV1alpha1() certmanagerv1alpha1.CertmanagerV1alpha1Interface { - if c == nil { - return nil - } - return c.CertmanagerV1alpha1Client + return c.certmanagerV1alpha1 } // Deprecated: Certmanager retrieves the default version of CertmanagerClient. // Please explicitly pick a version. func (c *Clientset) Certmanager() certmanagerv1alpha1.CertmanagerV1alpha1Interface { - if c == nil { - return nil - } - return c.CertmanagerV1alpha1Client + return c.certmanagerV1alpha1 } // Discovery retrieves the DiscoveryClient @@ -71,7 +65,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error - cs.CertmanagerV1alpha1Client, err = certmanagerv1alpha1.NewForConfig(&configShallowCopy) + cs.certmanagerV1alpha1, err = certmanagerv1alpha1.NewForConfig(&configShallowCopy) if err != nil { return nil, err } @@ -88,7 +82,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset - cs.CertmanagerV1alpha1Client = certmanagerv1alpha1.NewForConfigOrDie(c) + cs.certmanagerV1alpha1 = certmanagerv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -97,7 +91,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.CertmanagerV1alpha1Client = certmanagerv1alpha1.New(c) + cs.certmanagerV1alpha1 = certmanagerv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/pkg/client/internalclientset/clientset.go b/pkg/client/internalclientset/clientset.go deleted file mode 100644 index aa479f35a..000000000 --- a/pkg/client/internalclientset/clientset.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package internalclientset - -import ( - glog "github.com/golang/glog" - certmanagerinternalversion "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset/typed/certmanager/internalversion" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - Certmanager() certmanagerinternalversion.CertmanagerInterface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - *certmanagerinternalversion.CertmanagerClient -} - -// Certmanager retrieves the CertmanagerClient -func (c *Clientset) Certmanager() certmanagerinternalversion.CertmanagerInterface { - if c == nil { - return nil - } - return c.CertmanagerClient -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.CertmanagerClient, err = certmanagerinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.CertmanagerClient = certmanagerinternalversion.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.CertmanagerClient = certmanagerinternalversion.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/pkg/client/internalclientset/doc.go b/pkg/client/internalclientset/doc.go deleted file mode 100644 index 309c091bf..000000000 --- a/pkg/client/internalclientset/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This package is generated by client-gen with custom arguments. - -// This package has the automatically generated clientset. -package internalclientset diff --git a/pkg/client/internalclientset/fake/clientset_generated.go b/pkg/client/internalclientset/fake/clientset_generated.go deleted file mode 100644 index b1ec95b85..000000000 --- a/pkg/client/internalclientset/fake/clientset_generated.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package fake - -import ( - clientset "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset" - certmanagerinternalversion "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset/typed/certmanager/internalversion" - fakecertmanagerinternalversion "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset/typed/certmanager/internalversion/fake" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - - fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil)) - - return &Clientset{fakePtr} -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return &fakediscovery.FakeDiscovery{Fake: &c.Fake} -} - -var _ clientset.Interface = &Clientset{} - -// Certmanager retrieves the CertmanagerClient -func (c *Clientset) Certmanager() certmanagerinternalversion.CertmanagerInterface { - return &fakecertmanagerinternalversion.FakeCertmanager{Fake: &c.Fake} -} diff --git a/pkg/client/internalclientset/fake/doc.go b/pkg/client/internalclientset/fake/doc.go deleted file mode 100644 index 5f565b3c8..000000000 --- a/pkg/client/internalclientset/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This package is generated by client-gen with custom arguments. - -// This package has the automatically generated fake clientset. -package fake diff --git a/pkg/client/internalclientset/fake/register.go b/pkg/client/internalclientset/fake/register.go deleted file mode 100644 index 63a9a9fed..000000000 --- a/pkg/client/internalclientset/fake/register.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package fake - -import ( - certmanagerinternalversion "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kuberentes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -func AddToScheme(scheme *runtime.Scheme) { - certmanagerinternalversion.AddToScheme(scheme) - -} diff --git a/pkg/client/internalclientset/scheme/doc.go b/pkg/client/internalclientset/scheme/doc.go deleted file mode 100644 index 5d8ec824f..000000000 --- a/pkg/client/internalclientset/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This package is generated by client-gen with custom arguments. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/pkg/client/internalclientset/scheme/register.go b/pkg/client/internalclientset/scheme/register.go deleted file mode 100644 index 87dc52567..000000000 --- a/pkg/client/internalclientset/scheme/register.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package scheme - -import ( - certmanager "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager/install" - announced "k8s.io/apimachinery/pkg/apimachinery/announced" - registered "k8s.io/apimachinery/pkg/apimachinery/registered" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - os "os" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) - -var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS")) -var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry) - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - Install(GroupFactoryRegistry, Registry, Scheme) -} - -// Install registers the API group and adds types to a scheme -func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { - certmanager.Install(groupFactoryRegistry, registry, scheme) - -} diff --git a/pkg/client/internalclientset/typed/certmanager/internalversion/certificate.go b/pkg/client/internalclientset/typed/certmanager/internalversion/certificate.go deleted file mode 100644 index 6b2bb74d9..000000000 --- a/pkg/client/internalclientset/typed/certmanager/internalversion/certificate.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package internalversion - -import ( - certmanager "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" - scheme "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CertificatesGetter has a method to return a CertificateInterface. -// A group's client should implement this interface. -type CertificatesGetter interface { - Certificates(namespace string) CertificateInterface -} - -// CertificateInterface has methods to work with Certificate resources. -type CertificateInterface interface { - Create(*certmanager.Certificate) (*certmanager.Certificate, error) - Update(*certmanager.Certificate) (*certmanager.Certificate, error) - UpdateStatus(*certmanager.Certificate) (*certmanager.Certificate, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*certmanager.Certificate, error) - List(opts v1.ListOptions) (*certmanager.CertificateList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certmanager.Certificate, err error) - CertificateExpansion -} - -// certificates implements CertificateInterface -type certificates struct { - client rest.Interface - ns string -} - -// newCertificates returns a Certificates -func newCertificates(c *CertmanagerClient, namespace string) *certificates { - return &certificates{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any. -func (c *certificates) Create(certificate *certmanager.Certificate) (result *certmanager.Certificate, err error) { - result = &certmanager.Certificate{} - err = c.client.Post(). - Namespace(c.ns). - Resource("certificates"). - Body(certificate). - Do(). - Into(result) - return -} - -// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any. -func (c *certificates) Update(certificate *certmanager.Certificate) (result *certmanager.Certificate, err error) { - result = &certmanager.Certificate{} - err = c.client.Put(). - Namespace(c.ns). - Resource("certificates"). - Name(certificate.Name). - Body(certificate). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). - -func (c *certificates) UpdateStatus(certificate *certmanager.Certificate) (result *certmanager.Certificate, err error) { - result = &certmanager.Certificate{} - err = c.client.Put(). - Namespace(c.ns). - Resource("certificates"). - Name(certificate.Name). - SubResource("status"). - Body(certificate). - Do(). - Into(result) - return -} - -// Delete takes name of the certificate and deletes it. Returns an error if one occurs. -func (c *certificates) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("certificates"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *certificates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any. -func (c *certificates) Get(name string, options v1.GetOptions) (result *certmanager.Certificate, err error) { - result = &certmanager.Certificate{} - err = c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Certificates that match those selectors. -func (c *certificates) List(opts v1.ListOptions) (result *certmanager.CertificateList, err error) { - result = &certmanager.CertificateList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested certificates. -func (c *certificates) Watch(opts v1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch() -} - -// Patch applies the patch and returns the patched certificate. -func (c *certificates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certmanager.Certificate, err error) { - result = &certmanager.Certificate{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("certificates"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/internalclientset/typed/certmanager/internalversion/certmanager_client.go b/pkg/client/internalclientset/typed/certmanager/internalversion/certmanager_client.go deleted file mode 100644 index e4c1b01df..000000000 --- a/pkg/client/internalclientset/typed/certmanager/internalversion/certmanager_client.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package internalversion - -import ( - "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset/scheme" - rest "k8s.io/client-go/rest" -) - -type CertmanagerInterface interface { - RESTClient() rest.Interface - CertificatesGetter - IssuersGetter -} - -// CertmanagerClient is used to interact with features provided by the certmanager group. -type CertmanagerClient struct { - restClient rest.Interface -} - -func (c *CertmanagerClient) Certificates(namespace string) CertificateInterface { - return newCertificates(c, namespace) -} - -func (c *CertmanagerClient) Issuers(namespace string) IssuerInterface { - return newIssuers(c, namespace) -} - -// NewForConfig creates a new CertmanagerClient for the given config. -func NewForConfig(c *rest.Config) (*CertmanagerClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &CertmanagerClient{client}, nil -} - -// NewForConfigOrDie creates a new CertmanagerClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CertmanagerClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CertmanagerClient for the given RESTClient. -func New(c rest.Interface) *CertmanagerClient { - return &CertmanagerClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - g, err := scheme.Registry.Group("certmanager") - if err != nil { - return err - } - - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { - gv := g.GroupVersion - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *CertmanagerClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/internalclientset/typed/certmanager/internalversion/doc.go b/pkg/client/internalclientset/typed/certmanager/internalversion/doc.go deleted file mode 100644 index 57e5b70cf..000000000 --- a/pkg/client/internalclientset/typed/certmanager/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This package is generated by client-gen with custom arguments. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/internalclientset/typed/certmanager/internalversion/fake/doc.go b/pkg/client/internalclientset/typed/certmanager/internalversion/fake/doc.go deleted file mode 100644 index c6548330a..000000000 --- a/pkg/client/internalclientset/typed/certmanager/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This package is generated by client-gen with custom arguments. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/internalclientset/typed/certmanager/internalversion/fake/fake_certificate.go b/pkg/client/internalclientset/typed/certmanager/internalversion/fake/fake_certificate.go deleted file mode 100644 index e760ed505..000000000 --- a/pkg/client/internalclientset/typed/certmanager/internalversion/fake/fake_certificate.go +++ /dev/null @@ -1,130 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package fake - -import ( - certmanager "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCertificates implements CertificateInterface -type FakeCertificates struct { - Fake *FakeCertmanager - ns string -} - -var certificatesResource = schema.GroupVersionResource{Group: "certmanager", Version: "", Resource: "certificates"} - -var certificatesKind = schema.GroupVersionKind{Group: "certmanager", Version: "", Kind: "Certificate"} - -func (c *FakeCertificates) Create(certificate *certmanager.Certificate) (result *certmanager.Certificate, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(certificatesResource, c.ns, certificate), &certmanager.Certificate{}) - - if obj == nil { - return nil, err - } - return obj.(*certmanager.Certificate), err -} - -func (c *FakeCertificates) Update(certificate *certmanager.Certificate) (result *certmanager.Certificate, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(certificatesResource, c.ns, certificate), &certmanager.Certificate{}) - - if obj == nil { - return nil, err - } - return obj.(*certmanager.Certificate), err -} - -func (c *FakeCertificates) UpdateStatus(certificate *certmanager.Certificate) (*certmanager.Certificate, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(certificatesResource, "status", c.ns, certificate), &certmanager.Certificate{}) - - if obj == nil { - return nil, err - } - return obj.(*certmanager.Certificate), err -} - -func (c *FakeCertificates) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(certificatesResource, c.ns, name), &certmanager.Certificate{}) - - return err -} - -func (c *FakeCertificates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(certificatesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &certmanager.CertificateList{}) - return err -} - -func (c *FakeCertificates) Get(name string, options v1.GetOptions) (result *certmanager.Certificate, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(certificatesResource, c.ns, name), &certmanager.Certificate{}) - - if obj == nil { - return nil, err - } - return obj.(*certmanager.Certificate), err -} - -func (c *FakeCertificates) List(opts v1.ListOptions) (result *certmanager.CertificateList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(certificatesResource, certificatesKind, c.ns, opts), &certmanager.CertificateList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &certmanager.CertificateList{} - for _, item := range obj.(*certmanager.CertificateList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested certificates. -func (c *FakeCertificates) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(certificatesResource, c.ns, opts)) - -} - -// Patch applies the patch and returns the patched certificate. -func (c *FakeCertificates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certmanager.Certificate, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(certificatesResource, c.ns, name, data, subresources...), &certmanager.Certificate{}) - - if obj == nil { - return nil, err - } - return obj.(*certmanager.Certificate), err -} diff --git a/pkg/client/internalclientset/typed/certmanager/internalversion/fake/fake_certmanager_client.go b/pkg/client/internalclientset/typed/certmanager/internalversion/fake/fake_certmanager_client.go deleted file mode 100644 index 52470d5ac..000000000 --- a/pkg/client/internalclientset/typed/certmanager/internalversion/fake/fake_certmanager_client.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package fake - -import ( - internalversion "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset/typed/certmanager/internalversion" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeCertmanager struct { - *testing.Fake -} - -func (c *FakeCertmanager) Certificates(namespace string) internalversion.CertificateInterface { - return &FakeCertificates{c, namespace} -} - -func (c *FakeCertmanager) Issuers(namespace string) internalversion.IssuerInterface { - return &FakeIssuers{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeCertmanager) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/internalclientset/typed/certmanager/internalversion/fake/fake_issuer.go b/pkg/client/internalclientset/typed/certmanager/internalversion/fake/fake_issuer.go deleted file mode 100644 index ecf187ab8..000000000 --- a/pkg/client/internalclientset/typed/certmanager/internalversion/fake/fake_issuer.go +++ /dev/null @@ -1,130 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package fake - -import ( - certmanager "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeIssuers implements IssuerInterface -type FakeIssuers struct { - Fake *FakeCertmanager - ns string -} - -var issuersResource = schema.GroupVersionResource{Group: "certmanager", Version: "", Resource: "issuers"} - -var issuersKind = schema.GroupVersionKind{Group: "certmanager", Version: "", Kind: "Issuer"} - -func (c *FakeIssuers) Create(issuer *certmanager.Issuer) (result *certmanager.Issuer, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(issuersResource, c.ns, issuer), &certmanager.Issuer{}) - - if obj == nil { - return nil, err - } - return obj.(*certmanager.Issuer), err -} - -func (c *FakeIssuers) Update(issuer *certmanager.Issuer) (result *certmanager.Issuer, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(issuersResource, c.ns, issuer), &certmanager.Issuer{}) - - if obj == nil { - return nil, err - } - return obj.(*certmanager.Issuer), err -} - -func (c *FakeIssuers) UpdateStatus(issuer *certmanager.Issuer) (*certmanager.Issuer, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(issuersResource, "status", c.ns, issuer), &certmanager.Issuer{}) - - if obj == nil { - return nil, err - } - return obj.(*certmanager.Issuer), err -} - -func (c *FakeIssuers) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(issuersResource, c.ns, name), &certmanager.Issuer{}) - - return err -} - -func (c *FakeIssuers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(issuersResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &certmanager.IssuerList{}) - return err -} - -func (c *FakeIssuers) Get(name string, options v1.GetOptions) (result *certmanager.Issuer, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(issuersResource, c.ns, name), &certmanager.Issuer{}) - - if obj == nil { - return nil, err - } - return obj.(*certmanager.Issuer), err -} - -func (c *FakeIssuers) List(opts v1.ListOptions) (result *certmanager.IssuerList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(issuersResource, issuersKind, c.ns, opts), &certmanager.IssuerList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &certmanager.IssuerList{} - for _, item := range obj.(*certmanager.IssuerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested issuers. -func (c *FakeIssuers) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(issuersResource, c.ns, opts)) - -} - -// Patch applies the patch and returns the patched issuer. -func (c *FakeIssuers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certmanager.Issuer, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(issuersResource, c.ns, name, data, subresources...), &certmanager.Issuer{}) - - if obj == nil { - return nil, err - } - return obj.(*certmanager.Issuer), err -} diff --git a/pkg/client/internalclientset/typed/certmanager/internalversion/generated_expansion.go b/pkg/client/internalclientset/typed/certmanager/internalversion/generated_expansion.go deleted file mode 100644 index b24a1a94e..000000000 --- a/pkg/client/internalclientset/typed/certmanager/internalversion/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package internalversion - -type CertificateExpansion interface{} - -type IssuerExpansion interface{} diff --git a/pkg/client/internalclientset/typed/certmanager/internalversion/issuer.go b/pkg/client/internalclientset/typed/certmanager/internalversion/issuer.go deleted file mode 100644 index afa9cb020..000000000 --- a/pkg/client/internalclientset/typed/certmanager/internalversion/issuer.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -Copyright 2017 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. -*/ - -package internalversion - -import ( - certmanager "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" - scheme "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// IssuersGetter has a method to return a IssuerInterface. -// A group's client should implement this interface. -type IssuersGetter interface { - Issuers(namespace string) IssuerInterface -} - -// IssuerInterface has methods to work with Issuer resources. -type IssuerInterface interface { - Create(*certmanager.Issuer) (*certmanager.Issuer, error) - Update(*certmanager.Issuer) (*certmanager.Issuer, error) - UpdateStatus(*certmanager.Issuer) (*certmanager.Issuer, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*certmanager.Issuer, error) - List(opts v1.ListOptions) (*certmanager.IssuerList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certmanager.Issuer, err error) - IssuerExpansion -} - -// issuers implements IssuerInterface -type issuers struct { - client rest.Interface - ns string -} - -// newIssuers returns a Issuers -func newIssuers(c *CertmanagerClient, namespace string) *issuers { - return &issuers{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any. -func (c *issuers) Create(issuer *certmanager.Issuer) (result *certmanager.Issuer, err error) { - result = &certmanager.Issuer{} - err = c.client.Post(). - Namespace(c.ns). - Resource("issuers"). - Body(issuer). - Do(). - Into(result) - return -} - -// Update takes the representation of a issuer and updates it. Returns the server's representation of the issuer, and an error, if there is any. -func (c *issuers) Update(issuer *certmanager.Issuer) (result *certmanager.Issuer, err error) { - result = &certmanager.Issuer{} - err = c.client.Put(). - Namespace(c.ns). - Resource("issuers"). - Name(issuer.Name). - Body(issuer). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). - -func (c *issuers) UpdateStatus(issuer *certmanager.Issuer) (result *certmanager.Issuer, err error) { - result = &certmanager.Issuer{} - err = c.client.Put(). - Namespace(c.ns). - Resource("issuers"). - Name(issuer.Name). - SubResource("status"). - Body(issuer). - Do(). - Into(result) - return -} - -// Delete takes name of the issuer and deletes it. Returns an error if one occurs. -func (c *issuers) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("issuers"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *issuers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("issuers"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any. -func (c *issuers) Get(name string, options v1.GetOptions) (result *certmanager.Issuer, err error) { - result = &certmanager.Issuer{} - err = c.client.Get(). - Namespace(c.ns). - Resource("issuers"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Issuers that match those selectors. -func (c *issuers) List(opts v1.ListOptions) (result *certmanager.IssuerList, err error) { - result = &certmanager.IssuerList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("issuers"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested issuers. -func (c *issuers) Watch(opts v1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("issuers"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch() -} - -// Patch applies the patch and returns the patched issuer. -func (c *issuers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certmanager.Issuer, err error) { - result = &certmanager.Issuer{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("issuers"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/typed/certmanager/v1alpha1/certificate.go b/pkg/client/typed/certmanager/v1alpha1/certificate.go index 202e62d64..d0deede12 100644 --- a/pkg/client/typed/certmanager/v1alpha1/certificate.go +++ b/pkg/client/typed/certmanager/v1alpha1/certificate.go @@ -59,6 +59,41 @@ func newCertificates(c *CertmanagerV1alpha1Client, namespace string) *certificat } } +// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any. +func (c *certificates) Get(name string, options v1.GetOptions) (result *v1alpha1.Certificate, err error) { + result = &v1alpha1.Certificate{} + err = c.client.Get(). + Namespace(c.ns). + Resource("certificates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Certificates that match those selectors. +func (c *certificates) List(opts v1.ListOptions) (result *v1alpha1.CertificateList, err error) { + result = &v1alpha1.CertificateList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("certificates"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested certificates. +func (c *certificates) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("certificates"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + // Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any. func (c *certificates) Create(certificate *v1alpha1.Certificate) (result *v1alpha1.Certificate, err error) { result = &v1alpha1.Certificate{} @@ -85,7 +120,7 @@ func (c *certificates) Update(certificate *v1alpha1.Certificate) (result *v1alph } // UpdateStatus was generated because the type contains a Status member. -// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). func (c *certificates) UpdateStatus(certificate *v1alpha1.Certificate) (result *v1alpha1.Certificate, err error) { result = &v1alpha1.Certificate{} @@ -122,41 +157,6 @@ func (c *certificates) DeleteCollection(options *v1.DeleteOptions, listOptions v Error() } -// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any. -func (c *certificates) Get(name string, options v1.GetOptions) (result *v1alpha1.Certificate, err error) { - result = &v1alpha1.Certificate{} - err = c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Certificates that match those selectors. -func (c *certificates) List(opts v1.ListOptions) (result *v1alpha1.CertificateList, err error) { - result = &v1alpha1.CertificateList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested certificates. -func (c *certificates) Watch(opts v1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("certificates"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch() -} - // Patch applies the patch and returns the patched certificate. func (c *certificates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Certificate, err error) { result = &v1alpha1.Certificate{} diff --git a/pkg/client/typed/certmanager/v1alpha1/fake/fake_certificate.go b/pkg/client/typed/certmanager/v1alpha1/fake/fake_certificate.go index dce578f22..d59f9b8cc 100644 --- a/pkg/client/typed/certmanager/v1alpha1/fake/fake_certificate.go +++ b/pkg/client/typed/certmanager/v1alpha1/fake/fake_certificate.go @@ -36,50 +36,7 @@ var certificatesResource = schema.GroupVersionResource{Group: "certmanager.k8s.i var certificatesKind = schema.GroupVersionKind{Group: "certmanager.k8s.io", Version: "v1alpha1", Kind: "Certificate"} -func (c *FakeCertificates) Create(certificate *v1alpha1.Certificate) (result *v1alpha1.Certificate, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(certificatesResource, c.ns, certificate), &v1alpha1.Certificate{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Certificate), err -} - -func (c *FakeCertificates) Update(certificate *v1alpha1.Certificate) (result *v1alpha1.Certificate, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(certificatesResource, c.ns, certificate), &v1alpha1.Certificate{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Certificate), err -} - -func (c *FakeCertificates) UpdateStatus(certificate *v1alpha1.Certificate) (*v1alpha1.Certificate, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(certificatesResource, "status", c.ns, certificate), &v1alpha1.Certificate{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Certificate), err -} - -func (c *FakeCertificates) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(certificatesResource, c.ns, name), &v1alpha1.Certificate{}) - - return err -} - -func (c *FakeCertificates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(certificatesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.CertificateList{}) - return err -} - +// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any. func (c *FakeCertificates) Get(name string, options v1.GetOptions) (result *v1alpha1.Certificate, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(certificatesResource, c.ns, name), &v1alpha1.Certificate{}) @@ -90,6 +47,7 @@ func (c *FakeCertificates) Get(name string, options v1.GetOptions) (result *v1al return obj.(*v1alpha1.Certificate), err } +// List takes label and field selectors, and returns the list of Certificates that match those selectors. func (c *FakeCertificates) List(opts v1.ListOptions) (result *v1alpha1.CertificateList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(certificatesResource, certificatesKind, c.ns, opts), &v1alpha1.CertificateList{}) @@ -118,6 +76,56 @@ func (c *FakeCertificates) Watch(opts v1.ListOptions) (watch.Interface, error) { } +// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any. +func (c *FakeCertificates) Create(certificate *v1alpha1.Certificate) (result *v1alpha1.Certificate, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(certificatesResource, c.ns, certificate), &v1alpha1.Certificate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Certificate), err +} + +// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any. +func (c *FakeCertificates) Update(certificate *v1alpha1.Certificate) (result *v1alpha1.Certificate, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(certificatesResource, c.ns, certificate), &v1alpha1.Certificate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Certificate), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCertificates) UpdateStatus(certificate *v1alpha1.Certificate) (*v1alpha1.Certificate, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(certificatesResource, "status", c.ns, certificate), &v1alpha1.Certificate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Certificate), err +} + +// Delete takes name of the certificate and deletes it. Returns an error if one occurs. +func (c *FakeCertificates) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(certificatesResource, c.ns, name), &v1alpha1.Certificate{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCertificates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(certificatesResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1alpha1.CertificateList{}) + return err +} + // Patch applies the patch and returns the patched certificate. func (c *FakeCertificates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Certificate, err error) { obj, err := c.Fake. diff --git a/pkg/client/typed/certmanager/v1alpha1/fake/fake_issuer.go b/pkg/client/typed/certmanager/v1alpha1/fake/fake_issuer.go index 0ff0d7086..752f0b91f 100644 --- a/pkg/client/typed/certmanager/v1alpha1/fake/fake_issuer.go +++ b/pkg/client/typed/certmanager/v1alpha1/fake/fake_issuer.go @@ -36,50 +36,7 @@ var issuersResource = schema.GroupVersionResource{Group: "certmanager.k8s.io", V var issuersKind = schema.GroupVersionKind{Group: "certmanager.k8s.io", Version: "v1alpha1", Kind: "Issuer"} -func (c *FakeIssuers) Create(issuer *v1alpha1.Issuer) (result *v1alpha1.Issuer, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(issuersResource, c.ns, issuer), &v1alpha1.Issuer{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Issuer), err -} - -func (c *FakeIssuers) Update(issuer *v1alpha1.Issuer) (result *v1alpha1.Issuer, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(issuersResource, c.ns, issuer), &v1alpha1.Issuer{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Issuer), err -} - -func (c *FakeIssuers) UpdateStatus(issuer *v1alpha1.Issuer) (*v1alpha1.Issuer, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(issuersResource, "status", c.ns, issuer), &v1alpha1.Issuer{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Issuer), err -} - -func (c *FakeIssuers) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(issuersResource, c.ns, name), &v1alpha1.Issuer{}) - - return err -} - -func (c *FakeIssuers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(issuersResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.IssuerList{}) - return err -} - +// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any. func (c *FakeIssuers) Get(name string, options v1.GetOptions) (result *v1alpha1.Issuer, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(issuersResource, c.ns, name), &v1alpha1.Issuer{}) @@ -90,6 +47,7 @@ func (c *FakeIssuers) Get(name string, options v1.GetOptions) (result *v1alpha1. return obj.(*v1alpha1.Issuer), err } +// List takes label and field selectors, and returns the list of Issuers that match those selectors. func (c *FakeIssuers) List(opts v1.ListOptions) (result *v1alpha1.IssuerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(issuersResource, issuersKind, c.ns, opts), &v1alpha1.IssuerList{}) @@ -118,6 +76,56 @@ func (c *FakeIssuers) Watch(opts v1.ListOptions) (watch.Interface, error) { } +// Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any. +func (c *FakeIssuers) Create(issuer *v1alpha1.Issuer) (result *v1alpha1.Issuer, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(issuersResource, c.ns, issuer), &v1alpha1.Issuer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Issuer), err +} + +// Update takes the representation of a issuer and updates it. Returns the server's representation of the issuer, and an error, if there is any. +func (c *FakeIssuers) Update(issuer *v1alpha1.Issuer) (result *v1alpha1.Issuer, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(issuersResource, c.ns, issuer), &v1alpha1.Issuer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Issuer), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeIssuers) UpdateStatus(issuer *v1alpha1.Issuer) (*v1alpha1.Issuer, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(issuersResource, "status", c.ns, issuer), &v1alpha1.Issuer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Issuer), err +} + +// Delete takes name of the issuer and deletes it. Returns an error if one occurs. +func (c *FakeIssuers) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(issuersResource, c.ns, name), &v1alpha1.Issuer{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIssuers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(issuersResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1alpha1.IssuerList{}) + return err +} + // Patch applies the patch and returns the patched issuer. func (c *FakeIssuers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Issuer, err error) { obj, err := c.Fake. diff --git a/pkg/client/typed/certmanager/v1alpha1/issuer.go b/pkg/client/typed/certmanager/v1alpha1/issuer.go index 89a431ada..8ae092ed4 100644 --- a/pkg/client/typed/certmanager/v1alpha1/issuer.go +++ b/pkg/client/typed/certmanager/v1alpha1/issuer.go @@ -59,6 +59,41 @@ func newIssuers(c *CertmanagerV1alpha1Client, namespace string) *issuers { } } +// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any. +func (c *issuers) Get(name string, options v1.GetOptions) (result *v1alpha1.Issuer, err error) { + result = &v1alpha1.Issuer{} + err = c.client.Get(). + Namespace(c.ns). + Resource("issuers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Issuers that match those selectors. +func (c *issuers) List(opts v1.ListOptions) (result *v1alpha1.IssuerList, err error) { + result = &v1alpha1.IssuerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("issuers"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested issuers. +func (c *issuers) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("issuers"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + // Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any. func (c *issuers) Create(issuer *v1alpha1.Issuer) (result *v1alpha1.Issuer, err error) { result = &v1alpha1.Issuer{} @@ -85,7 +120,7 @@ func (c *issuers) Update(issuer *v1alpha1.Issuer) (result *v1alpha1.Issuer, err } // UpdateStatus was generated because the type contains a Status member. -// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). func (c *issuers) UpdateStatus(issuer *v1alpha1.Issuer) (result *v1alpha1.Issuer, err error) { result = &v1alpha1.Issuer{} @@ -122,41 +157,6 @@ func (c *issuers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Lis Error() } -// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any. -func (c *issuers) Get(name string, options v1.GetOptions) (result *v1alpha1.Issuer, err error) { - result = &v1alpha1.Issuer{} - err = c.client.Get(). - Namespace(c.ns). - Resource("issuers"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Issuers that match those selectors. -func (c *issuers) List(opts v1.ListOptions) (result *v1alpha1.IssuerList, err error) { - result = &v1alpha1.IssuerList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("issuers"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested issuers. -func (c *issuers) Watch(opts v1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("issuers"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch() -} - // Patch applies the patch and returns the patched issuer. func (c *issuers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Issuer, err error) { result = &v1alpha1.Issuer{} diff --git a/pkg/informers/externalversions/certmanager/v1alpha1/certificate.go b/pkg/informers/externalversions/certmanager/v1alpha1/certificate.go index d50c81aad..7c1292fdc 100644 --- a/pkg/informers/externalversions/certmanager/v1alpha1/certificate.go +++ b/pkg/informers/externalversions/certmanager/v1alpha1/certificate.go @@ -41,26 +41,31 @@ type certificateInformer struct { factory internalinterfaces.SharedInformerFactory } -func newCertificateInformer(client client.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - sharedIndexInformer := cache.NewSharedIndexInformer( +// NewCertificateInformer constructs a new informer for Certificate type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewCertificateInformer(client client.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.CertmanagerV1alpha1().Certificates(v1.NamespaceAll).List(options) + return client.CertmanagerV1alpha1().Certificates(namespace).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.CertmanagerV1alpha1().Certificates(v1.NamespaceAll).Watch(options) + return client.CertmanagerV1alpha1().Certificates(namespace).Watch(options) }, }, &certmanager_v1alpha1.Certificate{}, resyncPeriod, - cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + indexers, ) +} - return sharedIndexInformer +func defaultCertificateInformer(client client.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewCertificateInformer(client, v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) } func (f *certificateInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&certmanager_v1alpha1.Certificate{}, newCertificateInformer) + return f.factory.InformerFor(&certmanager_v1alpha1.Certificate{}, defaultCertificateInformer) } func (f *certificateInformer) Lister() v1alpha1.CertificateLister { diff --git a/pkg/informers/externalversions/certmanager/v1alpha1/issuer.go b/pkg/informers/externalversions/certmanager/v1alpha1/issuer.go index 29277f6e6..0f36d6eec 100644 --- a/pkg/informers/externalversions/certmanager/v1alpha1/issuer.go +++ b/pkg/informers/externalversions/certmanager/v1alpha1/issuer.go @@ -41,26 +41,31 @@ type issuerInformer struct { factory internalinterfaces.SharedInformerFactory } -func newIssuerInformer(client client.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - sharedIndexInformer := cache.NewSharedIndexInformer( +// NewIssuerInformer constructs a new informer for Issuer type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewIssuerInformer(client client.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.CertmanagerV1alpha1().Issuers(v1.NamespaceAll).List(options) + return client.CertmanagerV1alpha1().Issuers(namespace).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.CertmanagerV1alpha1().Issuers(v1.NamespaceAll).Watch(options) + return client.CertmanagerV1alpha1().Issuers(namespace).Watch(options) }, }, &certmanager_v1alpha1.Issuer{}, resyncPeriod, - cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + indexers, ) +} - return sharedIndexInformer +func defaultIssuerInformer(client client.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewIssuerInformer(client, v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) } func (f *issuerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&certmanager_v1alpha1.Issuer{}, newIssuerInformer) + return f.factory.InformerFor(&certmanager_v1alpha1.Issuer{}, defaultIssuerInformer) } func (f *issuerInformer) Lister() v1alpha1.IssuerLister { diff --git a/pkg/informers/internalversion/certmanager/interface.go b/pkg/informers/internalversion/certmanager/interface.go deleted file mode 100644 index c746ae460..000000000 --- a/pkg/informers/internalversion/certmanager/interface.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This file was automatically generated by informer-gen - -package certmanager - -import ( - internalversion "github.com/jetstack-experimental/cert-manager/pkg/informers/internalversion/certmanager/internalversion" - internalinterfaces "github.com/jetstack-experimental/cert-manager/pkg/informers/internalversion/internalinterfaces" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // InternalVersion provides access to shared informers for resources in InternalVersion. - InternalVersion() internalversion.Interface -} - -type group struct { - internalinterfaces.SharedInformerFactory -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory) Interface { - return &group{f} -} - -// InternalVersion returns a new internalversion.Interface. -func (g *group) InternalVersion() internalversion.Interface { - return internalversion.New(g.SharedInformerFactory) -} diff --git a/pkg/informers/internalversion/certmanager/internalversion/certificate.go b/pkg/informers/internalversion/certmanager/internalversion/certificate.go deleted file mode 100644 index 4579137f1..000000000 --- a/pkg/informers/internalversion/certmanager/internalversion/certificate.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This file was automatically generated by informer-gen - -package internalversion - -import ( - certmanager "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" - internalclientset "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset" - internalinterfaces "github.com/jetstack-experimental/cert-manager/pkg/informers/internalversion/internalinterfaces" - internalversion "github.com/jetstack-experimental/cert-manager/pkg/listers/certmanager/internalversion" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// CertificateInformer provides access to a shared informer and lister for -// Certificates. -type CertificateInformer interface { - Informer() cache.SharedIndexInformer - Lister() internalversion.CertificateLister -} - -type certificateInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -func newCertificateInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - sharedIndexInformer := cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.Certmanager().Certificates(v1.NamespaceAll).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.Certmanager().Certificates(v1.NamespaceAll).Watch(options) - }, - }, - &certmanager.Certificate{}, - resyncPeriod, - cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, - ) - - return sharedIndexInformer -} - -func (f *certificateInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&certmanager.Certificate{}, newCertificateInformer) -} - -func (f *certificateInformer) Lister() internalversion.CertificateLister { - return internalversion.NewCertificateLister(f.Informer().GetIndexer()) -} diff --git a/pkg/informers/internalversion/certmanager/internalversion/interface.go b/pkg/informers/internalversion/certmanager/internalversion/interface.go deleted file mode 100644 index 6955f5a42..000000000 --- a/pkg/informers/internalversion/certmanager/internalversion/interface.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This file was automatically generated by informer-gen - -package internalversion - -import ( - internalinterfaces "github.com/jetstack-experimental/cert-manager/pkg/informers/internalversion/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // Certificates returns a CertificateInformer. - Certificates() CertificateInformer - // Issuers returns a IssuerInformer. - Issuers() IssuerInformer -} - -type version struct { - internalinterfaces.SharedInformerFactory -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory) Interface { - return &version{f} -} - -// Certificates returns a CertificateInformer. -func (v *version) Certificates() CertificateInformer { - return &certificateInformer{factory: v.SharedInformerFactory} -} - -// Issuers returns a IssuerInformer. -func (v *version) Issuers() IssuerInformer { - return &issuerInformer{factory: v.SharedInformerFactory} -} diff --git a/pkg/informers/internalversion/certmanager/internalversion/issuer.go b/pkg/informers/internalversion/certmanager/internalversion/issuer.go deleted file mode 100644 index d613e9b11..000000000 --- a/pkg/informers/internalversion/certmanager/internalversion/issuer.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This file was automatically generated by informer-gen - -package internalversion - -import ( - certmanager "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" - internalclientset "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset" - internalinterfaces "github.com/jetstack-experimental/cert-manager/pkg/informers/internalversion/internalinterfaces" - internalversion "github.com/jetstack-experimental/cert-manager/pkg/listers/certmanager/internalversion" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// IssuerInformer provides access to a shared informer and lister for -// Issuers. -type IssuerInformer interface { - Informer() cache.SharedIndexInformer - Lister() internalversion.IssuerLister -} - -type issuerInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -func newIssuerInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - sharedIndexInformer := cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.Certmanager().Issuers(v1.NamespaceAll).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.Certmanager().Issuers(v1.NamespaceAll).Watch(options) - }, - }, - &certmanager.Issuer{}, - resyncPeriod, - cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, - ) - - return sharedIndexInformer -} - -func (f *issuerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&certmanager.Issuer{}, newIssuerInformer) -} - -func (f *issuerInformer) Lister() internalversion.IssuerLister { - return internalversion.NewIssuerLister(f.Informer().GetIndexer()) -} diff --git a/pkg/informers/internalversion/factory.go b/pkg/informers/internalversion/factory.go deleted file mode 100644 index f506850f5..000000000 --- a/pkg/informers/internalversion/factory.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This file was automatically generated by informer-gen - -package internalversion - -import ( - internalclientset "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset" - certmanager "github.com/jetstack-experimental/cert-manager/pkg/informers/internalversion/certmanager" - internalinterfaces "github.com/jetstack-experimental/cert-manager/pkg/informers/internalversion/internalinterfaces" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" - reflect "reflect" - sync "sync" - time "time" -) - -type sharedInformerFactory struct { - client internalclientset.Interface - lock sync.Mutex - defaultResync time.Duration - - informers map[reflect.Type]cache.SharedIndexInformer - // startedInformers is used for tracking which informers have been started. - // This allows Start() to be called multiple times safely. - startedInformers map[reflect.Type]bool -} - -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory -func NewSharedInformerFactory(client internalclientset.Interface, defaultResync time.Duration) SharedInformerFactory { - return &sharedInformerFactory{ - client: client, - defaultResync: defaultResync, - informers: make(map[reflect.Type]cache.SharedIndexInformer), - startedInformers: make(map[reflect.Type]bool), - } -} - -// Start initializes all requested informers. -func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { - f.lock.Lock() - defer f.lock.Unlock() - - for informerType, informer := range f.informers { - if !f.startedInformers[informerType] { - go informer.Run(stopCh) - f.startedInformers[informerType] = true - } - } -} - -// WaitForCacheSync waits for all started informers' cache were synced. -func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { - informers := func() map[reflect.Type]cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informers := map[reflect.Type]cache.SharedIndexInformer{} - for informerType, informer := range f.informers { - if f.startedInformers[informerType] { - informers[informerType] = informer - } - } - return informers - }() - - res := map[reflect.Type]bool{} - for informType, informer := range informers { - res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) - } - return res -} - -// InternalInformerFor returns the SharedIndexInformer for obj using an internal -// client. -func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informerType := reflect.TypeOf(obj) - informer, exists := f.informers[informerType] - if exists { - return informer - } - informer = newFunc(f.client, f.defaultResync) - f.informers[informerType] = informer - - return informer -} - -// SharedInformerFactory provides shared informers for resources in all known -// API group versions. -type SharedInformerFactory interface { - internalinterfaces.SharedInformerFactory - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) - WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - - Certmanager() certmanager.Interface -} - -func (f *sharedInformerFactory) Certmanager() certmanager.Interface { - return certmanager.New(f) -} diff --git a/pkg/informers/internalversion/generic.go b/pkg/informers/internalversion/generic.go deleted file mode 100644 index d42f0b86a..000000000 --- a/pkg/informers/internalversion/generic.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This file was automatically generated by informer-gen - -package internalversion - -import ( - "fmt" - certmanager "github.com/jetstack-experimental/cert-manager/pkg/apis/certmanager" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" -) - -// GenericInformer is type of SharedIndexInformer which will locate and delegate to other -// sharedInformers based on type -type GenericInformer interface { - Informer() cache.SharedIndexInformer - Lister() cache.GenericLister -} - -type genericInformer struct { - informer cache.SharedIndexInformer - resource schema.GroupResource -} - -// Informer returns the SharedIndexInformer. -func (f *genericInformer) Informer() cache.SharedIndexInformer { - return f.informer -} - -// Lister returns the GenericLister. -func (f *genericInformer) Lister() cache.GenericLister { - return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) -} - -// ForResource gives generic access to a shared informer of the matching type -// TODO extend this to unknown resources with a client pool -func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { - switch resource { - // Group=Certmanager, Version=InternalVersion - case certmanager.SchemeGroupVersion.WithResource("certificates"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Certmanager().InternalVersion().Certificates().Informer()}, nil - case certmanager.SchemeGroupVersion.WithResource("issuers"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Certmanager().InternalVersion().Issuers().Informer()}, nil - - } - - return nil, fmt.Errorf("no informer found for %v", resource) -} diff --git a/pkg/informers/internalversion/internalinterfaces/factory_interfaces.go b/pkg/informers/internalversion/internalinterfaces/factory_interfaces.go deleted file mode 100644 index 47eeb7f75..000000000 --- a/pkg/informers/internalversion/internalinterfaces/factory_interfaces.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// This file was automatically generated by informer-gen - -package internalinterfaces - -import ( - internalclientset "github.com/jetstack-experimental/cert-manager/pkg/client/internalclientset" - runtime "k8s.io/apimachinery/pkg/runtime" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -type NewInformerFunc func(internalclientset.Interface, time.Duration) cache.SharedIndexInformer - -// SharedInformerFactory a small interface to allow for adding an informer without an import cycle -type SharedInformerFactory interface { - Start(stopCh <-chan struct{}) - InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer -}