-
Notifications
You must be signed in to change notification settings - Fork 272
[Cloud Bigtable App Profile Beta Migration] Add direct controller #4345
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
Conversation
8facc4b
to
fb138a6
Compare
9e4084f
to
34b7ff4
Compare
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.
We need to test the behavior of the new controller using the existing tests. Let's remove the annotation "cnrm.cloud.google.com/tf2crd=true";"cnrm.cloud.google.com/stability-level=stable"
and regenerate the CRD. Then the resource should be reconciled by the new controller.
Done - removed the annotations and pushed the resulting generated CRD to the PR |
pkg/controller/direct/bigtable/bigtableappprofile_controller.go
Outdated
Show resolved
Hide resolved
...a/basic/bigtable/v1beta1/bigtableappprofile/_generated_object_bigtableappprofile.golden.yaml
Show resolved
Hide resolved
@@ -22,7 +21,6 @@ spec: | |||
- cluster1-${uniqueId} | |||
- cluster2-${uniqueId} | |||
multiClusterRoutingUseAny: true | |||
resourceID: bigtableappprofile-${uniqueId} |
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.
@maqiuyujoyce For TF-based controller, we are writing "resourceID" back to Spec even though we set "state-into-spec: absent"?
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.
Yes, we treat spec.resourceID
differently in TF-based/DCL-based controllers, and we always write them back. E.g. https://github.com/GoogleCloudPlatform/k8s-config-connector/blob/master/pkg/krmtotf/tftokrm.go#L229
...a/basic/bigtable/v1beta1/bigtableappprofile/_generated_object_bigtableappprofile.golden.yaml
Show resolved
Hide resolved
Can you run "make manifests" to fix the validation error in presubmit? |
Remove file to regenerate it Regenerate controller, make changes to it Fix Delete and Get Add Create/Update for existing fields Dont set Name in Create, since its unused Make helper function Tweak comment Pull latest bigtable goclient version Make use of updated bigtable goclient API in controller Clean up controller Run make ensure Remove annotations and regenerate CRD Remove HTTP client options from client creation call
Fix controller update function
…og with GRPC client options Record real gcp log after cleaning up instances
log: mock gcp with controller logic Address PR comments Put name back to golden file Fix to update mask Set Name Make manifests
Clean up log: mock gcp
@@ -309,6 +309,68 @@ OK | |||
|
|||
GRPC /google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateAppProfile | |||
|
|||
{ | |||
"appProfile": { |
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.
Not sure why there an extra "UpdateAppProfile" call with this change? The RPC body still contains the old field values. Is this from the mock or the real GCP?
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.
Oh yeah, that is weird. When I do either "record-gcp" or "compare-mock", neither one removes this
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.
Upon closer look, there are 2 updates here for some reason...the first update (line 310) doesn't update the description but does update multiclusterRouting and standardIsolation
Then the second update (line 371) updates the description along with both of those fields that were already updated in the first call.
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jingyih 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 |
9033f2e
into
GoogleCloudPlatform:master
For reference, I have also verified that following sample tests passed.
|
doc: update release note from #4345
Change description
Fixes #
Tests you have done
make ready-pr
to ensure this PR is ready for review.