diff --git a/apis/config/v1alpha1/types_oidcproviderconfig.go.tmpl b/apis/config/v1alpha1/types_oidcproviderconfig.go.tmpl index a2850bdf..a05f4339 100644 --- a/apis/config/v1alpha1/types_oidcproviderconfig.go.tmpl +++ b/apis/config/v1alpha1/types_oidcproviderconfig.go.tmpl @@ -38,6 +38,12 @@ type OIDCProviderConfigStatus struct { // Message provides human-readable details about the Status. // +optional Message string `json:"message,omitempty"` + + // LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get + // around some undesirable behavior with respect to the empty metav1.Time value (see + // https://github.com/kubernetes/kubernetes/issues/86811). + // +optional + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` } // OIDCProviderConfig describes the configuration of an OIDC provider. diff --git a/deploy/config.pinniped.dev_oidcproviderconfigs.yaml b/deploy/config.pinniped.dev_oidcproviderconfigs.yaml index c1cb5525..062dca9f 100644 --- a/deploy/config.pinniped.dev_oidcproviderconfigs.yaml +++ b/deploy/config.pinniped.dev_oidcproviderconfigs.yaml @@ -55,12 +55,18 @@ spec: status: description: Status of the OIDC provider. properties: + lastUpdateTime: + description: LastUpdateTime holds the time at which the Status was + last updated. It is a pointer to get around some undesirable behavior + with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811). + format: date-time + type: string message: description: Message provides human-readable details about the Status. type: string status: description: Status holds an enum that describes the state of this - OIDCProvider. Note that this Status can represent success or failure. + OIDC Provider. Note that this Status can represent success or failure. enum: - Success - Duplicate diff --git a/generated/1.17/README.adoc b/generated/1.17/README.adoc index 716d1b03..c74ee743 100644 --- a/generated/1.17/README.adoc +++ b/generated/1.17/README.adoc @@ -148,8 +148,9 @@ OIDCProviderConfigStatus is a struct that describes the actual state of an OIDC [cols="25a,75a", options="header"] |=== | Field | Description -| *`status`* __OIDCProviderStatus__ | Status holds an enum that describes the state of this OIDCProvider. Note that this Status can represent success or failure. +| *`status`* __OIDCProviderStatus__ | Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure. | *`message`* __string__ | Message provides human-readable details about the Status. +| *`lastUpdateTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#time-v1-meta[$$Time$$]__ | LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get around some undesirable behavior with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811). |=== diff --git a/generated/1.17/apis/config/v1alpha1/types_oidcproviderconfig.go b/generated/1.17/apis/config/v1alpha1/types_oidcproviderconfig.go index 75931e70..a05f4339 100644 --- a/generated/1.17/apis/config/v1alpha1/types_oidcproviderconfig.go +++ b/generated/1.17/apis/config/v1alpha1/types_oidcproviderconfig.go @@ -30,7 +30,7 @@ type OIDCProviderConfigSpec struct { // OIDCProviderConfigStatus is a struct that describes the actual state of an OIDC Provider. type OIDCProviderConfigStatus struct { - // Status holds an enum that describes the state of this OIDCProvider. Note that this Status can + // Status holds an enum that describes the state of this OIDC Provider. Note that this Status can // represent success or failure. // +optional Status OIDCProviderStatus `json:"status,omitempty"` @@ -38,6 +38,12 @@ type OIDCProviderConfigStatus struct { // Message provides human-readable details about the Status. // +optional Message string `json:"message,omitempty"` + + // LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get + // around some undesirable behavior with respect to the empty metav1.Time value (see + // https://github.com/kubernetes/kubernetes/issues/86811). + // +optional + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` } // OIDCProviderConfig describes the configuration of an OIDC provider. diff --git a/generated/1.17/apis/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.17/apis/config/v1alpha1/zz_generated.deepcopy.go index 253a5c5b..262992cb 100644 --- a/generated/1.17/apis/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.17/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -138,7 +138,7 @@ func (in *OIDCProviderConfig) DeepCopyInto(out *OIDCProviderConfig) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -212,6 +212,10 @@ func (in *OIDCProviderConfigSpec) DeepCopy() *OIDCProviderConfigSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCProviderConfigStatus) DeepCopyInto(out *OIDCProviderConfigStatus) { *out = *in + if in.LastUpdateTime != nil { + in, out := &in.LastUpdateTime, &out.LastUpdateTime + *out = (*in).DeepCopy() + } return } diff --git a/generated/1.17/client/openapi/zz_generated.openapi.go b/generated/1.17/client/openapi/zz_generated.openapi.go index d25d0c88..8e5ad5b8 100644 --- a/generated/1.17/client/openapi/zz_generated.openapi.go +++ b/generated/1.17/client/openapi/zz_generated.openapi.go @@ -413,7 +413,7 @@ func schema_117_apis_config_v1alpha1_OIDCProviderConfigStatus(ref common.Referen Properties: map[string]spec.Schema{ "status": { SchemaProps: spec.SchemaProps{ - Description: "Status holds an enum that describes the state of this OIDCProvider. Note that this Status can represent success or failure.", + Description: "Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure.", Type: []string{"string"}, Format: "", }, @@ -425,9 +425,17 @@ func schema_117_apis_config_v1alpha1_OIDCProviderConfigStatus(ref common.Referen Format: "", }, }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get around some undesirable behavior with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811).", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } diff --git a/generated/1.17/crds/config.pinniped.dev_oidcproviderconfigs.yaml b/generated/1.17/crds/config.pinniped.dev_oidcproviderconfigs.yaml index c1cb5525..062dca9f 100644 --- a/generated/1.17/crds/config.pinniped.dev_oidcproviderconfigs.yaml +++ b/generated/1.17/crds/config.pinniped.dev_oidcproviderconfigs.yaml @@ -55,12 +55,18 @@ spec: status: description: Status of the OIDC provider. properties: + lastUpdateTime: + description: LastUpdateTime holds the time at which the Status was + last updated. It is a pointer to get around some undesirable behavior + with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811). + format: date-time + type: string message: description: Message provides human-readable details about the Status. type: string status: description: Status holds an enum that describes the state of this - OIDCProvider. Note that this Status can represent success or failure. + OIDC Provider. Note that this Status can represent success or failure. enum: - Success - Duplicate diff --git a/generated/1.18/README.adoc b/generated/1.18/README.adoc index 6eef0246..eaa1e5bf 100644 --- a/generated/1.18/README.adoc +++ b/generated/1.18/README.adoc @@ -148,8 +148,9 @@ OIDCProviderConfigStatus is a struct that describes the actual state of an OIDC [cols="25a,75a", options="header"] |=== | Field | Description -| *`status`* __OIDCProviderStatus__ | Status holds an enum that describes the state of this OIDCProvider. Note that this Status can represent success or failure. +| *`status`* __OIDCProviderStatus__ | Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure. | *`message`* __string__ | Message provides human-readable details about the Status. +| *`lastUpdateTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta[$$Time$$]__ | LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get around some undesirable behavior with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811). |=== diff --git a/generated/1.18/apis/config/v1alpha1/types_oidcproviderconfig.go b/generated/1.18/apis/config/v1alpha1/types_oidcproviderconfig.go index 75931e70..a05f4339 100644 --- a/generated/1.18/apis/config/v1alpha1/types_oidcproviderconfig.go +++ b/generated/1.18/apis/config/v1alpha1/types_oidcproviderconfig.go @@ -30,7 +30,7 @@ type OIDCProviderConfigSpec struct { // OIDCProviderConfigStatus is a struct that describes the actual state of an OIDC Provider. type OIDCProviderConfigStatus struct { - // Status holds an enum that describes the state of this OIDCProvider. Note that this Status can + // Status holds an enum that describes the state of this OIDC Provider. Note that this Status can // represent success or failure. // +optional Status OIDCProviderStatus `json:"status,omitempty"` @@ -38,6 +38,12 @@ type OIDCProviderConfigStatus struct { // Message provides human-readable details about the Status. // +optional Message string `json:"message,omitempty"` + + // LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get + // around some undesirable behavior with respect to the empty metav1.Time value (see + // https://github.com/kubernetes/kubernetes/issues/86811). + // +optional + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` } // OIDCProviderConfig describes the configuration of an OIDC provider. diff --git a/generated/1.18/apis/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.18/apis/config/v1alpha1/zz_generated.deepcopy.go index 253a5c5b..262992cb 100644 --- a/generated/1.18/apis/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.18/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -138,7 +138,7 @@ func (in *OIDCProviderConfig) DeepCopyInto(out *OIDCProviderConfig) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -212,6 +212,10 @@ func (in *OIDCProviderConfigSpec) DeepCopy() *OIDCProviderConfigSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCProviderConfigStatus) DeepCopyInto(out *OIDCProviderConfigStatus) { *out = *in + if in.LastUpdateTime != nil { + in, out := &in.LastUpdateTime, &out.LastUpdateTime + *out = (*in).DeepCopy() + } return } diff --git a/generated/1.18/client/openapi/zz_generated.openapi.go b/generated/1.18/client/openapi/zz_generated.openapi.go index eb0e2dfa..75393f9a 100644 --- a/generated/1.18/client/openapi/zz_generated.openapi.go +++ b/generated/1.18/client/openapi/zz_generated.openapi.go @@ -413,7 +413,7 @@ func schema_118_apis_config_v1alpha1_OIDCProviderConfigStatus(ref common.Referen Properties: map[string]spec.Schema{ "status": { SchemaProps: spec.SchemaProps{ - Description: "Status holds an enum that describes the state of this OIDCProvider. Note that this Status can represent success or failure.", + Description: "Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure.", Type: []string{"string"}, Format: "", }, @@ -425,9 +425,17 @@ func schema_118_apis_config_v1alpha1_OIDCProviderConfigStatus(ref common.Referen Format: "", }, }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get around some undesirable behavior with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811).", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } diff --git a/generated/1.18/crds/config.pinniped.dev_oidcproviderconfigs.yaml b/generated/1.18/crds/config.pinniped.dev_oidcproviderconfigs.yaml index c1cb5525..062dca9f 100644 --- a/generated/1.18/crds/config.pinniped.dev_oidcproviderconfigs.yaml +++ b/generated/1.18/crds/config.pinniped.dev_oidcproviderconfigs.yaml @@ -55,12 +55,18 @@ spec: status: description: Status of the OIDC provider. properties: + lastUpdateTime: + description: LastUpdateTime holds the time at which the Status was + last updated. It is a pointer to get around some undesirable behavior + with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811). + format: date-time + type: string message: description: Message provides human-readable details about the Status. type: string status: description: Status holds an enum that describes the state of this - OIDCProvider. Note that this Status can represent success or failure. + OIDC Provider. Note that this Status can represent success or failure. enum: - Success - Duplicate diff --git a/generated/1.19/README.adoc b/generated/1.19/README.adoc index 3008fb69..1dc10f4c 100644 --- a/generated/1.19/README.adoc +++ b/generated/1.19/README.adoc @@ -148,8 +148,9 @@ OIDCProviderConfigStatus is a struct that describes the actual state of an OIDC [cols="25a,75a", options="header"] |=== | Field | Description -| *`status`* __OIDCProviderStatus__ | Status holds an enum that describes the state of this OIDCProvider. Note that this Status can represent success or failure. +| *`status`* __OIDCProviderStatus__ | Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure. | *`message`* __string__ | Message provides human-readable details about the Status. +| *`lastUpdateTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#time-v1-meta[$$Time$$]__ | LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get around some undesirable behavior with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811). |=== diff --git a/generated/1.19/apis/config/v1alpha1/types_oidcproviderconfig.go b/generated/1.19/apis/config/v1alpha1/types_oidcproviderconfig.go index 75931e70..a05f4339 100644 --- a/generated/1.19/apis/config/v1alpha1/types_oidcproviderconfig.go +++ b/generated/1.19/apis/config/v1alpha1/types_oidcproviderconfig.go @@ -30,7 +30,7 @@ type OIDCProviderConfigSpec struct { // OIDCProviderConfigStatus is a struct that describes the actual state of an OIDC Provider. type OIDCProviderConfigStatus struct { - // Status holds an enum that describes the state of this OIDCProvider. Note that this Status can + // Status holds an enum that describes the state of this OIDC Provider. Note that this Status can // represent success or failure. // +optional Status OIDCProviderStatus `json:"status,omitempty"` @@ -38,6 +38,12 @@ type OIDCProviderConfigStatus struct { // Message provides human-readable details about the Status. // +optional Message string `json:"message,omitempty"` + + // LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get + // around some undesirable behavior with respect to the empty metav1.Time value (see + // https://github.com/kubernetes/kubernetes/issues/86811). + // +optional + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` } // OIDCProviderConfig describes the configuration of an OIDC provider. diff --git a/generated/1.19/apis/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.19/apis/config/v1alpha1/zz_generated.deepcopy.go index 253a5c5b..262992cb 100644 --- a/generated/1.19/apis/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.19/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -138,7 +138,7 @@ func (in *OIDCProviderConfig) DeepCopyInto(out *OIDCProviderConfig) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -212,6 +212,10 @@ func (in *OIDCProviderConfigSpec) DeepCopy() *OIDCProviderConfigSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCProviderConfigStatus) DeepCopyInto(out *OIDCProviderConfigStatus) { *out = *in + if in.LastUpdateTime != nil { + in, out := &in.LastUpdateTime, &out.LastUpdateTime + *out = (*in).DeepCopy() + } return } diff --git a/generated/1.19/client/openapi/zz_generated.openapi.go b/generated/1.19/client/openapi/zz_generated.openapi.go index c7ed5084..277a97cb 100644 --- a/generated/1.19/client/openapi/zz_generated.openapi.go +++ b/generated/1.19/client/openapi/zz_generated.openapi.go @@ -414,7 +414,7 @@ func schema_119_apis_config_v1alpha1_OIDCProviderConfigStatus(ref common.Referen Properties: map[string]spec.Schema{ "status": { SchemaProps: spec.SchemaProps{ - Description: "Status holds an enum that describes the state of this OIDCProvider. Note that this Status can represent success or failure.", + Description: "Status holds an enum that describes the state of this OIDC Provider. Note that this Status can represent success or failure.", Type: []string{"string"}, Format: "", }, @@ -426,9 +426,17 @@ func schema_119_apis_config_v1alpha1_OIDCProviderConfigStatus(ref common.Referen Format: "", }, }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "LastUpdateTime holds the time at which the Status was last updated. It is a pointer to get around some undesirable behavior with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811).", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } diff --git a/generated/1.19/crds/config.pinniped.dev_oidcproviderconfigs.yaml b/generated/1.19/crds/config.pinniped.dev_oidcproviderconfigs.yaml index c1cb5525..062dca9f 100644 --- a/generated/1.19/crds/config.pinniped.dev_oidcproviderconfigs.yaml +++ b/generated/1.19/crds/config.pinniped.dev_oidcproviderconfigs.yaml @@ -55,12 +55,18 @@ spec: status: description: Status of the OIDC provider. properties: + lastUpdateTime: + description: LastUpdateTime holds the time at which the Status was + last updated. It is a pointer to get around some undesirable behavior + with respect to the empty metav1.Time value (see https://github.com/kubernetes/kubernetes/issues/86811). + format: date-time + type: string message: description: Message provides human-readable details about the Status. type: string status: description: Status holds an enum that describes the state of this - OIDCProvider. Note that this Status can represent success or failure. + OIDC Provider. Note that this Status can represent success or failure. enum: - Success - Duplicate diff --git a/internal/controller/supervisorconfig/oidcproviderconfig_watcher.go b/internal/controller/supervisorconfig/oidcproviderconfig_watcher.go index 3f21d5fe..d6420f4c 100644 --- a/internal/controller/supervisorconfig/oidcproviderconfig_watcher.go +++ b/internal/controller/supervisorconfig/oidcproviderconfig_watcher.go @@ -152,7 +152,10 @@ func (c *oidcProviderConfigWatcherController) updateStatus( ) opc.Status.Status = status opc.Status.Message = message + opc.Status.LastUpdateTime = timePtr(metav1.NewTime(c.clock.Now())) _, err = c.client.ConfigV1alpha1().OIDCProviderConfigs(namespace).Update(ctx, opc, metav1.UpdateOptions{}) return err }) } + +func timePtr(t metav1.Time) *metav1.Time { return &t } diff --git a/internal/controller/supervisorconfig/oidcproviderconfig_watcher_test.go b/internal/controller/supervisorconfig/oidcproviderconfig_watcher_test.go index a7f549a8..7db8022d 100644 --- a/internal/controller/supervisorconfig/oidcproviderconfig_watcher_test.go +++ b/internal/controller/supervisorconfig/oidcproviderconfig_watcher_test.go @@ -208,9 +208,11 @@ func TestSync(t *testing.T) { oidcProviderConfig1.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig1.Status.Message = "Provider successfully created" + oidcProviderConfig1.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) oidcProviderConfig2.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig2.Status.Message = "Provider successfully created" + oidcProviderConfig2.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) expectedActions := []coretesting.Action{ coretesting.NewGetAction( @@ -241,6 +243,7 @@ func TestSync(t *testing.T) { it.Before(func() { oidcProviderConfig1.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig1.Status.Message = "Provider successfully created" + oidcProviderConfig1.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) r.NoError(pinnipedAPIClient.Tracker().Update(oidcProviderConfigGVR, oidcProviderConfig1, oidcProviderConfig1.Namespace)) r.NoError(opcInformerClient.Tracker().Update(oidcProviderConfigGVR, oidcProviderConfig1, oidcProviderConfig1.Namespace)) @@ -253,6 +256,7 @@ func TestSync(t *testing.T) { oidcProviderConfig2.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig2.Status.Message = "Provider successfully created" + oidcProviderConfig2.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) expectedActions := []coretesting.Action{ coretesting.NewGetAction( @@ -338,9 +342,11 @@ func TestSync(t *testing.T) { oidcProviderConfig1.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig1.Status.Message = "Provider successfully created" + oidcProviderConfig1.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) oidcProviderConfig2.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig2.Status.Message = "Provider successfully created" + oidcProviderConfig2.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) expectedActions := []coretesting.Action{ coretesting.NewGetAction( @@ -406,6 +412,7 @@ func TestSync(t *testing.T) { oidcProviderConfig.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig.Status.Message = "Provider successfully created" + oidcProviderConfig.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) expectedActions := []coretesting.Action{ coretesting.NewGetAction( @@ -451,6 +458,7 @@ func TestSync(t *testing.T) { oidcProviderConfig.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig.Status.Message = "Provider successfully created" + oidcProviderConfig.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) expectedActions := []coretesting.Action{ coretesting.NewGetAction( @@ -486,6 +494,7 @@ func TestSync(t *testing.T) { oidcProviderConfig.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig.Status.Message = "Provider successfully created" + oidcProviderConfig.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) expectedActions := []coretesting.Action{ coretesting.NewGetAction( @@ -545,9 +554,11 @@ func TestSync(t *testing.T) { validOIDCProviderConfig.Status.Status = v1alpha1.SuccessOIDCProviderStatus validOIDCProviderConfig.Status.Message = "Provider successfully created" + validOIDCProviderConfig.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) invalidOIDCProviderConfig.Status.Status = v1alpha1.InvalidOIDCProviderStatus invalidOIDCProviderConfig.Status.Message = "Invalid: issuer must not have query" + invalidOIDCProviderConfig.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) expectedActions := []coretesting.Action{ coretesting.NewGetAction( @@ -615,9 +626,11 @@ func TestSync(t *testing.T) { validOIDCProviderConfig.Status.Status = v1alpha1.SuccessOIDCProviderStatus validOIDCProviderConfig.Status.Message = "Provider successfully created" + validOIDCProviderConfig.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) invalidOIDCProviderConfig.Status.Status = v1alpha1.InvalidOIDCProviderStatus invalidOIDCProviderConfig.Status.Message = "Invalid: issuer must not have query" + invalidOIDCProviderConfig.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) expectedActions := []coretesting.Action{ coretesting.NewGetAction( @@ -699,12 +712,15 @@ func TestSync(t *testing.T) { oidcProviderConfig.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig.Status.Message = "Provider successfully created" + oidcProviderConfig.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) oidcProviderConfigDuplicate1.Status.Status = v1alpha1.DuplicateOIDCProviderStatus oidcProviderConfigDuplicate1.Status.Message = "Duplicate issuer: https://issuer-duplicate.com" + oidcProviderConfigDuplicate1.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) oidcProviderConfigDuplicate2.Status.Status = v1alpha1.DuplicateOIDCProviderStatus oidcProviderConfigDuplicate2.Status.Message = "Duplicate issuer: https://issuer-duplicate.com" + oidcProviderConfigDuplicate2.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) expectedActions := []coretesting.Action{ coretesting.NewGetAction( @@ -764,6 +780,7 @@ func TestSync(t *testing.T) { oidcProviderConfig.Status.Status = v1alpha1.SuccessOIDCProviderStatus oidcProviderConfig.Status.Message = "Provider successfully created" + oidcProviderConfig.Status.LastUpdateTime = timePtr(metav1.NewTime(frozenNow)) expectedActions := []coretesting.Action{ coretesting.NewGetAction(