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

Make the cache size field immutable #42

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

ialidzhikov
Copy link
Member

@ialidzhikov ialidzhikov commented Sep 8, 2023

How to categorize this PR?

/kind enhancement

What this PR does / why we need it:
Currently we are using StatefulSet volumeClaimTemplate to provision the PVC. However the corresponding StatefulSet field that controls the PVC size is immutable. It is not possible to resize/enlarge the underlying PVC through the StatefulSet spec. See kubernetes/enhancements#661 This commit makes the cache size field immutable until we decide how to implement the resize.

GRM currently does not try to update the volumeClaimTemplates of a StatefulSet as the field is immutable. See https://github.com/gardener/gardener/blob/292970d299b4a5b113c148fc23488b11542c8dd5/pkg/resourcemanager/controller/managedresource/merger.go#L284-L287. Hence, updating the cache's size via the Shoot spec gives the impression that the update went through and was successful but actually the update does not happen at all.

Which issue(s) this PR fixes:
Part of #3

Special notes for your reviewer:
N/A

Release note:

NONE

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Sep 8, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@gardener-prow gardener-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/enhancement Enhancement, improvement, extension labels Sep 8, 2023
@gardener-prow gardener-prow bot added cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 8, 2023
@ialidzhikov ialidzhikov force-pushed the enh/immutable-cache-size branch from 658c5ea to 29c6514 Compare September 11, 2023 13:23
@gardener-prow gardener-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 11, 2023
@ialidzhikov ialidzhikov marked this pull request as ready for review September 11, 2023 13:24
@gardener-prow gardener-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 11, 2023
@ialidzhikov ialidzhikov force-pushed the enh/immutable-cache-size branch from 29c6514 to edff842 Compare September 29, 2023 06:41
@ialidzhikov
Copy link
Member Author

/test pull-gardener-extension-registry-cache-e2e-kind

@dimitar-kostadinov
Copy link
Contributor

/assign

Copy link
Contributor

@dimitar-kostadinov dimitar-kostadinov left a comment

Choose a reason for hiding this comment

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

Two minor nits, otherwise looks good

pkg/admission/validator/helper.go Outdated Show resolved Hide resolved
pkg/apis/registry/helper/helper.go Outdated Show resolved Hide resolved
Currently we are using StatefulSet volumeClaimTemplate to provision the PVC. However the corresponding StatefulSet field that controls the PVC size is immutable. It is not possible to resize/enlarge the underlying PVC through the StatefulSet spec. See kubernetes/enhancements#661
This commit makes the cache size field immutable until we decide how to implement the resize.
@ialidzhikov ialidzhikov force-pushed the enh/immutable-cache-size branch 3 times, most recently from 7eb9911 to 78c4191 Compare October 9, 2023 06:35
@ialidzhikov ialidzhikov force-pushed the enh/immutable-cache-size branch from 78c4191 to abe4c17 Compare October 10, 2023 07:10
Copy link
Contributor

@dimitar-kostadinov dimitar-kostadinov left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 10, 2023
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 10, 2023

LGTM label has been added.

Git tree hash: 9e2a4391ec3cc797d884016a495eda7708c90c02

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dimitar-kostadinov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 10, 2023
@gardener-prow gardener-prow bot merged commit 1c84298 into gardener:main Oct 10, 2023
1 check passed
@ialidzhikov ialidzhikov deleted the enh/immutable-cache-size branch October 10, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants