kpt-config-sync icon indicating copy to clipboard operation
kpt-config-sync copied to clipboard

Feature Request: non-GKE OSS Config Sync Usage Examples

Open xueliangyang-oeuler opened this issue 3 years ago • 10 comments

Here is my way to install kpt-config-sync,

Create a directory to store the manifest bundle

mkdir -p <MANIFEST_DIR>

Extract the manifest bundle

tar -xzf <MANIFEST_BUNDLE> -C <MANIFEST_DIR>

Apply the manifests to your cluster

kubectl apply -f <MANIFEST_DIR>

BUT Are There any efficient and easy example to verify the kpt-config-syn ? I need some tips. Thank you !

xueliangyang-oeuler avatar Jul 30 '22 08:07 xueliangyang-oeuler

@mortent Hi, would you give me some suggestion ?

xueliangyang-oeuler avatar Aug 01 '22 08:08 xueliangyang-oeuler

ping @justinsb Hello

xueliangyang-oeuler avatar Aug 02 '22 13:08 xueliangyang-oeuler

@oeular Thanks for trying out Config Sync. We are aware that the documentation is very sparse at the moment and we do plan to improve it.

You can look at https://github.com/janetkuo/csmr-examples for some good examples for using Config Sync. When using the OSS version of Config Sync you can ignore any mention of the ConfigManagement resource and any mentions of the monorepo mode and just go straight to using the RootSync and RepoSync resources: https://github.com/janetkuo/csmr-examples#multi-repo-mode

mortent avatar Aug 02 '22 13:08 mortent

@mortent Thanks for your tips. Can the Config Sync work on the alone Kubernetes ? I want to try it on the alone kubernetes.

xueliangyang-oeuler avatar Aug 03 '22 04:08 xueliangyang-oeuler

@oeular yes Config Sync should work on Kubernetes clusters, including KinD.

janetkuo avatar Aug 04 '22 23:08 janetkuo

Most of the examples we've invested in so far have been for Anthos Config Management in https://github.com/GoogleCloudPlatform/anthos-config-management-samples, but ACM is a higher level abstraction which includes Policy Controller, Config Sync, and an ACM Operator to manage them. Some of the examples in the samples repo work with CS by itself, but some require the rest of ACM.

I would consider this a feature request for a set of Config Sync specific examples, perhaps in an /examples/ or /demos/ dir in this repo, like we've done for kpt and cli-utils.

karlkfi avatar Aug 05 '22 00:08 karlkfi

@janetkuo @karlkfi Thanks. I need some specific examples on Kubernetes(We don't have ACM or Google Cloud). Now I have installed Config Sync with https://github.com/GoogleContainerTools/kpt-config-sync/releases/download/launch/deployment-blueprint.tar.gz

Actually, I want to install Config Sync as an addon in Kubevela(https://github.com/kubevela/kubevela) for some component.

xueliangyang-oeuler avatar Aug 05 '22 04:08 xueliangyang-oeuler

(I'm piggy-backing on this existing issue instead of filing a new one; if you'd prefer I can file a separate one.)

Is there any docs or an example somewhere of how to use cluster selectors with the OSS manifests? After running make build-oss and copying the manifests (except for dev.yaml which I suppose should probably not have been there...?) into a folder of my own, it seems I can just apply all of them and deploy Config Sync. However, since the ConfigManagement is now out of the picture, I don't find anywhere how to specify the cluster name that then defines which labels etc that are applicable for cluster selectors in my target repositories. How does that work in the OSS version?

tomasaschan avatar Oct 03 '22 15:10 tomasaschan

—cluster-name is configured on the reconciler-manager, which in turn configures it on the reconciler containers with an env var: https://github.com/GoogleContainerTools/kpt-config-sync/blob/main/cmd/reconciler-manager/main.go#L42

karlkfi avatar Oct 03 '22 17:10 karlkfi