Skip to content

Commit

Permalink
[AUS] upgrade policy fast path
Browse files Browse the repository at this point in the history
speed up overwrites for cluster upgrades to reach a certain version
level.

based on design doc https://gitlab.cee.redhat.com/service/app-interface/-/merge_requests/100465

part of SDE-3696

Signed-off-by: Gerd Oberlechner <[email protected]>
  • Loading branch information
geoberle committed Apr 23, 2024
1 parent baf8790 commit d60b8f4
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
10 changes: 10 additions & 0 deletions graphql-schemas/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }
Expand Down
37 changes: 37 additions & 0 deletions schemas/openshift/cluster-upgrade-fast-path-1.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions schemas/openshift/cluster-upgrade-policy-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions schemas/openshift/openshift-cluster-manager-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d60b8f4

Please sign in to comment.