Skip to content

Conversation

@hebelsan
Copy link
Contributor

@hebelsan hebelsan commented Apr 23, 2025

What this PR does / why we need it:
This PR enables extensions to pass values for the storagePool field in the provider spec.
See also https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Add storagePool field to provider spec

@hebelsan hebelsan requested review from a team as code owners April 23, 2025 13:32
@gardener-robot gardener-robot added needs/review Needs review size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) labels Apr 23, 2025
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 23, 2025
@hebelsan
Copy link
Contributor Author

Corresponding extension PR:
gardener/gardener-extension-provider-gcp#1046

@takoverflow takoverflow added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 24, 2025
@gardener-robot-ci-2 gardener-robot-ci-2 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 24, 2025
// StoragePool in which the new disk is created.
// You can provide this as a partial or full URL to the resource. For example
// https://www.googleapis.com/compute/v1/projects/project/zones/zone
StoragePool string `json:"storagePool,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For backward compatibility, shouldn't this field be optional, i.e. of type *string and use it only when it is set?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only place where we use this param is here.
And by default, AttachedDiskInitializeParams fields with empty or default values are omitted from API requests.
So unless we set it from outside it will be basically ignored.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is not real API resource, it is just used for parsing yaml documents which are usually coming from providerConfig somewhere in a shoot manifest. In this case, it could be safe to not use pointers, but generally it would be nice to follow some conventions like https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md#new-field-in-existing-api-version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted the PR to use *string instead.

@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jun 18, 2025
Copy link
Member

@aaronfern aaronfern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hebelsan
really sorry for the delayed review
In general seems fine, just one question, please address that

# kmsKeyServiceAccount: "[email protected]" # email of service account (optional)
# provisionedIops: 3000 # IOPS that the disk can handle (optional)
# provisionedThroughput: 140 # throughput unit in MB per sec (optional)
# storagePool: zones/zone/storagePools/storagePool # StoragePool where the new disk is created (optional)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these values fair and sensible defaults?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I interpreted your comment exactly right, but I tweaked the storagePool field in the example to make it a bit clearer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is clear enough now
Thank you!

@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Sep 30, 2025
Copy link
Member

@aaronfern aaronfern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels Sep 30, 2025
@aaronfern aaronfern merged commit ff90e6f into gardener:master Sep 30, 2025
11 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants