-
Notifications
You must be signed in to change notification settings - Fork 263
feat: add controller, test and mock support for VMwareEngineExternalAccessRule #4403
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
feat: add controller, test and mock support for VMwareEngineExternalAccessRule #4403
Conversation
2ef32ba
to
b0ac7a3
Compare
/assign @maqiuyujoyce |
} | ||
|
||
paths := []string{} | ||
if desired.Spec.Description != nil && !reflect.DeepEqual(resource.Description, a.actual.Description) { |
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.
Just curious, why do you prefer DeepEqual() here instead of CompareProtoMessage()?
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.
I feel it is easier to do custom diff when needed. e.g.
func backupConfigsEqual(a, b *gkebackuppb.BackupPlan_BackupConfig) bool { |
var updated *pb.ExternalAccessRule | ||
if len(paths) == 0 { | ||
log.V(2).Info("no field needs update", "name", a.id) | ||
updated = a.actual |
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.
I think you'll want to set externalRef here for acquisition case.
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.
Ah, I didn’t realize the externalRef
wasn’t added by the LLM. This is a blind spot on my part. I may have overlooked it in other controllers I’ve added. I’ll double-check.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maqiuyujoyce The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
a97e410
into
GoogleCloudPlatform:master
HTTP log: real vs. mock (only includes requests relevant to this resource):
https://www.diffchecker.com/GdM306Ad/
The diff includes additional GET requests related to VMware networks, network policies, and similar resources. I think these are triggered by periodic reconciliations that occur roughly every 10 minutes during testing against real GCP, which takes considerably longer.