-
Notifications
You must be signed in to change notification settings - Fork 29
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
[function-mesh] nil pointer in MakeFunctionHPA() #505
Comments
Looks like my default webhook is not enabled. |
Currently, this issue occurs during upgrades from older versions (without webhook) to newer versions. Therefore, it makes sense to solve this issue. |
This is because, when I run the operator controller locally using |
Good to know this. For fixing this issue, do you mean something like check if the pointer is nil and provide a default value for it before we process the Spec (just like we did in the mutating webhook)? Or should we just simply detect the nil pointer and fail early and instruct the user to complete the Spec ? |
It is recommended to use nocalhost to run the controller with webhook enabled, pls see: https://streamnative.slack.com/files/U03EV808CAC/F03RZTPPWE8/develop_functionmesh_with_nocalhost.mp4 |
I think the "default value" is better... |
Thanks, I'll try with the nocalhost~ |
A nil pointer deference is thrown in
The exception is thrown because function.Spec.MinReplica is null:
2022-11-02T15:54:14.680+0800 INFO function-resource MinReplicas {"pt": null}
The spec json is
I can follow this issue to understand the HPA related code~
The text was updated successfully, but these errors were encountered: