Skip to content

Commit 185ec21

Browse files
committed
CORS-3842: Add API Updates for GCP Custom API Endpoints
** Add the Tech preview and No upgrade tags for the new feature GCP API Custom Endpoints. ** Add the ServiceEndpoint Structure that includes the api name and endpoint. ** Add the Service Endpoints to the GCP Spec and Status structs.
1 parent 52377f0 commit 185ec21

File tree

50 files changed

+3293
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3293
-5
lines changed

config/v1/types_infrastructure.go

+39-1
Original file line numberDiff line numberDiff line change
@@ -620,9 +620,40 @@ const (
620620
AzureStackCloud AzureCloudEnvironment = "AzureStackCloud"
621621
)
622622

623+
// GCPServiceEndpoint store the configuration of a custom url to
624+
// override existing defaults of GCP Services.
625+
type GCPServiceEndpoint struct {
626+
// name is the name of the GCP service.
627+
// Few of the services are
628+
// Compute - https://cloud.google.com/compute/docs/reference/rest/v1
629+
// DNS - https://cloud.google.com/dns/docs/reference/rest/v1
630+
// IAM - https://cloud.google.com/iam/docs/reference/rest/
631+
//
632+
// +required
633+
// +kubebuilder:validation:Enum=Compute;CloudResourceManager;DNS;File;IAM;ServiceUsage;Storage;TagManager
634+
Name string `json:"name"`
635+
636+
// url is fully qualified URI with scheme https, that overrides the default generated
637+
// endpoint for a client.
638+
// This must be provided and cannot be empty.
639+
//
640+
// +required
641+
// +kubebuilder:validation:Type=string
642+
// +kubebuilder:validation:Format=uri
643+
// +kubebuilder:validation:Pattern=`^https://`
644+
URL string `json:"url"`
645+
}
646+
623647
// GCPPlatformSpec holds the desired state of the Google Cloud Platform infrastructure provider.
624648
// This only includes fields that can be modified in the cluster.
625-
type GCPPlatformSpec struct{}
649+
type GCPPlatformSpec struct {
650+
// serviceEndpoints list contains custom endpoints which will override default
651+
// service endpoint of GCP Services.
652+
// There must be only one ServiceEndpoint for a service.
653+
// +listType=atomic
654+
// +optional
655+
ServiceEndpoints []GCPServiceEndpoint `json:"serviceEndpoints,omitempty"`
656+
}
626657

627658
// GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider.
628659
// +openshift:validation:FeatureGateAwareXValidation:featureGate=GCPLabelsTags,rule="!has(oldSelf.resourceLabels) && !has(self.resourceLabels) || has(oldSelf.resourceLabels) && has(self.resourceLabels)",message="resourceLabels may only be configured during installation"
@@ -675,6 +706,13 @@ type GCPPlatformStatus struct {
675706
// +optional
676707
// +nullable
677708
CloudLoadBalancerConfig *CloudLoadBalancerConfig `json:"cloudLoadBalancerConfig,omitempty"`
709+
710+
// serviceEndpoints list contains custom endpoints which will override default
711+
// service endpoint of GCP Services.
712+
// There must be only one ServiceEndpoint for a service.
713+
// +listType=atomic
714+
// +optional
715+
ServiceEndpoints []GCPServiceEndpoint `json:"serviceEndpoints,omitempty"`
678716
}
679717

680718
// GCPResourceLabel is a label to apply to GCP resources created for the cluster.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml

+83
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,48 @@ spec:
219219
gcp:
220220
description: gcp contains settings specific to the Google Cloud
221221
Platform infrastructure provider.
222+
properties:
223+
serviceEndpoints:
224+
description: |-
225+
serviceEndpoints list contains custom endpoints which will override default
226+
service endpoint of GCP Services.
227+
There must be only one ServiceEndpoint for a service.
228+
items:
229+
description: |-
230+
GCPServiceEndpoint store the configuration of a custom url to
231+
override existing defaults of GCP Services.
232+
properties:
233+
name:
234+
description: |-
235+
name is the name of the GCP service.
236+
Few of the services are
237+
Compute - https://cloud.google.com/compute/docs/reference/rest/v1
238+
DNS - https://cloud.google.com/dns/docs/reference/rest/v1
239+
IAM - https://cloud.google.com/iam/docs/reference/rest/
240+
enum:
241+
- Compute
242+
- CloudResourceManager
243+
- DNS
244+
- File
245+
- IAM
246+
- ServiceUsage
247+
- Storage
248+
- TagManager
249+
type: string
250+
url:
251+
description: |-
252+
url is fully qualified URI with scheme https, that overrides the default generated
253+
endpoint for a client.
254+
This must be provided and cannot be empty.
255+
format: uri
256+
pattern: ^https://
257+
type: string
258+
required:
259+
- name
260+
- url
261+
type: object
262+
type: array
263+
x-kubernetes-list-type: atomic
222264
type: object
223265
ibmcloud:
224266
description: ibmcloud contains settings specific to the IBMCloud
@@ -1808,6 +1850,47 @@ spec:
18081850
- message: resourceTags are immutable and may only be configured
18091851
during installation
18101852
rule: self.all(x, x in oldSelf) && oldSelf.all(x, x in self)
1853+
serviceEndpoints:
1854+
description: |-
1855+
serviceEndpoints list contains custom endpoints which will override default
1856+
service endpoint of GCP Services.
1857+
There must be only one ServiceEndpoint for a service.
1858+
items:
1859+
description: |-
1860+
GCPServiceEndpoint store the configuration of a custom url to
1861+
override existing defaults of GCP Services.
1862+
properties:
1863+
name:
1864+
description: |-
1865+
name is the name of the GCP service.
1866+
Few of the services are
1867+
Compute - https://cloud.google.com/compute/docs/reference/rest/v1
1868+
DNS - https://cloud.google.com/dns/docs/reference/rest/v1
1869+
IAM - https://cloud.google.com/iam/docs/reference/rest/
1870+
enum:
1871+
- Compute
1872+
- CloudResourceManager
1873+
- DNS
1874+
- File
1875+
- IAM
1876+
- ServiceUsage
1877+
- Storage
1878+
- TagManager
1879+
type: string
1880+
url:
1881+
description: |-
1882+
url is fully qualified URI with scheme https, that overrides the default generated
1883+
endpoint for a client.
1884+
This must be provided and cannot be empty.
1885+
format: uri
1886+
pattern: ^https://
1887+
type: string
1888+
required:
1889+
- name
1890+
- url
1891+
type: object
1892+
type: array
1893+
x-kubernetes-list-type: atomic
18111894
type: object
18121895
x-kubernetes-validations:
18131896
- message: resourceLabels may only be configured during installation

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml

+83
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,48 @@ spec:
219219
gcp:
220220
description: gcp contains settings specific to the Google Cloud
221221
Platform infrastructure provider.
222+
properties:
223+
serviceEndpoints:
224+
description: |-
225+
serviceEndpoints list contains custom endpoints which will override default
226+
service endpoint of GCP Services.
227+
There must be only one ServiceEndpoint for a service.
228+
items:
229+
description: |-
230+
GCPServiceEndpoint store the configuration of a custom url to
231+
override existing defaults of GCP Services.
232+
properties:
233+
name:
234+
description: |-
235+
name is the name of the GCP service.
236+
Few of the services are
237+
Compute - https://cloud.google.com/compute/docs/reference/rest/v1
238+
DNS - https://cloud.google.com/dns/docs/reference/rest/v1
239+
IAM - https://cloud.google.com/iam/docs/reference/rest/
240+
enum:
241+
- Compute
242+
- CloudResourceManager
243+
- DNS
244+
- File
245+
- IAM
246+
- ServiceUsage
247+
- Storage
248+
- TagManager
249+
type: string
250+
url:
251+
description: |-
252+
url is fully qualified URI with scheme https, that overrides the default generated
253+
endpoint for a client.
254+
This must be provided and cannot be empty.
255+
format: uri
256+
pattern: ^https://
257+
type: string
258+
required:
259+
- name
260+
- url
261+
type: object
262+
type: array
263+
x-kubernetes-list-type: atomic
222264
type: object
223265
ibmcloud:
224266
description: ibmcloud contains settings specific to the IBMCloud
@@ -1584,6 +1626,47 @@ spec:
15841626
- message: resourceTags are immutable and may only be configured
15851627
during installation
15861628
rule: self.all(x, x in oldSelf) && oldSelf.all(x, x in self)
1629+
serviceEndpoints:
1630+
description: |-
1631+
serviceEndpoints list contains custom endpoints which will override default
1632+
service endpoint of GCP Services.
1633+
There must be only one ServiceEndpoint for a service.
1634+
items:
1635+
description: |-
1636+
GCPServiceEndpoint store the configuration of a custom url to
1637+
override existing defaults of GCP Services.
1638+
properties:
1639+
name:
1640+
description: |-
1641+
name is the name of the GCP service.
1642+
Few of the services are
1643+
Compute - https://cloud.google.com/compute/docs/reference/rest/v1
1644+
DNS - https://cloud.google.com/dns/docs/reference/rest/v1
1645+
IAM - https://cloud.google.com/iam/docs/reference/rest/
1646+
enum:
1647+
- Compute
1648+
- CloudResourceManager
1649+
- DNS
1650+
- File
1651+
- IAM
1652+
- ServiceUsage
1653+
- Storage
1654+
- TagManager
1655+
type: string
1656+
url:
1657+
description: |-
1658+
url is fully qualified URI with scheme https, that overrides the default generated
1659+
endpoint for a client.
1660+
This must be provided and cannot be empty.
1661+
format: uri
1662+
pattern: ^https://
1663+
type: string
1664+
required:
1665+
- name
1666+
- url
1667+
type: object
1668+
type: array
1669+
x-kubernetes-list-type: atomic
15871670
type: object
15881671
x-kubernetes-validations:
15891672
- message: resourceLabels may only be configured during installation

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml

+83
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,48 @@ spec:
219219
gcp:
220220
description: gcp contains settings specific to the Google Cloud
221221
Platform infrastructure provider.
222+
properties:
223+
serviceEndpoints:
224+
description: |-
225+
serviceEndpoints list contains custom endpoints which will override default
226+
service endpoint of GCP Services.
227+
There must be only one ServiceEndpoint for a service.
228+
items:
229+
description: |-
230+
GCPServiceEndpoint store the configuration of a custom url to
231+
override existing defaults of GCP Services.
232+
properties:
233+
name:
234+
description: |-
235+
name is the name of the GCP service.
236+
Few of the services are
237+
Compute - https://cloud.google.com/compute/docs/reference/rest/v1
238+
DNS - https://cloud.google.com/dns/docs/reference/rest/v1
239+
IAM - https://cloud.google.com/iam/docs/reference/rest/
240+
enum:
241+
- Compute
242+
- CloudResourceManager
243+
- DNS
244+
- File
245+
- IAM
246+
- ServiceUsage
247+
- Storage
248+
- TagManager
249+
type: string
250+
url:
251+
description: |-
252+
url is fully qualified URI with scheme https, that overrides the default generated
253+
endpoint for a client.
254+
This must be provided and cannot be empty.
255+
format: uri
256+
pattern: ^https://
257+
type: string
258+
required:
259+
- name
260+
- url
261+
type: object
262+
type: array
263+
x-kubernetes-list-type: atomic
222264
type: object
223265
ibmcloud:
224266
description: ibmcloud contains settings specific to the IBMCloud
@@ -1808,6 +1850,47 @@ spec:
18081850
- message: resourceTags are immutable and may only be configured
18091851
during installation
18101852
rule: self.all(x, x in oldSelf) && oldSelf.all(x, x in self)
1853+
serviceEndpoints:
1854+
description: |-
1855+
serviceEndpoints list contains custom endpoints which will override default
1856+
service endpoint of GCP Services.
1857+
There must be only one ServiceEndpoint for a service.
1858+
items:
1859+
description: |-
1860+
GCPServiceEndpoint store the configuration of a custom url to
1861+
override existing defaults of GCP Services.
1862+
properties:
1863+
name:
1864+
description: |-
1865+
name is the name of the GCP service.
1866+
Few of the services are
1867+
Compute - https://cloud.google.com/compute/docs/reference/rest/v1
1868+
DNS - https://cloud.google.com/dns/docs/reference/rest/v1
1869+
IAM - https://cloud.google.com/iam/docs/reference/rest/
1870+
enum:
1871+
- Compute
1872+
- CloudResourceManager
1873+
- DNS
1874+
- File
1875+
- IAM
1876+
- ServiceUsage
1877+
- Storage
1878+
- TagManager
1879+
type: string
1880+
url:
1881+
description: |-
1882+
url is fully qualified URI with scheme https, that overrides the default generated
1883+
endpoint for a client.
1884+
This must be provided and cannot be empty.
1885+
format: uri
1886+
pattern: ^https://
1887+
type: string
1888+
required:
1889+
- name
1890+
- url
1891+
type: object
1892+
type: array
1893+
x-kubernetes-list-type: atomic
18111894
type: object
18121895
x-kubernetes-validations:
18131896
- message: resourceLabels may only be configured during installation

0 commit comments

Comments
 (0)