Skip to content

Add mutator functions to allow modify the Kubernetes resources used b… #176

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

Merged

Conversation

dannawang0221
Copy link
Contributor

…y volume population

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test

/kind feature

/kind flake

What this PR does / why we need it:
In some cases we might want to customize the default Kubernetes objects in volume populator, so add plugin functions to allow modification for the objects.

  • Add MutatorConfig to Volume Populator Controller to allow specify mutator functions to modify the Kubernetes resources used by volume populator
  • Add the PvcPrimeMutator to allow modify PVC prime before object creation

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Add MutatorConfig to Volume Populator Controller to allow specify mutator functions to modify the Kubernetes resources used for volume population. Add the PvcPrimeMutator function to allow modify PVC prime before object creation

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Dec 26, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 26, 2024
@dannawang0221
Copy link
Contributor Author

/assign @msau42

@dannawang0221
Copy link
Contributor Author

/assign @pwschuurman

@pwschuurman
Copy link

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 28, 2024
@pwschuurman
Copy link

/approve

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 30, 2024
@@ -189,6 +194,19 @@ type PopulatorParams struct {
Recorder record.EventRecorder
}

type MutatorConfig struct {
// PvcPrimeMutator is the mutator function for pvcPrime
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment about when this will be called.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@msau42
Copy link
Contributor

msau42 commented Jan 2, 2025

Thanks, can you squash the commits?

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dannawang0221, msau42, pwschuurman

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 2, 2025
@msau42
Copy link
Contributor

msau42 commented Jan 2, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 2, 2025
@k8s-ci-robot k8s-ci-robot merged commit 490ae27 into kubernetes-csi:master Jan 2, 2025
2 of 3 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

5 participants