fluxcd / flux2-kustomize-helm-example

A GitOps workflow example for multi-env deployments with Flux, Kustomize and Helm.
https://fluxcd.io
Apache License 2.0
933 stars 992 forks source link

sync path configuration ("./clusters/staging") would overwrite path ("./clusters/production") of existing Kustomizatio #107

Closed bunengxiu closed 2 months ago

bunengxiu commented 2 months ago

~ flux get helmreleases --all-namespaces

NAMESPACE NAME REVISION SUSPENDED READY MESSAGE
cert-manager cert-manager v1.14.4 False True Helm install succeeded for release cert-manager/cert-manager.v1 with chart cert-manager@v1.14.4
ingress-nginx ingress-nginx 4.10.0 False True Helm install succeeded for release ingress-nginx/ingress-nginx.v1 with chart ingress-nginx@4.10.0
podinfo podinfo 6.6.2 False True Helm install succeeded for release podinfo/podinfo.v1 with chart podinfo@6.6.2

~ curl -H "Host: podinfo.production" http://localhost:8080

{ "hostname": "podinfo-75b9f9f57f-5fkmr", "version": "6.6.2", "revision": "8d010c498e79f499d1b37480507ca1ffb81a3bf7", "color": "#34577c", "logo": "https://raw.githubusercontent.com/stefanprodan/podinfo/gh-pages/cuddle_clap.gif", "message": "greetings from podinfo v6.6.2", "goos": "linux", "goarch": "amd64", "runtime": "go1.22.2", "num_goroutine": "9", "num_cpu": "12" }

~ kc config use-context staging

Switched to context "staging".

~ flux bootstrap github \
--context=staging \ --owner=${GITHUB_USER} \ --repository=${GITHUB_REPO} \ --branch=main \ --personal \ --path=clusters/staging ► connecting to github.com ► cloning branch "main" from Git repository "https://github.com/bunengxiu/gitops.git" ✔ cloned repository ► generating component manifests ✔ generated component manifests ✔ component manifests are up to date ✔ reconciled components ► determining if source secret "flux-system/flux-system" exists ✔ source secret up to date ✗ sync path configuration ("./clusters/staging") would overwrite path ("./clusters/production") of existing Kustomizatio