Skip to content
Closed
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
10 changes: 9 additions & 1 deletion pipelines/types/istio.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ type IstioUpgradeStep struct {
StepMeta `json:",inline"`
AKSCluster string `json:"aksCluster"`
DryRun bool `json:"dryRun,omitempty"`
// "install" installs the new control plane alongside the existing one
// and stops before workload migration. "upgrade" migrates workloads and
// completes the canary. Empty runs the full lifecycle in one step.
Phase string `json:"phase,omitempty"`
Comment on lines +25 to +28
}

func (s *IstioUpgradeStep) Description() string {
return fmt.Sprintf("Step %s\n Kind: %s\n AKSCluster: %s\n DryRun: %v\n", s.Name, s.Action, s.AKSCluster, s.DryRun)
phase := s.Phase
if phase == "" {
phase = "full"
}
return fmt.Sprintf("Step %s\n Kind: %s\n AKSCluster: %s\n DryRun: %v\n Phase: %s\n", s.Name, s.Action, s.AKSCluster, s.DryRun, phase)
}

func (s *IstioUpgradeStep) RequiredInputs() []StepDependency {
Expand Down
47 changes: 47 additions & 0 deletions pipelines/types/pipeline.schema.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,37 @@
}
]
},
"istioUpgradeStep": {
"unevaluatedProperties": false,
"allOf": [
{
"$ref": "#/definitions/stepMeta"
},
{
"properties": {
"action": {
"const": "IstioUpgrade"
},
"aksCluster": {
"type": "string"
},
"dryRun": {
"type": "boolean"
},
"phase": {
"type": "string",
"enum": [
"install",
"upgrade"
]
}
Comment on lines +840 to +846
},
"required": [
"aksCluster"
]
}
]
},
"helmStep": {
"unevaluatedProperties": false,
"allOf": [
Expand Down Expand Up @@ -2073,6 +2104,22 @@
"then": {
"$ref": "#/definitions/grafanaDatasourcesStep"
}
},
{
"if": {
"type": "object",
"properties": {
"action": {
"const": "IstioUpgrade"
}
},
"required": [
"action"
]
},
"then": {
"$ref": "#/definitions/istioUpgradeStep"
}
}
],
"required": [
Expand Down