GoogleCloudPlatform / GoogleCloudPlatform/pubsec-declarative-toolkit

RootSync GitOps solution does not allow keeping the kpt resource group resource under the same folder.

Open
#769 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
36
Forks
26
PR merge metrics
No merged PRs in 30d

Description

**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)
```
kpt live init core-landing-zone --namespace config-control
kpt fn render core-landing-zone
kpt live apply core-landing-zone --reconcile-timeout=2m --output=table
...
```
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.
```
nomos status --contexts gke_${PROJECT_ID}_northamerica-northeast1_krmapihost-${CLUSTER}
```
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.