Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: [GkeMultiCloud] option to ignore_errors while deleting Azure clusters / nodepools #7304

Merged
merged 2 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions GkeMultiCloud/metadata/V1/AzureService.php

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 @@ -57,8 +57,8 @@
* You can list all supported versions on a given Google Cloud region by
* calling
* [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
* @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM role assigned to nodes in the
* pool.
* @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM instance profile to assign to
* nodes in the pool.
* @param string $awsNodePoolConfigConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data.
* @param int $awsNodePoolAutoscalingMinNodeCount Minimum number of nodes in the node pool. Must be greater than or
* equal to 1 and less than or equal to max_node_count.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
* You can list all supported versions on a given Google Cloud region by
* calling
* [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
* @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM role assigned to nodes in the
* pool.
* @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM instance profile to assign to
* nodes in the pool.
* @param string $awsNodePoolConfigConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data.
* @param int $awsNodePoolAutoscalingMinNodeCount Minimum number of nodes in the node pool. Must be greater than or
* equal to 1 and less than or equal to max_node_count.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*
* @param string $formattedAzureCluster The AzureCluster, which owns the JsonWebKeys.
* Format:
* projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
* Please see {@see AzureClustersClient::azureClusterName()} for help formatting this field.
*/
function get_azure_json_web_keys_sample(string $formattedAzureCluster): void
Expand Down
16 changes: 8 additions & 8 deletions GkeMultiCloud/src/V1/AwsNodeConfig.php

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

46 changes: 46 additions & 0 deletions GkeMultiCloud/src/V1/DeleteAzureClusterRequest.php

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

46 changes: 46 additions & 0 deletions GkeMultiCloud/src/V1/DeleteAzureNodePoolRequest.php

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

20 changes: 19 additions & 1 deletion GkeMultiCloud/src/V1/Gapic/AzureClustersGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,11 @@ public function deleteAzureClient($name, array $optionalArgs = [])
*
* If the provided etag does not match the current etag of the cluster,
* the request will fail and an ABORTED error will be returned.
* @type bool $ignoreErrors
* Optional. If set to true, the deletion of
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will
* succeed even if errors occur during deleting in cluster resources. Using
* this parameter may result in orphaned resources in the cluster.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
Expand Down Expand Up @@ -1039,6 +1044,10 @@ public function deleteAzureCluster($name, array $optionalArgs = [])
$request->setEtag($optionalArgs['etag']);
}

if (isset($optionalArgs['ignoreErrors'])) {
$request->setIgnoreErrors($optionalArgs['ignoreErrors']);
}

$requestParams = new RequestParamsHeaderDescriptor(
$requestParamHeaders
);
Expand Down Expand Up @@ -1125,6 +1134,11 @@ public function deleteAzureCluster($name, array $optionalArgs = [])
*
* If the provided ETag does not match the current etag of the node pool,
* the request will fail and an ABORTED error will be returned.
* @type bool $ignoreErrors
* Optional. If set to true, the deletion of
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will
* succeed even if errors occur during deleting in node pool resources. Using
* this parameter may result in orphaned resources in the node pool.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
Expand Down Expand Up @@ -1153,6 +1167,10 @@ public function deleteAzureNodePool($name, array $optionalArgs = [])
$request->setEtag($optionalArgs['etag']);
}

if (isset($optionalArgs['ignoreErrors'])) {
$request->setIgnoreErrors($optionalArgs['ignoreErrors']);
}

$requestParams = new RequestParamsHeaderDescriptor(
$requestParamHeaders
);
Expand Down Expand Up @@ -1458,7 +1476,7 @@ public function getAzureCluster($name, array $optionalArgs = [])
*
* @param string $azureCluster Required. The AzureCluster, which owns the JsonWebKeys.
* Format:
* projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
* @param array $optionalArgs {
* Optional.
*
Expand Down
10 changes: 5 additions & 5 deletions GkeMultiCloud/src/V1/GetAzureJsonWebKeysRequest.php

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

Loading