Skip to content

Commit 2d7d627

Browse files
authored
refactor: change route spec backup and condition extension anno key (#38)
1 parent 310729a commit 2d7d627

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

rollout/v1alpha1/shared_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ type BatchProgressingInfo struct {
118118
}
119119

120120
const (
121-
RouteConditionTypeReady = "Ready"
122-
RouteConditionTypeSynced = "Synced"
121+
ConditionTypeReady = "Ready"
122+
ConditionTypeSynced = "Synced"
123123
)
124124

125-
// RouteConditionExtension contains the conditions of route
126-
type RouteConditionExtension struct {
125+
// ConditionExtension contains the conditions of route
126+
type ConditionExtension struct {
127127
Conditions []metav1.Condition `json:"conditions,omitempty"`
128128
}

rollout/well_known_annotations.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ const (
3939
AnnoRolloutName = "rollout.kusionstack.io/name"
4040
)
4141

42-
// traffic annotations
42+
// new style key
4343
const (
44-
// AnnoRouteSpecBackup is the origin spec of route object. It is used to rollback.
45-
AnnoRouteSpecBackup = "rollout.kusionstack.io/route-spec-backup"
46-
// AnnoRouteConditions is the conditions of route object.
47-
AnnoRouteConditions = "rollout.kusionstack.io/route-conditions"
44+
// OriginRouteSpecAnnoKey is the backup of origin route object spec. It is used to rollback.
45+
OriginRouteSpecAnnoKey = "rollout.kusionstack.io/origin-route-spec"
46+
47+
// AnnoConditionExtension is the annotation key of condition extension.
48+
ConditionExtensionAnnoKey = "rollout.kusionstack.io/condition-extension"
4849
)

0 commit comments

Comments
 (0)