Merge pull request #4667 from wallrj/move-deprecated-api-structs

Stop exporting deprecated API types; move them to an internal package
This commit is contained in:
jetstack-bot
2021-12-16 16:37:09 +00:00
committed by GitHub
99 changed files with 2067 additions and 2651 deletions
+6 -6
View File
@@ -34,14 +34,14 @@ module_name="github.com/jetstack/cert-manager"
# Generate deepcopy functions for all internal and external APIs
deepcopy_inputs=(
pkg/apis/certmanager/v1alpha2 \
pkg/apis/certmanager/v1alpha3 \
pkg/apis/certmanager/v1beta1 \
internal/apis/certmanager/v1alpha2 \
internal/apis/certmanager/v1alpha3 \
internal/apis/certmanager/v1beta1 \
pkg/apis/certmanager/v1 \
internal/apis/certmanager \
pkg/apis/acme/v1alpha2 \
pkg/apis/acme/v1alpha3 \
pkg/apis/acme/v1beta1 \
internal/apis/acme/v1alpha2 \
internal/apis/acme/v1alpha3 \
internal/apis/acme/v1beta1 \
pkg/apis/acme/v1 \
internal/apis/acme \
pkg/apis/config/webhook/v1alpha1 \
+6 -1
View File
@@ -3,11 +3,17 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"conversion.go",
"defaults.go",
"doc.go",
"register.go",
"types.go",
"types_challenge.go",
"types_issuer.go",
"types_order.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
"zz_generated.defaults.go",
],
importpath = "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha2",
@@ -17,7 +23,6 @@ go_library(
"//internal/apis/meta:go_default_library",
"//internal/apis/meta/v1:go_default_library",
"//pkg/apis/acme:go_default_library",
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_api//core/v1:go_default_library",
"@io_k8s_apiextensions_apiserver//pkg/apis/apiextensions/v1:go_default_library",
+11 -12
View File
@@ -20,10 +20,9 @@ import (
"k8s.io/apimachinery/pkg/conversion"
"github.com/jetstack/cert-manager/internal/apis/acme"
"github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
)
func Convert_v1alpha2_ChallengeSpec_To_acme_ChallengeSpec(in *v1alpha2.ChallengeSpec, out *acme.ChallengeSpec, s conversion.Scope) error {
func Convert_v1alpha2_ChallengeSpec_To_acme_ChallengeSpec(in *ChallengeSpec, out *acme.ChallengeSpec, s conversion.Scope) error {
if err := autoConvert_v1alpha2_ChallengeSpec_To_acme_ChallengeSpec(in, out, s); err != nil {
return err
}
@@ -31,9 +30,9 @@ func Convert_v1alpha2_ChallengeSpec_To_acme_ChallengeSpec(in *v1alpha2.Challenge
out.AuthorizationURL = in.AuthzURL
switch in.Type {
case v1alpha2.ACMEChallengeTypeHTTP01:
case ACMEChallengeTypeHTTP01:
out.Type = acme.ACMEChallengeTypeHTTP01
case v1alpha2.ACMEChallengeTypeDNS01:
case ACMEChallengeTypeDNS01:
out.Type = acme.ACMEChallengeTypeDNS01
default:
// this case should never be hit due to validation
@@ -43,7 +42,7 @@ func Convert_v1alpha2_ChallengeSpec_To_acme_ChallengeSpec(in *v1alpha2.Challenge
return nil
}
func Convert_acme_ChallengeSpec_To_v1alpha2_ChallengeSpec(in *acme.ChallengeSpec, out *v1alpha2.ChallengeSpec, s conversion.Scope) error {
func Convert_acme_ChallengeSpec_To_v1alpha2_ChallengeSpec(in *acme.ChallengeSpec, out *ChallengeSpec, s conversion.Scope) error {
if err := autoConvert_acme_ChallengeSpec_To_v1alpha2_ChallengeSpec(in, out, s); err != nil {
return err
}
@@ -52,18 +51,18 @@ func Convert_acme_ChallengeSpec_To_v1alpha2_ChallengeSpec(in *acme.ChallengeSpec
switch in.Type {
case acme.ACMEChallengeTypeHTTP01:
out.Type = v1alpha2.ACMEChallengeTypeHTTP01
out.Type = ACMEChallengeTypeHTTP01
case acme.ACMEChallengeTypeDNS01:
out.Type = v1alpha2.ACMEChallengeTypeDNS01
out.Type = ACMEChallengeTypeDNS01
default:
// this case should never be hit due to validation
out.Type = v1alpha2.ACMEChallengeType(in.Type)
out.Type = ACMEChallengeType(in.Type)
}
return nil
}
func Convert_v1alpha2_OrderSpec_To_acme_OrderSpec(in *v1alpha2.OrderSpec, out *acme.OrderSpec, s conversion.Scope) error {
func Convert_v1alpha2_OrderSpec_To_acme_OrderSpec(in *OrderSpec, out *acme.OrderSpec, s conversion.Scope) error {
if err := autoConvert_v1alpha2_OrderSpec_To_acme_OrderSpec(in, out, s); err != nil {
return err
}
@@ -73,7 +72,7 @@ func Convert_v1alpha2_OrderSpec_To_acme_OrderSpec(in *v1alpha2.OrderSpec, out *a
return nil
}
func Convert_acme_OrderSpec_To_v1alpha2_OrderSpec(in *acme.OrderSpec, out *v1alpha2.OrderSpec, s conversion.Scope) error {
func Convert_acme_OrderSpec_To_v1alpha2_OrderSpec(in *acme.OrderSpec, out *OrderSpec, s conversion.Scope) error {
if err := autoConvert_acme_OrderSpec_To_v1alpha2_OrderSpec(in, out, s); err != nil {
return err
}
@@ -85,12 +84,12 @@ func Convert_acme_OrderSpec_To_v1alpha2_OrderSpec(in *acme.OrderSpec, out *v1alp
// Convert_acme_ACMEIssuer_To_v1alpha2_ACMEIssuer is explicitly defined to avoid issues in conversion-gen
// when referencing types in other API groups.
func Convert_acme_ACMEIssuer_To_v1alpha2_ACMEIssuer(in *acme.ACMEIssuer, out *v1alpha2.ACMEIssuer, s conversion.Scope) error {
func Convert_acme_ACMEIssuer_To_v1alpha2_ACMEIssuer(in *acme.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error {
return autoConvert_acme_ACMEIssuer_To_v1alpha2_ACMEIssuer(in, out, s)
}
// Convert_v1alpha2_ACMEIssuer_To_acme_ACMEIssuer is explicitly defined to avoid issues in conversion-gen
// when referencing types in other API groups.
func Convert_v1alpha2_ACMEIssuer_To_acme_ACMEIssuer(in *v1alpha2.ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error {
func Convert_v1alpha2_ACMEIssuer_To_acme_ACMEIssuer(in *ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error {
return autoConvert_v1alpha2_ACMEIssuer_To_acme_ACMEIssuer(in, out, s)
}
+3 -2
View File
@@ -15,9 +15,10 @@ limitations under the License.
*/
// +k8s:conversion-gen=github.com/jetstack/cert-manager/internal/apis/acme
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/internal/apis/acme/v1alpha2
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../pkg/apis/acme/v1alpha2
// +k8s:defaulter-gen-input=./
// +k8s:deepcopy-gen=package,register
// +groupName=acme.cert-manager.io
package v1alpha2
+21 -2
View File
@@ -17,10 +17,11 @@ limitations under the License.
package v1alpha2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/acme"
cmacme "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
)
// SchemeGroupVersion is group version used to register these objects
@@ -32,7 +33,8 @@ func Resource(resource string) schema.GroupResource {
}
var (
localSchemeBuilder = &cmacme.SchemeBuilder
SchemeBuilder runtime.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
@@ -41,4 +43,21 @@ func init() {
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addDefaultingFuncs)
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Order{},
&OrderList{},
&Challenge{},
&ChallengeList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
File diff suppressed because it is too large Load Diff
+6 -1
View File
@@ -3,11 +3,17 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"conversion.go",
"defaults.go",
"doc.go",
"register.go",
"types.go",
"types_challenge.go",
"types_issuer.go",
"types_order.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
"zz_generated.defaults.go",
],
importpath = "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha3",
@@ -17,7 +23,6 @@ go_library(
"//internal/apis/meta:go_default_library",
"//internal/apis/meta/v1:go_default_library",
"//pkg/apis/acme:go_default_library",
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_api//core/v1:go_default_library",
"@io_k8s_apiextensions_apiserver//pkg/apis/apiextensions/v1:go_default_library",
+11 -12
View File
@@ -20,10 +20,9 @@ import (
"k8s.io/apimachinery/pkg/conversion"
"github.com/jetstack/cert-manager/internal/apis/acme"
"github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
)
func Convert_v1alpha3_ChallengeSpec_To_acme_ChallengeSpec(in *v1alpha3.ChallengeSpec, out *acme.ChallengeSpec, s conversion.Scope) error {
func Convert_v1alpha3_ChallengeSpec_To_acme_ChallengeSpec(in *ChallengeSpec, out *acme.ChallengeSpec, s conversion.Scope) error {
if err := autoConvert_v1alpha3_ChallengeSpec_To_acme_ChallengeSpec(in, out, s); err != nil {
return err
}
@@ -31,9 +30,9 @@ func Convert_v1alpha3_ChallengeSpec_To_acme_ChallengeSpec(in *v1alpha3.Challenge
out.AuthorizationURL = in.AuthzURL
switch in.Type {
case v1alpha3.ACMEChallengeTypeHTTP01:
case ACMEChallengeTypeHTTP01:
out.Type = acme.ACMEChallengeTypeHTTP01
case v1alpha3.ACMEChallengeTypeDNS01:
case ACMEChallengeTypeDNS01:
out.Type = acme.ACMEChallengeTypeDNS01
default:
// this case should never be hit due to validation
@@ -43,7 +42,7 @@ func Convert_v1alpha3_ChallengeSpec_To_acme_ChallengeSpec(in *v1alpha3.Challenge
return nil
}
func Convert_acme_ChallengeSpec_To_v1alpha3_ChallengeSpec(in *acme.ChallengeSpec, out *v1alpha3.ChallengeSpec, s conversion.Scope) error {
func Convert_acme_ChallengeSpec_To_v1alpha3_ChallengeSpec(in *acme.ChallengeSpec, out *ChallengeSpec, s conversion.Scope) error {
if err := autoConvert_acme_ChallengeSpec_To_v1alpha3_ChallengeSpec(in, out, s); err != nil {
return err
}
@@ -52,18 +51,18 @@ func Convert_acme_ChallengeSpec_To_v1alpha3_ChallengeSpec(in *acme.ChallengeSpec
switch in.Type {
case acme.ACMEChallengeTypeHTTP01:
out.Type = v1alpha3.ACMEChallengeTypeHTTP01
out.Type = ACMEChallengeTypeHTTP01
case acme.ACMEChallengeTypeDNS01:
out.Type = v1alpha3.ACMEChallengeTypeDNS01
out.Type = ACMEChallengeTypeDNS01
default:
// this case should never be hit due to validation
out.Type = v1alpha3.ACMEChallengeType(in.Type)
out.Type = ACMEChallengeType(in.Type)
}
return nil
}
func Convert_v1alpha3_OrderSpec_To_acme_OrderSpec(in *v1alpha3.OrderSpec, out *acme.OrderSpec, s conversion.Scope) error {
func Convert_v1alpha3_OrderSpec_To_acme_OrderSpec(in *OrderSpec, out *acme.OrderSpec, s conversion.Scope) error {
if err := autoConvert_v1alpha3_OrderSpec_To_acme_OrderSpec(in, out, s); err != nil {
return err
}
@@ -73,7 +72,7 @@ func Convert_v1alpha3_OrderSpec_To_acme_OrderSpec(in *v1alpha3.OrderSpec, out *a
return nil
}
func Convert_acme_OrderSpec_To_v1alpha3_OrderSpec(in *acme.OrderSpec, out *v1alpha3.OrderSpec, s conversion.Scope) error {
func Convert_acme_OrderSpec_To_v1alpha3_OrderSpec(in *acme.OrderSpec, out *OrderSpec, s conversion.Scope) error {
if err := autoConvert_acme_OrderSpec_To_v1alpha3_OrderSpec(in, out, s); err != nil {
return err
}
@@ -85,12 +84,12 @@ func Convert_acme_OrderSpec_To_v1alpha3_OrderSpec(in *acme.OrderSpec, out *v1alp
// Convert_acme_ACMEIssuer_To_v1alpha3_ACMEIssuer is explicitly defined to avoid issues in conversion-gen
// when referencing types in other API groups.
func Convert_acme_ACMEIssuer_To_v1alpha3_ACMEIssuer(in *acme.ACMEIssuer, out *v1alpha3.ACMEIssuer, s conversion.Scope) error {
func Convert_acme_ACMEIssuer_To_v1alpha3_ACMEIssuer(in *acme.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error {
return autoConvert_acme_ACMEIssuer_To_v1alpha3_ACMEIssuer(in, out, s)
}
// Convert_v1alpha3_ACMEIssuer_To_acme_ACMEIssuer is explicitly defined to avoid issues in conversion-gen
// when referencing types in other API groups.
func Convert_v1alpha3_ACMEIssuer_To_acme_ACMEIssuer(in *v1alpha3.ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error {
func Convert_v1alpha3_ACMEIssuer_To_acme_ACMEIssuer(in *ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error {
return autoConvert_v1alpha3_ACMEIssuer_To_acme_ACMEIssuer(in, out, s)
}
+3 -2
View File
@@ -15,9 +15,10 @@ limitations under the License.
*/
// +k8s:conversion-gen=github.com/jetstack/cert-manager/internal/apis/acme
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/internal/apis/acme/v1alpha3
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../pkg/apis/acme/v1alpha3
// +k8s:defaulter-gen-input=./
// +k8s:deepcopy-gen=package,register
// +groupName=acme.cert-manager.io
package v1alpha3
+21 -2
View File
@@ -17,10 +17,11 @@ limitations under the License.
package v1alpha3
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/acme"
cmacme "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
)
// SchemeGroupVersion is group version used to register these objects
@@ -32,7 +33,8 @@ func Resource(resource string) schema.GroupResource {
}
var (
localSchemeBuilder = &cmacme.SchemeBuilder
SchemeBuilder runtime.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
@@ -41,4 +43,21 @@ func init() {
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addDefaultingFuncs)
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Order{},
&OrderList{},
&Challenge{},
&ChallengeList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
File diff suppressed because it is too large Load Diff
+6 -1
View File
@@ -3,11 +3,17 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"conversion.go",
"defaults.go",
"doc.go",
"register.go",
"types.go",
"types_challenge.go",
"types_issuer.go",
"types_order.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
"zz_generated.defaults.go",
],
importpath = "github.com/jetstack/cert-manager/internal/apis/acme/v1beta1",
@@ -17,7 +23,6 @@ go_library(
"//internal/apis/meta:go_default_library",
"//internal/apis/meta/v1:go_default_library",
"//pkg/apis/acme:go_default_library",
"//pkg/apis/acme/v1beta1:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_api//core/v1:go_default_library",
"@io_k8s_apiextensions_apiserver//pkg/apis/apiextensions/v1:go_default_library",
+2 -3
View File
@@ -20,17 +20,16 @@ import (
"k8s.io/apimachinery/pkg/conversion"
"github.com/jetstack/cert-manager/internal/apis/acme"
"github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
)
// Convert_acme_ACMEIssuer_To_v1beta1_ACMEIssuer is explicitly defined to avoid issues in conversion-gen
// when referencing types in other API groups.
func Convert_acme_ACMEIssuer_To_v1beta1_ACMEIssuer(in *acme.ACMEIssuer, out *v1beta1.ACMEIssuer, s conversion.Scope) error {
func Convert_acme_ACMEIssuer_To_v1beta1_ACMEIssuer(in *acme.ACMEIssuer, out *ACMEIssuer, s conversion.Scope) error {
return autoConvert_acme_ACMEIssuer_To_v1beta1_ACMEIssuer(in, out, s)
}
// Convert_v1beta1_ACMEIssuer_To_acme_ACMEIssuer is explicitly defined to avoid issues in conversion-gen
// when referencing types in other API groups.
func Convert_v1beta1_ACMEIssuer_To_acme_ACMEIssuer(in *v1beta1.ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error {
func Convert_v1beta1_ACMEIssuer_To_acme_ACMEIssuer(in *ACMEIssuer, out *acme.ACMEIssuer, s conversion.Scope) error {
return autoConvert_v1beta1_ACMEIssuer_To_acme_ACMEIssuer(in, out, s)
}
+3 -2
View File
@@ -15,9 +15,10 @@ limitations under the License.
*/
// +k8s:conversion-gen=github.com/jetstack/cert-manager/internal/apis/acme
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/internal/apis/acme/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../pkg/apis/acme/v1beta1
// +k8s:defaulter-gen-input=./
// +k8s:deepcopy-gen=package,register
// +groupName=acme.cert-manager.io
package v1beta1
+21 -2
View File
@@ -17,10 +17,11 @@ limitations under the License.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/acme"
cmacme "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
)
// SchemeGroupVersion is group version used to register these objects
@@ -32,7 +33,8 @@ func Resource(resource string) schema.GroupResource {
}
var (
localSchemeBuilder = &cmacme.SchemeBuilder
SchemeBuilder runtime.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
@@ -41,4 +43,21 @@ func init() {
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addDefaultingFuncs)
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Order{},
&OrderList{},
&Challenge{},
&ChallengeList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -13,10 +13,10 @@ go_library(
deps = [
"//internal/api/validation:go_default_library",
"//internal/apis/acme:go_default_library",
"//internal/apis/acme/v1alpha2:go_default_library",
"//internal/apis/acme/v1alpha3:go_default_library",
"//internal/apis/acme/v1beta1:go_default_library",
"//pkg/apis/acme/v1:go_default_library",
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/apis/acme/v1beta1:go_default_library",
"@io_k8s_api//admission/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
@@ -35,10 +35,10 @@ go_test(
deps = [
"//internal/api/validation:go_default_library",
"//internal/apis/acme:go_default_library",
"//internal/apis/acme/v1alpha2:go_default_library",
"//internal/apis/acme/v1alpha3:go_default_library",
"//internal/apis/acme/v1beta1:go_default_library",
"//pkg/apis/acme/v1:go_default_library",
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/apis/acme/v1beta1:go_default_library",
"@io_k8s_api//admission/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/util/validation/field:go_default_library",
@@ -27,10 +27,10 @@ import (
"github.com/jetstack/cert-manager/internal/api/validation"
cmacme "github.com/jetstack/cert-manager/internal/apis/acme"
cmacmev1alpha2 "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha2"
cmacmev1alpha3 "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha3"
cmacmev1beta1 "github.com/jetstack/cert-manager/internal/apis/acme/v1beta1"
cmacmev1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1"
cmacmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
cmacmev1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
cmacmev1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
)
func TestValidateChallengeUpdate(t *testing.T) {
+3 -3
View File
@@ -23,10 +23,10 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/internal/api/validation"
cmacmev1alpha2 "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha2"
cmacmev1alpha3 "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha3"
cmacmev1beta1 "github.com/jetstack/cert-manager/internal/apis/acme/v1beta1"
cmacme "github.com/jetstack/cert-manager/pkg/apis/acme/v1"
cmacmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
cmacmev1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
cmacmev1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
)
// This file holds temporary functionality for cert-manager v1.4 API deprecation.
+3 -3
View File
@@ -29,10 +29,10 @@ import (
"github.com/jetstack/cert-manager/internal/api/validation"
cmacme "github.com/jetstack/cert-manager/internal/apis/acme"
cmacmev1alpha2 "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha2"
cmacmev1alpha3 "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha3"
cmacmev1beta1 "github.com/jetstack/cert-manager/internal/apis/acme/v1beta1"
cmacmev1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1"
cmacmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
cmacmev1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
cmacmev1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
)
type testValue string
@@ -3,11 +3,18 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"conversion.go",
"defaults.go",
"doc.go",
"generic_issuer.go",
"register.go",
"types.go",
"types_certificate.go",
"types_certificaterequest.go",
"types_issuer.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
"zz_generated.defaults.go",
],
importpath = "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha2",
@@ -18,9 +25,7 @@ go_library(
"//internal/apis/certmanager:go_default_library",
"//internal/apis/meta:go_default_library",
"//internal/apis/meta/v1:go_default_library",
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/apis/certmanager:go_default_library",
"//pkg/apis/certmanager/v1alpha2:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/conversion:go_default_library",
@@ -20,10 +20,9 @@ import (
"k8s.io/apimachinery/pkg/conversion"
"github.com/jetstack/cert-manager/internal/apis/certmanager"
"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
)
func Convert_v1alpha2_CertificateSpec_To_certmanager_CertificateSpec(in *v1alpha2.CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error {
func Convert_v1alpha2_CertificateSpec_To_certmanager_CertificateSpec(in *CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error {
if err := autoConvert_v1alpha2_CertificateSpec_To_certmanager_CertificateSpec(in, out, s); err != nil {
return err
}
@@ -42,18 +41,18 @@ func Convert_v1alpha2_CertificateSpec_To_certmanager_CertificateSpec(in *v1alpha
}
switch in.KeyAlgorithm {
case v1alpha2.ECDSAKeyAlgorithm:
case ECDSAKeyAlgorithm:
out.PrivateKey.Algorithm = certmanager.ECDSAKeyAlgorithm
case v1alpha2.RSAKeyAlgorithm:
case RSAKeyAlgorithm:
out.PrivateKey.Algorithm = certmanager.RSAKeyAlgorithm
default:
out.PrivateKey.Algorithm = certmanager.PrivateKeyAlgorithm(in.KeyAlgorithm)
}
switch in.KeyEncoding {
case v1alpha2.PKCS1:
case PKCS1:
out.PrivateKey.Encoding = certmanager.PKCS1
case v1alpha2.PKCS8:
case PKCS8:
out.PrivateKey.Encoding = certmanager.PKCS8
default:
out.PrivateKey.Encoding = certmanager.PrivateKeyEncoding(in.KeyEncoding)
@@ -65,7 +64,7 @@ func Convert_v1alpha2_CertificateSpec_To_certmanager_CertificateSpec(in *v1alpha
return nil
}
func Convert_certmanager_CertificateSpec_To_v1alpha2_CertificateSpec(in *certmanager.CertificateSpec, out *v1alpha2.CertificateSpec, s conversion.Scope) error {
func Convert_certmanager_CertificateSpec_To_v1alpha2_CertificateSpec(in *certmanager.CertificateSpec, out *CertificateSpec, s conversion.Scope) error {
if err := autoConvert_certmanager_CertificateSpec_To_v1alpha2_CertificateSpec(in, out, s); err != nil {
return err
}
@@ -79,20 +78,20 @@ func Convert_certmanager_CertificateSpec_To_v1alpha2_CertificateSpec(in *certman
if in.PrivateKey != nil {
switch in.PrivateKey.Algorithm {
case certmanager.ECDSAKeyAlgorithm:
out.KeyAlgorithm = v1alpha2.ECDSAKeyAlgorithm
out.KeyAlgorithm = ECDSAKeyAlgorithm
case certmanager.RSAKeyAlgorithm:
out.KeyAlgorithm = v1alpha2.RSAKeyAlgorithm
out.KeyAlgorithm = RSAKeyAlgorithm
default:
out.KeyAlgorithm = v1alpha2.KeyAlgorithm(in.PrivateKey.Algorithm)
out.KeyAlgorithm = KeyAlgorithm(in.PrivateKey.Algorithm)
}
switch in.PrivateKey.Encoding {
case certmanager.PKCS1:
out.KeyEncoding = v1alpha2.PKCS1
out.KeyEncoding = PKCS1
case certmanager.PKCS8:
out.KeyEncoding = v1alpha2.PKCS8
out.KeyEncoding = PKCS8
default:
out.KeyEncoding = v1alpha2.KeyEncoding(in.PrivateKey.Encoding)
out.KeyEncoding = KeyEncoding(in.PrivateKey.Encoding)
}
out.KeySize = in.PrivateKey.Size
@@ -101,15 +100,15 @@ func Convert_certmanager_CertificateSpec_To_v1alpha2_CertificateSpec(in *certman
return nil
}
func Convert_certmanager_X509Subject_To_v1alpha2_X509Subject(in *certmanager.X509Subject, out *v1alpha2.X509Subject, s conversion.Scope) error {
func Convert_certmanager_X509Subject_To_v1alpha2_X509Subject(in *certmanager.X509Subject, out *X509Subject, s conversion.Scope) error {
return autoConvert_certmanager_X509Subject_To_v1alpha2_X509Subject(in, out, s)
}
func Convert_certmanager_CertificatePrivateKey_To_v1alpha2_CertificatePrivateKey(in *certmanager.CertificatePrivateKey, out *v1alpha2.CertificatePrivateKey, s conversion.Scope) error {
func Convert_certmanager_CertificatePrivateKey_To_v1alpha2_CertificatePrivateKey(in *certmanager.CertificatePrivateKey, out *CertificatePrivateKey, s conversion.Scope) error {
return autoConvert_certmanager_CertificatePrivateKey_To_v1alpha2_CertificatePrivateKey(in, out, s)
}
func Convert_v1alpha2_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in *v1alpha2.CertificateRequestSpec, out *certmanager.CertificateRequestSpec, s conversion.Scope) error {
func Convert_v1alpha2_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in *CertificateRequestSpec, out *certmanager.CertificateRequestSpec, s conversion.Scope) error {
if err := autoConvert_v1alpha2_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in, out, s); err != nil {
return err
}
@@ -118,7 +117,7 @@ func Convert_v1alpha2_CertificateRequestSpec_To_certmanager_CertificateRequestSp
return nil
}
func Convert_certmanager_CertificateRequestSpec_To_v1alpha2_CertificateRequestSpec(in *certmanager.CertificateRequestSpec, out *v1alpha2.CertificateRequestSpec, s conversion.Scope) error {
func Convert_certmanager_CertificateRequestSpec_To_v1alpha2_CertificateRequestSpec(in *certmanager.CertificateRequestSpec, out *CertificateRequestSpec, s conversion.Scope) error {
if err := autoConvert_certmanager_CertificateRequestSpec_To_v1alpha2_CertificateRequestSpec(in, out, s); err != nil {
return err
}
+3 -2
View File
@@ -15,9 +15,10 @@ limitations under the License.
*/
// +k8s:conversion-gen=github.com/jetstack/cert-manager/internal/apis/certmanager
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha2
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../pkg/apis/certmanager/v1alpha2
// +k8s:defaulter-gen-input=./
// +k8s:deepcopy-gen=package,register
// +groupName=cert-manager.io
package v1alpha2
@@ -20,7 +20,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
cmacme "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
cmacme "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha2"
)
type GenericIssuer interface {
+25 -2
View File
@@ -17,10 +17,11 @@ limitations under the License.
package v1alpha2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/certmanager"
cmapi "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
)
// SchemeGroupVersion is group version used to register these objects
@@ -32,7 +33,8 @@ func Resource(resource string) schema.GroupResource {
}
var (
localSchemeBuilder = &cmapi.SchemeBuilder
SchemeBuilder runtime.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
@@ -41,4 +43,25 @@ func init() {
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addDefaultingFuncs)
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Certificate{},
&CertificateList{},
&Issuer{},
&IssuerList{},
&ClusterIssuer{},
&ClusterIssuerList{},
&CertificateRequest{},
&CertificateRequestList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
@@ -19,7 +19,7 @@ package v1alpha2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
cmacme "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
cmacme "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha2"
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
)
File diff suppressed because it is too large Load Diff
@@ -22,7 +22,7 @@ limitations under the License.
package v1alpha2
import (
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
acmev1alpha2 "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha2"
metav1 "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -3,11 +3,18 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"conversion.go",
"defaults.go",
"doc.go",
"generic_issuer.go",
"register.go",
"types.go",
"types_certificate.go",
"types_certificaterequest.go",
"types_issuer.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
"zz_generated.defaults.go",
],
importpath = "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha3",
@@ -18,9 +25,7 @@ go_library(
"//internal/apis/certmanager:go_default_library",
"//internal/apis/meta:go_default_library",
"//internal/apis/meta/v1:go_default_library",
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/apis/certmanager:go_default_library",
"//pkg/apis/certmanager/v1alpha3:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/conversion:go_default_library",
@@ -20,10 +20,9 @@ import (
"k8s.io/apimachinery/pkg/conversion"
"github.com/jetstack/cert-manager/internal/apis/certmanager"
"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
)
func Convert_v1alpha3_CertificateSpec_To_certmanager_CertificateSpec(in *v1alpha3.CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error {
func Convert_v1alpha3_CertificateSpec_To_certmanager_CertificateSpec(in *CertificateSpec, out *certmanager.CertificateSpec, s conversion.Scope) error {
if err := autoConvert_v1alpha3_CertificateSpec_To_certmanager_CertificateSpec(in, out, s); err != nil {
return err
}
@@ -34,18 +33,18 @@ func Convert_v1alpha3_CertificateSpec_To_certmanager_CertificateSpec(in *v1alpha
}
switch in.KeyAlgorithm {
case v1alpha3.ECDSAKeyAlgorithm:
case ECDSAKeyAlgorithm:
out.PrivateKey.Algorithm = certmanager.ECDSAKeyAlgorithm
case v1alpha3.RSAKeyAlgorithm:
case RSAKeyAlgorithm:
out.PrivateKey.Algorithm = certmanager.RSAKeyAlgorithm
default:
out.PrivateKey.Algorithm = certmanager.PrivateKeyAlgorithm(in.KeyAlgorithm)
}
switch in.KeyEncoding {
case v1alpha3.PKCS1:
case PKCS1:
out.PrivateKey.Encoding = certmanager.PKCS1
case v1alpha3.PKCS8:
case PKCS8:
out.PrivateKey.Encoding = certmanager.PKCS8
default:
out.PrivateKey.Encoding = certmanager.PrivateKeyEncoding(in.KeyEncoding)
@@ -57,7 +56,7 @@ func Convert_v1alpha3_CertificateSpec_To_certmanager_CertificateSpec(in *v1alpha
return nil
}
func Convert_certmanager_CertificateSpec_To_v1alpha3_CertificateSpec(in *certmanager.CertificateSpec, out *v1alpha3.CertificateSpec, s conversion.Scope) error {
func Convert_certmanager_CertificateSpec_To_v1alpha3_CertificateSpec(in *certmanager.CertificateSpec, out *CertificateSpec, s conversion.Scope) error {
if err := autoConvert_certmanager_CertificateSpec_To_v1alpha3_CertificateSpec(in, out, s); err != nil {
return err
}
@@ -65,20 +64,20 @@ func Convert_certmanager_CertificateSpec_To_v1alpha3_CertificateSpec(in *certman
if in.PrivateKey != nil {
switch in.PrivateKey.Algorithm {
case certmanager.ECDSAKeyAlgorithm:
out.KeyAlgorithm = v1alpha3.ECDSAKeyAlgorithm
out.KeyAlgorithm = ECDSAKeyAlgorithm
case certmanager.RSAKeyAlgorithm:
out.KeyAlgorithm = v1alpha3.RSAKeyAlgorithm
out.KeyAlgorithm = RSAKeyAlgorithm
default:
out.KeyAlgorithm = v1alpha3.KeyAlgorithm(in.PrivateKey.Algorithm)
out.KeyAlgorithm = KeyAlgorithm(in.PrivateKey.Algorithm)
}
switch in.PrivateKey.Encoding {
case certmanager.PKCS1:
out.KeyEncoding = v1alpha3.PKCS1
out.KeyEncoding = PKCS1
case certmanager.PKCS8:
out.KeyEncoding = v1alpha3.PKCS8
out.KeyEncoding = PKCS8
default:
out.KeyEncoding = v1alpha3.KeyEncoding(in.PrivateKey.Encoding)
out.KeyEncoding = KeyEncoding(in.PrivateKey.Encoding)
}
out.KeySize = in.PrivateKey.Size
@@ -87,15 +86,15 @@ func Convert_certmanager_CertificateSpec_To_v1alpha3_CertificateSpec(in *certman
return nil
}
func Convert_certmanager_X509Subject_To_v1alpha3_X509Subject(in *certmanager.X509Subject, out *v1alpha3.X509Subject, s conversion.Scope) error {
func Convert_certmanager_X509Subject_To_v1alpha3_X509Subject(in *certmanager.X509Subject, out *X509Subject, s conversion.Scope) error {
return autoConvert_certmanager_X509Subject_To_v1alpha3_X509Subject(in, out, s)
}
func Convert_certmanager_CertificatePrivateKey_To_v1alpha3_CertificatePrivateKey(in *certmanager.CertificatePrivateKey, out *v1alpha3.CertificatePrivateKey, s conversion.Scope) error {
func Convert_certmanager_CertificatePrivateKey_To_v1alpha3_CertificatePrivateKey(in *certmanager.CertificatePrivateKey, out *CertificatePrivateKey, s conversion.Scope) error {
return autoConvert_certmanager_CertificatePrivateKey_To_v1alpha3_CertificatePrivateKey(in, out, s)
}
func Convert_v1alpha3_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in *v1alpha3.CertificateRequestSpec, out *certmanager.CertificateRequestSpec, s conversion.Scope) error {
func Convert_v1alpha3_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in *CertificateRequestSpec, out *certmanager.CertificateRequestSpec, s conversion.Scope) error {
if err := autoConvert_v1alpha3_CertificateRequestSpec_To_certmanager_CertificateRequestSpec(in, out, s); err != nil {
return err
}
@@ -104,7 +103,7 @@ func Convert_v1alpha3_CertificateRequestSpec_To_certmanager_CertificateRequestSp
return nil
}
func Convert_certmanager_CertificateRequestSpec_To_v1alpha3_CertificateRequestSpec(in *certmanager.CertificateRequestSpec, out *v1alpha3.CertificateRequestSpec, s conversion.Scope) error {
func Convert_certmanager_CertificateRequestSpec_To_v1alpha3_CertificateRequestSpec(in *certmanager.CertificateRequestSpec, out *CertificateRequestSpec, s conversion.Scope) error {
if err := autoConvert_certmanager_CertificateRequestSpec_To_v1alpha3_CertificateRequestSpec(in, out, s); err != nil {
return err
}
+3 -2
View File
@@ -15,9 +15,10 @@ limitations under the License.
*/
// +k8s:conversion-gen=github.com/jetstack/cert-manager/internal/apis/certmanager
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha3
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../pkg/apis/certmanager/v1alpha3
// +k8s:defaulter-gen-input=./
// +k8s:deepcopy-gen=package,register
// +groupName=cert-manager.io
package v1alpha3
@@ -20,7 +20,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
cmacme "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
cmacme "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha3"
)
type GenericIssuer interface {
+25 -2
View File
@@ -17,10 +17,11 @@ limitations under the License.
package v1alpha3
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/certmanager"
cmapi "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
)
// SchemeGroupVersion is group version used to register these objects
@@ -32,7 +33,8 @@ func Resource(resource string) schema.GroupResource {
}
var (
localSchemeBuilder = &cmapi.SchemeBuilder
SchemeBuilder runtime.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
@@ -41,4 +43,25 @@ func init() {
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addDefaultingFuncs)
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Certificate{},
&CertificateList{},
&Issuer{},
&IssuerList{},
&ClusterIssuer{},
&ClusterIssuerList{},
&CertificateRequest{},
&CertificateRequestList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
@@ -19,7 +19,7 @@ package v1alpha3
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
cmacme "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
cmacme "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha3"
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
)
File diff suppressed because it is too large Load Diff
@@ -22,7 +22,7 @@ limitations under the License.
package v1alpha3
import (
acmev1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
acmev1alpha3 "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha3"
metav1 "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -3,10 +3,16 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"defaults.go",
"doc.go",
"register.go",
"types.go",
"types_certificate.go",
"types_certificaterequest.go",
"types_issuer.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
"zz_generated.defaults.go",
],
importpath = "github.com/jetstack/cert-manager/internal/apis/certmanager/v1beta1",
@@ -17,9 +23,7 @@ go_library(
"//internal/apis/certmanager:go_default_library",
"//internal/apis/meta:go_default_library",
"//internal/apis/meta/v1:go_default_library",
"//pkg/apis/acme/v1beta1:go_default_library",
"//pkg/apis/certmanager:go_default_library",
"//pkg/apis/certmanager/v1beta1:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/conversion:go_default_library",
+3 -2
View File
@@ -15,9 +15,10 @@ limitations under the License.
*/
// +k8s:conversion-gen=github.com/jetstack/cert-manager/internal/apis/certmanager
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1
// +k8s:conversion-gen-external-types=github.com/jetstack/cert-manager/internal/apis/certmanager/v1beta1
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../pkg/apis/certmanager/v1beta1
// +k8s:defaulter-gen-input=./
// +k8s:deepcopy-gen=package,register
// +groupName=cert-manager.io
package v1beta1
+25 -2
View File
@@ -17,10 +17,11 @@ limitations under the License.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/certmanager"
cmapi "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
)
// SchemeGroupVersion is group version used to register these objects
@@ -32,7 +33,8 @@ func Resource(resource string) schema.GroupResource {
}
var (
localSchemeBuilder = &cmapi.SchemeBuilder
SchemeBuilder runtime.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
@@ -41,4 +43,25 @@ func init() {
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addDefaultingFuncs)
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Certificate{},
&CertificateList{},
&Issuer{},
&IssuerList{},
&ClusterIssuer{},
&ClusterIssuerList{},
&CertificateRequest{},
&CertificateRequestList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
@@ -19,7 +19,7 @@ package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
cmacme "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
cmacme "github.com/jetstack/cert-manager/internal/apis/acme/v1beta1"
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
)
File diff suppressed because it is too large Load Diff
@@ -22,7 +22,7 @@ limitations under the License.
package v1beta1
import (
acmev1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
acmev1beta1 "github.com/jetstack/cert-manager/internal/apis/acme/v1beta1"
metav1 "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -18,15 +18,15 @@ go_library(
"//internal/api/validation:go_default_library",
"//internal/apis/acme:go_default_library",
"//internal/apis/certmanager:go_default_library",
"//internal/apis/certmanager/v1alpha2:go_default_library",
"//internal/apis/certmanager/v1alpha3:go_default_library",
"//internal/apis/certmanager/v1beta1:go_default_library",
"//internal/apis/certmanager/validation/util:go_default_library",
"//internal/apis/meta:go_default_library",
"//pkg/api/util:go_default_library",
"//pkg/apis/acme:go_default_library",
"//pkg/apis/certmanager:go_default_library",
"//pkg/apis/certmanager/v1:go_default_library",
"//pkg/apis/certmanager/v1alpha2:go_default_library",
"//pkg/apis/certmanager/v1alpha3:go_default_library",
"//pkg/apis/certmanager/v1beta1:go_default_library",
"//pkg/util:go_default_library",
"//pkg/util/pki:go_default_library",
"@com_github_kr_pretty//:go_default_library",
@@ -60,9 +60,6 @@ go_test(
"//internal/apis/certmanager/v1beta1:go_default_library",
"//internal/apis/meta:go_default_library",
"//pkg/apis/certmanager/v1:go_default_library",
"//pkg/apis/certmanager/v1alpha2:go_default_library",
"//pkg/apis/certmanager/v1alpha3:go_default_library",
"//pkg/apis/certmanager/v1beta1:go_default_library",
"//pkg/util/pki:go_default_library",
"//test/unit/gen:go_default_library",
"@com_github_stretchr_testify//assert:go_default_library",
@@ -28,11 +28,11 @@ import (
"github.com/jetstack/cert-manager/internal/api/validation"
internalcmapi "github.com/jetstack/cert-manager/internal/apis/certmanager"
cmapiv1alpha2 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha2"
cmapiv1alpha3 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha3"
cmapiv1beta1 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1beta1"
cmmeta "github.com/jetstack/cert-manager/internal/apis/meta"
cmapi "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
cmapiv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
cmapiv1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
cmapiv1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
"github.com/stretchr/testify/assert"
)
@@ -27,10 +27,10 @@ import (
"github.com/jetstack/cert-manager/internal/api/validation"
cmapi "github.com/jetstack/cert-manager/internal/apis/certmanager"
cmapiv1alpha2 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha2"
cmapiv1alpha3 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha3"
cmapiv1beta1 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1beta1"
cmapiv1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
cmapiv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
cmapiv1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
cmapiv1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
)
func TestValidateClusterIssuer(t *testing.T) {
@@ -23,10 +23,10 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/internal/api/validation"
cmapiv1alpha2 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha2"
cmapiv1alpha3 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha3"
cmapiv1beta1 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1beta1"
cmapi "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
cmapiv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
cmapiv1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
cmapiv1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
)
// This file holds temporary functionality for cert-manager v1.4 API deprecation.
@@ -31,11 +31,11 @@ import (
"github.com/jetstack/cert-manager/internal/api/validation"
cmacme "github.com/jetstack/cert-manager/internal/apis/acme"
cmapi "github.com/jetstack/cert-manager/internal/apis/certmanager"
cmapiv1alpha2 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha2"
cmapiv1alpha3 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha3"
cmapiv1beta1 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1beta1"
cmmeta "github.com/jetstack/cert-manager/internal/apis/meta"
cmapiv1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
cmapiv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
cmapiv1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
cmapiv1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
)
var (
+6 -6
View File
@@ -6,15 +6,15 @@ go_library(
importpath = "github.com/jetstack/cert-manager/pkg/api",
visibility = ["//visibility:public"],
deps = [
"//internal/apis/acme/v1alpha2:go_default_library",
"//internal/apis/acme/v1alpha3:go_default_library",
"//internal/apis/acme/v1beta1:go_default_library",
"//internal/apis/certmanager/v1alpha2:go_default_library",
"//internal/apis/certmanager/v1alpha3:go_default_library",
"//internal/apis/certmanager/v1beta1:go_default_library",
"//pkg/acme/webhook/apis/acme/v1alpha1:go_default_library",
"//pkg/apis/acme/v1:go_default_library",
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/apis/acme/v1beta1:go_default_library",
"//pkg/apis/certmanager/v1:go_default_library",
"//pkg/apis/certmanager/v1alpha2:go_default_library",
"//pkg/apis/certmanager/v1alpha3:go_default_library",
"//pkg/apis/certmanager/v1beta1:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apiextensions_apiserver//pkg/apis/apiextensions/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
+6 -6
View File
@@ -26,15 +26,15 @@ import (
kscheme "k8s.io/client-go/kubernetes/scheme"
apireg "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"
cmacmev1alpha2 "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha2"
cmacmev1alpha3 "github.com/jetstack/cert-manager/internal/apis/acme/v1alpha3"
cmacmev1beta1 "github.com/jetstack/cert-manager/internal/apis/acme/v1beta1"
cmapiv1alpha2 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha2"
cmapiv1alpha3 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1alpha3"
cmapiv1beta1 "github.com/jetstack/cert-manager/internal/apis/certmanager/v1beta1"
whapi "github.com/jetstack/cert-manager/pkg/acme/webhook/apis/acme/v1alpha1"
cmacmev1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1"
cmacmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
cmacmev1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
cmacmev1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
cmapiv1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
cmapiv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
cmapiv1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
cmapiv1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
)
-3
View File
@@ -19,9 +19,6 @@ filegroup(
srcs = [
":package-srcs",
"//pkg/apis/acme/v1:all-srcs",
"//pkg/apis/acme/v1alpha2:all-srcs",
"//pkg/apis/acme/v1alpha3:all-srcs",
"//pkg/apis/acme/v1beta1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
-40
View File
@@ -1,40 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"doc.go",
"register.go",
"types.go",
"types_challenge.go",
"types_issuer.go",
"types_order.go",
"zz_generated.deepcopy.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_api//core/v1:go_default_library",
"@io_k8s_apiextensions_apiserver//pkg/apis/apiextensions/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
-20
View File
@@ -1,20 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1alpha2 is the v1alpha2 version of the API.
// +k8s:deepcopy-gen=package,register
// +groupName=acme.cert-manager.io
package v1alpha2
-58
View File
@@ -1,58 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/acme"
)
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: acme.GroupName, Version: "v1alpha2"}
// 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.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
func init() {
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Order{},
&OrderList{},
&Challenge{},
&ChallengeList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
-40
View File
@@ -1,40 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"doc.go",
"register.go",
"types.go",
"types_challenge.go",
"types_issuer.go",
"types_order.go",
"zz_generated.deepcopy.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_api//core/v1:go_default_library",
"@io_k8s_apiextensions_apiserver//pkg/apis/apiextensions/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
-20
View File
@@ -1,20 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1alpha3 is the v1alpha3 version of the API.
// +k8s:deepcopy-gen=package,register
// +groupName=acme.cert-manager.io
package v1alpha3
-58
View File
@@ -1,58 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha3
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/acme"
)
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: acme.GroupName, Version: "v1alpha3"}
// 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.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
func init() {
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Order{},
&OrderList{},
&Challenge{},
&ChallengeList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
-40
View File
@@ -1,40 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"doc.go",
"register.go",
"types.go",
"types_challenge.go",
"types_issuer.go",
"types_order.go",
"zz_generated.deepcopy.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_api//core/v1:go_default_library",
"@io_k8s_apiextensions_apiserver//pkg/apis/apiextensions/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
-20
View File
@@ -1,20 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1beta1 is the v1beta1 version of the API.
// +k8s:deepcopy-gen=package,register
// +groupName=acme.cert-manager.io
package v1beta1
-58
View File
@@ -1,58 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/acme"
)
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: acme.GroupName, Version: "v1beta1"}
// 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.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
func init() {
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Order{},
&OrderList{},
&Challenge{},
&ChallengeList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
-3
View File
@@ -19,9 +19,6 @@ filegroup(
srcs = [
":package-srcs",
"//pkg/apis/certmanager/v1:all-srcs",
"//pkg/apis/certmanager/v1alpha2:all-srcs",
"//pkg/apis/certmanager/v1alpha3:all-srcs",
"//pkg/apis/certmanager/v1beta1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
-40
View File
@@ -1,40 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"doc.go",
"generic_issuer.go",
"register.go",
"types.go",
"types_certificate.go",
"types_certificaterequest.go",
"types_issuer.go",
"zz_generated.deepcopy.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/apis/certmanager:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
-21
View File
@@ -1,21 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1alpha2 is the v1alpha2 version of the API.
// +k8s:deepcopy-gen=package,register
// +groupName=cert-manager.io
// +groupGoName=Certmanager
package v1alpha2
-62
View File
@@ -1,62 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/certmanager"
)
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: certmanager.GroupName, Version: "v1alpha2"}
// 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.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
func init() {
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Certificate{},
&CertificateList{},
&Issuer{},
&IssuerList{},
&ClusterIssuer{},
&ClusterIssuerList{},
&CertificateRequest{},
&CertificateRequestList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
-40
View File
@@ -1,40 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"doc.go",
"generic_issuer.go",
"register.go",
"types.go",
"types_certificate.go",
"types_certificaterequest.go",
"types_issuer.go",
"zz_generated.deepcopy.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/apis/certmanager:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
-21
View File
@@ -1,21 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1alpha3 is the v1alpha3 version of the API.
// +k8s:deepcopy-gen=package,register
// +groupName=cert-manager.io
// +groupGoName=Certmanager
package v1alpha3
-62
View File
@@ -1,62 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha3
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/certmanager"
)
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: certmanager.GroupName, Version: "v1alpha3"}
// 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.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
func init() {
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Certificate{},
&CertificateList{},
&Issuer{},
&IssuerList{},
&ClusterIssuer{},
&ClusterIssuerList{},
&CertificateRequest{},
&CertificateRequestList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
-39
View File
@@ -1,39 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"const.go",
"doc.go",
"register.go",
"types.go",
"types_certificate.go",
"types_certificaterequest.go",
"types_issuer.go",
"zz_generated.deepcopy.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1beta1:go_default_library",
"//pkg/apis/certmanager:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
-21
View File
@@ -1,21 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1beta1 is the v1beta1 version of the API.
// +k8s:deepcopy-gen=package,register
// +groupName=cert-manager.io
// +groupGoName=Certmanager
package v1beta1
-62
View File
@@ -1,62 +0,0 @@
/*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/jetstack/cert-manager/pkg/apis/certmanager"
)
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: certmanager.GroupName, Version: "v1beta1"}
// 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.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
func init() {
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Certificate{},
&CertificateList{},
&Issuer{},
&IssuerList{},
&ClusterIssuer{},
&ClusterIssuerList{},
&CertificateRequest{},
&CertificateRequestList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}