From 2beee255de109032828ffd5f9f8fb9d62574787b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 10:11:56 -0400 Subject: [PATCH] feat: [container] Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters (#4177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters PiperOrigin-RevId: 524333419 Source-Link: https://github.com/googleapis/googleapis/commit/813f189dfb1c9236b0a0b76c7a71dfcd00b0cf36 Source-Link: https://github.com/googleapis/googleapis-gen/commit/dbfd75eb6e6eb228712d5fb5de980dae72a3a8c0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiZGJmZDc1ZWI2ZTZlYjIyODcxMmQ1ZmI1ZGU5ODBkYWU3MmEzYThjMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters PiperOrigin-RevId: 524334945 Source-Link: https://github.com/googleapis/googleapis/commit/46ae6dff900f5230a229dc4c7048d2be128b47ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/45daacfdbd622abb91daa2e6a11d04eba306040f Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiNDVkYWFjZmRiZDYyMmFiYjkxZGFhMmU2YTExZDA0ZWJhMzA2MDQwZiJ9 * 🦉 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 Co-authored-by: Denis DelGrosso <85250797+ddelgrosso1@users.noreply.github.com> --- .../google/container/v1/cluster_service.proto | 5 +- .../container/v1beta1/cluster_service.proto | 5 +- packages/google-container/protos/protos.d.ts | 12 +++ packages/google-container/protos/protos.js | 100 ++++++++++++++++-- packages/google-container/protos/protos.json | 16 ++- .../snippet_metadata.google.container.v1.json | 2 +- ...pet_metadata.google.container.v1beta1.json | 2 +- 7 files changed, 130 insertions(+), 12 deletions(-) diff --git a/packages/google-container/protos/google/container/v1/cluster_service.proto b/packages/google-container/protos/google/container/v1/cluster_service.proto index 943c0c36f1c..c31b2ff7630 100644 --- a/packages/google-container/protos/google/container/v1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1/cluster_service.proto @@ -2082,7 +2082,10 @@ message ClusterUpdate { // AdditionalPodRangesConfig is the configuration for additional pod secondary // ranges supporting the ClusterUpdate message. -message AdditionalPodRangesConfig {} +message AdditionalPodRangesConfig { + // Name for pod secondary ipv4 range which has the actual range defined ahead. + repeated string pod_range_names = 1; +} // This operation resource represents operations that may have happened or are // happening on the cluster. All fields are output only. diff --git a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto index b36c5474927..32798c242d8 100644 --- a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto @@ -2333,7 +2333,10 @@ message ClusterUpdate { // AdditionalPodRangesConfig is the configuration for additional pod secondary // ranges supporting the ClusterUpdate message. -message AdditionalPodRangesConfig {} +message AdditionalPodRangesConfig { + // Name for pod secondary ipv4 range which has the actual range defined ahead. + repeated string pod_range_names = 1; +} // This operation resource represents operations that may have happened or are // happening on the cluster. All fields are output only. diff --git a/packages/google-container/protos/protos.d.ts b/packages/google-container/protos/protos.d.ts index 5ee25dc33fd..d63df9dae9d 100644 --- a/packages/google-container/protos/protos.d.ts +++ b/packages/google-container/protos/protos.d.ts @@ -6325,6 +6325,9 @@ export namespace google { /** Properties of an AdditionalPodRangesConfig. */ interface IAdditionalPodRangesConfig { + + /** AdditionalPodRangesConfig podRangeNames */ + podRangeNames?: (string[]|null); } /** Represents an AdditionalPodRangesConfig. */ @@ -6336,6 +6339,9 @@ export namespace google { */ constructor(properties?: google.container.v1.IAdditionalPodRangesConfig); + /** AdditionalPodRangesConfig podRangeNames. */ + public podRangeNames: string[]; + /** * Creates a new AdditionalPodRangesConfig instance using the specified properties. * @param [properties] Properties to set @@ -26564,6 +26570,9 @@ export namespace google { /** Properties of an AdditionalPodRangesConfig. */ interface IAdditionalPodRangesConfig { + + /** AdditionalPodRangesConfig podRangeNames */ + podRangeNames?: (string[]|null); } /** Represents an AdditionalPodRangesConfig. */ @@ -26575,6 +26584,9 @@ export namespace google { */ constructor(properties?: google.container.v1beta1.IAdditionalPodRangesConfig); + /** AdditionalPodRangesConfig podRangeNames. */ + public podRangeNames: string[]; + /** * Creates a new AdditionalPodRangesConfig instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-container/protos/protos.js b/packages/google-container/protos/protos.js index 22688e9bd76..2b0e2693399 100644 --- a/packages/google-container/protos/protos.js +++ b/packages/google-container/protos/protos.js @@ -16364,6 +16364,7 @@ * Properties of an AdditionalPodRangesConfig. * @memberof google.container.v1 * @interface IAdditionalPodRangesConfig + * @property {Array.|null} [podRangeNames] AdditionalPodRangesConfig podRangeNames */ /** @@ -16375,12 +16376,21 @@ * @param {google.container.v1.IAdditionalPodRangesConfig=} [properties] Properties to set */ function AdditionalPodRangesConfig(properties) { + this.podRangeNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } + /** + * AdditionalPodRangesConfig podRangeNames. + * @member {Array.} podRangeNames + * @memberof google.container.v1.AdditionalPodRangesConfig + * @instance + */ + AdditionalPodRangesConfig.prototype.podRangeNames = $util.emptyArray; + /** * Creates a new AdditionalPodRangesConfig instance using the specified properties. * @function create @@ -16405,6 +16415,9 @@ AdditionalPodRangesConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.podRangeNames != null && message.podRangeNames.length) + for (var i = 0; i < message.podRangeNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.podRangeNames[i]); return writer; }; @@ -16439,6 +16452,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.podRangeNames && message.podRangeNames.length)) + message.podRangeNames = []; + message.podRangeNames.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -16474,6 +16493,13 @@ AdditionalPodRangesConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.podRangeNames != null && message.hasOwnProperty("podRangeNames")) { + if (!Array.isArray(message.podRangeNames)) + return "podRangeNames: array expected"; + for (var i = 0; i < message.podRangeNames.length; ++i) + if (!$util.isString(message.podRangeNames[i])) + return "podRangeNames: string[] expected"; + } return null; }; @@ -16488,7 +16514,15 @@ AdditionalPodRangesConfig.fromObject = function fromObject(object) { if (object instanceof $root.google.container.v1.AdditionalPodRangesConfig) return object; - return new $root.google.container.v1.AdditionalPodRangesConfig(); + var message = new $root.google.container.v1.AdditionalPodRangesConfig(); + if (object.podRangeNames) { + if (!Array.isArray(object.podRangeNames)) + throw TypeError(".google.container.v1.AdditionalPodRangesConfig.podRangeNames: array expected"); + message.podRangeNames = []; + for (var i = 0; i < object.podRangeNames.length; ++i) + message.podRangeNames[i] = String(object.podRangeNames[i]); + } + return message; }; /** @@ -16500,8 +16534,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdditionalPodRangesConfig.toObject = function toObject() { - return {}; + AdditionalPodRangesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.podRangeNames = []; + if (message.podRangeNames && message.podRangeNames.length) { + object.podRangeNames = []; + for (var j = 0; j < message.podRangeNames.length; ++j) + object.podRangeNames[j] = message.podRangeNames[j]; + } + return object; }; /** @@ -67619,6 +67663,7 @@ * Properties of an AdditionalPodRangesConfig. * @memberof google.container.v1beta1 * @interface IAdditionalPodRangesConfig + * @property {Array.|null} [podRangeNames] AdditionalPodRangesConfig podRangeNames */ /** @@ -67630,12 +67675,21 @@ * @param {google.container.v1beta1.IAdditionalPodRangesConfig=} [properties] Properties to set */ function AdditionalPodRangesConfig(properties) { + this.podRangeNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } + /** + * AdditionalPodRangesConfig podRangeNames. + * @member {Array.} podRangeNames + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @instance + */ + AdditionalPodRangesConfig.prototype.podRangeNames = $util.emptyArray; + /** * Creates a new AdditionalPodRangesConfig instance using the specified properties. * @function create @@ -67660,6 +67714,9 @@ AdditionalPodRangesConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.podRangeNames != null && message.podRangeNames.length) + for (var i = 0; i < message.podRangeNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.podRangeNames[i]); return writer; }; @@ -67694,6 +67751,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.podRangeNames && message.podRangeNames.length)) + message.podRangeNames = []; + message.podRangeNames.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -67729,6 +67792,13 @@ AdditionalPodRangesConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.podRangeNames != null && message.hasOwnProperty("podRangeNames")) { + if (!Array.isArray(message.podRangeNames)) + return "podRangeNames: array expected"; + for (var i = 0; i < message.podRangeNames.length; ++i) + if (!$util.isString(message.podRangeNames[i])) + return "podRangeNames: string[] expected"; + } return null; }; @@ -67743,7 +67813,15 @@ AdditionalPodRangesConfig.fromObject = function fromObject(object) { if (object instanceof $root.google.container.v1beta1.AdditionalPodRangesConfig) return object; - return new $root.google.container.v1beta1.AdditionalPodRangesConfig(); + var message = new $root.google.container.v1beta1.AdditionalPodRangesConfig(); + if (object.podRangeNames) { + if (!Array.isArray(object.podRangeNames)) + throw TypeError(".google.container.v1beta1.AdditionalPodRangesConfig.podRangeNames: array expected"); + message.podRangeNames = []; + for (var i = 0; i < object.podRangeNames.length; ++i) + message.podRangeNames[i] = String(object.podRangeNames[i]); + } + return message; }; /** @@ -67755,8 +67833,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdditionalPodRangesConfig.toObject = function toObject() { - return {}; + AdditionalPodRangesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.podRangeNames = []; + if (message.podRangeNames && message.podRangeNames.length) { + object.podRangeNames = []; + for (var j = 0; j < message.podRangeNames.length; ++j) + object.podRangeNames[j] = message.podRangeNames[j]; + } + return object; }; /** diff --git a/packages/google-container/protos/protos.json b/packages/google-container/protos/protos.json index 9a57b9261ae..69eb04a4a1b 100644 --- a/packages/google-container/protos/protos.json +++ b/packages/google-container/protos/protos.json @@ -2255,7 +2255,13 @@ } }, "AdditionalPodRangesConfig": { - "fields": {} + "fields": { + "podRangeNames": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } }, "Operation": { "fields": { @@ -7592,7 +7598,13 @@ } }, "AdditionalPodRangesConfig": { - "fields": {} + "fields": { + "podRangeNames": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } }, "Operation": { "fields": { diff --git a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json index ca0c108974a..bfcb3760126 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "4.7.1", + "version": "4.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json index ebe0e50545c..6496b764517 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "4.7.1", + "version": "4.8.0", "language": "TYPESCRIPT", "apis": [ {