GoogleCloudPlatform / pubsec-declarative-toolkit

The GCP PubSec Declarative Toolkit is a collection of declarative solutions to help you on your Journey to Google Cloud. Solutions are designed using Config Connector and deployed using Config Controller.
Apache License 2.0
31 stars 28 forks source link

Fix kpt partial solution deployment issue #755

Open jacyang2010 opened 10 months ago

jacyang2010 commented 10 months ago

Describe the bug When deploy kcc solutions by kpt, sometimes, for some unknown reason, there is a chance that some resources from the solution failed to be deployed to kcc cluster and we end up with a partial solution deployment.

To Reproduce Step1: Follow the below document to bootstrap kcc config cluster and deploy core landing zone v2 solution. https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/tree/main/docs/landing-zone-v2 Step2: Run the below command to deploy core landing zone after kcc bootstrapping.

kpt live apply core-landing-zone --reconcile-timeout=2m --output=table

Step3: Found some resources were missed during the first deployment by kpt. After the initial kpt deployment by the above command, only some resources are created as shown below by the command below.

kubectl get gcp -n projects
Screenshot 2023-12-05 at 11 23 53 AM

Run the above kpt deployment command again and then all missed resources are created as shown below by the same above command.

Screenshot 2023-12-05 at 3 04 42 PM

We can make a conclusion that some resources were not created sometimes during the initial deployment based on the above test results.

Expected behavior All resources of a kcc solution must be deployed by kpt to kcc cluster completely.