You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(sub): add subscription installplan status conditions
- Add Subscription InstallPlan status conditions
- Add better condition getters/setters to InstallPlan status
- Add hashstructure set tag to Subscription condition
- Update internal version types to match
// InstallPlanFailed is a reason string for Subscriptions that transitioned due to a referenced InstallPlan failing without setting an explicit failure condition.
82
+
InstallPlanFailed="InstallPlanFailed"
65
83
)
66
84
85
+
// SubscriptionCondition represents the latest available observations of a Subscription's state.
67
86
typeSubscriptionConditionstruct {
68
87
// Type is the type of Subscription condition.
69
88
TypeSubscriptionConditionType
@@ -127,16 +146,16 @@ type SubscriptionStatus struct {
127
146
128
147
// Conditions is a list of the latest available observations about a Subscription's current state.
129
148
// +optional
130
-
Conditions []SubscriptionCondition
149
+
Conditions []SubscriptionCondition`hash:"set"`
131
150
132
151
// LastUpdated represents the last time that the Subscription status was updated.
133
152
LastUpdated metav1.Time
134
153
}
135
154
136
155
// GetCondition returns the SubscriptionCondition of the given type if it exists in the SubscriptionStatus' Conditions.
137
156
// Returns a condition of the given type with a ConditionStatus of "Unknown" if not found.
// InstallPlanFailed is a reason string for Subscriptions that transitioned due to a referenced InstallPlan failing without setting an explicit failure condition.
84
+
InstallPlanFailed="InstallPlanFailed"
67
85
)
68
86
87
+
// SubscriptionCondition represents the latest available observations of a Subscription's state.
69
88
typeSubscriptionConditionstruct {
70
89
// Type is the type of Subscription condition.
71
90
TypeSubscriptionConditionType`json:"type" description:"type of Subscription condition"`
@@ -87,7 +106,7 @@ type SubscriptionCondition struct {
87
106
88
107
// LastTransitionTime is the last time the condition transit from one status to another
89
108
// +optional
90
-
LastTransitionTime*metav1.Time`json:"lastTransitionTime,omitempty" description:"last time the condition transit from one status to another"`
109
+
LastTransitionTime*metav1.Time`json:"lastTransitionTime,omitempty" description:"last time the condition transit from one status to another" hash:"ignore"`
91
110
}
92
111
93
112
// Equals returns true if a SubscriptionCondition equals the one given, false otherwise.
@@ -129,16 +148,16 @@ type SubscriptionStatus struct {
129
148
130
149
// Conditions is a list of the latest available observations about a Subscription's current state.
0 commit comments