-
Notifications
You must be signed in to change notification settings - Fork 151
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
Document and add validation on enable_cri_dockerd option #415
Document and add validation on enable_cri_dockerd option #415
Conversation
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.
Note: There was significant discussion around the decision for the RKE enable_cri_dockerd
option and this was the simplest solution instead of handling the value in an unexpected way on the backend based on the version of the cluster. Once k8s 1.23 is deprecated, we will update the default to true and users can provision RKE clusters without manually setting the value.
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.
Can you add validation for the provider to error out if a user sets false
on a 1.24+ cluster? Either in a ValidateFunc or if you don't have access to the k8s version, perhaps here
terraform-provider-rke/rke/structure_rke_cluster.go
Lines 91 to 93 in 1a25755
if _, ok := d.Get("enable_cri_dockerd").(bool); ok && in.EnableCRIDockerd != nil { | |
d.Set("enable_cri_dockerd", *in.EnableCRIDockerd) | |
} |
Thank you @jiaqiluo for the feedback!
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 now, please squash on merge
Issue: #404
Problem
K8s 1.24+ needs enable_cri_dockerd to be set to true for clusters to successfully provision.
Solution
We cant do that change.
a) change the default value of enable_cri_dockerd to true
b) Set enable_cri_dockerd to true during execution time:
Add to the docs that the user need to change the value of the field.
Also added a validation function on the Expander that is used to create/update the cluster.
This can't be a "ValidationFunc" from terraform as it depends on 2 fields.
Testing
Added a validation for the function that checks the k8s version
Engineering Testing
Manual Testing
Automated Testing
Test types added/modified:
If "None" - Reason:
Change to the docs.
Summary:
QA Testing Considerations
Regressions Considerations
There is no regression, this is a doc only