Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Bootstrap

Init:

gotk bootstrap github \
  --owner=gitopsrun \
  --repository=fleet-infra \
  --branch=main \
  --team=dev \
  --path=staging-cluster

Clone:

git clone https://github.com/gitopsrun/fleet-infra
cd fleet-infra

Monitoring

Monitoring stack:

gotk create source git monitoring \
--url=https://github.com/fluxcd/toolkit \
--branch=main \
--export > ./staging-cluster/monitoring.yaml

gotk create kustomization monitoring \
--source=monitoring \
--path="./manifests/monitoring" \
--prune=true \
--validation=client \
--interval=10m \
--health-check="Deployment/prometheus.gotk-system" \
--health-check="Deployment/grafana.gotk-system" \
--export >> ./staging-cluster/monitoring.yaml

Push changes:

git add -A && git commit -m "add monitoring" && git push

Trigger sync:

gotk reconcile source git gotk-system

Grafana:

kubectl -n gotk-system port-forward svc/grafana 3000:3000

Helm

Register Bitnami repository:

gotk create source helm bitnami \
--interval=10m \
--url=https://charts.bitnami.com/bitnami \
--export > ./staging-cluster/bitnami.yaml

Contour namespace:

kubectl create ns contour -oyaml --dry-run=client \
> ./staging-cluster/contour.yaml

Contour Helm release:

gotk create helmrelease contour \
--interval=1h \
--target-namespace=contour \
--release-name=contour \
--source=HelmRepository/bitnami \
--chart=contour \
--chart-version=">2.0.0 <3.0.0" \
--export >> ./staging-cluster/contour.yaml

Push changes:

git add -A && git commit -m "add countour" && git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment