Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ tests:
url: https://dummy.vpc.com
- name: BadService
url: https://bad-service.com
expectedStatusError: 'platformStatus.ibmcloud.serviceEndpoints[1].name: Unsupported value: "BadService": supported values: "CIS", "COS", "COSConfig", "DNSServices", "GlobalCatalog", "GlobalSearch", "GlobalTagging", "HyperProtect", "IAM", "KeyProtect", "ResourceController", "ResourceManager", "VPC"'
expectedStatusError: 'platformStatus.ibmcloud.serviceEndpoints[1].name: Unsupported value: "BadService": supported values: "CIS", "COS", "COSConfig", "DNSServices", "GlobalCatalog", "GlobalSearch", "GlobalTagging", "HyperProtect", "IAM", "KeyProtect", "ResourceController", "ResourceManager", "VPC", "TransitGateway", "PowerVS"'
- name: Should allow updating other fields with an invalid persisted PowerVS service endpoint name in spec
initialCRDPatches:
- op: replace
Expand Down Expand Up @@ -1477,7 +1477,7 @@ tests:
serviceEndpoints:
- name: dnsservices2
url: https://abc
expectedError: 'spec.platformSpec.powervs.serviceEndpoints[0].name: Unsupported value: "dnsservices2": supported values: "CIS", "COS", "COSConfig", "DNSServices", "GlobalCatalog", "GlobalSearch", "GlobalTagging", "HyperProtect", "IAM", "KeyProtect", "Power", "ResourceController", "ResourceManager", "VPC"'
expectedError: 'spec.platformSpec.powervs.serviceEndpoints[0].name: Unsupported value: "dnsservices2": supported values: "CIS", "COS", "COSConfig", "DNSServices", "GlobalCatalog", "GlobalSearch", "GlobalTagging", "HyperProtect", "IAM", "KeyProtect", "Power", "ResourceController", "ResourceManager", "VPC", "TransitGateway"'
- name: Should allow updating adding updating an invalid value to a valid value for PowerVS service endpoint name in spec
initialCRDPatches:
- op: replace
Expand Down Expand Up @@ -1636,7 +1636,7 @@ tests:
serviceEndpoints:
- name: dnsservices2
url: https://abc
expectedStatusError: 'status.platformStatus.powervs.serviceEndpoints[0].name: Unsupported value: "dnsservices2": supported values: "CIS", "COS", "COSConfig", "DNSServices", "GlobalCatalog", "GlobalSearch", "GlobalTagging", "HyperProtect", "IAM", "KeyProtect", "Power", "ResourceController", "ResourceManager", "VPC"'
expectedStatusError: 'status.platformStatus.powervs.serviceEndpoints[0].name: Unsupported value: "dnsservices2": supported values: "CIS", "COS", "COSConfig", "DNSServices", "GlobalCatalog", "GlobalSearch", "GlobalTagging", "HyperProtect", "IAM", "KeyProtect", "Power", "ResourceController", "ResourceManager", "VPC", "TransitGateway"'
- name: Should allow updating adding updating an invalid value to a valid value for PowerVS service endpoint name in status
initialCRDPatches:
- op: replace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ tests:
serviceEndpoints:
- name: InvalidService
url: https://dummy.vpc.com/v1
expectedError: "spec.platformSpec.ibmcloud.serviceEndpoints[0].name: Unsupported value: \"InvalidService\": supported values: \"CIS\", \"COS\", \"COSConfig\", \"DNSServices\", \"GlobalCatalog\", \"GlobalSearch\", \"GlobalTagging\", \"HyperProtect\", \"IAM\", \"KeyProtect\", \"ResourceController\", \"ResourceManager\", \"VPC\", <nil>: Invalid value: \"null\": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation"
expectedError: "spec.platformSpec.ibmcloud.serviceEndpoints[0].name: Unsupported value: \"InvalidService\": supported values: \"CIS\", \"COS\", \"COSConfig\", \"DNSServices\", \"GlobalCatalog\", \"GlobalSearch\", \"GlobalTagging\", \"HyperProtect\", \"IAM\", \"KeyProtect\", \"ResourceController\", \"ResourceManager\", \"VPC\", \"TransitGateway\", \"PowerVS\", <nil>: Invalid value: \"null\": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation"
- name: Should be able to add valid ServiceEndpoints to IBMCloud PlatformSpec
initial: |
apiVersion: config.openshift.io/v1
Expand Down
6 changes: 5 additions & 1 deletion config/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ const (

// IBMCloudServiceName contains a value specifying the name of an IBM Cloud Service,
// which are used by MAPI, CIRO, CIO, Installer, etc.
// +kubebuilder:validation:Enum=CIS;COS;COSConfig;DNSServices;GlobalCatalog;GlobalSearch;GlobalTagging;HyperProtect;IAM;KeyProtect;ResourceController;ResourceManager;VPC
// +kubebuilder:validation:Enum=CIS;COS;COSConfig;DNSServices;GlobalCatalog;GlobalSearch;GlobalTagging;HyperProtect;IAM;KeyProtect;ResourceController;ResourceManager;VPC;TransitGateway;PowerVS
Comment thread
qodo-for-rh-openshift[bot] marked this conversation as resolved.
Comment thread
qodo-for-rh-openshift[bot] marked this conversation as resolved.
type IBMCloudServiceName string

const (
Expand Down Expand Up @@ -433,4 +433,8 @@ const (
IBMCloudServiceResourceManager IBMCloudServiceName = "ResourceManager"
// IBMCloudServiceVPC is the name for IBM Cloud VPC.
IBMCloudServiceVPC IBMCloudServiceName = "VPC"
// IBMCloudServiceTransitGateway is the name for IBM Cloud Transit Gateway.
IBMCloudServiceTransitGateway IBMCloudServiceName = "TransitGateway"
// IBMCloudServicePowerVS is the name for IBM Cloud Power Virtual Server.
IBMCloudServicePowerVS IBMCloudServiceName = "PowerVS"
Comment thread
qodo-for-rh-openshift[bot] marked this conversation as resolved.
)
10 changes: 5 additions & 5 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ type VSpherePlatformStatus struct {
// override existing defaults of IBM Cloud Services.
type IBMCloudServiceEndpoint struct {
// name is the name of the IBM Cloud service.
// Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, or VPC.
// Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, VPC, TransitGateway, or PowerVS.
// For example, the IBM Cloud Private IAM service could be configured with the
// service `name` of `IAM` and `url` of `https://private.iam.cloud.ibm.com`
// Whereas the IBM Cloud Private VPC service for US South (Dallas) could be configured
Expand Down Expand Up @@ -1884,8 +1884,8 @@ type IBMCloudPlatformSpec struct {
// overridden. The CCCMO reads in the IBMCloudPlatformSpec and validates each
// endpoint is resolvable. Once validated, the cloud config and IBMCloudPlatformStatus
// are updated to reflect the same custom endpoints.
// A maximum of 13 service endpoints overrides are supported.
// +kubebuilder:validation:MaxItems=13
// A maximum of 15 service endpoints overrides are supported.
// +kubebuilder:validation:MaxItems=15
// +listType=map
// +listMapKey=name
// +optional
Expand Down Expand Up @@ -1918,7 +1918,7 @@ type IBMCloudPlatformStatus struct {
// overridden. The CCCMO reads in the IBMCloudPlatformSpec and validates each
// endpoint is resolvable. Once validated, the cloud config and IBMCloudPlatformStatus
// are updated to reflect the same custom endpoints.
// +openshift:validation:FeatureGateAwareMaxItems:featureGate=DyanmicServiceEndpointIBMCloud,maxItems=13
// +openshift:validation:FeatureGateAwareMaxItems:featureGate=DyanmicServiceEndpointIBMCloud,maxItems=15
// +listType=map
// +listMapKey=name
// +optional
Expand Down Expand Up @@ -1969,7 +1969,7 @@ type PowerVSServiceEndpoint struct {
// Power Cloud - https://cloud.ibm.com/apidocs/power-cloud
//
// +required
// +kubebuilder:validation:Enum=CIS;COS;COSConfig;DNSServices;GlobalCatalog;GlobalSearch;GlobalTagging;HyperProtect;IAM;KeyProtect;Power;ResourceController;ResourceManager;VPC
// +kubebuilder:validation:Enum=CIS;COS;COSConfig;DNSServices;GlobalCatalog;GlobalSearch;GlobalTagging;HyperProtect;IAM;KeyProtect;Power;ResourceController;ResourceManager;VPC;TransitGateway
Name string `json:"name"`

// url is fully qualified URI with scheme https, that overrides the default generated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
type: string
url:
description: |-
Expand Down Expand Up @@ -1976,7 +1977,7 @@ spec:
name:
description: |-
name is the name of the IBM Cloud service.
Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, or VPC.
Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, VPC, TransitGateway, or PowerVS.
For example, the IBM Cloud Private IAM service could be configured with the
service `name` of `IAM` and `url` of `https://private.iam.cloud.ibm.com`
Whereas the IBM Cloud Private VPC service for US South (Dallas) could be configured
Expand All @@ -1995,6 +1996,8 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
- PowerVS
type: string
url:
description: |-
Expand Down Expand Up @@ -2382,6 +2385,7 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
type: string
url:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ spec:
overridden. The CCCMO reads in the IBMCloudPlatformSpec and validates each
endpoint is resolvable. Once validated, the cloud config and IBMCloudPlatformStatus
are updated to reflect the same custom endpoints.
A maximum of 13 service endpoints overrides are supported.
A maximum of 15 service endpoints overrides are supported.
items:
description: |-
IBMCloudServiceEndpoint stores the configuration of a custom url to
Expand All @@ -255,7 +255,7 @@ spec:
name:
description: |-
name is the name of the IBM Cloud service.
Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, or VPC.
Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, VPC, TransitGateway, or PowerVS.
For example, the IBM Cloud Private IAM service could be configured with the
service `name` of `IAM` and `url` of `https://private.iam.cloud.ibm.com`
Whereas the IBM Cloud Private VPC service for US South (Dallas) could be configured
Expand All @@ -274,6 +274,8 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
- PowerVS
type: string
url:
description: |-
Expand All @@ -294,7 +296,7 @@ spec:
- name
- url
type: object
maxItems: 13
maxItems: 15
type: array
x-kubernetes-list-map-keys:
- name
Expand Down Expand Up @@ -617,6 +619,7 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
type: string
url:
description: |-
Expand Down Expand Up @@ -2139,7 +2142,7 @@ spec:
name:
description: |-
name is the name of the IBM Cloud service.
Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, or VPC.
Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, VPC, TransitGateway, or PowerVS.
For example, the IBM Cloud Private IAM service could be configured with the
service `name` of `IAM` and `url` of `https://private.iam.cloud.ibm.com`
Whereas the IBM Cloud Private VPC service for US South (Dallas) could be configured
Expand All @@ -2158,6 +2161,8 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
- PowerVS
type: string
url:
description: |-
Expand All @@ -2174,7 +2179,7 @@ spec:
- name
- url
type: object
maxItems: 13
maxItems: 15
type: array
x-kubernetes-list-map-keys:
- name
Expand Down Expand Up @@ -2615,6 +2620,7 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
type: string
url:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ spec:
overridden. The CCCMO reads in the IBMCloudPlatformSpec and validates each
endpoint is resolvable. Once validated, the cloud config and IBMCloudPlatformStatus
are updated to reflect the same custom endpoints.
A maximum of 13 service endpoints overrides are supported.
A maximum of 15 service endpoints overrides are supported.
items:
description: |-
IBMCloudServiceEndpoint stores the configuration of a custom url to
Expand All @@ -240,7 +240,7 @@ spec:
name:
description: |-
name is the name of the IBM Cloud service.
Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, or VPC.
Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, VPC, TransitGateway, or PowerVS.
For example, the IBM Cloud Private IAM service could be configured with the
service `name` of `IAM` and `url` of `https://private.iam.cloud.ibm.com`
Whereas the IBM Cloud Private VPC service for US South (Dallas) could be configured
Expand All @@ -259,6 +259,8 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
- PowerVS
type: string
url:
description: |-
Expand All @@ -279,7 +281,7 @@ spec:
- name
- url
type: object
maxItems: 13
maxItems: 15
type: array
x-kubernetes-list-map-keys:
- name
Expand Down Expand Up @@ -602,6 +604,7 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
type: string
url:
description: |-
Expand Down Expand Up @@ -2124,7 +2127,7 @@ spec:
name:
description: |-
name is the name of the IBM Cloud service.
Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, or VPC.
Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, VPC, TransitGateway, or PowerVS.
For example, the IBM Cloud Private IAM service could be configured with the
service `name` of `IAM` and `url` of `https://private.iam.cloud.ibm.com`
Whereas the IBM Cloud Private VPC service for US South (Dallas) could be configured
Expand All @@ -2143,6 +2146,8 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
- PowerVS
type: string
url:
description: |-
Expand All @@ -2159,7 +2164,7 @@ spec:
- name
- url
type: object
maxItems: 13
maxItems: 15
type: array
x-kubernetes-list-map-keys:
- name
Expand Down Expand Up @@ -2600,6 +2605,7 @@ spec:
- ResourceController
- ResourceManager
- VPC
- TransitGateway
type: string
url:
description: |-
Expand Down
Loading