diff --git a/graphql-schemas/schema.yml b/graphql-schemas/schema.yml index 7080b689..806afcd0 100644 --- a/graphql-schemas/schema.yml +++ b/graphql-schemas/schema.yml @@ -933,6 +933,15 @@ confs: - { name: workloads, type: string, isList: true, isRequired: true } - { name: versionGateApprovals, type: string, isList: true } - { name: conditions, type: ClusterUpgradePolicyConditions_v1, isRequired: true } + - { name: fastPath, type: ClusterUpgradeFastPath_v1 } + +- name: ClusterUpgradeFastPath_v1 + fields: + - { name: path, type: string } + - { name: towardsVersions, type: string, isList: true } + - { name: schedule, type: string } + - { name: speedUpFactor, type: int, isRequired: true } + - { name: description, type: string } - name: ClusterNetwork_v1 fields: @@ -1181,6 +1190,7 @@ confs: - { name: blockedVersions, type: string, isList: true } - { name: upgradePolicyAllowedWorkloads, type: string, isList: true } - { name: upgradePolicyAllowedMutexes, type: string, isList: true } + - { name: upgradePolicyFastPath, type: ClusterUpgradeFastPath_v1 } - { name: ausClusterHealthChecks, type: AusClusterHealthCheck_v1, isList: true } - { name: sectors, type: OpenShiftClusterManagerSector_v1, isList: true } - { name: upgradePolicyDefaults, type: OpenShiftClusterManagerUpgradePolicyDefault_v1, isList: true } diff --git a/schemas/openshift/cluster-upgrade-fast-path-1.yml b/schemas/openshift/cluster-upgrade-fast-path-1.yml new file mode 100644 index 00000000..7d2c0f60 --- /dev/null +++ b/schemas/openshift/cluster-upgrade-fast-path-1.yml @@ -0,0 +1,37 @@ +--- +"$schema": /metaschema-1.json +version: '1.0' +type: object + +additionalProperties: false +properties: + "$schema": + type: string + enum: + - /openshift/cluster-upgrade-fast-path-1.yml + description: + type: string + towardsVersions: + description: | + List of versions or version regexes that the cluster needs to + upgrade towards. Once a cluster reaches or surpasses on of these + versions, the effect of the upgrade fast path is disabled. + type: array + items: + type: string + schedule: + description: | + The allowed maintenance window for cluster upgrades while the fast + path upgrade policy is in effect. If present, this schedule overwrites + the one from the cluster upgrade policy. The schedule is a cron-like + expression. + type: string + pattern: '(((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5}' + speedUpFactor: + description: | + The speed up factor scales down the required soak days for a version + on a cluster. + type: integer +required: +- towardsVersions +- speedUpFactor diff --git a/schemas/openshift/cluster-upgrade-policy-1.yml b/schemas/openshift/cluster-upgrade-policy-1.yml index f3b21149..912a82a5 100644 --- a/schemas/openshift/cluster-upgrade-policy-1.yml +++ b/schemas/openshift/cluster-upgrade-policy-1.yml @@ -58,6 +58,13 @@ properties: oneOf: - required: - soakDays + fastPath: + oneOf: + # inline + - "$ref": "/openshift/cluster-upgrade-fast-path-1.yml" + # referenced + - "$ref": "/common-1.json#/definitions/crossref" + "$schemaRef": "/openshift/cluster-upgrade-fast-path-1.yml" required: - workloads - schedule diff --git a/schemas/openshift/openshift-cluster-manager-1.yml b/schemas/openshift/openshift-cluster-manager-1.yml index fc81044a..6855a034 100644 --- a/schemas/openshift/openshift-cluster-manager-1.yml +++ b/schemas/openshift/openshift-cluster-manager-1.yml @@ -102,6 +102,13 @@ properties: type: array items: type: string + upgradePolicyFastPath: + oneOf: + # inline + - "$ref": "/openshift/cluster-upgrade-fast-path-1.yml" + # referenced + - "$ref": "/common-1.json#/definitions/crossref" + "$schemaRef": "/openshift/cluster-upgrade-fast-path-1.yml" ausClusterHealthChecks: description: List of cluster health check providers type: array