From 86ed14d95a7b182b31a31ba66b5b401e61f12f61 Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:31:29 +0000 Subject: [PATCH] remove GetIssuerTypeIdentifier from issuer API, moving it to the controller initialisation Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- api/v1alpha1/issuer_interface.go | 11 +- ...caterequest_controller_integration_test.go | 33 ++- .../certificaterequest_controller_test.go | 85 +++--- .../certificatesigningrequest_controller.go | 2 +- ...rtificatesigningrequest_controller_test.go | 119 ++++---- controllers/combined_controller.go | 17 +- .../combined_controller_integration_test.go | 24 +- controllers/predicates_test.go | 4 - controllers/request_controller.go | 32 ++- docs/api.md | 13 +- .../simple/api/simple_cluster_issuer_types.go | 7 +- examples/simple/api/simple_issuer_types.go | 7 +- examples/simple/controller/signer.go | 9 +- examples/simple/go.mod | 88 +++--- examples/simple/go.sum | 257 ++++++++++-------- go.mod | 2 +- .../testapi/api/test_cluster_issuer_types.go | 7 +- internal/testapi/api/test_issuer_types.go | 7 +- 18 files changed, 406 insertions(+), 318 deletions(-) diff --git a/api/v1alpha1/issuer_interface.go b/api/v1alpha1/issuer_interface.go index a250518..3a28f3a 100644 --- a/api/v1alpha1/issuer_interface.go +++ b/api/v1alpha1/issuer_interface.go @@ -27,15 +27,6 @@ import ( type Issuer interface { runtime.Object metav1.Object - GetStatus() *IssuerStatus - // GetIssuerTypeIdentifier returns a string that uniquely identifies the - // issuer type. This should be a constant across all instances of this - // issuer type. This string is used as a prefix when determining the - // issuer type for a Kubernetes CertificateSigningRequest resource based - // on the issuerName field. The value should be formatted as follows: - // ".". For example, the value - // "simpleclusterissuers.issuer.cert-manager.io" will match all CSRs - // with an issuerName set to eg. "simpleclusterissuers.issuer.cert-manager.io/issuer1". - GetIssuerTypeIdentifier() string + GetStatus() *IssuerStatus } diff --git a/controllers/certificaterequest_controller_integration_test.go b/controllers/certificaterequest_controller_integration_test.go index a5d2aa6..35e9e70 100644 --- a/controllers/certificaterequest_controller_integration_test.go +++ b/controllers/certificaterequest_controller_integration_test.go @@ -32,6 +32,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/tools/record" @@ -85,12 +86,16 @@ func TestCertificateRequestControllerIntegrationIssuerInitiallyNotFoundAndNotRea func(mgr ctrl.Manager) controllerInterface { return &CertificateRequestReconciler{ RequestController: RequestController{ - IssuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - ClusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - FieldOwner: fieldOwner, - MaxRetryDuration: time.Minute, - EventSource: kubeutil.NewEventStore(), - Client: mgr.GetClient(), + IssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + ClusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + FieldOwner: fieldOwner, + MaxRetryDuration: time.Minute, + EventSource: kubeutil.NewEventStore(), + Client: mgr.GetClient(), Sign: func(_ context.Context, cr signer.CertificateRequestObject, _ v1alpha1.Issuer) (signer.PEMBundle, error) { atomic.AddUint64(&counters[extractIdFromNamespace(t, cr.GetNamespace())], 1) return signer.PEMBundle{ @@ -224,12 +229,16 @@ func TestCertificateRequestControllerIntegrationSetCondition(t *testing.T) { func(mgr ctrl.Manager) controllerInterface { return &CertificateRequestReconciler{ RequestController: RequestController{ - IssuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - ClusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - FieldOwner: fieldOwner, - MaxRetryDuration: time.Minute, - EventSource: kubeutil.NewEventStore(), - Client: mgr.GetClient(), + IssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + ClusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + FieldOwner: fieldOwner, + MaxRetryDuration: time.Minute, + EventSource: kubeutil.NewEventStore(), + Client: mgr.GetClient(), Sign: func(ctx context.Context, cr signer.CertificateRequestObject, _ v1alpha1.Issuer) (signer.PEMBundle, error) { atomic.AddUint64(&counter, 1) select { diff --git a/controllers/certificaterequest_controller_test.go b/controllers/certificaterequest_controller_test.go index 33eb9e3..711b0f2 100644 --- a/controllers/certificaterequest_controller_test.go +++ b/controllers/certificaterequest_controller_test.go @@ -31,6 +31,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" clocktesting "k8s.io/utils/clock/testing" @@ -942,15 +943,19 @@ func TestCertificateRequestReconcilerReconcile(t *testing.T) { controller := (&CertificateRequestReconciler{ RequestController: RequestController{ - IssuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - ClusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - FieldOwner: fieldOwner, - MaxRetryDuration: time.Minute, - EventSource: kubeutil.NewEventStore(), - Client: fakeClient, - Sign: tc.sign, - EventRecorder: fakeRecorder, - Clock: fakeClock2, + IssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + ClusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + FieldOwner: fieldOwner, + MaxRetryDuration: time.Minute, + EventSource: kubeutil.NewEventStore(), + Client: fakeClient, + Sign: tc.sign, + EventRecorder: fakeRecorder, + Clock: fakeClock2, }, }).Init() @@ -1000,8 +1005,8 @@ func TestCertificateRequestMatchIssuerType(t *testing.T) { type testcase struct { name string - issuerTypes []v1alpha1.Issuer - clusterIssuerTypes []v1alpha1.Issuer + issuerTypes map[schema.GroupResource]v1alpha1.Issuer + clusterIssuerTypes map[schema.GroupResource]v1alpha1.Issuer cr *cmapi.CertificateRequest expectedIssuerType v1alpha1.Issuer @@ -1046,46 +1051,64 @@ func TestCertificateRequestMatchIssuerType(t *testing.T) { expectedError: errormatch.ErrorContains("no issuer found for reference: [Group=\"test\", Kind=\"\", Name=\"name\"]"), }, { - name: "match issuer", - issuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - clusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - cr: createCr("name", "namespace", "TestIssuer", "testing.cert-manager.io"), + name: "match issuer", + issuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + clusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + cr: createCr("name", "namespace", "TestIssuer", "testing.cert-manager.io"), expectedIssuerType: &api.TestIssuer{}, expectedIssuerName: types.NamespacedName{Name: "name", Namespace: "namespace"}, }, { - name: "match cluster issuer", - issuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - clusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - cr: createCr("name", "namespace", "TestClusterIssuer", "testing.cert-manager.io"), + name: "match cluster issuer", + issuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + clusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + cr: createCr("name", "namespace", "TestClusterIssuer", "testing.cert-manager.io"), expectedIssuerType: &api.TestClusterIssuer{}, expectedIssuerName: types.NamespacedName{Name: "name"}, }, { - name: "select kind if empty", - issuerTypes: []v1alpha1.Issuer{}, - clusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - cr: createCr("name", "namespace", "", "testing.cert-manager.io"), + name: "select kind if empty", + issuerTypes: map[schema.GroupResource]v1alpha1.Issuer{}, + clusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + cr: createCr("name", "namespace", "", "testing.cert-manager.io"), expectedIssuerType: &api.TestClusterIssuer{}, expectedIssuerName: types.NamespacedName{Name: "name"}, }, { - name: "prefer issuer over cluster issuer (v1)", - issuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - clusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - cr: createCr("name", "namespace", "", "testing.cert-manager.io"), + name: "prefer issuer over cluster issuer (v1)", + issuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + clusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + cr: createCr("name", "namespace", "", "testing.cert-manager.io"), expectedIssuerType: &api.TestIssuer{}, expectedIssuerName: types.NamespacedName{Name: "name", Namespace: "namespace"}, }, { - name: "prefer issuer over cluster issuer (v2)", - issuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - clusterIssuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - cr: createCr("name", "namespace", "", "testing.cert-manager.io"), + name: "prefer issuer over cluster issuer (v2)", + issuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + clusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + cr: createCr("name", "namespace", "", "testing.cert-manager.io"), expectedIssuerType: &api.TestIssuer{}, expectedIssuerName: types.NamespacedName{Name: "name", Namespace: "namespace"}, diff --git a/controllers/certificatesigningrequest_controller.go b/controllers/certificatesigningrequest_controller.go index 607662a..bee1bfa 100644 --- a/controllers/certificatesigningrequest_controller.go +++ b/controllers/certificatesigningrequest_controller.go @@ -59,7 +59,7 @@ func (r *CertificateSigningRequestReconciler) matchIssuerType(requestObject clie // Search for matching issuer for _, issuerType := range r.AllIssuerTypes() { - if issuerTypeIdentifier != issuerType.Type.GetIssuerTypeIdentifier() { + if issuerTypeIdentifier != issuerType.IssuerTypeIdentifier { continue } diff --git a/controllers/certificatesigningrequest_controller_test.go b/controllers/certificatesigningrequest_controller_test.go index 1270e0f..1aa7e92 100644 --- a/controllers/certificatesigningrequest_controller_test.go +++ b/controllers/certificatesigningrequest_controller_test.go @@ -33,6 +33,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" clocktesting "k8s.io/utils/clock/testing" @@ -207,7 +208,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { name: "set-ready-pending-missing-issuer", objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }), }, expectedStatusPatch: &certificatesv1.CertificateSigningRequestStatus{ @@ -224,7 +225,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { name: "set-ready-pending-issuer-has-no-ready-condition", objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }), testutil.TestClusterIssuerFrom(clusterIssuer1, func(si *api.TestClusterIssuer) { @@ -245,7 +246,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { name: "set-ready-pending-issuer-is-not-ready", objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }), testutil.TestClusterIssuerFrom(clusterIssuer1, testutil.SetTestClusterIssuerStatusCondition( @@ -271,7 +272,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { name: "set-ready-pending-issuer-ready-outdated", objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }), testutil.TestClusterIssuerFrom(clusterIssuer1, testutil.SetTestClusterIssuerGeneration(issuer1.Generation+1), @@ -295,7 +296,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }, func(cr *certificatesv1.CertificateSigningRequest) { cr.CreationTimestamp = metav1.NewTime(fakeTimeObj2.Add(-2 * time.Minute)) @@ -331,7 +332,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }, func(cr *certificatesv1.CertificateSigningRequest) { cr.CreationTimestamp = metav1.NewTime(fakeTimeObj2.Add(-2 * time.Minute)) @@ -372,7 +373,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { cr.CreationTimestamp = fakeTimeObj2 }, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }, ), testutil.TestClusterIssuerFrom(clusterIssuer1), @@ -417,7 +418,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { cr.CreationTimestamp = fakeTimeObj2 }, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }, cmgen.SetCertificateSigningRequestStatusCondition(certificatesv1.CertificateSigningRequestCondition{ Type: "[condition type]", @@ -467,7 +468,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }, func(cr *certificatesv1.CertificateSigningRequest) { cr.CreationTimestamp = metav1.NewTime(fakeTimeObj2.Add(-2 * time.Minute)) @@ -520,7 +521,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }, func(cr *certificatesv1.CertificateSigningRequest) { cr.CreationTimestamp = metav1.NewTime(fakeTimeObj2.Add(-2 * time.Minute)) @@ -580,7 +581,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }, func(cr *certificatesv1.CertificateSigningRequest) { cr.CreationTimestamp = metav1.NewTime(fakeTimeObj2.Add(-2 * time.Minute)) @@ -626,7 +627,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }, ), testutil.TestClusterIssuerFrom(clusterIssuer1), @@ -666,7 +667,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }, ), testutil.TestClusterIssuerFrom(clusterIssuer1), @@ -699,7 +700,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }, func(cr *certificatesv1.CertificateSigningRequest) { cr.CreationTimestamp = fakeTimeObj2 @@ -721,7 +722,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { sign: successSigner("a-signed-certificate"), objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s.%s", issuer1.GetIssuerTypeIdentifier(), issuer1.Namespace, issuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s.%s", api.TestIssuerGroupVersionResource.Resource, api.TestIssuerGroupVersionResource.Group, issuer1.Namespace, issuer1.Name) }), testutil.TestIssuerFrom(issuer1), }, @@ -734,7 +735,7 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { sign: successSigner("a-signed-certificate"), objects: []client.Object{ cmgen.CertificateSigningRequestFrom(cr1, func(cr *certificatesv1.CertificateSigningRequest) { - cr.Spec.SignerName = fmt.Sprintf("%s/%s", clusterIssuer1.GetIssuerTypeIdentifier(), clusterIssuer1.Name) + cr.Spec.SignerName = fmt.Sprintf("%s.%s/%s", api.TestClusterIssuerGroupVersionResource.Resource, api.TestClusterIssuerGroupVersionResource.Group, clusterIssuer1.Name) }), testutil.TestClusterIssuerFrom(clusterIssuer1), }, @@ -776,15 +777,19 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { controller := (&CertificateSigningRequestReconciler{ RequestController: RequestController{ - IssuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - ClusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - FieldOwner: fieldOwner, - MaxRetryDuration: time.Minute, - EventSource: kubeutil.NewEventStore(), - Client: fakeClient, - Sign: tc.sign, - EventRecorder: fakeRecorder, - Clock: fakeClock2, + IssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + ClusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + FieldOwner: fieldOwner, + MaxRetryDuration: time.Minute, + EventSource: kubeutil.NewEventStore(), + Client: fakeClient, + Sign: tc.sign, + EventRecorder: fakeRecorder, + Clock: fakeClock2, }, }).Init() @@ -817,8 +822,8 @@ func TestCertificateSigningRequestMatchIssuerType(t *testing.T) { type testcase struct { name string - issuerTypes []v1alpha1.Issuer - clusterIssuerTypes []v1alpha1.Issuer + issuerTypes map[schema.GroupResource]v1alpha1.Issuer + clusterIssuerTypes map[schema.GroupResource]v1alpha1.Issuer csr *certificatesv1.CertificateSigningRequest expectedIssuerType v1alpha1.Issuer @@ -856,48 +861,68 @@ func TestCertificateSigningRequestMatchIssuerType(t *testing.T) { expectedError: errormatch.ErrorContains("invalid signer name, should have format /: \"aaaaaa\""), }, { - name: "unknown issuer type identifier", - issuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - clusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - csr: createCsr("aaaaa.testing.cert-manager.io/namespace.name"), + name: "unknown issuer type identifier", + issuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + clusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + csr: createCsr("aaaaa.testing.cert-manager.io/namespace.name"), expectedIssuerType: nil, expectedIssuerName: types.NamespacedName{}, expectedError: errormatch.ErrorContains("no issuer found for signer name: \"aaaaa.testing.cert-manager.io/namespace.name\""), }, { - name: "match issuer", - issuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - clusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - csr: createCsr("testissuers.testing.cert-manager.io/namespace.name"), + name: "match issuer", + issuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + clusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + csr: createCsr("testissuers.testing.cert-manager.io/namespace.name"), expectedIssuerType: nil, expectedIssuerName: types.NamespacedName{}, expectedError: errormatch.ErrorContains("invalid SignerName, \"testissuers.testing.cert-manager.io\" is a namespaced issuer type, namespaced issuers are not supported for Kubernetes CSRs"), }, { - name: "match cluster issuer", - issuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - clusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - csr: createCsr("testclusterissuers.testing.cert-manager.io/name"), + name: "match cluster issuer", + issuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + clusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + csr: createCsr("testclusterissuers.testing.cert-manager.io/name"), expectedIssuerType: &api.TestClusterIssuer{}, expectedIssuerName: types.NamespacedName{Name: "name"}, }, { - name: "cluster issuer with dot in name", - issuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - clusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - csr: createCsr("testclusterissuers.testing.cert-manager.io/name.test"), + name: "cluster issuer with dot in name", + issuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + clusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + csr: createCsr("testclusterissuers.testing.cert-manager.io/name.test"), expectedIssuerType: &api.TestClusterIssuer{}, expectedIssuerName: types.NamespacedName{Name: "name.test"}, }, { - name: "cluster issuer with empty name", - issuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - clusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - csr: createCsr("testclusterissuers.testing.cert-manager.io/"), + name: "cluster issuer with empty name", + issuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + clusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + csr: createCsr("testclusterissuers.testing.cert-manager.io/"), expectedIssuerType: &api.TestClusterIssuer{}, expectedIssuerName: types.NamespacedName{Name: ""}, diff --git a/controllers/combined_controller.go b/controllers/combined_controller.go index b856877..bcf8327 100644 --- a/controllers/combined_controller.go +++ b/controllers/combined_controller.go @@ -19,6 +19,8 @@ package controllers import ( "context" "fmt" + "maps" + "slices" "time" "k8s.io/apimachinery/pkg/runtime/schema" @@ -34,8 +36,14 @@ import ( ) type CombinedController struct { - IssuerTypes []v1alpha1.Issuer - ClusterIssuerTypes []v1alpha1.Issuer + // IssuerTypes is a map of empty namespaced issuer objects, each supported issuer type + // should have its own entry. The key should be the GroupResource for that issuer, the + // resource being the plural lowercase resource name. + IssuerTypes map[schema.GroupResource]v1alpha1.Issuer + // ClusterIssuerTypes is a map of empty cluster-scoped issuer objects, each supported issuer type + // should have its own entry. The key should be the GroupResource for that issuer, the + // resource being the plural lowercase resource name. + ClusterIssuerTypes map[schema.GroupResource]v1alpha1.Issuer FieldOwner string @@ -102,7 +110,10 @@ func (r *CombinedController) SetupWithManager(ctx context.Context, mgr ctrl.Mana r.Clock = clock.RealClock{} } - for _, issuerType := range append(r.IssuerTypes, r.ClusterIssuerTypes...) { + for _, issuerType := range slices.Concat( + slices.Collect(maps.Values(r.IssuerTypes)), + slices.Collect(maps.Values(r.ClusterIssuerTypes)), + ) { if err = (&IssuerReconciler{ ForObject: issuerType, diff --git a/controllers/combined_controller_integration_test.go b/controllers/combined_controller_integration_test.go index 5a7919e..0b92f22 100644 --- a/controllers/combined_controller_integration_test.go +++ b/controllers/combined_controller_integration_test.go @@ -72,10 +72,14 @@ func TestCombinedControllerTemporaryFailedCertificateRequestRetrigger(t *testing ctx = setupControllersAPIServerAndClient(t, ctx, kubeClients, func(mgr ctrl.Manager) controllerInterface { return &CombinedController{ - IssuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - ClusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - FieldOwner: fieldOwner, - MaxRetryDuration: time.Minute, + IssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + ClusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + FieldOwner: fieldOwner, + MaxRetryDuration: time.Minute, Check: func(_ context.Context, _ v1alpha1.Issuer) error { select { case err := <-checkResult: @@ -458,10 +462,14 @@ func TestCombinedControllerTiming(t *testing.T) { //nolint:tparallel ctx := setupControllersAPIServerAndClient(t, ctx, kubeClients, func(mgr ctrl.Manager) controllerInterface { return &CombinedController{ - IssuerTypes: []v1alpha1.Issuer{&api.TestIssuer{}}, - ClusterIssuerTypes: []v1alpha1.Issuer{&api.TestClusterIssuer{}}, - FieldOwner: fieldOwner, - MaxRetryDuration: tc.maxRetryDuration, + IssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestIssuerGroupVersionResource.GroupResource(): &api.TestIssuer{}, + }, + ClusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.TestClusterIssuerGroupVersionResource.GroupResource(): &api.TestClusterIssuer{}, + }, + FieldOwner: fieldOwner, + MaxRetryDuration: tc.maxRetryDuration, Check: func(_ context.Context, _ v1alpha1.Issuer) error { resultsMutex.Lock() defer resultsMutex.Unlock() diff --git a/controllers/predicates_test.go b/controllers/predicates_test.go index 5e9a295..e77e221 100644 --- a/controllers/predicates_test.go +++ b/controllers/predicates_test.go @@ -397,10 +397,6 @@ func (ti *testissuer) GetStatus() *v1alpha1.IssuerStatus { return ti.Status } -func (ti *testissuer) GetIssuerTypeIdentifier() string { - return "test" -} - func TestLinkedIssuerPredicate(t *testing.T) { predicate := controllers.LinkedIssuerPredicate{} diff --git a/controllers/request_controller.go b/controllers/request_controller.go index b1c0474..ee6af3d 100644 --- a/controllers/request_controller.go +++ b/controllers/request_controller.go @@ -53,8 +53,14 @@ import ( // is used to interact with the request object. // Currently, we support cert-manager CertificateRequests and Kubernetes CertificateSigningRequests. type RequestController struct { - IssuerTypes []v1alpha1.Issuer - ClusterIssuerTypes []v1alpha1.Issuer + // IssuerTypes is a map of empty namespaced issuer objects, each supported issuer type + // should have its own entry. The key should be the GroupResource for that issuer, the + // resource being the plural lowercase resource name. + IssuerTypes map[schema.GroupResource]v1alpha1.Issuer + // Cluster is a map of empty cluster-scoped issuer objects, each supported issuer type + // should have its own entry. The key should be the GroupResource for that issuer, the + // resource being the plural lowercase resource name. + ClusterIssuerTypes map[schema.GroupResource]v1alpha1.Issuer FieldOwner string MaxRetryDuration time.Duration @@ -97,8 +103,9 @@ type MatchIssuerType func(client.Object) (v1alpha1.Issuer, client.ObjectKey, err type RequestObjectHelperCreator func(client.Object) RequestObjectHelper type IssuerType struct { - Type v1alpha1.Issuer - IsNamespaced bool + Type v1alpha1.Issuer + IssuerTypeIdentifier string + IsNamespaced bool } func (r *RequestController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -352,17 +359,20 @@ func (r *RequestController) reconcileStatusPatch( func (r *RequestController) setAllIssuerTypesWithGroupVersionKind(scheme *runtime.Scheme) error { issuers := make([]IssuerType, 0, len(r.IssuerTypes)+len(r.ClusterIssuerTypes)) - for _, issuer := range r.IssuerTypes { + for gr, issuer := range r.IssuerTypes { issuers = append(issuers, IssuerType{ - Type: issuer, - IsNamespaced: true, + Type: issuer, + // "." + IssuerTypeIdentifier: fmt.Sprintf("%s.%s", gr.Resource, gr.Group), + IsNamespaced: true, }) - } - for _, issuer := range r.ClusterIssuerTypes { + for gr, issuer := range r.ClusterIssuerTypes { issuers = append(issuers, IssuerType{ - Type: issuer, - IsNamespaced: false, + Type: issuer, + // "." + IssuerTypeIdentifier: fmt.Sprintf("%s.%s", gr.Resource, gr.Group), + IsNamespaced: false, }) } diff --git a/docs/api.md b/docs/api.md index 699a54b..10c9cfd 100644 --- a/docs/api.md +++ b/docs/api.md @@ -50,7 +50,7 @@ const ( ``` -## type [Issuer]() +## type [Issuer]() @@ -58,17 +58,8 @@ const ( type Issuer interface { runtime.Object metav1.Object - GetStatus() *IssuerStatus - // GetIssuerTypeIdentifier returns a string that uniquely identifies the - // issuer type. This should be a constant across all instances of this - // issuer type. This string is used as a prefix when determining the - // issuer type for a Kubernetes CertificateSigningRequest resource based - // on the issuerName field. The value should be formatted as follows: - // ".". For example, the value - // "simpleclusterissuers.issuer.cert-manager.io" will match all CSRs - // with an issuerName set to eg. "simpleclusterissuers.issuer.cert-manager.io/issuer1". - GetIssuerTypeIdentifier() string + GetStatus() *IssuerStatus } ``` diff --git a/examples/simple/api/simple_cluster_issuer_types.go b/examples/simple/api/simple_cluster_issuer_types.go index 15ef353..0e4f66d 100644 --- a/examples/simple/api/simple_cluster_issuer_types.go +++ b/examples/simple/api/simple_cluster_issuer_types.go @@ -18,10 +18,13 @@ package api import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" "github.com/cert-manager/issuer-lib/api/v1alpha1" ) +var SimpleClusterIssuerGroupVersionResource schema.GroupVersionResource = SchemeGroupVersion.WithResource("simpleclusterissuers") + // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster @@ -46,10 +49,6 @@ func (vi *SimpleClusterIssuer) GetStatus() *v1alpha1.IssuerStatus { return &vi.Status } -func (vi *SimpleClusterIssuer) GetIssuerTypeIdentifier() string { - return "simpleclusterissuers.testing.cert-manager.io" -} - var _ v1alpha1.Issuer = &SimpleClusterIssuer{} // +kubebuilder:object:root=true diff --git a/examples/simple/api/simple_issuer_types.go b/examples/simple/api/simple_issuer_types.go index 3ca1693..a16c8df 100644 --- a/examples/simple/api/simple_issuer_types.go +++ b/examples/simple/api/simple_issuer_types.go @@ -18,10 +18,13 @@ package api import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" "github.com/cert-manager/issuer-lib/api/v1alpha1" ) +var SimpleIssuerGroupVersionResource schema.GroupVersionResource = SchemeGroupVersion.WithResource("simpleissuers") + // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status" @@ -45,10 +48,6 @@ func (vi *SimpleIssuer) GetStatus() *v1alpha1.IssuerStatus { return &vi.Status } -func (vi *SimpleIssuer) GetIssuerTypeIdentifier() string { - return "simpleissuers.testing.cert-manager.io" -} - var _ v1alpha1.Issuer = &SimpleIssuer{} // +kubebuilder:object:root=true diff --git a/examples/simple/controller/signer.go b/examples/simple/controller/signer.go index f1f15df..16eceba 100644 --- a/examples/simple/controller/signer.go +++ b/examples/simple/controller/signer.go @@ -27,6 +27,7 @@ import ( "math/big" "time" + "k8s.io/apimachinery/pkg/runtime/schema" ctrl "sigs.k8s.io/controller-runtime" "simple-issuer/api" @@ -51,8 +52,12 @@ type Signer struct{} func (s Signer) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error { return (&controllers.CombinedController{ - IssuerTypes: []v1alpha1.Issuer{&api.SimpleIssuer{}}, - ClusterIssuerTypes: []v1alpha1.Issuer{&api.SimpleClusterIssuer{}}, + IssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.SimpleIssuerGroupVersionResource.GroupResource(): &api.SimpleIssuer{}, + }, + ClusterIssuerTypes: map[schema.GroupResource]v1alpha1.Issuer{ + api.SimpleClusterIssuerGroupVersionResource.GroupResource(): &api.SimpleClusterIssuer{}, + }, FieldOwner: "simpleissuer.testing.cert-manager.io", MaxRetryDuration: 1 * time.Minute, diff --git a/examples/simple/go.mod b/examples/simple/go.mod index e4aeb8d..0f069f1 100644 --- a/examples/simple/go.mod +++ b/examples/simple/go.mod @@ -1,80 +1,82 @@ module simple-issuer -go 1.21 +go 1.23.0 + +replace github.com/cert-manager/issuer-lib => ../../ require ( - github.com/cert-manager/cert-manager v1.13.3 + github.com/cert-manager/cert-manager v1.16.2 github.com/cert-manager/issuer-lib v0.5.0 - github.com/stretchr/testify v1.8.4 - go.uber.org/zap v1.26.0 - k8s.io/api v0.29.1 - k8s.io/apimachinery v0.29.1 - k8s.io/client-go v0.29.1 - k8s.io/klog/v2 v2.120.1 - sigs.k8s.io/controller-runtime v0.17.0 + github.com/stretchr/testify v1.10.0 + go.uber.org/zap v1.27.0 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 + k8s.io/klog/v2 v2.130.1 + sigs.k8s.io/controller-runtime v0.19.2 ) require ( github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/evanphx/json-patch/v5 v5.8.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-asn1-ber/asn1-ber v1.5.4 // indirect - github.com/go-ldap/ldap/v3 v3.4.5 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/go-asn1-ber/asn1-ber v1.5.6 // indirect + github.com/go-ldap/ldap/v3 v3.4.8 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.18.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/prometheus/client_golang v1.20.4 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/x448/float16 v0.8.4 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/time v0.6.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.29.0 // indirect - k8s.io/component-base v0.29.0 // indirect - k8s.io/kube-aggregator v0.28.1 // indirect - k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect - k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect - sigs.k8s.io/gateway-api v0.8.0 // indirect + k8s.io/apiextensions-apiserver v0.31.3 // indirect + k8s.io/component-base v0.31.3 // indirect + k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect + k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect + sigs.k8s.io/gateway-api v1.1.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/examples/simple/go.sum b/examples/simple/go.sum index ce2b7cc..9aec238 100644 --- a/examples/simple/go.sum +++ b/examples/simple/go.sum @@ -1,89 +1,102 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8= github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= -github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74 h1:Kk6a4nehpJ3UuJRqlA3JxYxBZEqCeOmATOvrbT4p9RA= -github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= +github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa h1:LHTHcTQiSGT7VVbI0o4wBRNQIgn917usHWOd6VAffYI= +github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/cert-manager/cert-manager v1.13.3 h1:3R4G0RI7K0OkTZhWlVOC5SGZMYa2NwqmQJoyKydrz/M= -github.com/cert-manager/cert-manager v1.13.3/go.mod h1:BM2+Pt/NmSv1Zr25/MHv6BgIEF9IUxA1xAjp80qkxgc= -github.com/cert-manager/issuer-lib v0.5.0 h1:w60NsUvTxOGIfosfRSVhjwiPRIsTZvvfxa3vUnuQKuM= -github.com/cert-manager/issuer-lib v0.5.0/go.mod h1:ulq+QTxQccoIMzi3FDIhBFmgj6hGE/M4EGzO0VqiTz0= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cert-manager/cert-manager v1.16.2 h1:c9UU2E+8XWGruyvC/mdpc1wuLddtgmNr8foKdP7a8Jg= +github.com/cert-manager/cert-manager v1.16.2/go.mod h1:MfLVTL45hFZsqmaT1O0+b2ugaNNQQZttSFV9hASHUb0= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= -github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= +github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/go-asn1-ber/asn1-ber v1.5.4 h1:vXT6d/FNDiELJnLb6hGNa309LMsrCoYFvpwHDF0+Y1A= -github.com/go-asn1-ber/asn1-ber v1.5.4/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-ldap/ldap/v3 v3.4.5 h1:ekEKmaDrpvR2yf5Nc/DClsGG9lAmdDixe44mLzlW5r8= -github.com/go-ldap/ldap/v3 v3.4.5/go.mod h1:bMGIq3AGbytbaMwf8wdv5Phdxz0FWHTIYMSzyrYgnQs= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/go-asn1-ber/asn1-ber v1.5.5/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-asn1-ber/asn1-ber v1.5.6 h1:CYsqysemXfEaQbyrLJmdsCRuufHoLa3P/gGWGl5TDrM= +github.com/go-asn1-ber/asn1-ber v1.5.6/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-ldap/ldap/v3 v3.4.8 h1:loKJyspcRezt2Q3ZRMq2p/0v8iOurlmeXDPw6fikSvQ= +github.com/go-ldap/ldap/v3 v3.4.8/go.mod h1:qS3Sjlu76eHfHGpUdWkAXQTw4beih+cHsco2jXlIXrk= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= +github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= +github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= +github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= +github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -91,39 +104,42 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= -github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -131,41 +147,46 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -174,79 +195,79 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.29.1 h1:DAjwWX/9YT7NQD4INu49ROJuZAAAP/Ijki48GUPzxqw= -k8s.io/api v0.29.1/go.mod h1:7Kl10vBRUXhnQQI8YR/R327zXC8eJ7887/+Ybta+RoQ= -k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= -k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= -k8s.io/apimachinery v0.29.1 h1:KY4/E6km/wLBguvCZv8cKTeOwwOBqFNjwJIdMkMbbRc= -k8s.io/apimachinery v0.29.1/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= -k8s.io/client-go v0.29.1 h1:19B/+2NGEwnFLzt0uB5kNJnfTsbV8w6TgQRz9l7ti7A= -k8s.io/client-go v0.29.1/go.mod h1:TDG/psL9hdet0TI9mGyHJSgRkW3H9JZk2dNEUS7bRks= -k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= -k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-aggregator v0.28.1 h1:rvG4llYnQKHjj6YjjoBPEJxfD1uH0DJwkrJTNKGAaCs= -k8s.io/kube-aggregator v0.28.1/go.mod h1:JaLizMe+AECSpO2OmrWVsvnG0V3dX1RpW+Wq/QHbu18= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.17.0 h1:fjJQf8Ukya+VjogLO6/bNX9HE6Y2xpsO5+fyS26ur/s= -sigs.k8s.io/controller-runtime v0.17.0/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= -sigs.k8s.io/gateway-api v0.8.0 h1:isQQ3Jx2qFP7vaA3ls0846F0Amp9Eq14P08xbSwVbQg= -sigs.k8s.io/gateway-api v0.8.0/go.mod h1:okOnjPNBFbIS/Rw9kAhuIUaIkLhTKEu+ARIuXk2dgaM= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= +k8s.io/apiextensions-apiserver v0.31.3 h1:+GFGj2qFiU7rGCsA5o+p/rul1OQIq6oYpQw4+u+nciE= +k8s.io/apiextensions-apiserver v0.31.3/go.mod h1:2DSpFhUZZJmn/cr/RweH1cEVVbzFw9YBu4T+U3mf1e4= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= +k8s.io/component-base v0.31.3 h1:DMCXXVx546Rfvhj+3cOm2EUxhS+EyztH423j+8sOwhQ= +k8s.io/component-base v0.31.3/go.mod h1:xME6BHfUOafRgT0rGVBGl7TuSg8Z9/deT7qq6w7qjIU= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= +k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.19.2 h1:3sPrF58XQEPzbE8T81TN6selQIMGbtYwuaJ6eDssDF8= +sigs.k8s.io/controller-runtime v0.19.2/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= +sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= +sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= diff --git a/go.mod b/go.mod index b0c7994..cd1814e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cert-manager/issuer-lib -go 1.22.0 +go 1.23.0 require ( github.com/cert-manager/cert-manager v1.16.2 diff --git a/internal/testapi/api/test_cluster_issuer_types.go b/internal/testapi/api/test_cluster_issuer_types.go index 3b6a846..15b924a 100644 --- a/internal/testapi/api/test_cluster_issuer_types.go +++ b/internal/testapi/api/test_cluster_issuer_types.go @@ -18,10 +18,13 @@ package api import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" "github.com/cert-manager/issuer-lib/api/v1alpha1" ) +var TestClusterIssuerGroupVersionResource schema.GroupVersionResource = SchemeGroupVersion.WithResource("testclusterissuers") + // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster @@ -46,10 +49,6 @@ func (vi *TestClusterIssuer) GetStatus() *v1alpha1.IssuerStatus { return &vi.Status } -func (vi *TestClusterIssuer) GetIssuerTypeIdentifier() string { - return "testclusterissuers.testing.cert-manager.io" -} - var _ v1alpha1.Issuer = &TestClusterIssuer{} // +kubebuilder:object:root=true diff --git a/internal/testapi/api/test_issuer_types.go b/internal/testapi/api/test_issuer_types.go index efbcde4..5a0b932 100644 --- a/internal/testapi/api/test_issuer_types.go +++ b/internal/testapi/api/test_issuer_types.go @@ -18,10 +18,13 @@ package api import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" "github.com/cert-manager/issuer-lib/api/v1alpha1" ) +var TestIssuerGroupVersionResource schema.GroupVersionResource = SchemeGroupVersion.WithResource("testissuers") + // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status" @@ -45,10 +48,6 @@ func (vi *TestIssuer) GetStatus() *v1alpha1.IssuerStatus { return &vi.Status } -func (vi *TestIssuer) GetIssuerTypeIdentifier() string { - return "testissuers.testing.cert-manager.io" -} - var _ v1alpha1.Issuer = &TestIssuer{} // +kubebuilder:object:root=true