Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.85 KB

File metadata and controls

57 lines (42 loc) · 1.85 KB

cluster-infra-argocd

Bootstraps ArgoCD and the app-of-apps, then hands Kubernetes-side resources off to Argo from k8s-gitops.

Includes:

  • EKS Auto Mode ingress class resources
  • External Secrets Operator
  • External Secrets per-environment SecretStores and envtype fanout
  • ExternalDNS
  • Dex (SSO for K8s)
  • ArgoCD
  • Kargo writeback git credentials and webhook secrets in Kubernetes

Pre-requisites

Apply ../cluster/ and ../cluster-infra/ first.

Usage

Prerequisite: ../cluster/ and ../cluster-infra/ must already have been applied.

# Update kubernetes context to point at the cluster we made in ../cluster
$(tofu -chdir=../cluster output -raw kubectl_config_command)

# We use some ruby scripts here
bundle install

tofu init
AWS_PROFILE=cdo-readwrite tofu apply

Watching Argo

  • bin/argo-trace prints the live Argo/Kubernetes dependency tree to stdout.

  • bin/watch-argo-trace runs argo-trace in a loop, watching its output using watch, use this as your human default go to command to watch the cluster.

Testing

Testing scripts used in deploying the cluster

  • This directory has its own Ruby bundle. Run bundle install once before using bin/argo-trace, bin/watch-argo-trace, or the Ruby tests.
  • If you modify bin/argo-trace, run before commit: ruby test/argo-trace/argo_trace_test.rb
  • test/argo-trace/fixtures/argo-cli-data/ holds saved argocd --core YAML responses for argo-trace.
  • test/argo-trace/expected-output-from-argo-trace-given-data-responses.txt is the expected rendered tree for that saved Argo CLI dataset.
  • If you modify bin/log-cluster-events, run before commit: ruby test/log_cluster_events_test.rb
  • If you modify bin/wait-for-200, run before commit: ruby test/wait_for_200_test.rb
  • bin/wait-for-200 smoke: bin/wait-for-200 --timeout-seconds 30 https://studio.code.org