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

EVEREST-1874 | support volume expansion for PXC #688

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mayankshah1607
Copy link
Member

CHANGE DESCRIPTION

Problem:
EVEREST-0

Short explanation of the problem.

Related pull requests

  • [link]

Cause:
Short explanation of the root cause of the issue if applicable.

Solution:
Short explanation of the solution we are providing with this PR.

CHECKLIST

Helm chart

  • Is the helm chart updated with the new changes? (if applicable)

Jira

  • Is the Jira ticket created and referenced properly?

Tests

  • Is an Integration test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>
Signed-off-by: Mayank Shah <[email protected]>

// StorageClassSupportsVolumeExpansion returns true if the storage class supports volume expansion.
// If className is unspecified, uses the default storage class
func StorageClassSupportsVolumeExpansion(c client.Client, ctx context.Context, className *string) (bool, error) {
Copy link

Choose a reason for hiding this comment

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

🚫 [golangci-lint] reported by reviewdog 🐶
context-as-argument: context.Context should be the first parameter of a function (revive)

return *storageClass.AllowVolumeExpansion, nil
}

func getStorageClassOrDefault(c client.Client, ctx context.Context, scName *string) (*storagev1.StorageClass, error) {
Copy link

Choose a reason for hiding this comment

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

🚫 [golangci-lint] reported by reviewdog 🐶
context-as-argument: context.Context should be the first parameter of a function (revive)

@@ -73,6 +75,63 @@ func (p *applier) AllowUnsafeConfig() {
}
}

func configureStorage(
c client.Client,
ctx context.Context,
Copy link

Choose a reason for hiding this comment

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

🚫 [golangci-lint] reported by reviewdog 🐶
context-as-argument: context.Context should be the first parameter of a function (revive)

storageClassDefaultAnnotation = "storageclass.kubernetes.io/is-default-class"
)

// StorageClassSupportsVolumeExpansion returns true if the storage class supports volume expansion.
Copy link

Choose a reason for hiding this comment

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

🚫 [golangci-lint] reported by reviewdog 🐶
Comment should end in a period (godot)

return &sc, nil
}
}
return nil, fmt.Errorf("no default storage class found")
Copy link

Choose a reason for hiding this comment

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

🚫 [golangci-lint] reported by reviewdog 🐶
fmt.Errorf can be replaced with errors.New (perfsprint)

@mayankshah1607 mayankshah1607 added the test/e2e-core Run core E2E test suite label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test/e2e-core Run core E2E test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant