From f567e1ee5f2f6293b5e204c4a0a80b861503d8d9 Mon Sep 17 00:00:00 2001 From: DCL Team Date: Mon, 24 Jun 2024 12:39:10 -0700 Subject: [PATCH] Automated DCL import. - 66f7afd2dbf9bf26c4e21685ee5fef56012df7b5 Automatic import from cloud_mmv2_dcl_20240624_1231_RC00 by DCL Team GitOrigin-RevId: 66f7afd2dbf9bf26c4e21685ee5fef56012df7b5 --- python/proto/clouddeploy/alpha/target.proto | 1 + python/proto/clouddeploy/beta/target.proto | 1 + python/proto/clouddeploy/target.proto | 1 + python/services/clouddeploy/alpha/target.py | 8 +++++++- .../clouddeploy/alpha/target_server.go | 2 ++ python/services/clouddeploy/beta/target.py | 8 +++++++- .../clouddeploy/beta/target_server.go | 2 ++ python/services/clouddeploy/target.py | 8 +++++++- python/services/clouddeploy/target_server.go | 2 ++ services/google/clouddeploy/alpha/target.go | 3 +++ services/google/clouddeploy/alpha/target.yaml | 5 +++++ .../alpha/target_alpha_yaml_embed.go | 6 +++--- .../clouddeploy/alpha/target_internal.go | 19 +++++++++++++++++++ .../google/clouddeploy/alpha/target_schema.go | 5 +++++ services/google/clouddeploy/beta/target.go | 3 +++ services/google/clouddeploy/beta/target.yaml | 5 +++++ .../beta/target_beta_yaml_embed.go | 6 +++--- .../clouddeploy/beta/target_internal.go | 19 +++++++++++++++++++ .../google/clouddeploy/beta/target_schema.go | 5 +++++ services/google/clouddeploy/target.go | 3 +++ services/google/clouddeploy/target.yaml | 5 +++++ .../google/clouddeploy/target_internal.go | 19 +++++++++++++++++++ services/google/clouddeploy/target_schema.go | 5 +++++ .../google/clouddeploy/target_yaml_embed.go | 6 +++--- .../google/clouddeploy/alpha/target.go | 10 ++++++++++ .../google/clouddeploy/beta/target.go | 10 ++++++++++ unstructured/google/clouddeploy/target.go | 10 ++++++++++ 27 files changed, 165 insertions(+), 12 deletions(-) diff --git a/python/proto/clouddeploy/alpha/target.proto b/python/proto/clouddeploy/alpha/target.proto index c3604bbb6..1027f9cb4 100755 --- a/python/proto/clouddeploy/alpha/target.proto +++ b/python/proto/clouddeploy/alpha/target.proto @@ -53,6 +53,7 @@ message ClouddeployAlphaTarget { message ClouddeployAlphaTargetGke { string cluster = 1; bool internal_ip = 2; + string proxy_url = 3; } message ClouddeployAlphaTargetAnthosCluster { diff --git a/python/proto/clouddeploy/beta/target.proto b/python/proto/clouddeploy/beta/target.proto index 872dad551..7003074a8 100755 --- a/python/proto/clouddeploy/beta/target.proto +++ b/python/proto/clouddeploy/beta/target.proto @@ -53,6 +53,7 @@ message ClouddeployBetaTarget { message ClouddeployBetaTargetGke { string cluster = 1; bool internal_ip = 2; + string proxy_url = 3; } message ClouddeployBetaTargetAnthosCluster { diff --git a/python/proto/clouddeploy/target.proto b/python/proto/clouddeploy/target.proto index 5588ec689..146170435 100755 --- a/python/proto/clouddeploy/target.proto +++ b/python/proto/clouddeploy/target.proto @@ -53,6 +53,7 @@ message ClouddeployTarget { message ClouddeployTargetGke { string cluster = 1; bool internal_ip = 2; + string proxy_url = 3; } message ClouddeployTargetAnthosCluster { diff --git a/python/services/clouddeploy/alpha/target.py b/python/services/clouddeploy/alpha/target.py index 228570a80..7be6b99d2 100755 --- a/python/services/clouddeploy/alpha/target.py +++ b/python/services/clouddeploy/alpha/target.py @@ -274,9 +274,12 @@ def to_proto(self): class TargetGke(object): - def __init__(self, cluster: str = None, internal_ip: bool = None): + def __init__( + self, cluster: str = None, internal_ip: bool = None, proxy_url: str = None + ): self.cluster = cluster self.internal_ip = internal_ip + self.proxy_url = proxy_url @classmethod def to_proto(self, resource): @@ -288,6 +291,8 @@ def to_proto(self, resource): res.cluster = Primitive.to_proto(resource.cluster) if Primitive.to_proto(resource.internal_ip): res.internal_ip = Primitive.to_proto(resource.internal_ip) + if Primitive.to_proto(resource.proxy_url): + res.proxy_url = Primitive.to_proto(resource.proxy_url) return res @classmethod @@ -298,6 +303,7 @@ def from_proto(self, resource): return TargetGke( cluster=Primitive.from_proto(resource.cluster), internal_ip=Primitive.from_proto(resource.internal_ip), + proxy_url=Primitive.from_proto(resource.proxy_url), ) diff --git a/python/services/clouddeploy/alpha/target_server.go b/python/services/clouddeploy/alpha/target_server.go index db1efeba3..5089bb536 100755 --- a/python/services/clouddeploy/alpha/target_server.go +++ b/python/services/clouddeploy/alpha/target_server.go @@ -44,6 +44,7 @@ func ProtoToClouddeployAlphaTargetGke(p *alphapb.ClouddeployAlphaTargetGke) *alp obj := &alpha.TargetGke{ Cluster: dcl.StringOrNil(p.GetCluster()), InternalIP: dcl.Bool(p.GetInternalIp()), + ProxyUrl: dcl.StringOrNil(p.GetProxyUrl()), } return obj } @@ -155,6 +156,7 @@ func ClouddeployAlphaTargetGkeToProto(o *alpha.TargetGke) *alphapb.ClouddeployAl p := &alphapb.ClouddeployAlphaTargetGke{} p.SetCluster(dcl.ValueOrEmptyString(o.Cluster)) p.SetInternalIp(dcl.ValueOrEmptyBool(o.InternalIP)) + p.SetProxyUrl(dcl.ValueOrEmptyString(o.ProxyUrl)) return p } diff --git a/python/services/clouddeploy/beta/target.py b/python/services/clouddeploy/beta/target.py index 0861b606b..cfec40279 100755 --- a/python/services/clouddeploy/beta/target.py +++ b/python/services/clouddeploy/beta/target.py @@ -274,9 +274,12 @@ def to_proto(self): class TargetGke(object): - def __init__(self, cluster: str = None, internal_ip: bool = None): + def __init__( + self, cluster: str = None, internal_ip: bool = None, proxy_url: str = None + ): self.cluster = cluster self.internal_ip = internal_ip + self.proxy_url = proxy_url @classmethod def to_proto(self, resource): @@ -288,6 +291,8 @@ def to_proto(self, resource): res.cluster = Primitive.to_proto(resource.cluster) if Primitive.to_proto(resource.internal_ip): res.internal_ip = Primitive.to_proto(resource.internal_ip) + if Primitive.to_proto(resource.proxy_url): + res.proxy_url = Primitive.to_proto(resource.proxy_url) return res @classmethod @@ -298,6 +303,7 @@ def from_proto(self, resource): return TargetGke( cluster=Primitive.from_proto(resource.cluster), internal_ip=Primitive.from_proto(resource.internal_ip), + proxy_url=Primitive.from_proto(resource.proxy_url), ) diff --git a/python/services/clouddeploy/beta/target_server.go b/python/services/clouddeploy/beta/target_server.go index ea71f8dbb..745ad0c7f 100755 --- a/python/services/clouddeploy/beta/target_server.go +++ b/python/services/clouddeploy/beta/target_server.go @@ -44,6 +44,7 @@ func ProtoToClouddeployBetaTargetGke(p *betapb.ClouddeployBetaTargetGke) *beta.T obj := &beta.TargetGke{ Cluster: dcl.StringOrNil(p.GetCluster()), InternalIP: dcl.Bool(p.GetInternalIp()), + ProxyUrl: dcl.StringOrNil(p.GetProxyUrl()), } return obj } @@ -155,6 +156,7 @@ func ClouddeployBetaTargetGkeToProto(o *beta.TargetGke) *betapb.ClouddeployBetaT p := &betapb.ClouddeployBetaTargetGke{} p.SetCluster(dcl.ValueOrEmptyString(o.Cluster)) p.SetInternalIp(dcl.ValueOrEmptyBool(o.InternalIP)) + p.SetProxyUrl(dcl.ValueOrEmptyString(o.ProxyUrl)) return p } diff --git a/python/services/clouddeploy/target.py b/python/services/clouddeploy/target.py index 4f75842ca..c0af5ad65 100755 --- a/python/services/clouddeploy/target.py +++ b/python/services/clouddeploy/target.py @@ -274,9 +274,12 @@ def to_proto(self): class TargetGke(object): - def __init__(self, cluster: str = None, internal_ip: bool = None): + def __init__( + self, cluster: str = None, internal_ip: bool = None, proxy_url: str = None + ): self.cluster = cluster self.internal_ip = internal_ip + self.proxy_url = proxy_url @classmethod def to_proto(self, resource): @@ -288,6 +291,8 @@ def to_proto(self, resource): res.cluster = Primitive.to_proto(resource.cluster) if Primitive.to_proto(resource.internal_ip): res.internal_ip = Primitive.to_proto(resource.internal_ip) + if Primitive.to_proto(resource.proxy_url): + res.proxy_url = Primitive.to_proto(resource.proxy_url) return res @classmethod @@ -298,6 +303,7 @@ def from_proto(self, resource): return TargetGke( cluster=Primitive.from_proto(resource.cluster), internal_ip=Primitive.from_proto(resource.internal_ip), + proxy_url=Primitive.from_proto(resource.proxy_url), ) diff --git a/python/services/clouddeploy/target_server.go b/python/services/clouddeploy/target_server.go index 400aef99d..9f47553b2 100755 --- a/python/services/clouddeploy/target_server.go +++ b/python/services/clouddeploy/target_server.go @@ -44,6 +44,7 @@ func ProtoToClouddeployTargetGke(p *clouddeploypb.ClouddeployTargetGke) *cloudde obj := &clouddeploy.TargetGke{ Cluster: dcl.StringOrNil(p.GetCluster()), InternalIP: dcl.Bool(p.GetInternalIp()), + ProxyUrl: dcl.StringOrNil(p.GetProxyUrl()), } return obj } @@ -155,6 +156,7 @@ func ClouddeployTargetGkeToProto(o *clouddeploy.TargetGke) *clouddeploypb.Cloudd p := &clouddeploypb.ClouddeployTargetGke{} p.SetCluster(dcl.ValueOrEmptyString(o.Cluster)) p.SetInternalIp(dcl.ValueOrEmptyBool(o.InternalIP)) + p.SetProxyUrl(dcl.ValueOrEmptyString(o.ProxyUrl)) return p } diff --git a/services/google/clouddeploy/alpha/target.go b/services/google/clouddeploy/alpha/target.go index 083f20f44..db2cfe2f2 100755 --- a/services/google/clouddeploy/alpha/target.go +++ b/services/google/clouddeploy/alpha/target.go @@ -82,6 +82,7 @@ type TargetGke struct { empty bool `json:"-"` Cluster *string `json:"cluster"` InternalIP *bool `json:"internalIP"` + ProxyUrl *string `json:"proxyUrl"` } type jsonTargetGke TargetGke @@ -103,6 +104,8 @@ func (r *TargetGke) UnmarshalJSON(data []byte) error { r.InternalIP = res.InternalIP + r.ProxyUrl = res.ProxyUrl + } return nil } diff --git a/services/google/clouddeploy/alpha/target.yaml b/services/google/clouddeploy/alpha/target.yaml index 1d2d8d053..a408c1642 100755 --- a/services/google/clouddeploy/alpha/target.yaml +++ b/services/google/clouddeploy/alpha/target.yaml @@ -245,6 +245,11 @@ components: is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept). + proxyUrl: + type: string + x-dcl-go-name: ProxyUrl + description: Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy) + to the Kubernetes server. labels: type: object additionalProperties: diff --git a/services/google/clouddeploy/alpha/target_alpha_yaml_embed.go b/services/google/clouddeploy/alpha/target_alpha_yaml_embed.go index 753b6fa39..d617940ca 100755 --- a/services/google/clouddeploy/alpha/target_alpha_yaml_embed.go +++ b/services/google/clouddeploy/alpha/target_alpha_yaml_embed.go @@ -17,7 +17,7 @@ package alpha // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/clouddeploy/alpha/target.yaml -var YAML_target = []byte("info:\n title: Clouddeploy/Target\n description: The Cloud Deploy `Target` resource\n x-dcl-struct-name: Target\n x-dcl-has-iam: false\n x-dcl-ref:\n text: REST API\n url: https://cloud.google.com/deploy/docs/api/reference/rest/v1/projects.locations.targets\npaths:\n get:\n description: The function used to get information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n apply:\n description: The function used to apply information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n delete:\n description: The function used to delete a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n deleteAll:\n description: The function used to delete all Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n Target:\n title: Target\n x-dcl-id: projects/{{project}}/locations/{{location}}/targets/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - project\n - location\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: Optional. User annotations. These attributes can only be set\n and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations\n for more details such as format and size limitations.\n anthosCluster:\n type: object\n x-dcl-go-name: AnthosCluster\n x-dcl-go-type: TargetAnthosCluster\n description: Information specifying an Anthos Cluster.\n x-dcl-conflicts:\n - gke\n - run\n - multiTarget\n - customTarget\n properties:\n membership:\n type: string\n x-dcl-go-name: Membership\n description: Membership of the GKE Hub-registered cluster to which to\n apply the Skaffold configuration. Format is `projects/{project}/locations/{location}/memberships/{membership_name}`.\n x-dcl-references:\n - resource: Gkehub/Membership\n field: selfLink\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. Time at which the `Target` was created.\n x-kubernetes-immutable: true\n customTarget:\n type: object\n x-dcl-go-name: CustomTarget\n x-dcl-go-type: TargetCustomTarget\n description: Optional. Information specifying a Custom Target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - multiTarget\n required:\n - customTargetType\n properties:\n customTargetType:\n type: string\n x-dcl-go-name: CustomTargetType\n description: Required. The name of the CustomTargetType. Format must\n be `projects/{project}/locations/{location}/customTargetTypes/{custom_target_type}`.\n x-dcl-references:\n - resource: Clouddeploy/CustomTargetType\n field: selfLink\n deployParameters:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: DeployParameters\n description: Optional. The deploy parameters to use for this target.\n description:\n type: string\n x-dcl-go-name: Description\n description: Optional. Description of the `Target`. Max length is 255 characters.\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Optional. This checksum is computed by the server based on\n the value of other fields, and may be sent on update and delete requests\n to ensure the client has an up-to-date value before proceeding.\n x-kubernetes-immutable: true\n executionConfigs:\n type: array\n x-dcl-go-name: ExecutionConfigs\n description: Configurations for all execution that relates to this `Target`.\n Each `ExecutionEnvironmentUsage` value may only be used in a single configuration;\n using the same value multiple times is an error. When one or more configurations\n are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage`\n values. When no configurations are specified, execution will use the default\n specified in `DefaultPool`.\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: TargetExecutionConfigs\n required:\n - usages\n properties:\n artifactStorage:\n type: string\n x-dcl-go-name: ArtifactStorage\n description: Optional. Cloud Storage location in which to store execution\n outputs. This can either be a bucket (\"gs://my-bucket\") or a path\n within a bucket (\"gs://my-bucket/my-dir\"). If unspecified, a default\n bucket located in the same region will be used.\n x-dcl-server-default: true\n executionTimeout:\n type: string\n x-dcl-go-name: ExecutionTimeout\n description: Optional. Execution timeout for a Cloud Build Execution.\n This must be between 10m and 24h in seconds format. If unspecified,\n a default timeout of 1h is used.\n x-dcl-server-default: true\n serviceAccount:\n type: string\n x-dcl-go-name: ServiceAccount\n description: Optional. Google service account to use for execution.\n If unspecified, the project execution service account (-compute@developer.gserviceaccount.com)\n is used.\n x-dcl-server-default: true\n usages:\n type: array\n x-dcl-go-name: Usages\n description: Required. Usages when this configuration should be applied.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: TargetExecutionConfigsUsagesEnum\n enum:\n - EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED\n - RENDER\n - DEPLOY\n verbose:\n type: boolean\n x-dcl-go-name: Verbose\n description: Optional. If true, additional logging will be enabled\n when running builds in this execution environment.\n workerPool:\n type: string\n x-dcl-go-name: WorkerPool\n description: Optional. The resource name of the `WorkerPool`, with\n the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`.\n If this optional field is unspecified, the default Cloud Build pool\n will be used.\n x-dcl-references:\n - resource: Cloudbuild/WorkerPool\n field: selfLink\n gke:\n type: object\n x-dcl-go-name: Gke\n x-dcl-go-type: TargetGke\n description: Information specifying a GKE Cluster.\n x-dcl-conflicts:\n - anthosCluster\n - run\n - multiTarget\n - customTarget\n properties:\n cluster:\n type: string\n x-dcl-go-name: Cluster\n description: Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.\n x-dcl-references:\n - resource: Container/Cluster\n field: selfLink\n internalIP:\n type: boolean\n x-dcl-go-name: InternalIP\n description: Optional. If true, `cluster` is accessed using the private\n IP address of the control plane endpoint. Otherwise, the default IP\n address of the control plane endpoint is used. The default IP address\n is the private IP address for clusters with private control-plane\n endpoints and the public IP address otherwise. Only specify this option\n when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: 'Optional. Labels are attributes that can be set and used by\n both the user and by Google Cloud Deploy. Labels must meet the following\n constraints: * Keys and values can contain only lowercase letters, numeric\n characters, underscores, and dashes. * All characters must use UTF-8 encoding,\n and international characters are allowed. * Keys must start with a lowercase\n letter or international character. * Each resource is limited to a maximum\n of 64 labels. Both keys and values are additionally constrained to be\n <= 128 bytes.'\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n multiTarget:\n type: object\n x-dcl-go-name: MultiTarget\n x-dcl-go-type: TargetMultiTarget\n description: Information specifying a multiTarget.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - customTarget\n required:\n - targetIds\n properties:\n targetIds:\n type: array\n x-dcl-go-name: TargetIds\n description: Required. The target_ids of this multiTarget.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the `Target`. Format is `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n x-dcl-has-long-form: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n requireApproval:\n type: boolean\n x-dcl-go-name: RequireApproval\n description: Optional. Whether or not the `Target` requires approval.\n run:\n type: object\n x-dcl-go-name: Run\n x-dcl-go-type: TargetRun\n description: Information specifying a Cloud Run deployment target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - multiTarget\n - customTarget\n required:\n - location\n properties:\n location:\n type: string\n x-dcl-go-name: Location\n description: Required. The location where the Cloud Run Service should\n be located. Format is `projects/{project}/locations/{location}`.\n targetId:\n type: string\n x-dcl-go-name: TargetId\n readOnly: true\n description: Output only. Resource id of the `Target`.\n x-kubernetes-immutable: true\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. Unique identifier of the `Target`.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. Most recent time at which the `Target` was updated.\n x-kubernetes-immutable: true\n") +var YAML_target = []byte("info:\n title: Clouddeploy/Target\n description: The Cloud Deploy `Target` resource\n x-dcl-struct-name: Target\n x-dcl-has-iam: false\n x-dcl-ref:\n text: REST API\n url: https://cloud.google.com/deploy/docs/api/reference/rest/v1/projects.locations.targets\npaths:\n get:\n description: The function used to get information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n apply:\n description: The function used to apply information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n delete:\n description: The function used to delete a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n deleteAll:\n description: The function used to delete all Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n Target:\n title: Target\n x-dcl-id: projects/{{project}}/locations/{{location}}/targets/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - project\n - location\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: Optional. User annotations. These attributes can only be set\n and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations\n for more details such as format and size limitations.\n anthosCluster:\n type: object\n x-dcl-go-name: AnthosCluster\n x-dcl-go-type: TargetAnthosCluster\n description: Information specifying an Anthos Cluster.\n x-dcl-conflicts:\n - gke\n - run\n - multiTarget\n - customTarget\n properties:\n membership:\n type: string\n x-dcl-go-name: Membership\n description: Membership of the GKE Hub-registered cluster to which to\n apply the Skaffold configuration. Format is `projects/{project}/locations/{location}/memberships/{membership_name}`.\n x-dcl-references:\n - resource: Gkehub/Membership\n field: selfLink\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. Time at which the `Target` was created.\n x-kubernetes-immutable: true\n customTarget:\n type: object\n x-dcl-go-name: CustomTarget\n x-dcl-go-type: TargetCustomTarget\n description: Optional. Information specifying a Custom Target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - multiTarget\n required:\n - customTargetType\n properties:\n customTargetType:\n type: string\n x-dcl-go-name: CustomTargetType\n description: Required. The name of the CustomTargetType. Format must\n be `projects/{project}/locations/{location}/customTargetTypes/{custom_target_type}`.\n x-dcl-references:\n - resource: Clouddeploy/CustomTargetType\n field: selfLink\n deployParameters:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: DeployParameters\n description: Optional. The deploy parameters to use for this target.\n description:\n type: string\n x-dcl-go-name: Description\n description: Optional. Description of the `Target`. Max length is 255 characters.\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Optional. This checksum is computed by the server based on\n the value of other fields, and may be sent on update and delete requests\n to ensure the client has an up-to-date value before proceeding.\n x-kubernetes-immutable: true\n executionConfigs:\n type: array\n x-dcl-go-name: ExecutionConfigs\n description: Configurations for all execution that relates to this `Target`.\n Each `ExecutionEnvironmentUsage` value may only be used in a single configuration;\n using the same value multiple times is an error. When one or more configurations\n are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage`\n values. When no configurations are specified, execution will use the default\n specified in `DefaultPool`.\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: TargetExecutionConfigs\n required:\n - usages\n properties:\n artifactStorage:\n type: string\n x-dcl-go-name: ArtifactStorage\n description: Optional. Cloud Storage location in which to store execution\n outputs. This can either be a bucket (\"gs://my-bucket\") or a path\n within a bucket (\"gs://my-bucket/my-dir\"). If unspecified, a default\n bucket located in the same region will be used.\n x-dcl-server-default: true\n executionTimeout:\n type: string\n x-dcl-go-name: ExecutionTimeout\n description: Optional. Execution timeout for a Cloud Build Execution.\n This must be between 10m and 24h in seconds format. If unspecified,\n a default timeout of 1h is used.\n x-dcl-server-default: true\n serviceAccount:\n type: string\n x-dcl-go-name: ServiceAccount\n description: Optional. Google service account to use for execution.\n If unspecified, the project execution service account (-compute@developer.gserviceaccount.com)\n is used.\n x-dcl-server-default: true\n usages:\n type: array\n x-dcl-go-name: Usages\n description: Required. Usages when this configuration should be applied.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: TargetExecutionConfigsUsagesEnum\n enum:\n - EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED\n - RENDER\n - DEPLOY\n verbose:\n type: boolean\n x-dcl-go-name: Verbose\n description: Optional. If true, additional logging will be enabled\n when running builds in this execution environment.\n workerPool:\n type: string\n x-dcl-go-name: WorkerPool\n description: Optional. The resource name of the `WorkerPool`, with\n the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`.\n If this optional field is unspecified, the default Cloud Build pool\n will be used.\n x-dcl-references:\n - resource: Cloudbuild/WorkerPool\n field: selfLink\n gke:\n type: object\n x-dcl-go-name: Gke\n x-dcl-go-type: TargetGke\n description: Information specifying a GKE Cluster.\n x-dcl-conflicts:\n - anthosCluster\n - run\n - multiTarget\n - customTarget\n properties:\n cluster:\n type: string\n x-dcl-go-name: Cluster\n description: Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.\n x-dcl-references:\n - resource: Container/Cluster\n field: selfLink\n internalIP:\n type: boolean\n x-dcl-go-name: InternalIP\n description: Optional. If true, `cluster` is accessed using the private\n IP address of the control plane endpoint. Otherwise, the default IP\n address of the control plane endpoint is used. The default IP address\n is the private IP address for clusters with private control-plane\n endpoints and the public IP address otherwise. Only specify this option\n when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).\n proxyUrl:\n type: string\n x-dcl-go-name: ProxyUrl\n description: Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy)\n to the Kubernetes server.\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: 'Optional. Labels are attributes that can be set and used by\n both the user and by Google Cloud Deploy. Labels must meet the following\n constraints: * Keys and values can contain only lowercase letters, numeric\n characters, underscores, and dashes. * All characters must use UTF-8 encoding,\n and international characters are allowed. * Keys must start with a lowercase\n letter or international character. * Each resource is limited to a maximum\n of 64 labels. Both keys and values are additionally constrained to be\n <= 128 bytes.'\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n multiTarget:\n type: object\n x-dcl-go-name: MultiTarget\n x-dcl-go-type: TargetMultiTarget\n description: Information specifying a multiTarget.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - customTarget\n required:\n - targetIds\n properties:\n targetIds:\n type: array\n x-dcl-go-name: TargetIds\n description: Required. The target_ids of this multiTarget.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the `Target`. Format is `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n x-dcl-has-long-form: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n requireApproval:\n type: boolean\n x-dcl-go-name: RequireApproval\n description: Optional. Whether or not the `Target` requires approval.\n run:\n type: object\n x-dcl-go-name: Run\n x-dcl-go-type: TargetRun\n description: Information specifying a Cloud Run deployment target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - multiTarget\n - customTarget\n required:\n - location\n properties:\n location:\n type: string\n x-dcl-go-name: Location\n description: Required. The location where the Cloud Run Service should\n be located. Format is `projects/{project}/locations/{location}`.\n targetId:\n type: string\n x-dcl-go-name: TargetId\n readOnly: true\n description: Output only. Resource id of the `Target`.\n x-kubernetes-immutable: true\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. Unique identifier of the `Target`.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. Most recent time at which the `Target` was updated.\n x-kubernetes-immutable: true\n") -// 12961 bytes -// MD5: af29d8850ca004a1fffe0f13577c3edd +// 13256 bytes +// MD5: 6af2eccf69e0aafa0d3498bc876d8a28 diff --git a/services/google/clouddeploy/alpha/target_internal.go b/services/google/clouddeploy/alpha/target_internal.go index 5b6603146..9aec4d745 100755 --- a/services/google/clouddeploy/alpha/target_internal.go +++ b/services/google/clouddeploy/alpha/target_internal.go @@ -841,6 +841,11 @@ func canonicalizeTargetGke(des, initial *TargetGke, opts ...dcl.ApplyOption) *Ta } else { cDes.InternalIP = des.InternalIP } + if dcl.StringCanonicalize(des.ProxyUrl, initial.ProxyUrl) || dcl.IsZeroValue(des.ProxyUrl) { + cDes.ProxyUrl = initial.ProxyUrl + } else { + cDes.ProxyUrl = des.ProxyUrl + } return cDes } @@ -890,6 +895,9 @@ func canonicalizeNewTargetGke(c *Client, des, nw *TargetGke) *TargetGke { if dcl.BoolCanonicalize(des.InternalIP, nw.InternalIP) { nw.InternalIP = des.InternalIP } + if dcl.StringCanonicalize(des.ProxyUrl, nw.ProxyUrl) { + nw.ProxyUrl = des.ProxyUrl + } return nw } @@ -1749,6 +1757,13 @@ func compareTargetGkeNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldD } diffs = append(diffs, ds...) } + + if ds, err := dcl.Diff(desired.ProxyUrl, actual.ProxyUrl, dcl.DiffInfo{OperationSelector: dcl.TriggersOperation("updateTargetUpdateTargetOperation")}, fn.AddNest("ProxyUrl")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } return diffs, nil } @@ -2191,6 +2206,9 @@ func expandTargetGke(c *Client, f *TargetGke, res *Target) (map[string]interface if v := f.InternalIP; !dcl.IsEmptyValueIndirect(v) { m["internalIp"] = v } + if v := f.ProxyUrl; !dcl.IsEmptyValueIndirect(v) { + m["proxyUrl"] = v + } return m, nil } @@ -2210,6 +2228,7 @@ func flattenTargetGke(c *Client, i interface{}, res *Target) *TargetGke { } r.Cluster = dcl.FlattenString(m["cluster"]) r.InternalIP = dcl.FlattenBool(m["internalIp"]) + r.ProxyUrl = dcl.FlattenString(m["proxyUrl"]) return r } diff --git a/services/google/clouddeploy/alpha/target_schema.go b/services/google/clouddeploy/alpha/target_schema.go index b61acd26a..030f8929e 100755 --- a/services/google/clouddeploy/alpha/target_schema.go +++ b/services/google/clouddeploy/alpha/target_schema.go @@ -297,6 +297,11 @@ func DCLTargetSchema() *dcl.Schema { GoName: "InternalIP", Description: "Optional. If true, `cluster` is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).", }, + "proxyUrl": &dcl.Property{ + Type: "string", + GoName: "ProxyUrl", + Description: "Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy) to the Kubernetes server.", + }, }, }, "labels": &dcl.Property{ diff --git a/services/google/clouddeploy/beta/target.go b/services/google/clouddeploy/beta/target.go index 29143aa88..1af5ff295 100755 --- a/services/google/clouddeploy/beta/target.go +++ b/services/google/clouddeploy/beta/target.go @@ -82,6 +82,7 @@ type TargetGke struct { empty bool `json:"-"` Cluster *string `json:"cluster"` InternalIP *bool `json:"internalIP"` + ProxyUrl *string `json:"proxyUrl"` } type jsonTargetGke TargetGke @@ -103,6 +104,8 @@ func (r *TargetGke) UnmarshalJSON(data []byte) error { r.InternalIP = res.InternalIP + r.ProxyUrl = res.ProxyUrl + } return nil } diff --git a/services/google/clouddeploy/beta/target.yaml b/services/google/clouddeploy/beta/target.yaml index 1d2d8d053..a408c1642 100755 --- a/services/google/clouddeploy/beta/target.yaml +++ b/services/google/clouddeploy/beta/target.yaml @@ -245,6 +245,11 @@ components: is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept). + proxyUrl: + type: string + x-dcl-go-name: ProxyUrl + description: Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy) + to the Kubernetes server. labels: type: object additionalProperties: diff --git a/services/google/clouddeploy/beta/target_beta_yaml_embed.go b/services/google/clouddeploy/beta/target_beta_yaml_embed.go index b0aec2ef3..2ce095c1d 100755 --- a/services/google/clouddeploy/beta/target_beta_yaml_embed.go +++ b/services/google/clouddeploy/beta/target_beta_yaml_embed.go @@ -17,7 +17,7 @@ package beta // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/clouddeploy/beta/target.yaml -var YAML_target = []byte("info:\n title: Clouddeploy/Target\n description: The Cloud Deploy `Target` resource\n x-dcl-struct-name: Target\n x-dcl-has-iam: false\n x-dcl-ref:\n text: REST API\n url: https://cloud.google.com/deploy/docs/api/reference/rest/v1/projects.locations.targets\npaths:\n get:\n description: The function used to get information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n apply:\n description: The function used to apply information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n delete:\n description: The function used to delete a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n deleteAll:\n description: The function used to delete all Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n Target:\n title: Target\n x-dcl-id: projects/{{project}}/locations/{{location}}/targets/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - project\n - location\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: Optional. User annotations. These attributes can only be set\n and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations\n for more details such as format and size limitations.\n anthosCluster:\n type: object\n x-dcl-go-name: AnthosCluster\n x-dcl-go-type: TargetAnthosCluster\n description: Information specifying an Anthos Cluster.\n x-dcl-conflicts:\n - gke\n - run\n - multiTarget\n - customTarget\n properties:\n membership:\n type: string\n x-dcl-go-name: Membership\n description: Membership of the GKE Hub-registered cluster to which to\n apply the Skaffold configuration. Format is `projects/{project}/locations/{location}/memberships/{membership_name}`.\n x-dcl-references:\n - resource: Gkehub/Membership\n field: selfLink\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. Time at which the `Target` was created.\n x-kubernetes-immutable: true\n customTarget:\n type: object\n x-dcl-go-name: CustomTarget\n x-dcl-go-type: TargetCustomTarget\n description: Optional. Information specifying a Custom Target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - multiTarget\n required:\n - customTargetType\n properties:\n customTargetType:\n type: string\n x-dcl-go-name: CustomTargetType\n description: Required. The name of the CustomTargetType. Format must\n be `projects/{project}/locations/{location}/customTargetTypes/{custom_target_type}`.\n x-dcl-references:\n - resource: Clouddeploy/CustomTargetType\n field: selfLink\n deployParameters:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: DeployParameters\n description: Optional. The deploy parameters to use for this target.\n description:\n type: string\n x-dcl-go-name: Description\n description: Optional. Description of the `Target`. Max length is 255 characters.\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Optional. This checksum is computed by the server based on\n the value of other fields, and may be sent on update and delete requests\n to ensure the client has an up-to-date value before proceeding.\n x-kubernetes-immutable: true\n executionConfigs:\n type: array\n x-dcl-go-name: ExecutionConfigs\n description: Configurations for all execution that relates to this `Target`.\n Each `ExecutionEnvironmentUsage` value may only be used in a single configuration;\n using the same value multiple times is an error. When one or more configurations\n are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage`\n values. When no configurations are specified, execution will use the default\n specified in `DefaultPool`.\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: TargetExecutionConfigs\n required:\n - usages\n properties:\n artifactStorage:\n type: string\n x-dcl-go-name: ArtifactStorage\n description: Optional. Cloud Storage location in which to store execution\n outputs. This can either be a bucket (\"gs://my-bucket\") or a path\n within a bucket (\"gs://my-bucket/my-dir\"). If unspecified, a default\n bucket located in the same region will be used.\n x-dcl-server-default: true\n executionTimeout:\n type: string\n x-dcl-go-name: ExecutionTimeout\n description: Optional. Execution timeout for a Cloud Build Execution.\n This must be between 10m and 24h in seconds format. If unspecified,\n a default timeout of 1h is used.\n x-dcl-server-default: true\n serviceAccount:\n type: string\n x-dcl-go-name: ServiceAccount\n description: Optional. Google service account to use for execution.\n If unspecified, the project execution service account (-compute@developer.gserviceaccount.com)\n is used.\n x-dcl-server-default: true\n usages:\n type: array\n x-dcl-go-name: Usages\n description: Required. Usages when this configuration should be applied.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: TargetExecutionConfigsUsagesEnum\n enum:\n - EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED\n - RENDER\n - DEPLOY\n verbose:\n type: boolean\n x-dcl-go-name: Verbose\n description: Optional. If true, additional logging will be enabled\n when running builds in this execution environment.\n workerPool:\n type: string\n x-dcl-go-name: WorkerPool\n description: Optional. The resource name of the `WorkerPool`, with\n the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`.\n If this optional field is unspecified, the default Cloud Build pool\n will be used.\n x-dcl-references:\n - resource: Cloudbuild/WorkerPool\n field: selfLink\n gke:\n type: object\n x-dcl-go-name: Gke\n x-dcl-go-type: TargetGke\n description: Information specifying a GKE Cluster.\n x-dcl-conflicts:\n - anthosCluster\n - run\n - multiTarget\n - customTarget\n properties:\n cluster:\n type: string\n x-dcl-go-name: Cluster\n description: Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.\n x-dcl-references:\n - resource: Container/Cluster\n field: selfLink\n internalIP:\n type: boolean\n x-dcl-go-name: InternalIP\n description: Optional. If true, `cluster` is accessed using the private\n IP address of the control plane endpoint. Otherwise, the default IP\n address of the control plane endpoint is used. The default IP address\n is the private IP address for clusters with private control-plane\n endpoints and the public IP address otherwise. Only specify this option\n when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: 'Optional. Labels are attributes that can be set and used by\n both the user and by Google Cloud Deploy. Labels must meet the following\n constraints: * Keys and values can contain only lowercase letters, numeric\n characters, underscores, and dashes. * All characters must use UTF-8 encoding,\n and international characters are allowed. * Keys must start with a lowercase\n letter or international character. * Each resource is limited to a maximum\n of 64 labels. Both keys and values are additionally constrained to be\n <= 128 bytes.'\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n multiTarget:\n type: object\n x-dcl-go-name: MultiTarget\n x-dcl-go-type: TargetMultiTarget\n description: Information specifying a multiTarget.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - customTarget\n required:\n - targetIds\n properties:\n targetIds:\n type: array\n x-dcl-go-name: TargetIds\n description: Required. The target_ids of this multiTarget.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the `Target`. Format is `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n x-dcl-has-long-form: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n requireApproval:\n type: boolean\n x-dcl-go-name: RequireApproval\n description: Optional. Whether or not the `Target` requires approval.\n run:\n type: object\n x-dcl-go-name: Run\n x-dcl-go-type: TargetRun\n description: Information specifying a Cloud Run deployment target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - multiTarget\n - customTarget\n required:\n - location\n properties:\n location:\n type: string\n x-dcl-go-name: Location\n description: Required. The location where the Cloud Run Service should\n be located. Format is `projects/{project}/locations/{location}`.\n targetId:\n type: string\n x-dcl-go-name: TargetId\n readOnly: true\n description: Output only. Resource id of the `Target`.\n x-kubernetes-immutable: true\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. Unique identifier of the `Target`.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. Most recent time at which the `Target` was updated.\n x-kubernetes-immutable: true\n") +var YAML_target = []byte("info:\n title: Clouddeploy/Target\n description: The Cloud Deploy `Target` resource\n x-dcl-struct-name: Target\n x-dcl-has-iam: false\n x-dcl-ref:\n text: REST API\n url: https://cloud.google.com/deploy/docs/api/reference/rest/v1/projects.locations.targets\npaths:\n get:\n description: The function used to get information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n apply:\n description: The function used to apply information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n delete:\n description: The function used to delete a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n deleteAll:\n description: The function used to delete all Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n Target:\n title: Target\n x-dcl-id: projects/{{project}}/locations/{{location}}/targets/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - project\n - location\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: Optional. User annotations. These attributes can only be set\n and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations\n for more details such as format and size limitations.\n anthosCluster:\n type: object\n x-dcl-go-name: AnthosCluster\n x-dcl-go-type: TargetAnthosCluster\n description: Information specifying an Anthos Cluster.\n x-dcl-conflicts:\n - gke\n - run\n - multiTarget\n - customTarget\n properties:\n membership:\n type: string\n x-dcl-go-name: Membership\n description: Membership of the GKE Hub-registered cluster to which to\n apply the Skaffold configuration. Format is `projects/{project}/locations/{location}/memberships/{membership_name}`.\n x-dcl-references:\n - resource: Gkehub/Membership\n field: selfLink\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. Time at which the `Target` was created.\n x-kubernetes-immutable: true\n customTarget:\n type: object\n x-dcl-go-name: CustomTarget\n x-dcl-go-type: TargetCustomTarget\n description: Optional. Information specifying a Custom Target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - multiTarget\n required:\n - customTargetType\n properties:\n customTargetType:\n type: string\n x-dcl-go-name: CustomTargetType\n description: Required. The name of the CustomTargetType. Format must\n be `projects/{project}/locations/{location}/customTargetTypes/{custom_target_type}`.\n x-dcl-references:\n - resource: Clouddeploy/CustomTargetType\n field: selfLink\n deployParameters:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: DeployParameters\n description: Optional. The deploy parameters to use for this target.\n description:\n type: string\n x-dcl-go-name: Description\n description: Optional. Description of the `Target`. Max length is 255 characters.\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Optional. This checksum is computed by the server based on\n the value of other fields, and may be sent on update and delete requests\n to ensure the client has an up-to-date value before proceeding.\n x-kubernetes-immutable: true\n executionConfigs:\n type: array\n x-dcl-go-name: ExecutionConfigs\n description: Configurations for all execution that relates to this `Target`.\n Each `ExecutionEnvironmentUsage` value may only be used in a single configuration;\n using the same value multiple times is an error. When one or more configurations\n are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage`\n values. When no configurations are specified, execution will use the default\n specified in `DefaultPool`.\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: TargetExecutionConfigs\n required:\n - usages\n properties:\n artifactStorage:\n type: string\n x-dcl-go-name: ArtifactStorage\n description: Optional. Cloud Storage location in which to store execution\n outputs. This can either be a bucket (\"gs://my-bucket\") or a path\n within a bucket (\"gs://my-bucket/my-dir\"). If unspecified, a default\n bucket located in the same region will be used.\n x-dcl-server-default: true\n executionTimeout:\n type: string\n x-dcl-go-name: ExecutionTimeout\n description: Optional. Execution timeout for a Cloud Build Execution.\n This must be between 10m and 24h in seconds format. If unspecified,\n a default timeout of 1h is used.\n x-dcl-server-default: true\n serviceAccount:\n type: string\n x-dcl-go-name: ServiceAccount\n description: Optional. Google service account to use for execution.\n If unspecified, the project execution service account (-compute@developer.gserviceaccount.com)\n is used.\n x-dcl-server-default: true\n usages:\n type: array\n x-dcl-go-name: Usages\n description: Required. Usages when this configuration should be applied.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: TargetExecutionConfigsUsagesEnum\n enum:\n - EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED\n - RENDER\n - DEPLOY\n verbose:\n type: boolean\n x-dcl-go-name: Verbose\n description: Optional. If true, additional logging will be enabled\n when running builds in this execution environment.\n workerPool:\n type: string\n x-dcl-go-name: WorkerPool\n description: Optional. The resource name of the `WorkerPool`, with\n the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`.\n If this optional field is unspecified, the default Cloud Build pool\n will be used.\n x-dcl-references:\n - resource: Cloudbuild/WorkerPool\n field: selfLink\n gke:\n type: object\n x-dcl-go-name: Gke\n x-dcl-go-type: TargetGke\n description: Information specifying a GKE Cluster.\n x-dcl-conflicts:\n - anthosCluster\n - run\n - multiTarget\n - customTarget\n properties:\n cluster:\n type: string\n x-dcl-go-name: Cluster\n description: Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.\n x-dcl-references:\n - resource: Container/Cluster\n field: selfLink\n internalIP:\n type: boolean\n x-dcl-go-name: InternalIP\n description: Optional. If true, `cluster` is accessed using the private\n IP address of the control plane endpoint. Otherwise, the default IP\n address of the control plane endpoint is used. The default IP address\n is the private IP address for clusters with private control-plane\n endpoints and the public IP address otherwise. Only specify this option\n when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).\n proxyUrl:\n type: string\n x-dcl-go-name: ProxyUrl\n description: Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy)\n to the Kubernetes server.\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: 'Optional. Labels are attributes that can be set and used by\n both the user and by Google Cloud Deploy. Labels must meet the following\n constraints: * Keys and values can contain only lowercase letters, numeric\n characters, underscores, and dashes. * All characters must use UTF-8 encoding,\n and international characters are allowed. * Keys must start with a lowercase\n letter or international character. * Each resource is limited to a maximum\n of 64 labels. Both keys and values are additionally constrained to be\n <= 128 bytes.'\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n multiTarget:\n type: object\n x-dcl-go-name: MultiTarget\n x-dcl-go-type: TargetMultiTarget\n description: Information specifying a multiTarget.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - customTarget\n required:\n - targetIds\n properties:\n targetIds:\n type: array\n x-dcl-go-name: TargetIds\n description: Required. The target_ids of this multiTarget.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the `Target`. Format is `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n x-dcl-has-long-form: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n requireApproval:\n type: boolean\n x-dcl-go-name: RequireApproval\n description: Optional. Whether or not the `Target` requires approval.\n run:\n type: object\n x-dcl-go-name: Run\n x-dcl-go-type: TargetRun\n description: Information specifying a Cloud Run deployment target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - multiTarget\n - customTarget\n required:\n - location\n properties:\n location:\n type: string\n x-dcl-go-name: Location\n description: Required. The location where the Cloud Run Service should\n be located. Format is `projects/{project}/locations/{location}`.\n targetId:\n type: string\n x-dcl-go-name: TargetId\n readOnly: true\n description: Output only. Resource id of the `Target`.\n x-kubernetes-immutable: true\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. Unique identifier of the `Target`.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. Most recent time at which the `Target` was updated.\n x-kubernetes-immutable: true\n") -// 12961 bytes -// MD5: af29d8850ca004a1fffe0f13577c3edd +// 13256 bytes +// MD5: 6af2eccf69e0aafa0d3498bc876d8a28 diff --git a/services/google/clouddeploy/beta/target_internal.go b/services/google/clouddeploy/beta/target_internal.go index 42f2b0cef..f72ba3149 100755 --- a/services/google/clouddeploy/beta/target_internal.go +++ b/services/google/clouddeploy/beta/target_internal.go @@ -841,6 +841,11 @@ func canonicalizeTargetGke(des, initial *TargetGke, opts ...dcl.ApplyOption) *Ta } else { cDes.InternalIP = des.InternalIP } + if dcl.StringCanonicalize(des.ProxyUrl, initial.ProxyUrl) || dcl.IsZeroValue(des.ProxyUrl) { + cDes.ProxyUrl = initial.ProxyUrl + } else { + cDes.ProxyUrl = des.ProxyUrl + } return cDes } @@ -890,6 +895,9 @@ func canonicalizeNewTargetGke(c *Client, des, nw *TargetGke) *TargetGke { if dcl.BoolCanonicalize(des.InternalIP, nw.InternalIP) { nw.InternalIP = des.InternalIP } + if dcl.StringCanonicalize(des.ProxyUrl, nw.ProxyUrl) { + nw.ProxyUrl = des.ProxyUrl + } return nw } @@ -1749,6 +1757,13 @@ func compareTargetGkeNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldD } diffs = append(diffs, ds...) } + + if ds, err := dcl.Diff(desired.ProxyUrl, actual.ProxyUrl, dcl.DiffInfo{OperationSelector: dcl.TriggersOperation("updateTargetUpdateTargetOperation")}, fn.AddNest("ProxyUrl")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } return diffs, nil } @@ -2191,6 +2206,9 @@ func expandTargetGke(c *Client, f *TargetGke, res *Target) (map[string]interface if v := f.InternalIP; !dcl.IsEmptyValueIndirect(v) { m["internalIp"] = v } + if v := f.ProxyUrl; !dcl.IsEmptyValueIndirect(v) { + m["proxyUrl"] = v + } return m, nil } @@ -2210,6 +2228,7 @@ func flattenTargetGke(c *Client, i interface{}, res *Target) *TargetGke { } r.Cluster = dcl.FlattenString(m["cluster"]) r.InternalIP = dcl.FlattenBool(m["internalIp"]) + r.ProxyUrl = dcl.FlattenString(m["proxyUrl"]) return r } diff --git a/services/google/clouddeploy/beta/target_schema.go b/services/google/clouddeploy/beta/target_schema.go index 631aee975..df073aa5c 100755 --- a/services/google/clouddeploy/beta/target_schema.go +++ b/services/google/clouddeploy/beta/target_schema.go @@ -297,6 +297,11 @@ func DCLTargetSchema() *dcl.Schema { GoName: "InternalIP", Description: "Optional. If true, `cluster` is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).", }, + "proxyUrl": &dcl.Property{ + Type: "string", + GoName: "ProxyUrl", + Description: "Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy) to the Kubernetes server.", + }, }, }, "labels": &dcl.Property{ diff --git a/services/google/clouddeploy/target.go b/services/google/clouddeploy/target.go index 88ca7c918..955088ebc 100755 --- a/services/google/clouddeploy/target.go +++ b/services/google/clouddeploy/target.go @@ -82,6 +82,7 @@ type TargetGke struct { empty bool `json:"-"` Cluster *string `json:"cluster"` InternalIP *bool `json:"internalIP"` + ProxyUrl *string `json:"proxyUrl"` } type jsonTargetGke TargetGke @@ -103,6 +104,8 @@ func (r *TargetGke) UnmarshalJSON(data []byte) error { r.InternalIP = res.InternalIP + r.ProxyUrl = res.ProxyUrl + } return nil } diff --git a/services/google/clouddeploy/target.yaml b/services/google/clouddeploy/target.yaml index 1d2d8d053..a408c1642 100755 --- a/services/google/clouddeploy/target.yaml +++ b/services/google/clouddeploy/target.yaml @@ -245,6 +245,11 @@ components: is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept). + proxyUrl: + type: string + x-dcl-go-name: ProxyUrl + description: Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy) + to the Kubernetes server. labels: type: object additionalProperties: diff --git a/services/google/clouddeploy/target_internal.go b/services/google/clouddeploy/target_internal.go index 0e7c2dd18..dc5d13c01 100755 --- a/services/google/clouddeploy/target_internal.go +++ b/services/google/clouddeploy/target_internal.go @@ -841,6 +841,11 @@ func canonicalizeTargetGke(des, initial *TargetGke, opts ...dcl.ApplyOption) *Ta } else { cDes.InternalIP = des.InternalIP } + if dcl.StringCanonicalize(des.ProxyUrl, initial.ProxyUrl) || dcl.IsZeroValue(des.ProxyUrl) { + cDes.ProxyUrl = initial.ProxyUrl + } else { + cDes.ProxyUrl = des.ProxyUrl + } return cDes } @@ -890,6 +895,9 @@ func canonicalizeNewTargetGke(c *Client, des, nw *TargetGke) *TargetGke { if dcl.BoolCanonicalize(des.InternalIP, nw.InternalIP) { nw.InternalIP = des.InternalIP } + if dcl.StringCanonicalize(des.ProxyUrl, nw.ProxyUrl) { + nw.ProxyUrl = des.ProxyUrl + } return nw } @@ -1749,6 +1757,13 @@ func compareTargetGkeNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldD } diffs = append(diffs, ds...) } + + if ds, err := dcl.Diff(desired.ProxyUrl, actual.ProxyUrl, dcl.DiffInfo{OperationSelector: dcl.TriggersOperation("updateTargetUpdateTargetOperation")}, fn.AddNest("ProxyUrl")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } return diffs, nil } @@ -2191,6 +2206,9 @@ func expandTargetGke(c *Client, f *TargetGke, res *Target) (map[string]interface if v := f.InternalIP; !dcl.IsEmptyValueIndirect(v) { m["internalIp"] = v } + if v := f.ProxyUrl; !dcl.IsEmptyValueIndirect(v) { + m["proxyUrl"] = v + } return m, nil } @@ -2210,6 +2228,7 @@ func flattenTargetGke(c *Client, i interface{}, res *Target) *TargetGke { } r.Cluster = dcl.FlattenString(m["cluster"]) r.InternalIP = dcl.FlattenBool(m["internalIp"]) + r.ProxyUrl = dcl.FlattenString(m["proxyUrl"]) return r } diff --git a/services/google/clouddeploy/target_schema.go b/services/google/clouddeploy/target_schema.go index 0ce59b6c0..d6b7b9f81 100755 --- a/services/google/clouddeploy/target_schema.go +++ b/services/google/clouddeploy/target_schema.go @@ -297,6 +297,11 @@ func DCLTargetSchema() *dcl.Schema { GoName: "InternalIP", Description: "Optional. If true, `cluster` is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).", }, + "proxyUrl": &dcl.Property{ + Type: "string", + GoName: "ProxyUrl", + Description: "Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy) to the Kubernetes server.", + }, }, }, "labels": &dcl.Property{ diff --git a/services/google/clouddeploy/target_yaml_embed.go b/services/google/clouddeploy/target_yaml_embed.go index 7d9a4d9f5..114186eef 100755 --- a/services/google/clouddeploy/target_yaml_embed.go +++ b/services/google/clouddeploy/target_yaml_embed.go @@ -17,7 +17,7 @@ package clouddeploy // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/clouddeploy/target.yaml -var YAML_target = []byte("info:\n title: Clouddeploy/Target\n description: The Cloud Deploy `Target` resource\n x-dcl-struct-name: Target\n x-dcl-has-iam: false\n x-dcl-ref:\n text: REST API\n url: https://cloud.google.com/deploy/docs/api/reference/rest/v1/projects.locations.targets\npaths:\n get:\n description: The function used to get information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n apply:\n description: The function used to apply information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n delete:\n description: The function used to delete a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n deleteAll:\n description: The function used to delete all Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n Target:\n title: Target\n x-dcl-id: projects/{{project}}/locations/{{location}}/targets/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - project\n - location\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: Optional. User annotations. These attributes can only be set\n and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations\n for more details such as format and size limitations.\n anthosCluster:\n type: object\n x-dcl-go-name: AnthosCluster\n x-dcl-go-type: TargetAnthosCluster\n description: Information specifying an Anthos Cluster.\n x-dcl-conflicts:\n - gke\n - run\n - multiTarget\n - customTarget\n properties:\n membership:\n type: string\n x-dcl-go-name: Membership\n description: Membership of the GKE Hub-registered cluster to which to\n apply the Skaffold configuration. Format is `projects/{project}/locations/{location}/memberships/{membership_name}`.\n x-dcl-references:\n - resource: Gkehub/Membership\n field: selfLink\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. Time at which the `Target` was created.\n x-kubernetes-immutable: true\n customTarget:\n type: object\n x-dcl-go-name: CustomTarget\n x-dcl-go-type: TargetCustomTarget\n description: Optional. Information specifying a Custom Target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - multiTarget\n required:\n - customTargetType\n properties:\n customTargetType:\n type: string\n x-dcl-go-name: CustomTargetType\n description: Required. The name of the CustomTargetType. Format must\n be `projects/{project}/locations/{location}/customTargetTypes/{custom_target_type}`.\n x-dcl-references:\n - resource: Clouddeploy/CustomTargetType\n field: selfLink\n deployParameters:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: DeployParameters\n description: Optional. The deploy parameters to use for this target.\n description:\n type: string\n x-dcl-go-name: Description\n description: Optional. Description of the `Target`. Max length is 255 characters.\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Optional. This checksum is computed by the server based on\n the value of other fields, and may be sent on update and delete requests\n to ensure the client has an up-to-date value before proceeding.\n x-kubernetes-immutable: true\n executionConfigs:\n type: array\n x-dcl-go-name: ExecutionConfigs\n description: Configurations for all execution that relates to this `Target`.\n Each `ExecutionEnvironmentUsage` value may only be used in a single configuration;\n using the same value multiple times is an error. When one or more configurations\n are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage`\n values. When no configurations are specified, execution will use the default\n specified in `DefaultPool`.\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: TargetExecutionConfigs\n required:\n - usages\n properties:\n artifactStorage:\n type: string\n x-dcl-go-name: ArtifactStorage\n description: Optional. Cloud Storage location in which to store execution\n outputs. This can either be a bucket (\"gs://my-bucket\") or a path\n within a bucket (\"gs://my-bucket/my-dir\"). If unspecified, a default\n bucket located in the same region will be used.\n x-dcl-server-default: true\n executionTimeout:\n type: string\n x-dcl-go-name: ExecutionTimeout\n description: Optional. Execution timeout for a Cloud Build Execution.\n This must be between 10m and 24h in seconds format. If unspecified,\n a default timeout of 1h is used.\n x-dcl-server-default: true\n serviceAccount:\n type: string\n x-dcl-go-name: ServiceAccount\n description: Optional. Google service account to use for execution.\n If unspecified, the project execution service account (-compute@developer.gserviceaccount.com)\n is used.\n x-dcl-server-default: true\n usages:\n type: array\n x-dcl-go-name: Usages\n description: Required. Usages when this configuration should be applied.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: TargetExecutionConfigsUsagesEnum\n enum:\n - EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED\n - RENDER\n - DEPLOY\n verbose:\n type: boolean\n x-dcl-go-name: Verbose\n description: Optional. If true, additional logging will be enabled\n when running builds in this execution environment.\n workerPool:\n type: string\n x-dcl-go-name: WorkerPool\n description: Optional. The resource name of the `WorkerPool`, with\n the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`.\n If this optional field is unspecified, the default Cloud Build pool\n will be used.\n x-dcl-references:\n - resource: Cloudbuild/WorkerPool\n field: selfLink\n gke:\n type: object\n x-dcl-go-name: Gke\n x-dcl-go-type: TargetGke\n description: Information specifying a GKE Cluster.\n x-dcl-conflicts:\n - anthosCluster\n - run\n - multiTarget\n - customTarget\n properties:\n cluster:\n type: string\n x-dcl-go-name: Cluster\n description: Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.\n x-dcl-references:\n - resource: Container/Cluster\n field: selfLink\n internalIP:\n type: boolean\n x-dcl-go-name: InternalIP\n description: Optional. If true, `cluster` is accessed using the private\n IP address of the control plane endpoint. Otherwise, the default IP\n address of the control plane endpoint is used. The default IP address\n is the private IP address for clusters with private control-plane\n endpoints and the public IP address otherwise. Only specify this option\n when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: 'Optional. Labels are attributes that can be set and used by\n both the user and by Google Cloud Deploy. Labels must meet the following\n constraints: * Keys and values can contain only lowercase letters, numeric\n characters, underscores, and dashes. * All characters must use UTF-8 encoding,\n and international characters are allowed. * Keys must start with a lowercase\n letter or international character. * Each resource is limited to a maximum\n of 64 labels. Both keys and values are additionally constrained to be\n <= 128 bytes.'\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n multiTarget:\n type: object\n x-dcl-go-name: MultiTarget\n x-dcl-go-type: TargetMultiTarget\n description: Information specifying a multiTarget.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - customTarget\n required:\n - targetIds\n properties:\n targetIds:\n type: array\n x-dcl-go-name: TargetIds\n description: Required. The target_ids of this multiTarget.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the `Target`. Format is `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n x-dcl-has-long-form: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n requireApproval:\n type: boolean\n x-dcl-go-name: RequireApproval\n description: Optional. Whether or not the `Target` requires approval.\n run:\n type: object\n x-dcl-go-name: Run\n x-dcl-go-type: TargetRun\n description: Information specifying a Cloud Run deployment target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - multiTarget\n - customTarget\n required:\n - location\n properties:\n location:\n type: string\n x-dcl-go-name: Location\n description: Required. The location where the Cloud Run Service should\n be located. Format is `projects/{project}/locations/{location}`.\n targetId:\n type: string\n x-dcl-go-name: TargetId\n readOnly: true\n description: Output only. Resource id of the `Target`.\n x-kubernetes-immutable: true\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. Unique identifier of the `Target`.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. Most recent time at which the `Target` was updated.\n x-kubernetes-immutable: true\n") +var YAML_target = []byte("info:\n title: Clouddeploy/Target\n description: The Cloud Deploy `Target` resource\n x-dcl-struct-name: Target\n x-dcl-has-iam: false\n x-dcl-ref:\n text: REST API\n url: https://cloud.google.com/deploy/docs/api/reference/rest/v1/projects.locations.targets\npaths:\n get:\n description: The function used to get information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n apply:\n description: The function used to apply information about a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n delete:\n description: The function used to delete a Target\n parameters:\n - name: target\n required: true\n description: A full instance of a Target\n deleteAll:\n description: The function used to delete all Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many Target\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n Target:\n title: Target\n x-dcl-id: projects/{{project}}/locations/{{location}}/targets/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - name\n - project\n - location\n properties:\n annotations:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Annotations\n description: Optional. User annotations. These attributes can only be set\n and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations\n for more details such as format and size limitations.\n anthosCluster:\n type: object\n x-dcl-go-name: AnthosCluster\n x-dcl-go-type: TargetAnthosCluster\n description: Information specifying an Anthos Cluster.\n x-dcl-conflicts:\n - gke\n - run\n - multiTarget\n - customTarget\n properties:\n membership:\n type: string\n x-dcl-go-name: Membership\n description: Membership of the GKE Hub-registered cluster to which to\n apply the Skaffold configuration. Format is `projects/{project}/locations/{location}/memberships/{membership_name}`.\n x-dcl-references:\n - resource: Gkehub/Membership\n field: selfLink\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. Time at which the `Target` was created.\n x-kubernetes-immutable: true\n customTarget:\n type: object\n x-dcl-go-name: CustomTarget\n x-dcl-go-type: TargetCustomTarget\n description: Optional. Information specifying a Custom Target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - multiTarget\n required:\n - customTargetType\n properties:\n customTargetType:\n type: string\n x-dcl-go-name: CustomTargetType\n description: Required. The name of the CustomTargetType. Format must\n be `projects/{project}/locations/{location}/customTargetTypes/{custom_target_type}`.\n x-dcl-references:\n - resource: Clouddeploy/CustomTargetType\n field: selfLink\n deployParameters:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: DeployParameters\n description: Optional. The deploy parameters to use for this target.\n description:\n type: string\n x-dcl-go-name: Description\n description: Optional. Description of the `Target`. Max length is 255 characters.\n etag:\n type: string\n x-dcl-go-name: Etag\n readOnly: true\n description: Optional. This checksum is computed by the server based on\n the value of other fields, and may be sent on update and delete requests\n to ensure the client has an up-to-date value before proceeding.\n x-kubernetes-immutable: true\n executionConfigs:\n type: array\n x-dcl-go-name: ExecutionConfigs\n description: Configurations for all execution that relates to this `Target`.\n Each `ExecutionEnvironmentUsage` value may only be used in a single configuration;\n using the same value multiple times is an error. When one or more configurations\n are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage`\n values. When no configurations are specified, execution will use the default\n specified in `DefaultPool`.\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: TargetExecutionConfigs\n required:\n - usages\n properties:\n artifactStorage:\n type: string\n x-dcl-go-name: ArtifactStorage\n description: Optional. Cloud Storage location in which to store execution\n outputs. This can either be a bucket (\"gs://my-bucket\") or a path\n within a bucket (\"gs://my-bucket/my-dir\"). If unspecified, a default\n bucket located in the same region will be used.\n x-dcl-server-default: true\n executionTimeout:\n type: string\n x-dcl-go-name: ExecutionTimeout\n description: Optional. Execution timeout for a Cloud Build Execution.\n This must be between 10m and 24h in seconds format. If unspecified,\n a default timeout of 1h is used.\n x-dcl-server-default: true\n serviceAccount:\n type: string\n x-dcl-go-name: ServiceAccount\n description: Optional. Google service account to use for execution.\n If unspecified, the project execution service account (-compute@developer.gserviceaccount.com)\n is used.\n x-dcl-server-default: true\n usages:\n type: array\n x-dcl-go-name: Usages\n description: Required. Usages when this configuration should be applied.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: TargetExecutionConfigsUsagesEnum\n enum:\n - EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED\n - RENDER\n - DEPLOY\n verbose:\n type: boolean\n x-dcl-go-name: Verbose\n description: Optional. If true, additional logging will be enabled\n when running builds in this execution environment.\n workerPool:\n type: string\n x-dcl-go-name: WorkerPool\n description: Optional. The resource name of the `WorkerPool`, with\n the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`.\n If this optional field is unspecified, the default Cloud Build pool\n will be used.\n x-dcl-references:\n - resource: Cloudbuild/WorkerPool\n field: selfLink\n gke:\n type: object\n x-dcl-go-name: Gke\n x-dcl-go-type: TargetGke\n description: Information specifying a GKE Cluster.\n x-dcl-conflicts:\n - anthosCluster\n - run\n - multiTarget\n - customTarget\n properties:\n cluster:\n type: string\n x-dcl-go-name: Cluster\n description: Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.\n x-dcl-references:\n - resource: Container/Cluster\n field: selfLink\n internalIP:\n type: boolean\n x-dcl-go-name: InternalIP\n description: Optional. If true, `cluster` is accessed using the private\n IP address of the control plane endpoint. Otherwise, the default IP\n address of the control plane endpoint is used. The default IP address\n is the private IP address for clusters with private control-plane\n endpoints and the public IP address otherwise. Only specify this option\n when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).\n proxyUrl:\n type: string\n x-dcl-go-name: ProxyUrl\n description: Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy)\n to the Kubernetes server.\n labels:\n type: object\n additionalProperties:\n type: string\n x-dcl-go-name: Labels\n description: 'Optional. Labels are attributes that can be set and used by\n both the user and by Google Cloud Deploy. Labels must meet the following\n constraints: * Keys and values can contain only lowercase letters, numeric\n characters, underscores, and dashes. * All characters must use UTF-8 encoding,\n and international characters are allowed. * Keys must start with a lowercase\n letter or international character. * Each resource is limited to a maximum\n of 64 labels. Both keys and values are additionally constrained to be\n <= 128 bytes.'\n location:\n type: string\n x-dcl-go-name: Location\n description: The location for the resource\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n multiTarget:\n type: object\n x-dcl-go-name: MultiTarget\n x-dcl-go-type: TargetMultiTarget\n description: Information specifying a multiTarget.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - run\n - customTarget\n required:\n - targetIds\n properties:\n targetIds:\n type: array\n x-dcl-go-name: TargetIds\n description: Required. The target_ids of this multiTarget.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n name:\n type: string\n x-dcl-go-name: Name\n description: Name of the `Target`. Format is `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n x-dcl-has-long-form: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n requireApproval:\n type: boolean\n x-dcl-go-name: RequireApproval\n description: Optional. Whether or not the `Target` requires approval.\n run:\n type: object\n x-dcl-go-name: Run\n x-dcl-go-type: TargetRun\n description: Information specifying a Cloud Run deployment target.\n x-dcl-conflicts:\n - gke\n - anthosCluster\n - multiTarget\n - customTarget\n required:\n - location\n properties:\n location:\n type: string\n x-dcl-go-name: Location\n description: Required. The location where the Cloud Run Service should\n be located. Format is `projects/{project}/locations/{location}`.\n targetId:\n type: string\n x-dcl-go-name: TargetId\n readOnly: true\n description: Output only. Resource id of the `Target`.\n x-kubernetes-immutable: true\n uid:\n type: string\n x-dcl-go-name: Uid\n readOnly: true\n description: Output only. Unique identifier of the `Target`.\n x-kubernetes-immutable: true\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. Most recent time at which the `Target` was updated.\n x-kubernetes-immutable: true\n") -// 12961 bytes -// MD5: af29d8850ca004a1fffe0f13577c3edd +// 13256 bytes +// MD5: 6af2eccf69e0aafa0d3498bc876d8a28 diff --git a/unstructured/google/clouddeploy/alpha/target.go b/unstructured/google/clouddeploy/alpha/target.go index d1eda7fa0..36d76d49d 100755 --- a/unstructured/google/clouddeploy/alpha/target.go +++ b/unstructured/google/clouddeploy/alpha/target.go @@ -103,6 +103,9 @@ func TargetToUnstructured(r *dclService.Target) *unstructured.Resource { if r.Gke.InternalIP != nil { rGke["internalIP"] = *r.Gke.InternalIP } + if r.Gke.ProxyUrl != nil { + rGke["proxyUrl"] = *r.Gke.ProxyUrl + } u.Object["gke"] = rGke } if r.Labels != nil { @@ -304,6 +307,13 @@ func UnstructuredToTarget(u *unstructured.Resource) (*dclService.Target, error) return nil, fmt.Errorf("r.Gke.InternalIP: expected bool") } } + if _, ok := rGke["proxyUrl"]; ok { + if s, ok := rGke["proxyUrl"].(string); ok { + r.Gke.ProxyUrl = dcl.String(s) + } else { + return nil, fmt.Errorf("r.Gke.ProxyUrl: expected string") + } + } } else { return nil, fmt.Errorf("r.Gke: expected map[string]interface{}") } diff --git a/unstructured/google/clouddeploy/beta/target.go b/unstructured/google/clouddeploy/beta/target.go index f315d20ce..79ae2c1d3 100755 --- a/unstructured/google/clouddeploy/beta/target.go +++ b/unstructured/google/clouddeploy/beta/target.go @@ -103,6 +103,9 @@ func TargetToUnstructured(r *dclService.Target) *unstructured.Resource { if r.Gke.InternalIP != nil { rGke["internalIP"] = *r.Gke.InternalIP } + if r.Gke.ProxyUrl != nil { + rGke["proxyUrl"] = *r.Gke.ProxyUrl + } u.Object["gke"] = rGke } if r.Labels != nil { @@ -304,6 +307,13 @@ func UnstructuredToTarget(u *unstructured.Resource) (*dclService.Target, error) return nil, fmt.Errorf("r.Gke.InternalIP: expected bool") } } + if _, ok := rGke["proxyUrl"]; ok { + if s, ok := rGke["proxyUrl"].(string); ok { + r.Gke.ProxyUrl = dcl.String(s) + } else { + return nil, fmt.Errorf("r.Gke.ProxyUrl: expected string") + } + } } else { return nil, fmt.Errorf("r.Gke: expected map[string]interface{}") } diff --git a/unstructured/google/clouddeploy/target.go b/unstructured/google/clouddeploy/target.go index 83b8ca15d..c0ac988c8 100755 --- a/unstructured/google/clouddeploy/target.go +++ b/unstructured/google/clouddeploy/target.go @@ -103,6 +103,9 @@ func TargetToUnstructured(r *dclService.Target) *unstructured.Resource { if r.Gke.InternalIP != nil { rGke["internalIP"] = *r.Gke.InternalIP } + if r.Gke.ProxyUrl != nil { + rGke["proxyUrl"] = *r.Gke.ProxyUrl + } u.Object["gke"] = rGke } if r.Labels != nil { @@ -304,6 +307,13 @@ func UnstructuredToTarget(u *unstructured.Resource) (*dclService.Target, error) return nil, fmt.Errorf("r.Gke.InternalIP: expected bool") } } + if _, ok := rGke["proxyUrl"]; ok { + if s, ok := rGke["proxyUrl"].(string); ok { + r.Gke.ProxyUrl = dcl.String(s) + } else { + return nil, fmt.Errorf("r.Gke.ProxyUrl: expected string") + } + } } else { return nil, fmt.Errorf("r.Gke: expected map[string]interface{}") }