-
Notifications
You must be signed in to change notification settings - Fork 207
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
Adding support for specifying storageClass type #906
Conversation
output of lint, build and test:
|
@nrajb I see some GH Action warnings, can you fix those? Also can you update the documentation to emphasize on GP3 support. |
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.
@nrajb thank you for the contribution, I believe the functionality is valuable.
The way the implementation is done, there a bunch of things that are incorrect atm. I added some minor feedback but let's address the design first.
Core requirements:
- The core ebs-csi addon must be deployed. We don't want the default csi driver to be there at all. Atm, I believe it is just the default csi driver that will be running.
- The return value of the addon must be the addon itself or a construct that depends on the addon.
Explanation:
- You never call super.deploy so the actual ebs csi addon does not get a chance to deploy. I believe your patches are applied to the default storage classes supplied with the cluster creation.
- You return arbitrary things from the deploy method. What we return from this method is used for dependencies. So if I have another dependent on your EBS CSI driver, the expectation is that the CfnAddOn is done, before another addon can install. In your case you return the patch or noop construct.
- The patch and the storage class creation manifest do not depend on anything. they can fire arbitrarily in any order. Expectation: the patch and SC creation happens AFTER the ebs-csi addon is installed. I expect to see this dependency.
These are the major points, happy to answer any questions.
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.
@nrajb looks way better, I added some tactical feedback mostly minor, one functional issue was identified, please address.
@nrajb let's address the remaining feedback, it would be helpful to include this in 1.14 release. |
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.
@nrajb looks great, however please check my comments, you probably inadvertently removed the existing versionMap functionality that we rely on.
saName: "ebs-csi-controller-sa", | ||
storageClass: "gp3", // Set the default StorageClass to gp3 |
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.
@nrajb you removed versionMap from the default props, it has impact on how this addon will behave during build time.
please restore, it will also take care of the warning above stating the versionMap is not used.
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.
corrected
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.
@nrjab please don't resolve conversation, it should be done by the reviewer, otherwise the comments are hidden.
super({ | ||
addOnName: defaultProps.addOnName, | ||
version: options?.version ?? defaultProps.version, | ||
saName: defaultProps.saName, |
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.
same here: versionMap is removed.
@elamaran11 FYI
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.
Corrected!
updateSc.node.addDependency(patchSc); | ||
|
||
return updateSc; | ||
} else |
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.
minor: else clause is redundant, since you are returning updateSc.
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.
So with the new implementation of async deploy(clusterInfo: ClusterInfo): Promise<Construct>
in this proposed changes, if I don't handle return type without else I get following error for async deploy line:
Function lacks ending return statement and return type does not include 'undefined'.ts(2366)
Please suggest @shapirov103
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.
weird, it thinks that base deployment can be undefined. nm, as i said it is minor.
@nrajb Can you make progress with this PR so we can move towards release. Also we see |
Check Markdown links / markdown-link-check (pull_request) Failing after 1m Unrelated doc errors:
|
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.
LGTM pending e2e validation.
updateSc.node.addDependency(patchSc); | ||
|
||
return updateSc; | ||
} else |
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.
weird, it thinks that base deployment can be undefined. nm, as i said it is minor.
/do-e2e-tests |
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.
end to end tests failed. A maintainer can provide more details.
/do-e2e-tests |
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.
end to end tests passed
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.
LGTM
Issue #, if available:
#896
Description of changes:
Adds support for specifying storageClass and deploys required resources as part of post cluster steps
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.