Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

Conversation

@jensentanlo
Copy link
Contributor

Description of your changes

In the GKE API and gcloud, there is the option to select CloudDNS instead of relying on the regular kube-dns. This adds those fields to the GKE Cluster CRD.

In order to do that, I had to upgrade some dependencies to deal with some issues as detailed here:

Upgraded google.golang.org/api v0.52.0 to google.golang.org/api v0.97.0

sigs.k8s.io/controller-tools v0.8.0 to sigs.k8s.io/controller-tools v0.9.2 (fixes kubernetes-sigs/controller-tools#613 which occurs because google.golang.org/grpc is upgraded by the google.golang.org/api upgrade)

The "DesiredAutopilot' field no longer exists in the newer version of the client. In the documentation, it says that converting between Standard and Autopilot is not supported: https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview#no_conversion

Fixes #464

I have:

  • [ x] Read and followed Crossplane's contribution process.
  • [ x] Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

I created a GKE cluster and verified with gcloud that its dnsConfig was correctly set.

Upgraded google.golang.org/api v0.52.0 to google.golang.org/api v0.97.0

sigs.k8s.io/controller-tools v0.8.0 to sigs.k8s.io/controller-tools v0.9.2 (fixes kubernetes-sigs/controller-tools#613 which occurs because google.golang.org/grpc is upgraded by the google.golang.org/api upgrade)

The "DesiredAutopilot' field no longer exists in the newer version of the client. In the documentation, it says that converting between Standard and Autopilot is not supported: https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview#no_conversion

Signed-off-by: Jensen Lo <[email protected]>
Signed-off-by: Jensen Lo <[email protected]>
Signed-off-by: Jensen Lo <[email protected]>
Signed-off-by: Jensen Lo <[email protected]>
@jensentanlo jensentanlo force-pushed the add-DNS-config-to-gke branch from f4f0190 to 010a6c9 Compare October 4, 2022 18:56
@jensentanlo
Copy link
Contributor Author

@Feggah Thanks for the help yesterday with testing. Would it be possible to kick off the pre-merge checks for me?

Copy link
Collaborator

@Feggah Feggah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your effort, @jensentanlo !

Added some small coments in the code.

I think you also need to add the DNSConfig logic for the LateInitializeSpec method. This method is responsible for importing the field value when it isn't specified in the MR manifest. This is important when we are importing an existing GKE.

Lastly, I think you should change the TestLateInitializeSpec and TestIsUpToDate tests to cover the modifications you made in this PR.

Added relevant annotations
Changed optional fields to pointers
Added late initialization logic (and manually tested)
Added more tests

Signed-off-by: Jensen Lo <[email protected]>
@jensentanlo
Copy link
Contributor Author

Thanks for the detailed review comments, I think I've addressed everything + manually tested again as well.

@jensentanlo jensentanlo requested a review from Feggah October 6, 2022 19:49
Copy link
Collaborator

@Feggah Feggah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @jensentanlo! LGTM

@Feggah Feggah merged commit d85e3cc into crossplane-contrib:master Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add DNSConfig support for GKE Clusters controller-gen panics when reading selector expressions containing composite literals (Go 1.17)

2 participants