Open jacyang2010 opened 6 months ago
We'll need to add a section on migrating from a kpt apply
to using gitops
directly. To solve for this users would need to delete the resourcegroup.yaml
file that was generated from the kpt live init
command.
Describe the bug RootSync GitOps solution does not allow keeping the kpt resource group resource under the same folder. This kind of conflict stops us from utilizing both RootSync and kpt at same time under the package folder.
To Reproduce
Step1: Follow the guide to bootstrap kcc cluster. https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/main/docs/landing-zone-v2/README.md Step2: Utilize the kpt command to deploy core landing zone or any other solution. (Be noted that a resource group will be created)
Step3: Create a git repo as Source of Truth and checkout it to local for pushing solutions. Step4: Following the section about Deploy the infrastructure using GitOps fom the guide given in step1. https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/main/docs/landing-zone-v2/README.md#3-deploy-the-infrastructure-using-gitops Step5. Check if the resourcegroup.yaml exits under the remote repo folder. Step6: Validate deployment by the below command.
You will see the error about multiple inventory objects. (Screenshot TBC)
Step7: Validate deployment from GKE Config GUI. You will see the below error about duplicated resource groups as shown below. The below error shows that RootSync complains that there are multiple inventory objects.![image](https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/assets/95398233/45d168a3-4163-4a2e-bbb0-1db4fc9157e3)
Expected behavior We should be able to use either kpt or gitops anytime to manage the deployments.