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 @@ -213,7 +213,7 @@ tests:
dnsType: PlatformDefault
serviceEndpoints:
- {name: "UnknownService", url: "https://compute-myendpoint1.p.googleapis.com"}
expectedStatusError: "[status.platformStatus.gcp.serviceEndpoints[0].name: Unsupported value: \"UnknownService\": supported values: \"Compute\", \"Container\", \"CloudResourceManager\", \"DNS\", \"File\", \"IAM\", \"IAMCredentials\", \"OAuth\", \"ServiceUsage\", \"Storage\", \"STS\", <nil>: Invalid value: \"null\": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]"
expectedStatusError: "[status.platformStatus.gcp.serviceEndpoints[0].name: Unsupported value: \"UnknownService\": supported values: \"Compute\", \"Container\", \"CloudResourceManager\", \"DNS\", \"File\", \"IAM\", \"IAMCredentials\", \"ServiceUsage\", \"Storage\", <nil>: Invalid value: \"null\": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]"
- name: Service Endpoint End Slash
initial: |
apiVersion: config.openshift.io/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ tests:
dnsType: PlatformDefault
serviceEndpoints:
- {name: "UnknownService", url: "https://compute-myendpoint1.p.googleapis.com"}
expectedStatusError: "[status.platformStatus.gcp.serviceEndpoints[0].name: Unsupported value: \"UnknownService\": supported values: \"Compute\", \"Container\", \"CloudResourceManager\", \"DNS\", \"File\", \"IAM\", \"IAMCredentials\", \"OAuth\", \"ServiceUsage\", \"Storage\", \"STS\", <nil>: Invalid value: \"null\": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]"
expectedStatusError: "[status.platformStatus.gcp.serviceEndpoints[0].name: Unsupported value: \"UnknownService\": supported values: \"Compute\", \"Container\", \"CloudResourceManager\", \"DNS\", \"File\", \"IAM\", \"IAMCredentials\", \"ServiceUsage\", \"Storage\", <nil>: Invalid value: \"null\": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]"
- name: Service Endpoint End Slash
initial: |
apiVersion: config.openshift.io/v1
Expand Down
14 changes: 4 additions & 10 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ const (
)

// GCPServiceEndpointName is the name of the GCP Service Endpoint.
// +kubebuilder:validation:Enum=Compute;Container;CloudResourceManager;DNS;File;IAM;IAMCredentials;OAuth;ServiceUsage;Storage;STS
// +kubebuilder:validation:Enum=Compute;Container;CloudResourceManager;DNS;File;IAM;IAMCredentials;ServiceUsage;Storage
type GCPServiceEndpointName string

const (
Expand All @@ -675,17 +675,11 @@ const (
// GCPServiceEndpointNameIAMCredentials is the name used for the GCP IAM Credentials Service endpoint.
GCPServiceEndpointNameIAMCredentials GCPServiceEndpointName = "IAMCredentials"

// GCPServiceEndpointNameOAuth is the name used for the GCP OAuth2 Service endpoint.
GCPServiceEndpointNameOAuth GCPServiceEndpointName = "OAuth"

// GCPServiceEndpointNameServiceUsage is the name used for the GCP Service Usage Service endpoint.
GCPServiceEndpointNameServiceUsage GCPServiceEndpointName = "ServiceUsage"

// GCPServiceEndpointNameStorage is the name used for the GCP Storage Service endpoint.
GCPServiceEndpointNameStorage GCPServiceEndpointName = "Storage"

// GCPServiceEndpointNameSTS is the name used for the GCP STS Service endpoint.
GCPServiceEndpointNameSTS GCPServiceEndpointName = "STS"
)

// GCPServiceEndpoint store the configuration of a custom url to
Expand All @@ -694,8 +688,8 @@ type GCPServiceEndpoint struct {
// name is the name of the GCP service whose endpoint is being overridden.
// This must be provided and cannot be empty.
//
// Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, ServiceUsage,
// Storage, and TagManager.
// Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, IAMCredentials,
// ServiceUsage, and Storage.
//
// As an example, when setting the name to Compute all requests made by the caller to the GCP Compute
// Service will be directed to the endpoint specified in the url field.
Expand Down Expand Up @@ -779,7 +773,7 @@ type GCPPlatformStatus struct {
// The maximum number of endpoint overrides allowed is 11.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=11
// +kubebuilder:validation:MaxItems=9
// +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x.name == y.name))",message="only 1 endpoint override is permitted per GCP service name"
// +optional
// +openshift:enable:FeatureGate=GCPCustomAPIEndpointsInstall
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2006,8 +2006,8 @@ spec:
name is the name of the GCP service whose endpoint is being overridden.
This must be provided and cannot be empty.

Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, ServiceUsage,
Storage, and TagManager.
Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, IAMCredentials,
ServiceUsage, and Storage.

As an example, when setting the name to Compute all requests made by the caller to the GCP Compute
Service will be directed to the endpoint specified in the url field.
Expand All @@ -2019,10 +2019,8 @@ spec:
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2048,7 +2046,7 @@ spec:
- name
- url
type: object
maxItems: 11
maxItems: 9
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2006,8 +2006,8 @@ spec:
name is the name of the GCP service whose endpoint is being overridden.
This must be provided and cannot be empty.

Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, ServiceUsage,
Storage, and TagManager.
Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, IAMCredentials,
ServiceUsage, and Storage.

As an example, when setting the name to Compute all requests made by the caller to the GCP Compute
Service will be directed to the endpoint specified in the url field.
Expand All @@ -2019,10 +2019,8 @@ spec:
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2048,7 +2046,7 @@ spec:
- name
- url
type: object
maxItems: 11
maxItems: 9
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2006,8 +2006,8 @@ spec:
name is the name of the GCP service whose endpoint is being overridden.
This must be provided and cannot be empty.

Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, ServiceUsage,
Storage, and TagManager.
Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, IAMCredentials,
ServiceUsage, and Storage.

As an example, when setting the name to Compute all requests made by the caller to the GCP Compute
Service will be directed to the endpoint specified in the url field.
Expand All @@ -2019,10 +2019,8 @@ spec:
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2048,7 +2046,7 @@ spec:
- name
- url
type: object
maxItems: 11
maxItems: 9
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1598,8 +1598,8 @@ spec:
name is the name of the GCP service whose endpoint is being overridden.
This must be provided and cannot be empty.

Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, ServiceUsage,
Storage, and TagManager.
Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, IAMCredentials,
ServiceUsage, and Storage.

As an example, when setting the name to Compute all requests made by the caller to the GCP Compute
Service will be directed to the endpoint specified in the url field.
Expand All @@ -1611,10 +1611,8 @@ spec:
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -1640,7 +1638,7 @@ spec:
- name
- url
type: object
maxItems: 11
maxItems: 9
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
2 changes: 1 addition & 1 deletion config/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2286,8 +2286,8 @@ spec:
name is the name of the GCP service whose endpoint is being overridden.
This must be provided and cannot be empty.

Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, ServiceUsage,
Storage, and TagManager.
Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, IAMCredentials,
ServiceUsage, and Storage.

As an example, when setting the name to Compute all requests made by the caller to the GCP Compute
Service will be directed to the endpoint specified in the url field.
Expand All @@ -2299,10 +2299,8 @@ spec:
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2328,7 +2326,7 @@ spec:
- name
- url
type: object
maxItems: 11
maxItems: 9
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2286,8 +2286,8 @@ spec:
name is the name of the GCP service whose endpoint is being overridden.
This must be provided and cannot be empty.

Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, ServiceUsage,
Storage, and TagManager.
Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, IAMCredentials,
ServiceUsage, and Storage.

As an example, when setting the name to Compute all requests made by the caller to the GCP Compute
Service will be directed to the endpoint specified in the url field.
Expand All @@ -2299,10 +2299,8 @@ spec:
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2328,7 +2326,7 @@ spec:
- name
- url
type: object
maxItems: 11
maxItems: 9
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2286,8 +2286,8 @@ spec:
name is the name of the GCP service whose endpoint is being overridden.
This must be provided and cannot be empty.

Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, ServiceUsage,
Storage, and TagManager.
Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, IAMCredentials,
ServiceUsage, and Storage.

As an example, when setting the name to Compute all requests made by the caller to the GCP Compute
Service will be directed to the endpoint specified in the url field.
Expand All @@ -2299,10 +2299,8 @@ spec:
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2328,7 +2326,7 @@ spec:
- name
- url
type: object
maxItems: 11
maxItems: 9
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1899,8 +1899,8 @@ spec:
name is the name of the GCP service whose endpoint is being overridden.
This must be provided and cannot be empty.

Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, ServiceUsage,
Storage, and TagManager.
Allowed values are Compute, Container, CloudResourceManager, DNS, File, IAM, IAMCredentials,
ServiceUsage, and Storage.

As an example, when setting the name to Compute all requests made by the caller to the GCP Compute
Service will be directed to the endpoint specified in the url field.
Expand All @@ -1912,10 +1912,8 @@ spec:
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -1941,7 +1939,7 @@ spec:
- name
- url
type: object
maxItems: 11
maxItems: 9
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Loading