From 7b1ef76f37ba33b96be3f6afd5542139c02fc9d1 Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:37:24 +0000 Subject: [PATCH] use metav1 Conditions in Issuer API Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- api/v1alpha1/issuer_interface.go | 3 +- api/v1alpha1/issuer_status_types.go | 6 +- api/v1alpha1/types.go | 6 + api/v1alpha1/zz_generated.deepcopy.go | 4 +- conditions/issuer.go | 26 +- conditions/issuer_test.go | 114 ++++---- ...caterequest_controller_integration_test.go | 4 +- .../certificaterequest_controller_test.go | 12 +- ...rtificatesigningrequest_controller_test.go | 12 +- .../combined_controller_integration_test.go | 29 +- controllers/issuer_controller.go | 23 +- controllers/issuer_controller_test.go | 102 ++++--- controllers/predicates.go | 22 +- controllers/predicates_test.go | 48 ++-- controllers/request_controller.go | 8 +- controllers/request_objecthelper.go | 2 +- ...request_objecthelper_certificaterequest.go | 2 +- ..._objecthelper_certificatesigningrequest.go | 2 +- docs/api.md | 19 +- .../simple/api/simple_cluster_issuer_types.go | 4 +- examples/simple/api/simple_issuer_types.go | 4 +- ....cert-manager.io_simpleclusterissuers.yaml | 42 +-- ...testing.cert-manager.io_simpleissuers.yaml | 42 +-- examples/simple/go.mod | 90 +++--- examples/simple/go.sum | 257 ++++++++++-------- go.mod | 4 +- go.sum | 4 +- .../testapi/api/test_cluster_issuer_types.go | 4 +- internal/testapi/api/test_issuer_types.go | 4 +- ...ng.cert-manager.io_testclusterissuers.yaml | 42 +-- .../testing.cert-manager.io_testissuers.yaml | 42 +-- internal/testapi/testutil/api_gen.go | 10 +- 32 files changed, 533 insertions(+), 460 deletions(-) diff --git a/api/v1alpha1/issuer_interface.go b/api/v1alpha1/issuer_interface.go index a250518..64a2366 100644 --- a/api/v1alpha1/issuer_interface.go +++ b/api/v1alpha1/issuer_interface.go @@ -27,7 +27,8 @@ import ( type Issuer interface { runtime.Object metav1.Object - GetStatus() *IssuerStatus + + GetConditions() []metav1.Condition // GetIssuerTypeIdentifier returns a string that uniquely identifies the // issuer type. This should be a constant across all instances of this diff --git a/api/v1alpha1/issuer_status_types.go b/api/v1alpha1/issuer_status_types.go index ad77850..a4e54c9 100644 --- a/api/v1alpha1/issuer_status_types.go +++ b/api/v1alpha1/issuer_status_types.go @@ -16,9 +16,7 @@ limitations under the License. package v1alpha1 -import ( - cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type IssuerStatus struct { // List of status conditions to indicate the status of an Issuer. @@ -26,5 +24,5 @@ type IssuerStatus struct { // +listType=map // +listMapKey=type // +optional - Conditions []cmapi.IssuerCondition `json:"conditions,omitempty"` + Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/api/v1alpha1/types.go b/api/v1alpha1/types.go index 7b1f8bb..ec074f1 100644 --- a/api/v1alpha1/types.go +++ b/api/v1alpha1/types.go @@ -16,6 +16,12 @@ limitations under the License. package v1alpha1 +const ( + // IssuerConditionTypeReady is the type of condition that indicates whether + // an Issuer is ready for use. + IssuerConditionTypeReady = "Ready" +) + const ( // CertificateRequestConditionReasonInitializing is the value assigned to // the Reason field of the Ready condition when issuer-lib first diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 0f7f984..5894d10 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -21,7 +21,7 @@ limitations under the License. package v1alpha1 import ( - "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -29,7 +29,7 @@ func (in *IssuerStatus) DeepCopyInto(out *IssuerStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]v1.IssuerCondition, len(*in)) + *out = make([]v1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/conditions/issuer.go b/conditions/issuer.go index 56cf230..e139ad7 100644 --- a/conditions/issuer.go +++ b/conditions/issuer.go @@ -17,8 +17,6 @@ limitations under the License. package conditions import ( - cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/clock" ) @@ -27,14 +25,14 @@ import ( // the added condition. func SetIssuerStatusCondition( clock clock.PassiveClock, - existingConditions []cmapi.IssuerCondition, - patchConditions *[]cmapi.IssuerCondition, + existingConditions []metav1.Condition, + patchConditions *[]metav1.Condition, observedGeneration int64, - conditionType cmapi.IssuerConditionType, - status cmmeta.ConditionStatus, + conditionType string, + status metav1.ConditionStatus, reason, message string, -) (*cmapi.IssuerCondition, *metav1.Time) { - newCondition := cmapi.IssuerCondition{ +) (*metav1.Condition, metav1.Time) { + newCondition := metav1.Condition{ Type: conditionType, Status: status, Reason: reason, @@ -43,7 +41,7 @@ func SetIssuerStatusCondition( } nowTime := metav1.NewTime(clock.Now()) - newCondition.LastTransitionTime = &nowTime + newCondition.LastTransitionTime = nowTime // Reset the LastTransitionTime if the status hasn't changed for _, cond := range existingConditions { @@ -68,20 +66,20 @@ func SetIssuerStatusCondition( // Overwrite the existing condition (*patchConditions)[idx] = newCondition - return &newCondition, &nowTime + return &newCondition, nowTime } // If we've not found an existing condition of this type, we simply insert // the new condition into the slice. *patchConditions = append(*patchConditions, newCondition) - return &newCondition, &nowTime + return &newCondition, nowTime } func GetIssuerStatusCondition( - conditions []cmapi.IssuerCondition, - conditionType cmapi.IssuerConditionType, -) *cmapi.IssuerCondition { + conditions []metav1.Condition, + conditionType string, +) *metav1.Condition { for _, cond := range conditions { if cond.Type == conditionType { return &cond diff --git a/conditions/issuer_test.go b/conditions/issuer_test.go index 7dcbd15..b12653e 100644 --- a/conditions/issuer_test.go +++ b/conditions/issuer_test.go @@ -19,23 +19,23 @@ package conditions import ( "testing" - cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clocktesting "k8s.io/utils/clock/testing" + + "github.com/cert-manager/issuer-lib/api/v1alpha1" ) func TestSetIssuerStatusCondition(t *testing.T) { type testCase struct { name string - existingConditions []cmapi.IssuerCondition - patchConditions []cmapi.IssuerCondition - conditionType cmapi.IssuerConditionType - status cmmeta.ConditionStatus + existingConditions []metav1.Condition + patchConditions []metav1.Condition + conditionType string + status metav1.ConditionStatus - expectedCondition cmapi.IssuerCondition + expectedCondition metav1.Condition expectNewEntry bool } @@ -49,93 +49,93 @@ func TestSetIssuerStatusCondition(t *testing.T) { testCases := []testCase{ { name: "if the condition does NOT change its status, the last transition time should not be updated", - existingConditions: []cmapi.IssuerCondition{ + existingConditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, }, }, - patchConditions: []cmapi.IssuerCondition{}, - conditionType: cmapi.IssuerConditionReady, - status: cmmeta.ConditionTrue, - - expectedCondition: cmapi.IssuerCondition{ - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, - LastTransitionTime: &fakeTimeObj1, + patchConditions: []metav1.Condition{}, + conditionType: v1alpha1.IssuerConditionTypeReady, + status: metav1.ConditionTrue, + + expectedCondition: metav1.Condition{ + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, + LastTransitionTime: fakeTimeObj1, }, expectNewEntry: true, }, { name: "if the condition DOES change its status, the last transition time should be updated", - existingConditions: []cmapi.IssuerCondition{ + existingConditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, }, }, - patchConditions: []cmapi.IssuerCondition{}, - conditionType: cmapi.IssuerConditionReady, - status: cmmeta.ConditionFalse, - - expectedCondition: cmapi.IssuerCondition{ - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionFalse, - LastTransitionTime: &fakeTimeObj2, + patchConditions: []metav1.Condition{}, + conditionType: v1alpha1.IssuerConditionTypeReady, + status: metav1.ConditionFalse, + + expectedCondition: metav1.Condition{ + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionFalse, + LastTransitionTime: fakeTimeObj2, }, expectNewEntry: true, }, { name: "if the patch contains already contains the condition, it should get overwritten", - existingConditions: []cmapi.IssuerCondition{ + existingConditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, }, }, - patchConditions: []cmapi.IssuerCondition{ + patchConditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, }, }, - conditionType: cmapi.IssuerConditionReady, - status: cmmeta.ConditionTrue, + conditionType: v1alpha1.IssuerConditionTypeReady, + status: metav1.ConditionTrue, - expectedCondition: cmapi.IssuerCondition{ - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, - LastTransitionTime: &fakeTimeObj1, + expectedCondition: metav1.Condition{ + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, + LastTransitionTime: fakeTimeObj1, }, expectNewEntry: false, }, { name: "if the patch contains another condition type, it should get added", - existingConditions: []cmapi.IssuerCondition{ + existingConditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, }, }, - patchConditions: []cmapi.IssuerCondition{ + patchConditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, }, }, - conditionType: cmapi.IssuerConditionType("AnotherCondition"), - status: cmmeta.ConditionTrue, + conditionType: "AnotherCondition", + status: metav1.ConditionTrue, - expectedCondition: cmapi.IssuerCondition{ - Type: cmapi.IssuerConditionType("AnotherCondition"), - Status: cmmeta.ConditionTrue, - LastTransitionTime: &fakeTimeObj2, + expectedCondition: metav1.Condition{ + Type: "AnotherCondition", + Status: metav1.ConditionTrue, + LastTransitionTime: fakeTimeObj2, }, expectNewEntry: true, }, } - defaultConditions := func(t *testing.T, conditions []cmapi.IssuerCondition) []cmapi.IssuerCondition { + defaultConditions := func(t *testing.T, conditions []metav1.Condition) []metav1.Condition { t.Helper() for i := range conditions { @@ -145,7 +145,7 @@ func TestSetIssuerStatusCondition(t *testing.T) { conditions[i].ObservedGeneration != 0 { t.Fatal("this field is managed by the test and should not be set") } - conditions[i].LastTransitionTime = &fakeTimeObj1 + conditions[i].LastTransitionTime = fakeTimeObj1 conditions[i].Reason = "OldReason" conditions[i].Message = "OldMessage" conditions[i].ObservedGeneration = 7 @@ -159,7 +159,7 @@ func TestSetIssuerStatusCondition(t *testing.T) { test.existingConditions = defaultConditions(t, test.existingConditions) test.patchConditions = defaultConditions(t, test.patchConditions) - patchConditions := append([]cmapi.IssuerCondition{}, test.patchConditions...) + patchConditions := append([]metav1.Condition{}, test.patchConditions...) cond, time := SetIssuerStatusCondition( fakeClock2, @@ -181,7 +181,7 @@ func TestSetIssuerStatusCondition(t *testing.T) { test.expectedCondition.Message = "NewMessage" test.expectedCondition.ObservedGeneration = 8 require.Equal(t, test.expectedCondition, *cond) - require.Equal(t, &fakeTimeObj2, time) + require.Equal(t, fakeTimeObj2, time) // Check that the patchConditions slice got a new entry if expected if test.expectNewEntry { diff --git a/controllers/certificaterequest_controller_integration_test.go b/controllers/certificaterequest_controller_integration_test.go index a5d2aa6..8c27be3 100644 --- a/controllers/certificaterequest_controller_integration_test.go +++ b/controllers/certificaterequest_controller_integration_test.go @@ -420,8 +420,8 @@ func markIssuerReady(t *testing.T, ctx context.Context, kc client.Client, clock issuerStatus.Conditions, &issuerStatus.Conditions, issuer.GetGeneration(), - cmapi.IssuerConditionReady, - cmmeta.ConditionTrue, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionTrue, v1alpha1.IssuerConditionReasonChecked, "Succeeded checking the issuer", ) diff --git a/controllers/certificaterequest_controller_test.go b/controllers/certificaterequest_controller_test.go index 33eb9e3..44b3c00 100644 --- a/controllers/certificaterequest_controller_test.go +++ b/controllers/certificaterequest_controller_test.go @@ -79,8 +79,8 @@ func TestCertificateRequestReconcilerReconcile(t *testing.T) { testutil.SetTestIssuerGeneration(70), testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionTrue, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionTrue, v1alpha1.IssuerConditionReasonChecked, "Succeeded checking the issuer", ), @@ -91,8 +91,8 @@ func TestCertificateRequestReconcilerReconcile(t *testing.T) { testutil.SetTestClusterIssuerGeneration(70), testutil.SetTestClusterIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionTrue, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionTrue, v1alpha1.IssuerConditionReasonChecked, "Succeeded checking the issuer", ), @@ -335,8 +335,8 @@ func TestCertificateRequestReconcilerReconcile(t *testing.T) { testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, "[REASON]", "[MESSAGE]", ), diff --git a/controllers/certificatesigningrequest_controller_test.go b/controllers/certificatesigningrequest_controller_test.go index 1270e0f..fcf13da 100644 --- a/controllers/certificatesigningrequest_controller_test.go +++ b/controllers/certificatesigningrequest_controller_test.go @@ -81,8 +81,8 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { testutil.SetTestIssuerGeneration(70), testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionTrue, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionTrue, v1alpha1.IssuerConditionReasonChecked, "Succeeded checking the issuer", ), @@ -93,8 +93,8 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { testutil.SetTestClusterIssuerGeneration(70), testutil.SetTestClusterIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionTrue, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionTrue, v1alpha1.IssuerConditionReasonChecked, "Succeeded checking the issuer", ), @@ -250,8 +250,8 @@ func TestCertificateSigningRequestReconcilerReconcile(t *testing.T) { testutil.TestClusterIssuerFrom(clusterIssuer1, testutil.SetTestClusterIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, "[REASON]", "[MESSAGE]", ), diff --git a/controllers/combined_controller_integration_test.go b/controllers/combined_controller_integration_test.go index 5a7919e..2074b8d 100644 --- a/controllers/combined_controller_integration_test.go +++ b/controllers/combined_controller_integration_test.go @@ -29,6 +29,7 @@ import ( cmgen "github.com/cert-manager/cert-manager/test/unit/gen" "github.com/stretchr/testify/assert" "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/watch" @@ -100,7 +101,7 @@ func TestCombinedControllerTemporaryFailedCertificateRequestRetrigger(t *testing type testcase struct { name string issuerError error - issuerReadyCondition *cmapi.IssuerCondition + issuerReadyCondition *metav1.Condition certificateReadyCondition *cmapi.CertificateRequestCondition checkAutoRecovery bool } @@ -109,9 +110,9 @@ func TestCombinedControllerTemporaryFailedCertificateRequestRetrigger(t *testing { name: "test-normal-error", issuerError: fmt.Errorf("[error message]"), - issuerReadyCondition: &cmapi.IssuerCondition{ - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionFalse, + issuerReadyCondition: &metav1.Condition{ + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionFalse, Reason: v1alpha1.IssuerConditionReasonPending, Message: "Not ready yet: [error message]", }, @@ -126,9 +127,9 @@ func TestCombinedControllerTemporaryFailedCertificateRequestRetrigger(t *testing { name: "test-permanent-error", issuerError: signer.PermanentError{Err: fmt.Errorf("[error message]")}, - issuerReadyCondition: &cmapi.IssuerCondition{ - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionFalse, + issuerReadyCondition: &metav1.Condition{ + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionFalse, Reason: v1alpha1.IssuerConditionReasonFailed, Message: "Failed permanently: [error message]", }, @@ -155,8 +156,8 @@ func TestCombinedControllerTemporaryFailedCertificateRequestRetrigger(t *testing testutil.SetTestIssuerGeneration(70), testutil.SetTestIssuerStatusCondition( clock.RealClock{}, - cmapi.IssuerConditionReady, - cmmeta.ConditionTrue, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionTrue, v1alpha1.IssuerConditionReasonChecked, "Succeeded checking the issuer", ), @@ -179,11 +180,11 @@ func TestCombinedControllerTemporaryFailedCertificateRequestRetrigger(t *testing checkResult <- error(nil) t.Log("Waiting for the TestIssuer to be Ready") err := checkComplete(func(obj runtime.Object) error { - readyCondition := conditions.GetIssuerStatusCondition(obj.(*api.TestIssuer).Status.Conditions, cmapi.IssuerConditionReady) + readyCondition := conditions.GetIssuerStatusCondition(obj.(*api.TestIssuer).Status.Conditions, v1alpha1.IssuerConditionTypeReady) if (readyCondition == nil) || (readyCondition.ObservedGeneration != issuer.Generation) || - (readyCondition.Status != cmmeta.ConditionTrue) || + (readyCondition.Status != metav1.ConditionTrue) || (readyCondition.Reason != v1alpha1.IssuerConditionReasonChecked) || (readyCondition.Message != "Succeeded checking the issuer") { return fmt.Errorf("incorrect ready condition: %v", readyCondition) @@ -218,7 +219,7 @@ func TestCombinedControllerTemporaryFailedCertificateRequestRetrigger(t *testing t.Log("Waiting for Issuer to have a Pending IssuerFailedWillRetry condition") err = checkIssuerComplete(func(obj runtime.Object) error { - readyCondition := conditions.GetIssuerStatusCondition(obj.(*api.TestIssuer).Status.Conditions, cmapi.IssuerConditionReady) + readyCondition := conditions.GetIssuerStatusCondition(obj.(*api.TestIssuer).Status.Conditions, v1alpha1.IssuerConditionTypeReady) if (readyCondition == nil) || (readyCondition.ObservedGeneration != issuer.Generation) || @@ -252,11 +253,11 @@ func TestCombinedControllerTemporaryFailedCertificateRequestRetrigger(t *testing checkComplete = kubeClients.StartObjectWatch(t, ctx, issuer) checkResult <- error(nil) err = checkComplete(func(obj runtime.Object) error { - readyCondition := conditions.GetIssuerStatusCondition(obj.(*api.TestIssuer).Status.Conditions, cmapi.IssuerConditionReady) + readyCondition := conditions.GetIssuerStatusCondition(obj.(*api.TestIssuer).Status.Conditions, v1alpha1.IssuerConditionTypeReady) if (readyCondition == nil) || (readyCondition.ObservedGeneration != issuer.Generation) || - (readyCondition.Status != cmmeta.ConditionTrue) || + (readyCondition.Status != metav1.ConditionTrue) || (readyCondition.Reason != v1alpha1.IssuerConditionReasonChecked) || (readyCondition.Message != "Succeeded checking the issuer") { return fmt.Errorf("incorrect ready condition: %v", readyCondition) diff --git a/controllers/issuer_controller.go b/controllers/issuer_controller.go index 46bce64..470b570 100644 --- a/controllers/issuer_controller.go +++ b/controllers/issuer_controller.go @@ -21,11 +21,10 @@ import ( "errors" "fmt" - cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/tools/record" @@ -143,11 +142,11 @@ func (r *IssuerReconciler) reconcileStatusPatch( return result, nil, fmt.Errorf("unexpected get error: %v", err) // requeue with backoff } - readyCondition := conditions.GetIssuerStatusCondition(issuer.GetStatus().Conditions, cmapi.IssuerConditionReady) + readyCondition := conditions.GetIssuerStatusCondition(issuer.GetConditions(), v1alpha1.IssuerConditionTypeReady) // Ignore Issuer if it is already permanently Failed isFailed := (readyCondition != nil) && - (readyCondition.Status == cmmeta.ConditionFalse) && + (readyCondition.Status == metav1.ConditionFalse) && (readyCondition.Reason == v1alpha1.IssuerConditionReasonFailed) && (readyCondition.ObservedGeneration >= issuer.GetGeneration()) if isFailed { @@ -171,15 +170,15 @@ func (r *IssuerReconciler) reconcileStatusPatch( issuerStatusPatch = &v1alpha1.IssuerStatus{} setReadyCondition := func( - status cmmeta.ConditionStatus, + status metav1.ConditionStatus, reason, message string, ) string { condition, _ := conditions.SetIssuerStatusCondition( r.Clock, - issuer.GetStatus().Conditions, + issuer.GetConditions(), &issuerStatusPatch.Conditions, issuer.GetGeneration(), - cmapi.IssuerConditionReady, + v1alpha1.IssuerConditionTypeReady, status, reason, message, ) return condition.Message @@ -190,7 +189,7 @@ func (r *IssuerReconciler) reconcileStatusPatch( if readyCondition == nil { logger.V(1).Info("Initializing Ready condition") setReadyCondition( - cmmeta.ConditionUnknown, + metav1.ConditionUnknown, v1alpha1.IssuerConditionReasonInitializing, fmt.Sprintf("%s has started reconciling this Issuer", r.FieldOwner), ) @@ -201,7 +200,7 @@ func (r *IssuerReconciler) reconcileStatusPatch( } var err error - if (readyCondition.Status == cmmeta.ConditionTrue) && (reportedError != nil) { + if (readyCondition.Status == metav1.ConditionTrue) && (reportedError != nil) { // We received an error from a Certificaterequest while our current status is Ready, // update the ready state of the issuer to reflect the error. err = reportedError @@ -211,7 +210,7 @@ func (r *IssuerReconciler) reconcileStatusPatch( if err == nil { logger.V(1).Info("Successfully finished the reconciliation.") message := setReadyCondition( - cmmeta.ConditionTrue, + metav1.ConditionTrue, v1alpha1.IssuerConditionReasonChecked, "Succeeded checking the issuer", ) @@ -225,7 +224,7 @@ func (r *IssuerReconciler) reconcileStatusPatch( // fail permanently logger.V(1).Error(err, "Permanent Issuer error. Marking as failed.") message := setReadyCondition( - cmmeta.ConditionFalse, + metav1.ConditionFalse, v1alpha1.IssuerConditionReasonFailed, fmt.Sprintf("Failed permanently: %s", err), ) @@ -235,7 +234,7 @@ func (r *IssuerReconciler) reconcileStatusPatch( // retry logger.V(1).Error(err, "Retryable Issuer error.") message := setReadyCondition( - cmmeta.ConditionFalse, + metav1.ConditionFalse, v1alpha1.IssuerConditionReasonPending, fmt.Sprintf("Not ready yet: %s", err), ) diff --git a/controllers/issuer_controller_test.go b/controllers/issuer_controller_test.go index 466729c..d0c2d17 100644 --- a/controllers/issuer_controller_test.go +++ b/controllers/issuer_controller_test.go @@ -23,8 +23,6 @@ import ( "testing" "time" - cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" logrtesting "github.com/go-logr/logr/testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -116,22 +114,22 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { testutil.SetTestIssuerGeneration(80), testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionTrue, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionTrue, v1alpha1.IssuerConditionReasonChecked, "Succeeded checking the issuer", ), ), }, expectedStatusPatch: &v1alpha1.IssuerStatus{ - Conditions: []cmapi.IssuerCondition{ + Conditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, Reason: v1alpha1.IssuerConditionReasonChecked, Message: "Succeeded checking the issuer", ObservedGeneration: 80, - LastTransitionTime: &fakeTimeObj1, // since the status is not updated, the LastTransitionTime is not updated either + LastTransitionTime: fakeTimeObj1, // since the status is not updated, the LastTransitionTime is not updated either }, }, }, @@ -149,8 +147,8 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { testutil.SetTestIssuerGeneration(80), testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, v1alpha1.IssuerConditionReasonFailed, "[error message]", ), @@ -168,8 +166,8 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { testutil.SetTestIssuerGeneration(80), testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, v1alpha1.IssuerConditionReasonFailed, "[error message]", ), @@ -188,8 +186,8 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { testutil.SetTestIssuerGeneration(80), testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionTrue, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionTrue, v1alpha1.IssuerConditionReasonChecked, "Succeeded checking the issuer", ), @@ -197,14 +195,14 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { }, eventSourceError: fmt.Errorf("[specific error]"), expectedStatusPatch: &v1alpha1.IssuerStatus{ - Conditions: []cmapi.IssuerCondition{ + Conditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionFalse, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionFalse, Reason: v1alpha1.IssuerConditionReasonPending, Message: "Not ready yet: [specific error]", ObservedGeneration: 80, - LastTransitionTime: &fakeTimeObj2, + LastTransitionTime: fakeTimeObj2, }, }, }, @@ -223,8 +221,8 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { testutil.SetTestIssuerGeneration(80), testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionTrue, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionTrue, v1alpha1.IssuerConditionReasonChecked, "Succeeded checking the issuer", ), @@ -232,13 +230,13 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { ), }, expectedStatusPatch: &v1alpha1.IssuerStatus{ - Conditions: []cmapi.IssuerCondition{ + Conditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, Reason: v1alpha1.IssuerConditionReasonChecked, Message: "Succeeded checking the issuer", - LastTransitionTime: &fakeTimeObj1, // since the status is not updated, the LastTransitionTime is not updated either + LastTransitionTime: fakeTimeObj1, // since the status is not updated, the LastTransitionTime is not updated either ObservedGeneration: 81, }, }, @@ -255,13 +253,13 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { issuer1, }, expectedStatusPatch: &v1alpha1.IssuerStatus{ - Conditions: []cmapi.IssuerCondition{ + Conditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionUnknown, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionUnknown, Reason: v1alpha1.IssuerConditionReasonInitializing, Message: fieldOwner + " has started reconciling this Issuer", - LastTransitionTime: &fakeTimeObj2, + LastTransitionTime: fakeTimeObj2, }, }, }, @@ -275,21 +273,21 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionUnknown, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionUnknown, v1alpha1.IssuerConditionReasonInitializing, fieldOwner+" has started reconciling this Issuer", ), ), }, expectedStatusPatch: &v1alpha1.IssuerStatus{ - Conditions: []cmapi.IssuerCondition{ + Conditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionFalse, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionFalse, Reason: v1alpha1.IssuerConditionReasonPending, Message: "Not ready yet: [specific error]", - LastTransitionTime: &fakeTimeObj2, + LastTransitionTime: fakeTimeObj2, }, }, }, @@ -307,21 +305,21 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionUnknown, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionUnknown, v1alpha1.IssuerConditionReasonInitializing, fieldOwner+" has started reconciling this Issuer", ), ), }, expectedStatusPatch: &v1alpha1.IssuerStatus{ - Conditions: []cmapi.IssuerCondition{ + Conditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionFalse, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionFalse, Reason: v1alpha1.IssuerConditionReasonFailed, Message: "Failed permanently: [specific error]", - LastTransitionTime: &fakeTimeObj2, + LastTransitionTime: fakeTimeObj2, }, }, }, @@ -342,21 +340,21 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionUnknown, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionUnknown, v1alpha1.IssuerConditionReasonInitializing, fieldOwner+" has started reconciling this Issuer", ), ), }, expectedStatusPatch: &v1alpha1.IssuerStatus{ - Conditions: []cmapi.IssuerCondition{ + Conditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, Reason: v1alpha1.IssuerConditionReasonChecked, Message: "Succeeded checking the issuer", - LastTransitionTime: &fakeTimeObj2, + LastTransitionTime: fakeTimeObj2, }, }, }, @@ -374,8 +372,8 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { testutil.SetTestIssuerGeneration(80), testutil.SetTestIssuerStatusCondition( fakeClock1, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, v1alpha1.IssuerConditionReasonInitializing, fieldOwner+" has started reconciling this Issuer", ), @@ -383,13 +381,13 @@ func TestTestIssuerReconcilerReconcile(t *testing.T) { ), }, expectedStatusPatch: &v1alpha1.IssuerStatus{ - Conditions: []cmapi.IssuerCondition{ + Conditions: []metav1.Condition{ { - Type: cmapi.IssuerConditionReady, - Status: cmmeta.ConditionTrue, + Type: v1alpha1.IssuerConditionTypeReady, + Status: metav1.ConditionTrue, Reason: v1alpha1.IssuerConditionReasonChecked, Message: "Succeeded checking the issuer", - LastTransitionTime: &fakeTimeObj2, + LastTransitionTime: fakeTimeObj2, ObservedGeneration: 81, }, }, diff --git a/controllers/predicates.go b/controllers/predicates.go index 4812b77..a3f49b7 100644 --- a/controllers/predicates.go +++ b/controllers/predicates.go @@ -135,20 +135,19 @@ func (LinkedIssuerPredicate) Update(e event.UpdateEvent) bool { issuerOld, okOld := e.ObjectOld.(v1alpha1.Issuer) issuerNew, okNew := e.ObjectNew.(v1alpha1.Issuer) - if (!okOld || !okNew) || - (issuerOld.GetStatus() == nil || issuerNew.GetStatus() == nil) { + if !okOld || !okNew { // a reference object is invalid, just reconcile to be safe return true } readyOld := conditions.GetIssuerStatusCondition( - issuerOld.GetStatus().Conditions, - cmapi.IssuerConditionReady, + issuerOld.GetConditions(), + v1alpha1.IssuerConditionTypeReady, ) readyNew := conditions.GetIssuerStatusCondition( - issuerNew.GetStatus().Conditions, - cmapi.IssuerConditionReady, + issuerNew.GetConditions(), + v1alpha1.IssuerConditionTypeReady, ) if readyOld == nil || readyNew == nil { @@ -184,20 +183,19 @@ func (IssuerPredicate) Update(e event.UpdateEvent) bool { issuerOld, okOld := e.ObjectOld.(v1alpha1.Issuer) issuerNew, okNew := e.ObjectNew.(v1alpha1.Issuer) - if (!okOld || !okNew) || - (issuerOld.GetStatus() == nil || issuerNew.GetStatus() == nil) { + if !okOld || !okNew { // a reference object is invalid, just reconcile to be safe return true } readyOld := conditions.GetIssuerStatusCondition( - issuerOld.GetStatus().Conditions, - cmapi.IssuerConditionReady, + issuerOld.GetConditions(), + v1alpha1.IssuerConditionTypeReady, ) readyNew := conditions.GetIssuerStatusCondition( - issuerNew.GetStatus().Conditions, - cmapi.IssuerConditionReady, + issuerNew.GetConditions(), + v1alpha1.IssuerConditionTypeReady, ) if (readyOld == nil && readyNew != nil) || diff --git a/controllers/predicates_test.go b/controllers/predicates_test.go index 5e9a295..61ebe38 100644 --- a/controllers/predicates_test.go +++ b/controllers/predicates_test.go @@ -393,8 +393,12 @@ func (*testissuer) DeepCopyObject() runtime.Object { panic("not implemented") } -func (ti *testissuer) GetStatus() *v1alpha1.IssuerStatus { - return ti.Status +func (ti *testissuer) GetConditions() []metav1.Condition { + if ti.Status == nil { + return nil + } + + return ti.Status.Conditions } func (ti *testissuer) GetIssuerTypeIdentifier() string { @@ -432,7 +436,7 @@ func TestLinkedIssuerPredicate(t *testing.T) { testutil.SetTestIssuerStatusCondition( fakeClock, "random", - cmmeta.ConditionFalse, + metav1.ConditionFalse, "test1", "test1", ), @@ -441,7 +445,7 @@ func TestLinkedIssuerPredicate(t *testing.T) { testutil.SetTestIssuerStatusCondition( fakeClock, "random", - cmmeta.ConditionTrue, + metav1.ConditionTrue, "test2", "test2", ), @@ -456,8 +460,8 @@ func TestLinkedIssuerPredicate(t *testing.T) { ObjectNew: testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, "reason", "message", ), @@ -472,8 +476,8 @@ func TestLinkedIssuerPredicate(t *testing.T) { ObjectNew: testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, "reason", "message", ), @@ -487,8 +491,8 @@ func TestLinkedIssuerPredicate(t *testing.T) { ObjectOld: testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, "reason1", "message1", ), @@ -496,8 +500,8 @@ func TestLinkedIssuerPredicate(t *testing.T) { ObjectNew: testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, "reason2", "message2", ), @@ -511,8 +515,8 @@ func TestLinkedIssuerPredicate(t *testing.T) { ObjectOld: testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, "reason1", "message1", ), @@ -521,8 +525,8 @@ func TestLinkedIssuerPredicate(t *testing.T) { testutil.SetTestIssuerGeneration(2), testutil.SetTestIssuerStatusCondition( fakeClock, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, "reason2", "message2", ), @@ -536,8 +540,8 @@ func TestLinkedIssuerPredicate(t *testing.T) { ObjectOld: testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, "reason", "message", ), @@ -545,8 +549,8 @@ func TestLinkedIssuerPredicate(t *testing.T) { ObjectNew: testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock, - cmapi.IssuerConditionReady, - cmmeta.ConditionTrue, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionTrue, "reason", "message", ), @@ -643,8 +647,8 @@ func TestIssuerPredicate(t *testing.T) { ObjectNew: testutil.TestIssuerFrom(issuer1, testutil.SetTestIssuerStatusCondition( fakeClock, - cmapi.IssuerConditionReady, - cmmeta.ConditionFalse, + v1alpha1.IssuerConditionTypeReady, + metav1.ConditionFalse, "reason", "message", ), diff --git a/controllers/request_controller.go b/controllers/request_controller.go index b1c0474..a5b764e 100644 --- a/controllers/request_controller.go +++ b/controllers/request_controller.go @@ -22,8 +22,6 @@ import ( "fmt" "time" - cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" "github.com/go-logr/logr" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -247,8 +245,8 @@ func (r *RequestController) reconcileStatusPatch( } readyCondition := conditions.GetIssuerStatusCondition( - issuerObject.GetStatus().Conditions, - cmapi.IssuerConditionReady, + issuerObject.GetConditions(), + v1alpha1.IssuerConditionTypeReady, ) if readyCondition == nil { logger.V(1).Info("Issuer is not Ready yet (no ready condition). Waiting for it to become ready.") @@ -262,7 +260,7 @@ func (r *RequestController) reconcileStatusPatch( return result, statusPatch, nil // apply patch, done } - if readyCondition.Status != cmmeta.ConditionTrue { + if readyCondition.Status != metav1.ConditionTrue { logger.V(1).Info("Issuer is not Ready yet (status == false). Waiting for it to become ready.", "issuer ready condition", readyCondition) statusPatch.SetWaitingForIssuerReadyNotReady(readyCondition) diff --git a/controllers/request_objecthelper.go b/controllers/request_objecthelper.go index fc634b8..f3a3ad1 100644 --- a/controllers/request_objecthelper.go +++ b/controllers/request_objecthelper.go @@ -61,7 +61,7 @@ type RequestPatchHelper interface { //nolint:interfacebloat SetWaitingForIssuerExist(error) SetWaitingForIssuerReadyNoCondition() SetWaitingForIssuerReadyOutdated() - SetWaitingForIssuerReadyNotReady(*cmapi.IssuerCondition) + SetWaitingForIssuerReadyNotReady(*metav1.Condition) SetCustomCondition( conditionType string, conditionStatus metav1.ConditionStatus, diff --git a/controllers/request_objecthelper_certificaterequest.go b/controllers/request_objecthelper_certificaterequest.go index b4691a1..55cb01f 100644 --- a/controllers/request_objecthelper_certificaterequest.go +++ b/controllers/request_objecthelper_certificaterequest.go @@ -177,7 +177,7 @@ func (c *certificateRequestPatchHelper) SetWaitingForIssuerReadyOutdated() { c.eventRecorder.Event(c.readOnlyObj, corev1.EventTypeNormal, eventRequestWaitingForIssuerReady, message) } -func (c *certificateRequestPatchHelper) SetWaitingForIssuerReadyNotReady(cond *cmapi.IssuerCondition) { +func (c *certificateRequestPatchHelper) SetWaitingForIssuerReadyNotReady(cond *metav1.Condition) { message, _ := c.setCondition( cmapi.CertificateRequestConditionReady, cmmeta.ConditionFalse, diff --git a/controllers/request_objecthelper_certificatesigningrequest.go b/controllers/request_objecthelper_certificatesigningrequest.go index 8b6c965..ac35d13 100644 --- a/controllers/request_objecthelper_certificatesigningrequest.go +++ b/controllers/request_objecthelper_certificatesigningrequest.go @@ -120,7 +120,7 @@ func (c *certificatesigningRequestPatchHelper) SetWaitingForIssuerReadyOutdated( c.eventRecorder.Event(c.readOnlyObj, corev1.EventTypeNormal, eventRequestWaitingForIssuerReady, message) } -func (c *certificatesigningRequestPatchHelper) SetWaitingForIssuerReadyNotReady(cond *cmapi.IssuerCondition) { +func (c *certificatesigningRequestPatchHelper) SetWaitingForIssuerReadyNotReady(cond *metav1.Condition) { message := fmt.Sprintf("Waiting for issuer to become ready. Current issuer ready condition is \"%s\": %s.", cond.Reason, cond.Message) c.eventRecorder.Event(c.readOnlyObj, corev1.EventTypeNormal, eventRequestWaitingForIssuerReady, message) } diff --git a/docs/api.md b/docs/api.md index 699a54b..258baf9 100644 --- a/docs/api.md +++ b/docs/api.md @@ -49,8 +49,18 @@ const ( ) ``` + + +```go +const ( + // IssuerConditionTypeReady is the type of condition that indicates whether + // an Issuer is ready for use. + IssuerConditionTypeReady = "Ready" +) +``` + -## type [Issuer]() +## type [Issuer]() @@ -58,7 +68,8 @@ const ( type Issuer interface { runtime.Object metav1.Object - GetStatus() *IssuerStatus + + GetConditions() []metav1.Condition // GetIssuerTypeIdentifier returns a string that uniquely identifies the // issuer type. This should be a constant across all instances of this @@ -73,7 +84,7 @@ type Issuer interface { ``` -## type [IssuerStatus]() +## type [IssuerStatus]() @@ -84,7 +95,7 @@ type IssuerStatus struct { // +listType=map // +listMapKey=type // +optional - Conditions []cmapi.IssuerCondition `json:"conditions,omitempty"` + Conditions []metav1.Condition `json:"conditions,omitempty"` } ``` diff --git a/examples/simple/api/simple_cluster_issuer_types.go b/examples/simple/api/simple_cluster_issuer_types.go index 15ef353..dbb3806 100644 --- a/examples/simple/api/simple_cluster_issuer_types.go +++ b/examples/simple/api/simple_cluster_issuer_types.go @@ -42,8 +42,8 @@ type SimpleClusterIssuer struct { Status v1alpha1.IssuerStatus `json:"status,omitempty"` } -func (vi *SimpleClusterIssuer) GetStatus() *v1alpha1.IssuerStatus { - return &vi.Status +func (vi *SimpleClusterIssuer) GetConditions() []metav1.Condition { + return vi.Status.Conditions } func (vi *SimpleClusterIssuer) GetIssuerTypeIdentifier() string { diff --git a/examples/simple/api/simple_issuer_types.go b/examples/simple/api/simple_issuer_types.go index 3ca1693..4061a5d 100644 --- a/examples/simple/api/simple_issuer_types.go +++ b/examples/simple/api/simple_issuer_types.go @@ -41,8 +41,8 @@ type SimpleIssuer struct { Status v1alpha1.IssuerStatus `json:"status,omitempty"` } -func (vi *SimpleIssuer) GetStatus() *v1alpha1.IssuerStatus { - return &vi.Status +func (vi *SimpleIssuer) GetConditions() []metav1.Condition { + return vi.Status.Conditions } func (vi *SimpleIssuer) GetIssuerTypeIdentifier() string { diff --git a/examples/simple/deploy/crds/testing.cert-manager.io_simpleclusterissuers.yaml b/examples/simple/deploy/crds/testing.cert-manager.io_simpleclusterissuers.yaml index 63e6e3d..127358b 100644 --- a/examples/simple/deploy/crds/testing.cert-manager.io_simpleclusterissuers.yaml +++ b/examples/simple/deploy/crds/testing.cert-manager.io_simpleclusterissuers.yaml @@ -68,46 +68,56 @@ spec: List of status conditions to indicate the status of an Issuer. Known condition types are `Ready`. items: - description: IssuerCondition contains condition information for - an Issuer. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- - LastTransitionTime is the timestamp corresponding to the last status - change of this condition. + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- - Message is a human readable description of the details of the last - transition, complementing reason. + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 type: string observedGeneration: description: |- - If set, this represents the .metadata.generation that the condition was - set based upon. - For instance, if .metadata.generation is currently 12, but the - .status.condition[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the Issuer. + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 + minimum: 0 type: integer reason: description: |- - Reason is a brief machine readable explanation for the condition's last - transition. + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: - description: Status of the condition, one of (`True`, `False`, - `Unknown`). + description: status of the condition, one of True, False, Unknown. enum: - "True" - "False" - Unknown type: string type: - description: Type of the condition, known values are (`Ready`). + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: + - lastTransitionTime + - message + - reason - status - type type: object diff --git a/examples/simple/deploy/crds/testing.cert-manager.io_simpleissuers.yaml b/examples/simple/deploy/crds/testing.cert-manager.io_simpleissuers.yaml index f6ebd80..bbd2e23 100644 --- a/examples/simple/deploy/crds/testing.cert-manager.io_simpleissuers.yaml +++ b/examples/simple/deploy/crds/testing.cert-manager.io_simpleissuers.yaml @@ -67,46 +67,56 @@ spec: List of status conditions to indicate the status of an Issuer. Known condition types are `Ready`. items: - description: IssuerCondition contains condition information for - an Issuer. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- - LastTransitionTime is the timestamp corresponding to the last status - change of this condition. + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- - Message is a human readable description of the details of the last - transition, complementing reason. + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 type: string observedGeneration: description: |- - If set, this represents the .metadata.generation that the condition was - set based upon. - For instance, if .metadata.generation is currently 12, but the - .status.condition[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the Issuer. + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 + minimum: 0 type: integer reason: description: |- - Reason is a brief machine readable explanation for the condition's last - transition. + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: - description: Status of the condition, one of (`True`, `False`, - `Unknown`). + description: status of the condition, one of True, False, Unknown. enum: - "True" - "False" - Unknown type: string type: - description: Type of the condition, known values are (`Ready`). + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: + - lastTransitionTime + - message + - reason - status - type type: object diff --git a/examples/simple/go.mod b/examples/simple/go.mod index e4aeb8d..d7a6216 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/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/cert-manager/cert-manager v1.16.2 + github.com/cert-manager/issuer-lib v0.8.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-20241104163129-6fe5fd82f078 // 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..ea55493 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-20241104163129-6fe5fd82f078 h1:jGnCPejIetjiy2gqaJ5V0NLwTpF4wbQ6cZIItJCSHno= +k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078/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..595b618 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 @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.31.3 k8s.io/client-go v0.31.3 k8s.io/klog/v2 v2.130.1 - k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 + k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078 sigs.k8s.io/controller-runtime v0.19.2 ) diff --git a/go.sum b/go.sum index 9aec238..ea55493 100644 --- a/go.sum +++ b/go.sum @@ -262,8 +262,8 @@ 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= +k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078 h1:jGnCPejIetjiy2gqaJ5V0NLwTpF4wbQ6cZIItJCSHno= +k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078/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= diff --git a/internal/testapi/api/test_cluster_issuer_types.go b/internal/testapi/api/test_cluster_issuer_types.go index 3b6a846..52c1b98 100644 --- a/internal/testapi/api/test_cluster_issuer_types.go +++ b/internal/testapi/api/test_cluster_issuer_types.go @@ -42,8 +42,8 @@ type TestClusterIssuer struct { Status v1alpha1.IssuerStatus `json:"status,omitempty"` } -func (vi *TestClusterIssuer) GetStatus() *v1alpha1.IssuerStatus { - return &vi.Status +func (vi *TestClusterIssuer) GetConditions() []metav1.Condition { + return vi.Status.Conditions } func (vi *TestClusterIssuer) GetIssuerTypeIdentifier() string { diff --git a/internal/testapi/api/test_issuer_types.go b/internal/testapi/api/test_issuer_types.go index efbcde4..11079ce 100644 --- a/internal/testapi/api/test_issuer_types.go +++ b/internal/testapi/api/test_issuer_types.go @@ -41,8 +41,8 @@ type TestIssuer struct { Status v1alpha1.IssuerStatus `json:"status,omitempty"` } -func (vi *TestIssuer) GetStatus() *v1alpha1.IssuerStatus { - return &vi.Status +func (vi *TestIssuer) GetConditions() []metav1.Condition { + return vi.Status.Conditions } func (vi *TestIssuer) GetIssuerTypeIdentifier() string { diff --git a/internal/testapi/crds/testing.cert-manager.io_testclusterissuers.yaml b/internal/testapi/crds/testing.cert-manager.io_testclusterissuers.yaml index 98ea42e..006eac0 100644 --- a/internal/testapi/crds/testing.cert-manager.io_testclusterissuers.yaml +++ b/internal/testapi/crds/testing.cert-manager.io_testclusterissuers.yaml @@ -67,46 +67,56 @@ spec: List of status conditions to indicate the status of an Issuer. Known condition types are `Ready`. items: - description: IssuerCondition contains condition information for - an Issuer. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- - LastTransitionTime is the timestamp corresponding to the last status - change of this condition. + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- - Message is a human readable description of the details of the last - transition, complementing reason. + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 type: string observedGeneration: description: |- - If set, this represents the .metadata.generation that the condition was - set based upon. - For instance, if .metadata.generation is currently 12, but the - .status.condition[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the Issuer. + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 + minimum: 0 type: integer reason: description: |- - Reason is a brief machine readable explanation for the condition's last - transition. + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: - description: Status of the condition, one of (`True`, `False`, - `Unknown`). + description: status of the condition, one of True, False, Unknown. enum: - "True" - "False" - Unknown type: string type: - description: Type of the condition, known values are (`Ready`). + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: + - lastTransitionTime + - message + - reason - status - type type: object diff --git a/internal/testapi/crds/testing.cert-manager.io_testissuers.yaml b/internal/testapi/crds/testing.cert-manager.io_testissuers.yaml index 3ccc11c..f0547ff 100644 --- a/internal/testapi/crds/testing.cert-manager.io_testissuers.yaml +++ b/internal/testapi/crds/testing.cert-manager.io_testissuers.yaml @@ -67,46 +67,56 @@ spec: List of status conditions to indicate the status of an Issuer. Known condition types are `Ready`. items: - description: IssuerCondition contains condition information for - an Issuer. + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- - LastTransitionTime is the timestamp corresponding to the last status - change of this condition. + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: description: |- - Message is a human readable description of the details of the last - transition, complementing reason. + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 type: string observedGeneration: description: |- - If set, this represents the .metadata.generation that the condition was - set based upon. - For instance, if .metadata.generation is currently 12, but the - .status.condition[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the Issuer. + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 + minimum: 0 type: integer reason: description: |- - Reason is a brief machine readable explanation for the condition's last - transition. + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ type: string status: - description: Status of the condition, one of (`True`, `False`, - `Unknown`). + description: status of the condition, one of True, False, Unknown. enum: - "True" - "False" - Unknown type: string type: - description: Type of the condition, known values are (`Ready`). + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string required: + - lastTransitionTime + - message + - reason - status - type type: object diff --git a/internal/testapi/testutil/api_gen.go b/internal/testapi/testutil/api_gen.go index 52d0d54..2389d79 100644 --- a/internal/testapi/testutil/api_gen.go +++ b/internal/testapi/testutil/api_gen.go @@ -17,8 +17,6 @@ limitations under the License. package testutil import ( - cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/clock" @@ -66,8 +64,8 @@ func SetTestIssuerGeneration(generation int64) TestIssuerModifier { func SetTestIssuerStatusCondition( clock clock.PassiveClock, - conditionType cmapi.IssuerConditionType, - status cmmeta.ConditionStatus, + conditionType string, + status metav1.ConditionStatus, reason, message string, ) TestIssuerModifier { return func(si *api.TestIssuer) { @@ -118,8 +116,8 @@ func SetTestClusterIssuerGeneration(generation int64) TestClusterIssuerModifier func SetTestClusterIssuerStatusCondition( clock clock.PassiveClock, - conditionType cmapi.IssuerConditionType, - status cmmeta.ConditionStatus, + conditionType string, + status metav1.ConditionStatus, reason, message string, ) TestClusterIssuerModifier { return func(si *api.TestClusterIssuer) {