-
Notifications
You must be signed in to change notification settings - Fork 46
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
Mock objects do nothing for Update interface #46
Comments
I believe this is because "Update" is considered an additional method, and not part of the default methods. @bowei Do you remember if this is the case? |
Regardless this is something we deal with in ingress-gce with UpdateHooks, so this would be helpful there as well if we are able to fix it. |
Hmm, I think "Update" is used to update a GCE object in the legacy-cloud-provider package. For example: https://github.com/kubernetes/legacy-cloud-providers/blob/master/gce/gce_healthchecks.go#L80 |
@yanweiguo I think there is some confusion here. Update is definitely used to update a GCE object, but not all resources support the Update method. Hence why it is considered an additional method: https://github.com/GoogleCloudPlatform/k8s-cloud-provider/blob/master/pkg/cloud/meta/meta.go#L239 I think is mainly a limitation of the current codebase |
Ah thanks for explaining. |
@yanweiguo That isn't to say that we can't fix it though :) |
Can you use the hooks to implement the functionality you need? |
For example:
It does nothing if UpdateHook is nil. I would expect it to override what is stored in
m.Objects[*key]
. Do I miss something?The text was updated successfully, but these errors were encountered: