From 621390a392c1e23e7a8f75202e40c6108ffeca7a Mon Sep 17 00:00:00 2001 From: Guillaume Rose Date: Fri, 13 Nov 2020 11:13:34 +0100 Subject: [PATCH] Add ClusterProfile field for ClusterVersion --- ...ster-version-operator_01_clusterversion.crd.yaml | 9 +++++++++ config/v1/types_cluster_version.go | 13 +++++++++++++ config/v1/zz_generated.swagger_doc_generated.go | 13 +++++++------ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml b/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml index 1acda61afc3..73f1cc7b1d4 100644 --- a/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml +++ b/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml @@ -72,6 +72,15 @@ spec: to be an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in hexadecimal values). This is a required field. type: string + clusterProfile: + description: "ClusterProfile is the identifier that the Cluster Version + Operator uses to determine which manifests to apply. Operators can + be excluded completely or can have different manifests for each supported + profile. \n The following annotation is used to include manifests + for a given profile: include.release.openshift.io/[identifier]=true + \n If ClusterProfile is empty, self-managed-high-availability profile + is used." + type: string desiredUpdate: description: "desiredUpdate is an optional field that indicates the desired value of the cluster version. Setting this value will trigger diff --git a/config/v1/types_cluster_version.go b/config/v1/types_cluster_version.go index 58a65228da4..a8be39db63d 100644 --- a/config/v1/types_cluster_version.go +++ b/config/v1/types_cluster_version.go @@ -70,6 +70,19 @@ type ClusterVersionSpec struct { // the operator from creating or updating the object. // +optional Overrides []ComponentOverride `json:"overrides,omitempty"` + + // ClusterProfile is the identifier that the Cluster Version Operator + // uses to determine which manifests to apply. Operators can be excluded + // completely or can have different manifests for each supported profile. + // + // The following annotation is used to include manifests for a given profile: + // include.release.openshift.io/[identifier]=true + // + // If ClusterProfile is empty, self-managed-high-availability profile is + // used. + // + // +optional + ClusterProfile string `json:"clusterProfile,omitempty"` } // ClusterVersionStatus reports the status of the cluster versioning, diff --git a/config/v1/zz_generated.swagger_doc_generated.go b/config/v1/zz_generated.swagger_doc_generated.go index f0e27b94c2a..0888e7a8f41 100644 --- a/config/v1/zz_generated.swagger_doc_generated.go +++ b/config/v1/zz_generated.swagger_doc_generated.go @@ -490,12 +490,13 @@ func (ClusterVersionList) SwaggerDoc() map[string]string { } var map_ClusterVersionSpec = map[string]string{ - "": "ClusterVersionSpec is the desired version state of the cluster. It includes the version the cluster should be at, how the cluster is identified, and where the cluster should look for version updates.", - "clusterID": "clusterID uniquely identifies this cluster. This is expected to be an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in hexadecimal values). This is a required field.", - "desiredUpdate": "desiredUpdate is an optional field that indicates the desired value of the cluster version. Setting this value will trigger an upgrade (if the current version does not match the desired version). The set of recommended update values is listed as part of available updates in status, and setting values outside that range may cause the upgrade to fail. You may specify the version field without setting image if an update exists with that version in the availableUpdates or history.\n\nIf an upgrade fails the operator will halt and report status about the failing component. Setting the desired update value back to the previous version will cause a rollback to be attempted. Not all rollbacks will succeed.", - "upstream": "upstream may be used to specify the preferred update server. By default it will use the appropriate update server for the cluster and region.", - "channel": "channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster. The default channel will be contain stable updates that are appropriate for production clusters.", - "overrides": "overrides is list of overides for components that are managed by cluster version operator. Marking a component unmanaged will prevent the operator from creating or updating the object.", + "": "ClusterVersionSpec is the desired version state of the cluster. It includes the version the cluster should be at, how the cluster is identified, and where the cluster should look for version updates.", + "clusterID": "clusterID uniquely identifies this cluster. This is expected to be an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in hexadecimal values). This is a required field.", + "desiredUpdate": "desiredUpdate is an optional field that indicates the desired value of the cluster version. Setting this value will trigger an upgrade (if the current version does not match the desired version). The set of recommended update values is listed as part of available updates in status, and setting values outside that range may cause the upgrade to fail. You may specify the version field without setting image if an update exists with that version in the availableUpdates or history.\n\nIf an upgrade fails the operator will halt and report status about the failing component. Setting the desired update value back to the previous version will cause a rollback to be attempted. Not all rollbacks will succeed.", + "upstream": "upstream may be used to specify the preferred update server. By default it will use the appropriate update server for the cluster and region.", + "channel": "channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster. The default channel will be contain stable updates that are appropriate for production clusters.", + "overrides": "overrides is list of overides for components that are managed by cluster version operator. Marking a component unmanaged will prevent the operator from creating or updating the object.", + "clusterProfile": "ClusterProfile is the identifier that the Cluster Version Operator uses to determine which manifests to apply. Operators can be excluded completely or can have different manifests for each supported profile.\n\nThe following annotation is used to include manifests for a given profile: include.release.openshift.io/[identifier]=true\n\nIf ClusterProfile is empty, self-managed-high-availability profile is used.", } func (ClusterVersionSpec) SwaggerDoc() map[string]string {