Skip to content

xmoto/infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X-Moto Infra

Dependencies

Terraform

Kubernetes

Setup

Terraform

cd terraform

# Decrypt config files
sops decrypt kubeconfig.sops.yaml >kubeconfig.yaml
sops decrypt talosconfig.sops.yaml >talosconfig.yaml

export TF_VAR_hcloud_token="<your token>"

# Initialize modules and stuff
terraform init

# Preview the changes
terraform plan

# Apply
terraform apply

If Terraform makes changes to the kubeconfig.yaml or talosconfig.yaml files, remember to re-encrypt them into kubeconfig.sops.yaml and talosconfig.sops.yaml respectively.

Kubernetes

cd kubernetes

export KUBECONFIG="$(readlink -f ../terraform)/kubeconfig.yaml"
export SOPS_AGE_KEY_FILE=/path/to/sops/age/k8s.agekey

# This is very common in the Kubernetes world :)
alias k='kubectl'

# You may also want to set a convenience alias for `kustomize build`,
# as these flags are needed by KSOPS.
alias kbuild='kustomize build --enable-alpha-plugins --enable-exec'

# The commands below assume you've set the aliases above.

kbuild bootstrap | k apply -f -
helmfile apply -f helm/helmfile.yaml

kbuild gateway | k apply -f -
kbuild argocd | k apply -f -
kbuild whoami | k apply -f -

About

Terraform IaC and Kubernetes stuff for X-Moto

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors