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

Volume Health Monitoring #1495

Closed

Conversation

ConnorJC3
Copy link
Contributor

Is this a bug fix or adding new feature?

Feature

What is this PR about? / Why do we need it?

Implements https://kubernetes.io/docs/concepts/storage/volume-health-monitoring/

What testing is done?

Manually tested, as well as significant additional tests in-driver

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 24, 2023
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 24, 2023
@ConnorJC3 ConnorJC3 force-pushed the volume-health-monitoring branch 7 times, most recently from 9cfe524 to b6bed59 Compare January 24, 2023 23:15
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 25, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 25, 2023
@ConnorJC3
Copy link
Contributor Author

/hold

Known caveats:

Using non EKS-D sidecar until their team can build the external health monitor sidecar as well.

We should consider what the appropriate timing is for health checks, the default is once per minute per volume.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2023
Copy link
Member

@torredil torredil left a comment

Choose a reason for hiding this comment

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

Largely lgtm besides a few suggestions and really minor nits.

Let's add a test case for the volume-health-monitoring flag in TestControllerOptions:

func TestControllerOptions(t *testing.T) {

		{
			name:  "lookup volume-health-monitoring",
			flag:  "volume-health-monitoring",
			found: true,
		},

docs/volume-health-monitoring.md Outdated Show resolved Hide resolved
@@ -89,6 +89,17 @@ sidecars:
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
healthMonitor:
Copy link
Member

Choose a reason for hiding this comment

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

We should consider allowing users to specify their own monitoring interval via the monitor-interval flag: https://github.com/kubernetes-csi/external-health-monitor/blob/f11edf7690317fbad79ac0506a166eef3d78bf18/cmd/csi-external-health-monitor-controller/main.go#L55

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Leaving this open until we decide what the default for monitor-interval will be.

Copy link
Contributor

Choose a reason for hiding this comment

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

Every configuration option represents a failure of the software to do the right thing automatically. Every configuration option needs to be documented and protected by unit tests, thereby increasing the cognitive load of user and developer alike. Sometimes they are necessary, but only as a last resort.

docs/volume-health-monitoring.md Outdated Show resolved Hide resolved
charts/aws-ebs-csi-driver/values.yaml Show resolved Hide resolved
docs/volume-health-monitoring.md Outdated Show resolved Hide resolved
"Action": [
"ec2:DescribeVolumeStatus"
],
"Resource": "*"
Copy link
Contributor

Choose a reason for hiding this comment

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

How about restricting to just volumes created by the CSI driver?

Copy link
Contributor Author

@ConnorJC3 ConnorJC3 Jan 30, 2023

Choose a reason for hiding this comment

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

I think documenting how to do that is better left to #1340. Right now, our default example IAM policy gives the driver global permissions for several APIs like DescribeVolumes

Copy link
Contributor

Choose a reason for hiding this comment

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

If you're going to add to the entropy that #1340 has to clean up, at least leave a note (if not a new rev) over there.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rdpsin

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 25, 2023
@ConnorJC3
Copy link
Contributor Author

Fixed most of the review comments, ready for re-review on anything marked resolved.

Thinking about also using this PR to implement ListVolumes to optimize API calls.

pkg/cloud/cloud.go Outdated Show resolved Hide resolved
Signed-off-by: Connor Catlett <conncatl@amazon.com>
Signed-off-by: Connor Catlett <conncatl@amazon.com>
@k8s-ci-robot k8s-ci-robot removed the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Feb 10, 2023
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 10, 2023
Signed-off-by: Connor Catlett <conncatl@amazon.com>
Signed-off-by: Connor Catlett <conncatl@amazon.com>
Signed-off-by: Connor Catlett <conncatl@amazon.com>
@ConnorJC3
Copy link
Contributor Author

Closing this for now because it's stale and will likely be reworked

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants