-
Notifications
You must be signed in to change notification settings - Fork 0
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: Pod PVC Chaos #79
Conversation
Created new release based on commit 00b605aRelease tag: v2.6.1-f3-00b60-feature-pvc-chaos |
2179789
to
6d3fb60
Compare
Created new release based on commit 94ad812Release tag: v2.6.1-f3-94ad8-feature-pvc-chaos |
pkg/selector/podpvc/selector.go
Outdated
type PodPVCSpec struct { | ||
Pod types.NamespacedName | ||
PVC types.NamespacedName | ||
// Namespace string `json:"namespace,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come you switched from the commented out implementation? Don't the pod and PVC have to be in the same namespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seemed neater - we need them in this format later, and this is only internal construct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe good to delete the commented out implementation then
pkg/selector/podpvc/selector.go
Outdated
generic.Option | ||
} | ||
|
||
type PodPVCSpec struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this name confusing when reading the Apply
implementation - given the spec suffix on types in api/v1alpha1
.
Maybe PodPVCIdentifier
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at k8sChaos, Target
would be consistent. I copied from ResourceScaleChaos
, I agree it's a bit of a vague name
Created new release based on commit 82caf69Release tag: v2.6.1-f3-82caf-feature-pvc-chaos |
Created new release based on commit f462895Release tag: v2.6.1-f3-f4628-feature-pvc-chaos |
What problem does this PR solve?
Adds new chaos experiment type, which deletes the PVC from a Pod, and restarts the Pod.
What's changed and how it works?
We considered making this an extension to PodChaos, but instead opted for a new chaos type. We reuse the PodSelector from PodChaos, and add a VolumeName field.
Apply deleted both the PVC and the Pod in one pass, I don't think there's any need to wait between these steps.
Tested locally and works ok.
Related changes
UI interface
Cherry-pick to release branches (optional)
Checklist
CHANGELOG
CHANGELOG.md
Tests
Side effects
DCO
If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it: