Skip to content

Commit

Permalink
feat: added support for k8s_version field (#130)
Browse files Browse the repository at this point in the history
* feat: added support for k8s_version field
docs: k8s_version field is not part of resource_options struct

Clients now generate the V1 or V1beta1 CRD based on Kubernetes server version.

PiperOrigin-RevId: 430569173

Source-Link: googleapis/googleapis@3c17193

Source-Link: googleapis/googleapis-gen@ae78440
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWU3ODQ0MDZlMzAwYmYxYzU2ZDUwMTExMzM4YjkyNzJmYjA0NzNiNSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 24, 2022
1 parent ff0c4d0 commit d9ccb53
Show file tree
Hide file tree
Showing 11 changed files with 235 additions and 156 deletions.

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions packages/google-cloud-gkehub/protos/protos.d.ts

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

22 changes: 22 additions & 0 deletions packages/google-cloud-gkehub/protos/protos.js

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

7 changes: 7 additions & 0 deletions packages/google-cloud-gkehub/protos/protos.json

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

Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ function main(parent, membershipId, resource) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent (project and location) where the Memberships will be created.
* Specified in the format `projects/* /locations/*`.
* Required. The parent (project and location) where the Memberships will be
* created. Specified in the format `projects/* /locations/*`.
*/
// const parent = 'abc123'
/**
* Required. Client chosen ID for the membership. `membership_id` must be a valid RFC
* 1123 compliant DNS label:
* Required. Client chosen ID for the membership. `membership_id` must be a
* valid RFC 1123 compliant DNS label:
* 1. At most 63 characters in length
* 2. It must consist of lower case alphanumeric characters or `-`
* 3. It must start and end with an alphanumeric character
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ function main(name) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Membership resource name the Agent will associate with, in the format
* `projects/* /locations/* /memberships/*`.
* Required. The Membership resource name the Agent will associate with, in
* the format `projects/* /locations/* /memberships/*`.
*/
// const name = 'abc123'
/**
* Optional. The connect agent to generate manifest for.
*/
// const connectAgent = {}
/**
* Optional. The Connect agent version to use. Defaults to the most current version.
* Optional. The Connect agent version to use. Defaults to the most current
* version.
*/
// const version = 'abc123'
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ function main(parent) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent (project and location) where the Memberships will be listed.
* Specified in the format `projects/* /locations/*`.
* Required. The parent (project and location) where the Memberships will be
* listed. Specified in the format `projects/* /locations/*`.
*/
// const parent = 'abc123'
/**
* Optional. When requesting a 'page' of resources, `page_size` specifies number of
* resources to return. If unspecified or set to 0, all resources will
* be returned.
* Optional. When requesting a 'page' of resources, `page_size` specifies
* number of resources to return. If unspecified or set to 0, all resources
* will be returned.
*/
// const pageSize = 1234
/**
Expand All @@ -43,8 +43,8 @@ function main(parent) {
*/
// const pageToken = 'abc123'
/**
* Optional. Lists Memberships that match the filter expression, following the syntax
* outlined in https://google.aip.dev/160.
* Optional. Lists Memberships that match the filter expression, following the
* syntax outlined in https://google.aip.dev/160.
* Examples:
* - Name is `bar` in project `foo-proj` and location `global`:
* name = "projects/foo-proj/locations/global/membership/bar"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function main(name, updateMask, resource) {
*/
// const name = 'abc123'
/**
* Required. Mask of fields to update. At least one field path must be specified in this
* mask.
* Required. Mask of fields to update. At least one field path must be
* specified in this mask.
*/
// const updateMask = {}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ function main(parent, intendedMembership) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent (project and location) where the Memberships will be created.
* Specified in the format `projects/* /locations/*`.
* Required. The parent (project and location) where the Memberships will be
* created. Specified in the format `projects/* /locations/*`.
*/
// const parent = 'abc123'
/**
* Optional. The YAML of the membership CR in the cluster. Empty if the membership
* CR does not exist.
* Optional. The YAML of the membership CR in the cluster. Empty if the
* membership CR does not exist.
*/
// const crManifest = 'abc123'
/**
* Required. The intended membership name under the `parent`. This method only does
* validation in anticipation of a CreateMembership call with the same name.
* Required. The intended membership name under the `parent`. This method only
* does validation in anticipation of a CreateMembership call with the same
* name.
*/
// const intendedMembership = 'abc123'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
"segments": [
{
"start": 25,
"end": 73,
"end": 74,
"type": "FULL"
}
],
Expand Down Expand Up @@ -326,7 +326,7 @@
"segments": [
{
"start": 25,
"end": 62,
"end": 63,
"type": "FULL"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ const version = require('../../../package.json').version;

/**
* The GKE Hub MembershipService handles the registration of many Kubernetes
* clusters to Google Cloud, represented with the {@link google.cloud.gkehub.v1beta1.Membership|Membership} resource.
* clusters to Google Cloud, represented with the
* {@link google.cloud.gkehub.v1beta1.Membership|Membership} resource.
*
* GKE Hub is currently only available in the global region.
*
Expand Down Expand Up @@ -484,12 +485,13 @@ export class GkeHubMembershipServiceClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The Membership resource name the Agent will associate with, in the format
* `projects/* /locations/* /memberships/*`.
* Required. The Membership resource name the Agent will associate with, in
* the format `projects/* /locations/* /memberships/*`.
* @param {google.cloud.gkehub.v1beta1.ConnectAgent} [request.connectAgent]
* Optional. The connect agent to generate manifest for.
* @param {string} [request.version]
* Optional. The Connect agent version to use. Defaults to the most current version.
* Optional. The Connect agent version to use. Defaults to the most current
* version.
* @param {boolean} [request.isUpgrade]
* Optional. If true, generate the resources for upgrade only. Some resources
* generated only for installation (e.g. secrets) will be excluded.
Expand Down Expand Up @@ -599,14 +601,15 @@ export class GkeHubMembershipServiceClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent (project and location) where the Memberships will be created.
* Specified in the format `projects/* /locations/*`.
* Required. The parent (project and location) where the Memberships will be
* created. Specified in the format `projects/* /locations/*`.
* @param {string} [request.crManifest]
* Optional. The YAML of the membership CR in the cluster. Empty if the membership
* CR does not exist.
* Optional. The YAML of the membership CR in the cluster. Empty if the
* membership CR does not exist.
* @param {string} request.intendedMembership
* Required. The intended membership name under the `parent`. This method only does
* validation in anticipation of a CreateMembership call with the same name.
* Required. The intended membership name under the `parent`. This method only
* does validation in anticipation of a CreateMembership call with the same
* name.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
Expand Down Expand Up @@ -829,11 +832,11 @@ export class GkeHubMembershipServiceClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent (project and location) where the Memberships will be created.
* Specified in the format `projects/* /locations/*`.
* Required. The parent (project and location) where the Memberships will be
* created. Specified in the format `projects/* /locations/*`.
* @param {string} request.membershipId
* Required. Client chosen ID for the membership. `membership_id` must be a valid RFC
* 1123 compliant DNS label:
* Required. Client chosen ID for the membership. `membership_id` must be a
* valid RFC 1123 compliant DNS label:
*
* 1. At most 63 characters in length
* 2. It must consist of lower case alphanumeric characters or `-`
Expand Down Expand Up @@ -1152,8 +1155,8 @@ export class GkeHubMembershipServiceClient {
* Required. The membership resource name in the format:
* `projects/[project_id]/locations/global/memberships/[membership_id]`
* @param {google.protobuf.FieldMask} request.updateMask
* Required. Mask of fields to update. At least one field path must be specified in this
* mask.
* Required. Mask of fields to update. At least one field path must be
* specified in this mask.
* @param {google.cloud.gkehub.v1beta1.Membership} request.resource
* Required. Only fields specified in update_mask are updated.
* If you specify a field in the update_mask but don't specify its value here
Expand Down Expand Up @@ -1313,19 +1316,19 @@ export class GkeHubMembershipServiceClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent (project and location) where the Memberships will be listed.
* Specified in the format `projects/* /locations/*`.
* Required. The parent (project and location) where the Memberships will be
* listed. Specified in the format `projects/* /locations/*`.
* @param {number} [request.pageSize]
* Optional. When requesting a 'page' of resources, `page_size` specifies number of
* resources to return. If unspecified or set to 0, all resources will
* be returned.
* Optional. When requesting a 'page' of resources, `page_size` specifies
* number of resources to return. If unspecified or set to 0, all resources
* will be returned.
* @param {string} [request.pageToken]
* Optional. Token returned by previous call to `ListMemberships` which
* specifies the position in the list from where to continue listing the
* resources.
* @param {string} [request.filter]
* Optional. Lists Memberships that match the filter expression, following the syntax
* outlined in https://google.aip.dev/160.
* Optional. Lists Memberships that match the filter expression, following the
* syntax outlined in https://google.aip.dev/160.
*
* Examples:
*
Expand Down Expand Up @@ -1440,19 +1443,19 @@ export class GkeHubMembershipServiceClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent (project and location) where the Memberships will be listed.
* Specified in the format `projects/* /locations/*`.
* Required. The parent (project and location) where the Memberships will be
* listed. Specified in the format `projects/* /locations/*`.
* @param {number} [request.pageSize]
* Optional. When requesting a 'page' of resources, `page_size` specifies number of
* resources to return. If unspecified or set to 0, all resources will
* be returned.
* Optional. When requesting a 'page' of resources, `page_size` specifies
* number of resources to return. If unspecified or set to 0, all resources
* will be returned.
* @param {string} [request.pageToken]
* Optional. Token returned by previous call to `ListMemberships` which
* specifies the position in the list from where to continue listing the
* resources.
* @param {string} [request.filter]
* Optional. Lists Memberships that match the filter expression, following the syntax
* outlined in https://google.aip.dev/160.
* Optional. Lists Memberships that match the filter expression, following the
* syntax outlined in https://google.aip.dev/160.
*
* Examples:
*
Expand Down Expand Up @@ -1515,19 +1518,19 @@ export class GkeHubMembershipServiceClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent (project and location) where the Memberships will be listed.
* Specified in the format `projects/* /locations/*`.
* Required. The parent (project and location) where the Memberships will be
* listed. Specified in the format `projects/* /locations/*`.
* @param {number} [request.pageSize]
* Optional. When requesting a 'page' of resources, `page_size` specifies number of
* resources to return. If unspecified or set to 0, all resources will
* be returned.
* Optional. When requesting a 'page' of resources, `page_size` specifies
* number of resources to return. If unspecified or set to 0, all resources
* will be returned.
* @param {string} [request.pageToken]
* Optional. Token returned by previous call to `ListMemberships` which
* specifies the position in the list from where to continue listing the
* resources.
* @param {string} [request.filter]
* Optional. Lists Memberships that match the filter expression, following the syntax
* outlined in https://google.aip.dev/160.
* Optional. Lists Memberships that match the filter expression, following the
* syntax outlined in https://google.aip.dev/160.
*
* Examples:
*
Expand Down

0 comments on commit d9ccb53

Please sign in to comment.