diff --git a/pipelines/types/istio.go b/pipelines/types/istio.go index dae91f0..763bf7a 100644 --- a/pipelines/types/istio.go +++ b/pipelines/types/istio.go @@ -20,12 +20,11 @@ const StepActionIstioUpgrade = "IstioUpgrade" type IstioUpgradeStep struct { StepMeta `json:",inline"` - AKSCluster string `json:"aksCluster"` - DryRun bool `json:"dryRun,omitempty"` + AKSCluster Value `json:"aksCluster"` } 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) + return fmt.Sprintf("Step %s\n Kind: %s\n AKSCluster: %s\n", s.Name, s.Action, s.AKSCluster.String()) } func (s *IstioUpgradeStep) RequiredInputs() []StepDependency { diff --git a/pipelines/types/pipeline.schema.v1.json b/pipelines/types/pipeline.schema.v1.json index 9ba2ae0..f7b1a23 100644 --- a/pipelines/types/pipeline.schema.v1.json +++ b/pipelines/types/pipeline.schema.v1.json @@ -820,6 +820,33 @@ } ] }, + "istioUpgradeStep": { + "unevaluatedProperties": false, + "allOf": [ + { + "$ref": "#/definitions/stepMeta" + }, + { + "properties": { + "action": { + "const": "IstioUpgrade" + }, + "aksCluster": { + "$ref": "#/definitions/value" + }, + "timeout": { + "$ref": "#/definitions/durationString" + }, + "shellIdentity": { + "$ref": "#/definitions/value" + } + }, + "required": [ + "aksCluster" + ] + } + ] + }, "helmStep": { "unevaluatedProperties": false, "allOf": [ @@ -2073,6 +2100,22 @@ "then": { "$ref": "#/definitions/grafanaDatasourcesStep" } + }, + { + "if": { + "type": "object", + "properties": { + "action": { + "const": "IstioUpgrade" + } + }, + "required": [ + "action" + ] + }, + "then": { + "$ref": "#/definitions/istioUpgradeStep" + } } ], "required": [