Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Uplevel AnalysisRun status to Rollout status #578

Merged
merged 4 commits into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions manifests/crds/rollout-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2909,6 +2909,8 @@ spec:
type: integer
abort:
type: boolean
abortedAt:
type: boolean
availableReplicas:
format: int32
type: integer
Expand All @@ -2918,8 +2920,32 @@ spec:
type: string
postPromotionAnalysisRun:
type: string
postPromotionAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
prePromotionAnalysisRun:
type: string
prePromotionAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
previewSelector:
type: string
previousActiveSelector:
Expand All @@ -2934,10 +2960,34 @@ spec:
properties:
currentBackgroundAnalysisRun:
type: string
currentBackgroundAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
currentExperiment:
type: string
currentStepAnalysisRun:
type: string
currentStepAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
stableRS:
type: string
type: object
Expand Down
48 changes: 48 additions & 0 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13867,8 +13867,32 @@ spec:
type: string
postPromotionAnalysisRun:
type: string
postPromotionAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
prePromotionAnalysisRun:
type: string
prePromotionAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
previewSelector:
type: string
previousActiveSelector:
Expand All @@ -13883,10 +13907,34 @@ spec:
properties:
currentBackgroundAnalysisRun:
type: string
currentBackgroundAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
currentExperiment:
type: string
currentStepAnalysisRun:
type: string
currentStepAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
stableRS:
type: string
type: object
Expand Down
48 changes: 48 additions & 0 deletions manifests/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13867,8 +13867,32 @@ spec:
type: string
postPromotionAnalysisRun:
type: string
postPromotionAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
prePromotionAnalysisRun:
type: string
prePromotionAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
previewSelector:
type: string
previousActiveSelector:
Expand All @@ -13883,10 +13907,34 @@ spec:
properties:
currentBackgroundAnalysisRun:
type: string
currentBackgroundAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
currentExperiment:
type: string
currentStepAnalysisRun:
type: string
currentStepAnalysisRunStatus:
properties:
message:
type: string
name:
type: string
status:
type: string
required:
- name
- status
type: object
stableRS:
type: string
type: object
Expand Down
67 changes: 66 additions & 1 deletion pkg/apis/rollouts/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions pkg/apis/rollouts/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,11 @@ type RolloutStatus struct {
PauseConditions []PauseCondition `json:"pauseConditions,omitempty"`
//ControllerPause indicates the controller has paused the rollout
ControllerPause bool `json:"controllerPause,omitempty"`
// AbortedAt indicates the controller reconciled an aborted rollout. The controller uses this to understand if
// the controller needs to do some specific work when a Rollout is aborted. For example, the reconcileAbort is used
// to indicate if the Rollout should enter an aborted state when the latest AnalysisRun is a failure, or the controller
// has already put the Rollout into an aborted and should create a new AnalysisRun.
AbortedAt *metav1.Time `json:"abortedAt,omitempty"`
// CurrentPodHash the hash of the current pod template
// +optional
CurrentPodHash string `json:"currentPodHash,omitempty"`
Expand Down Expand Up @@ -550,9 +555,15 @@ type BlueGreenStatus struct {
// +optional
ScaleUpPreviewCheckPoint bool `json:"scaleUpPreviewCheckPoint,omitempty"`
// PrePromotionAnalysisRun is the current analysis run running before the active service promotion
// TODO(Deprecated): Remove in v0.10
PrePromotionAnalysisRun string `json:"prePromotionAnalysisRun,omitempty"`
// PrePromotionAnalysisRunStatus indicates the status of the current prepromotion analysis run
PrePromotionAnalysisRunStatus *RolloutAnalysisRunStatus `json:"prePromotionAnalysisRunStatus,omitempty"`
// PostPromotionAnalysisRun is the current analysis run running after the active service promotion
// TODO(Deprecated): Remove in v0.10
PostPromotionAnalysisRun string `json:"postPromotionAnalysisRun,omitempty"`
// PostPromotionAnalysisRunStatus indicates the status of the current post promotion analysis run
PostPromotionAnalysisRunStatus *RolloutAnalysisRunStatus `json:"postPromotionAnalysisRunStatus,omitempty"`
}

// CanaryStatus status fields that only pertain to the canary rollout
Expand All @@ -561,13 +572,25 @@ type CanaryStatus struct {
// +optional
StableRS string `json:"stableRS,omitempty"`
// CurrentStepAnalysisRun indicates the analysisRun for the current step index
// TODO(Deprecated): Remove in v0.10
CurrentStepAnalysisRun string `json:"currentStepAnalysisRun,omitempty"`
// CurrentStepAnalysisRunStatus indicates the status of the current step analysis run
CurrentStepAnalysisRunStatus *RolloutAnalysisRunStatus `json:"currentStepAnalysisRunStatus,omitempty"`
// CurrentBackgroundAnalysisRun indicates the analysisRun for the Background step
// TODO(Deprecated): Remove in v0.10
CurrentBackgroundAnalysisRun string `json:"currentBackgroundAnalysisRun,omitempty"`
// CurrentBackgroundAnalysisRunStatus indicates the status of the current background analysis run
CurrentBackgroundAnalysisRunStatus *RolloutAnalysisRunStatus `json:"currentBackgroundAnalysisRunStatus,omitempty"`
// CurrentExperiment indicates the running experiment
CurrentExperiment string `json:"currentExperiment,omitempty"`
}

type RolloutAnalysisRunStatus struct {
Name string `json:"name"`
Status AnalysisPhase `json:"status"`
Message string `json:"message,omitempty"`
}

// RolloutConditionType defines the conditions of Rollout
type RolloutConditionType string

Expand Down
Loading