diff --git a/api/v1alpha1/usersignup_types.go b/api/v1alpha1/usersignup_types.go index 60574ba7..5db5a942 100644 --- a/api/v1alpha1/usersignup_types.go +++ b/api/v1alpha1/usersignup_types.go @@ -247,6 +247,13 @@ type UserSignupStatus struct { // This is used by the proxy when no workspace context is provided. // +optional HomeSpace string `json:"homeSpace,omitempty"` + + // ScheduledDeactivationTimestamp is the calculated timestamp after which the user's account will be deactivated, typically + // after the expiry of their trial and based on the term specific by their UserTier. This property may be used as + // a convenience to determine the amount of time an account has left before deactivation, without requiring a separate + // lookup for the UserTier and subsequent calculation. It is managed by the Deactivation controller in the host operator. + // +optional + ScheduledDeactivationTimestamp metav1.Time `json:"scheduledDeactivationTimestamp,omitempty"` } //+kubebuilder:object:root=true diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 56272c8f..b5858a64 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -3728,6 +3728,7 @@ func (in *UserSignupStatus) DeepCopyInto(out *UserSignupStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.ScheduledDeactivationTimestamp.DeepCopyInto(&out.ScheduledDeactivationTimestamp) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSignupStatus. diff --git a/api/v1alpha1/zz_generated.openapi.go b/api/v1alpha1/zz_generated.openapi.go index 99d9f7a9..acc6edfa 100644 --- a/api/v1alpha1/zz_generated.openapi.go +++ b/api/v1alpha1/zz_generated.openapi.go @@ -5175,11 +5175,18 @@ func schema_codeready_toolchain_api_api_v1alpha1_UserSignupStatus(ref common.Ref Format: "", }, }, + "scheduledDeactivationTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "ScheduledDeactivationTimestamp is the calculated timestamp after which the user's account will be deactivated, typically after the expiry of their trial and based on the term specific by their UserTier. This property may be used as a convenience to determine the amount of time an account has left before deactivation, without requiring a separate lookup for the UserTier and subsequent calculation. It is managed by the Deactivation controller in the host operator.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, }, }, }, Dependencies: []string{ - "github.com/codeready-toolchain/api/api/v1alpha1.Condition"}, + "github.com/codeready-toolchain/api/api/v1alpha1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } }