-
Notifications
You must be signed in to change notification settings - Fork 237
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 direct controller for BigQueryDataset #2814
feat: add direct controller for BigQueryDataset #2814
Conversation
379711a
to
2ae68e0
Compare
2ae68e0
to
cbc5dd9
Compare
/assign @justinsb |
cbc5dd9
to
4d3534e
Compare
/assign @yuwenma |
pkg/controller/direct/bigquerydataset/dataset_externalresource.go
Outdated
Show resolved
Hide resolved
69ff85e
to
fd74bfb
Compare
Good job! Overall looks good and I think the main question is about why you need to resolve project from the seflLink. Besides, there are a few improvements and potential bug fixes that you can just apply the latest controller-template to pick up. |
Regarding our discussion on why the The reason why the projectRef is already set is because KCC does project defaulting. Here when we create the harness, we set the default project to the test harness. And then we apply the defaults and project annotation This is where it gets the default project https://github.com/GoogleCloudPlatform/k8s-config-connector/blob/master/pkg/test/gcp/gcp.go#L95. I tried changing the default project in my local config and then it would retunr error. |
9766768
to
6f8910e
Compare
ok, this could relate to the project defaulting https://cloud.google.com/config-connector/docs/how-to/organizing-resources/project-scoped-resources. In such case, the project is not required (but location is) |
...ions.k8s.io_v1_customresourcedefinition_bigquerydatasets.bigquery.cnrm.cloud.google.com.yaml
Outdated
Show resolved
Hide resolved
ba0732b
to
5e761ba
Compare
0339614
to
02cca79
Compare
...ataset/basicbigquerydataset-direct/_generated_object_basicbigquerydataset-direct.golden.yaml
Show resolved
Hide resolved
pkg/controller/direct/bigquerydataset/bigquerydataset_mappings.go
Outdated
Show resolved
Hide resolved
pkg/controller/direct/bigquerydataset/bigquerydataset_mappings.go
Outdated
Show resolved
Hide resolved
.../testdata/stateabsentinspec/bigquerydataset/_generated_object_bigquerydataset#01.golden.yaml
Show resolved
Hide resolved
dcc47be
to
0cc0284
Compare
pkg/controller/direct/bigquerydataset/bigquerydataset_mappings.go
Outdated
Show resolved
Hide resolved
pkg/controller/direct/bigquerydataset/bigquerydataset_mappings.go
Outdated
Show resolved
Hide resolved
0cc0284
to
d65f0de
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 had a offline discussion with @yuwenma. The controller is currently using the deprecated API for BigQuery datasets. We will need to update the controller and mapping functions to use the new API in follow-up PRs.
d65f0de
to
365271b
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.
/lgtm
Defer to @yuwenma for another pass and final approval. Note that with this PR, the default controller for BigQueryDataset is still TF-based. Users need to opt-in the direct controller using the annotation. |
365271b
to
4764ad9
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yuwenma 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 |
/lgtm |
/unhold |
4fba7df
into
GoogleCloudPlatform:master
make ready-pr
to ensure this PR is ready for review.