Skip to content

CORS-4184: Add STS IAMCredentials and OAuth Service for GCP Endpoint Overrides #2444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2025
Merged
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\", \"ServiceUsage\", \"Storage\", <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\", \"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]"
- 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\", \"ServiceUsage\", \"Storage\", <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\", \"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]"
- name: Service Endpoint End Slash
initial: |
apiVersion: config.openshift.io/v1
Expand Down
15 changes: 12 additions & 3 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;ServiceUsage;Storage
// +kubebuilder:validation:Enum=Compute;Container;CloudResourceManager;DNS;File;IAM;IAMCredentials;OAuth;ServiceUsage;Storage;STS
type GCPServiceEndpointName string

const (
Expand All @@ -672,11 +672,20 @@ const (
// GCPServiceEndpointNameIAM is the name used for the GCP IAM Service endpoint.
GCPServiceEndpointNameIAM GCPServiceEndpointName = "IAM"

// 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 Down Expand Up @@ -767,10 +776,10 @@ type GCPPlatformStatus struct {
// used when creating clients to interact with GCP services.
// When not specified, the default endpoint for the GCP region will be used.
// Only 1 endpoint override is permitted for each GCP service.
// The maximum number of endpoint overrides allowed is 9.
// The maximum number of endpoint overrides allowed is 11.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=8
// +kubebuilder:validation:MaxItems=11
// +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 @@ -1995,7 +1995,7 @@ spec:
used when creating clients to interact with GCP services.
When not specified, the default endpoint for the GCP region will be used.
Only 1 endpoint override is permitted for each GCP service.
The maximum number of endpoint overrides allowed is 9.
The maximum number of endpoint overrides allowed is 11.
items:
description: |-
GCPServiceEndpoint store the configuration of a custom url to
Expand All @@ -2018,8 +2018,11 @@ spec:
- DNS
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2045,7 +2048,7 @@ spec:
- name
- url
type: object
maxItems: 8
maxItems: 11
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ spec:
used when creating clients to interact with GCP services.
When not specified, the default endpoint for the GCP region will be used.
Only 1 endpoint override is permitted for each GCP service.
The maximum number of endpoint overrides allowed is 9.
The maximum number of endpoint overrides allowed is 11.
items:
description: |-
GCPServiceEndpoint store the configuration of a custom url to
Expand All @@ -2018,8 +2018,11 @@ spec:
- DNS
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2045,7 +2048,7 @@ spec:
- name
- url
type: object
maxItems: 8
maxItems: 11
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ spec:
used when creating clients to interact with GCP services.
When not specified, the default endpoint for the GCP region will be used.
Only 1 endpoint override is permitted for each GCP service.
The maximum number of endpoint overrides allowed is 9.
The maximum number of endpoint overrides allowed is 11.
items:
description: |-
GCPServiceEndpoint store the configuration of a custom url to
Expand All @@ -2018,8 +2018,11 @@ spec:
- DNS
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2045,7 +2048,7 @@ spec:
- name
- url
type: object
maxItems: 8
maxItems: 11
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ spec:
used when creating clients to interact with GCP services.
When not specified, the default endpoint for the GCP region will be used.
Only 1 endpoint override is permitted for each GCP service.
The maximum number of endpoint overrides allowed is 9.
The maximum number of endpoint overrides allowed is 11.
items:
description: |-
GCPServiceEndpoint store the configuration of a custom url to
Expand All @@ -1610,8 +1610,11 @@ spec:
- DNS
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -1637,7 +1640,7 @@ spec:
- name
- url
type: object
maxItems: 8
maxItems: 11
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 @@ -2275,7 +2275,7 @@ spec:
used when creating clients to interact with GCP services.
When not specified, the default endpoint for the GCP region will be used.
Only 1 endpoint override is permitted for each GCP service.
The maximum number of endpoint overrides allowed is 9.
The maximum number of endpoint overrides allowed is 11.
items:
description: |-
GCPServiceEndpoint store the configuration of a custom url to
Expand All @@ -2298,8 +2298,11 @@ spec:
- DNS
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2325,7 +2328,7 @@ spec:
- name
- url
type: object
maxItems: 8
maxItems: 11
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2275,7 +2275,7 @@ spec:
used when creating clients to interact with GCP services.
When not specified, the default endpoint for the GCP region will be used.
Only 1 endpoint override is permitted for each GCP service.
The maximum number of endpoint overrides allowed is 9.
The maximum number of endpoint overrides allowed is 11.
items:
description: |-
GCPServiceEndpoint store the configuration of a custom url to
Expand All @@ -2298,8 +2298,11 @@ spec:
- DNS
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2325,7 +2328,7 @@ spec:
- name
- url
type: object
maxItems: 8
maxItems: 11
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2275,7 +2275,7 @@ spec:
used when creating clients to interact with GCP services.
When not specified, the default endpoint for the GCP region will be used.
Only 1 endpoint override is permitted for each GCP service.
The maximum number of endpoint overrides allowed is 9.
The maximum number of endpoint overrides allowed is 11.
items:
description: |-
GCPServiceEndpoint store the configuration of a custom url to
Expand All @@ -2298,8 +2298,11 @@ spec:
- DNS
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -2325,7 +2328,7 @@ spec:
- name
- url
type: object
maxItems: 8
maxItems: 11
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@ spec:
used when creating clients to interact with GCP services.
When not specified, the default endpoint for the GCP region will be used.
Only 1 endpoint override is permitted for each GCP service.
The maximum number of endpoint overrides allowed is 9.
The maximum number of endpoint overrides allowed is 11.
items:
description: |-
GCPServiceEndpoint store the configuration of a custom url to
Expand All @@ -1911,8 +1911,11 @@ spec:
- DNS
- File
- IAM
- IAMCredentials
- OAuth
- ServiceUsage
- Storage
- STS
type: string
url:
description: |-
Expand All @@ -1938,7 +1941,7 @@ spec:
- name
- url
type: object
maxItems: 8
maxItems: 11
type: array
x-kubernetes-list-map-keys:
- name
Expand Down
2 changes: 1 addition & 1 deletion openapi/generated_openapi/zz_generated.openapi.go

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

Loading