This directory contains a runnable nginx demo for GitOpsCTL.
examples/
configs/
apps.json Sample application config. Copy to configs/applications.json.
clusters.json Sample cluster config. Copy to configs/clusters.json and edit kubeconfigPath.
manifests/
namespace.yaml
nginx-deployment.yaml
nginx-service.yaml
secret.sops.yaml.example
mkdir -p configs
cp examples/configs/apps.json configs/applications.json
cp examples/configs/clusters.json configs/clusters.jsonEdit configs/clusters.json:
- Set
kubeconfigPathto your real kubeconfig path. - Keep
allowedNamespacesas["demo"]unless you change the manifests.
Start GitOpsCTL:
gitopsctl start --api-address :8080In another terminal:
gitopsctl status-apps
gitopsctl status-clusters
gitopsctl dashboard --api-url http://127.0.0.1:8080Validate the Kubernetes resources:
kubectl get namespace demo
kubectl get deployment,service -n demogitopsctl register-cluster \
--name local-dev \
--kubeconfig ~/.kube/config \
--allowed-namespaces demo
gitopsctl register-apps \
--name nginx-demo \
--repo https://github.com/aeswibon/gitopsctl.git \
--branch main \
--path examples/manifests \
--cluster local-dev \
--interval 30s \
--sync-policy autoexamples/manifests/secret.sops.yaml.example is a template showing where encrypted SOPS metadata belongs. Do not apply it directly. To test SOPS:
- Create a normal Kubernetes Secret manifest.
- Encrypt it with
sops. - Commit the encrypted file as
.yaml,.yml, or.json. - Run GitOpsCTL in an environment that has access to the matching Age, PGP, or KMS key.
kubectl delete namespace demo
gitopsctl unregister --name nginx-demo
gitopsctl unregister-cluster --name local-dev