User request
- Add kubeconfig update to
apply.sh using kubectl config view --merge --flatten; ask before updating in interactive mode.
- Add auto-apply mode to
apply.sh: do not ask for domain/port; run Terraform with auto-apply flag(s); kubeconfig should be updated automatically.
- Rewrite root
README.md: remove current content; keep only 3 sections:
- Requirements: terraform, kubectl (optional)
- Setup: Fast (chmod + run apply.sh), Manual (terraform init + terraform apply for each stack + kubeconfig update)
- Usage: list exposed services with prebuilt links for default domain+port
Specification
apply.sh
- Kubeconfig merge (post-apply)
- After all stacks apply successfully, optionally merge the generated kubeconfig at:
$(pwd)/stacks/k8s/.kube/agyn-local-kubeconfig.yaml
into:
using:
KUBECONFIG="$KUBECONFIG:$HOME/.kube/config:$(pwd)/stacks/k8s/.kube/agyn-local-kubeconfig.yaml" \
kubectl config view --merge --flatten
- Interactive mode (no auto-apply flag): prompt before modifying
~/.kube/config:
Merge k3d kubeconfig into ~/.kube/config? [Y/n]: (default Yes)
- Auto-apply mode: update kubeconfig automatically (no prompt).
- Implement the merge safely (don’t redirect output directly into an input file). Use a temp file + atomic
mv (e.g. mktemp in ~/.kube/) or equivalent safe buffering.
- If
kubectl is missing or the generated kubeconfig file is missing, print a warning and skip (non-fatal).
- Auto-apply mode behavior
- Add/ensure a CLI flag (existing
-y is OK) that:
- runs Terraform with
-input=false -auto-approve
- does not prompt for domain/port
- uses defaults when
DOMAIN / PORT are unset
- updates kubeconfig automatically (see above)
- Domain/port resolution
- In interactive mode: if
DOMAIN/PORT env vars are unset, prompt with defaults (existing behavior).
- In auto-apply mode: if
DOMAIN/PORT env vars are unset, use defaults without prompting.
README.md (rewrite)
Replace the entire file with exactly 3 top-level sections:
- Requirements
- List only:
- terraform
- kubectl (optional; only needed for kubeconfig merge / interacting with cluster)
- Setup
- Fast:
chmod +x apply.sh then run ./apply.sh (mention -y for auto-apply mode).
- Manual: show
terraform init + terraform apply for each stack in order (stacks/k8s, stacks/system, stacks/routing, stacks/platform) + kubeconfig update step.
- Usage
- List exposed services with prebuilt links for the defaults:
- domain:
agyn.dev
- port:
2496
- Services to include (as defined by routing manifests):
- Platform UI:
https://agyn.dev:2496/
- Platform API:
https://agyn.dev:2496/api
- Argo CD:
https://argocd.agyn.dev:2496/
- LiteLLM:
https://litellm.agyn.dev:2496/
- Vault:
https://vault.agyn.dev:2496/
User request
apply.shusingkubectl config view --merge --flatten; ask before updating in interactive mode.apply.sh: do not ask for domain/port; run Terraform with auto-apply flag(s); kubeconfig should be updated automatically.README.md: remove current content; keep only 3 sections:Specification
apply.sh$(pwd)/stacks/k8s/.kube/agyn-local-kubeconfig.yamlinto:
$HOME/.kube/configusing:
KUBECONFIG="$KUBECONFIG:$HOME/.kube/config:$(pwd)/stacks/k8s/.kube/agyn-local-kubeconfig.yaml" \ kubectl config view --merge --flatten~/.kube/config:Merge k3d kubeconfig into ~/.kube/config? [Y/n]:(default Yes)mv(e.g.mktempin~/.kube/) or equivalent safe buffering.kubectlis missing or the generated kubeconfig file is missing, print a warning and skip (non-fatal).-yis OK) that:-input=false -auto-approveDOMAIN/PORTare unsetDOMAIN/PORTenv vars are unset, prompt with defaults (existing behavior).DOMAIN/PORTenv vars are unset, use defaults without prompting.README.md(rewrite)Replace the entire file with exactly 3 top-level sections:
chmod +x apply.shthen run./apply.sh(mention-yfor auto-apply mode).terraform init+terraform applyfor each stack in order (stacks/k8s,stacks/system,stacks/routing,stacks/platform) + kubeconfig update step.agyn.dev2496https://agyn.dev:2496/https://agyn.dev:2496/apihttps://argocd.agyn.dev:2496/https://litellm.agyn.dev:2496/https://vault.agyn.dev:2496/