Skip to content

Commit

Permalink
AWS K3S Deployment (#56)
Browse files Browse the repository at this point in the history
* setup headscale in k3d

* remove messed up svc config

* fix svc

* fix ports

* actually fix port

* expose headscale too

* update server url

* tidy

* add some terraform stuff

* refactor subnets

* move domain and hosted zone to vars

* wip

* fix nginx-ingress-controller

* force nginx class to be default

* add redis and postgres back in

* remove old stuff

* wip

* more cleanup

* configure wireguard/update ami

* update security group replacement, install nginx ingress controller

* refactor into modules

* remove lb controller json

* tag subnets

* change provider id

* use correct chart

* fix indent

* pin eks chart version

* update lb name

* remove comment

* got ssl working

* wip

* wip

* move to aws-dev

* rename buckets

* manage root password

* add backend repo back in

* remove data volume

* refactor variables

* add redis secret in

* populate config, create secret

* wip

* fix auth, bump redis chart version

* fix juicefs bucket

* fix rds security group

* remove some redundant names

* remove spaces

* fix redundant gitignore

* add depends

* make instance type and worker count configurable

* pin k3s version

* make bucket perms more restrictive

* fix vare

* less permissive policies

---------

Co-authored-by: Luke Lombardi <[email protected]>
  • Loading branch information
luke-lombardi and Luke Lombardi authored Jan 23, 2024
1 parent 22dc23e commit c1399b4
Show file tree
Hide file tree
Showing 25 changed files with 1,350 additions and 76 deletions.
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down
4 changes: 4 additions & 0 deletions deploy/aws-dev/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
modules/cluster/node-token
modules/cluster/kubeconfig
modules/cluster/client-*
modules/cluster/ca-certificate
13 changes: 13 additions & 0 deletions deploy/aws-dev/config.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.33.0"
}
}
}

provider "aws" {
region = "us-east-1"
}

19 changes: 19 additions & 0 deletions deploy/aws-dev/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module "cluster" {
source = "./modules/cluster"

prefix = var.prefix
}

module "k8s_resources" {
source = "./modules/k8s-resources"

domain = var.domain
domain_hosted_zone_id = var.domain_hosted_zone_id
prefix = var.prefix
aws_region = var.aws_region
k3s_cluster_config = module.cluster.k3s_cluster_config
vpc_config = module.cluster.vpc_config
db_config = module.cluster.db_config
s3_buckets = module.cluster.s3_buckets
bucket_user_credentials = module.cluster.bucket_user_credentials
}
Loading

0 comments on commit c1399b4

Please sign in to comment.