-
Notifications
You must be signed in to change notification settings - Fork 20
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
Golang zero values are not set in kops cluster config #330
Comments
A possible fix might be to remove the checks for zero values in the if reflect.DeepEqual(in, reflect.Zero(reflect.TypeOf(in)).Interface()) {
return nil
} Removing those will set the value to |
Hello, thanks for reporting the issue. One way to disable the behaviour is to mark the field mandatory. I will look at it today or tomorrow. |
@peter-svensson there was this fix #256 I applied to anonymous auth, I wonder if something similar would make sense here. WDYT ? |
Probably, but there are a lot of places where this will have to be applied? |
Indeed it could be needed in a lot of places. I will try to dig a bit deeper in the kOps code. |
Any progress on this? Anyway I can help? |
What attribute was causing the issue in the autoscaler addon please ? From what i see those two could be a problem as they have default
|
If I remember correctly it was |
But in general it's any value where the default-value is different than the zero-value. |
I see two options here:
I feel more comfortable with the first approach, it shifts some work on the end user side but it has the advantage of being explicit. |
@argoyle @peter-svensson sorry for taking so long, i opened #346 to fix the case with bool fields when default is |
|
Tested the autoscaler and it seems to work just fine at least 👍 |
@peter-svensson @argoyle can we close the issue ? |
I would say so. We'll open another one if we find anything else. Thanks for your work! ❤️ |
Thanks. Yes, don't hesitate to open issues, it helps improving the provider 🙏 |
The creation of cluster (and perhaps other ) configs are not handling golang zero values.
The zero value for a
bool
isfalse
and the parameters set in the terraform files withfalse
are not propagated to the kops configuration.For example:
Renders correctly to:
However:
Renders to:
This happens for all settings that I've tested, which more or less breaks every cluster.
The text was updated successfully, but these errors were encountered: