Skip to content

Commit

Permalink
align git with current state
Browse files Browse the repository at this point in the history
  • Loading branch information
splattner committed Aug 15, 2024
1 parent c982092 commit 9bd3cb7
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 92 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ terraform.tfstate
terraform.tfstate.backup
.terraform.lock.hcl
backend.sh
.env
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ TODOs and Work in Progress:

TODOs and Work in Progress:

- Cleanup up of everyhting does not yet fully work.
- You might need to remove the ingress controller Loadbalancer manually in the hetzner console. The reason for this, during destroy the Cloud Controller Manager (which provision the loadbalancer) is removed before the removal of the ingress controller.
- You might need to remove DNS Records for the training cluster, because Crossplane might be removed before removal of the ingress controller, which prevents removal of the DNS records.

## Concept Training Cluster Setup
Expand Down
178 changes: 88 additions & 90 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,93 +44,91 @@ provider "kubernetes" {

### Start Training Cluster flavor k8s
###############################
#
# module "training-cluster" {
#
# providers = {
# restapi.hosttech_dns = restapi.hosttech_dns
# hcloud = hcloud
# kubernetes.acend = kubernetes.acend
# }
#
# source = "git::https://github.com/acend/terraform-k8s-cluster-lab.git//modules/training-cluster"
#
# cluster_name = "training"
# cluster_domain = "cluster.acend.ch"
# worker_count = "3" // A minimum of 3 nodes is required
#
# hcloud_api_token = var.hcloud_api_token
# hosttech_dns_token = var.hosttech_dns_token
# hosttech-dns-zone-id = var.hosttech_dns_zone_id
#
#
# # SSH Public keys deployed on the VM's for SSH access
# extra_ssh_keys = local.ssh_keys
#
# cluster_admin = ["user1", "user2", "user3"]
#
# # Webshell
# # Make sure to scale down to 0 before removing the cluster,
# # otherwise there will be terraform errors due to missing provider config
# count-students = 5
#
# # User VMs
# user-vms-enabled = false
#
# # RBAC in Webshell
# webshell-rbac-enabled = true
#
# webshell-settings = {
# version = "0.5.6"
#
# theia-persistence-enabled = true
# dind-persistence-enabled = true
# webshell-rbac-enabled = true
#
# dind_resources = {
# limits = {
# cpu = "2"
# memory = "1Gi"
# }
#
# requests = {
# cpu = "50m"
# memory = "100Mi"
# }
# }
# theia_resources = {
# requests = {
# cpu = "500m"
# memory = "1Gi"
# }
# }
# }
# }
#
# output "training-kubeconfig" {
# value = module.training-cluster.kubeconfig_raw
# sensitive = true
# }
#
# output "argocd-admin-password" {
# value = module.training-cluster.argocd-admin-password
# sensitive = true
# }
#
# output "student-passwords" {
# value = module.training-cluster.student-passwords
# sensitive = true
# }
#
# output "count-students" {
# value = module.training-cluster.count-students
# }
#
# output "studentname-prefix" {
# value = module.training-cluster.studentname-prefix
# }
#
#
# # ### End Training Cluster flavor k8s
# #
#

module "training-cluster" {

providers = {
restapi.hosttech_dns = restapi.hosttech_dns
hcloud = hcloud
kubernetes.acend = kubernetes.acend
}

source = "git::https://github.com/acend/terraform-k8s-cluster-lab.git//modules/training-cluster"

cluster_name = "training"
cluster_domain = "cluster.acend.ch"
worker_count = "3" // A minimum of 3 nodes is required

hcloud_api_token = var.hcloud_api_token
hosttech_dns_token = var.hosttech_dns_token
hosttech-dns-zone-id = var.hosttech_dns_zone_id


# SSH Public keys deployed on the VM's for SSH access
extra_ssh_keys = local.ssh_keys

cluster_admin = ["user1", "user2", "user3"]

# Webshell
# Make sure to scale down to 0 before removing the cluster,
# otherwise there will be terraform errors due to missing provider config
count-students = 5

# User VMs
user-vms-enabled = false

# RBAC in Webshell
webshell-rbac-enabled = true

webshell-settings = {
version = "0.5.12"

theia-persistence-enabled = true
dind-persistence-enabled = true
webshell-rbac-enabled = true

dind_resources = {
limits = {
cpu = "2"
memory = "1Gi"
}

requests = {
cpu = "50m"
memory = "100Mi"
}
}
theia_resources = {
requests = {
cpu = "500m"
memory = "1Gi"
}
}
}
}

output "training-kubeconfig" {
value = module.training-cluster.kubeconfig_raw
sensitive = true
}

output "argocd-admin-password" {
value = module.training-cluster.argocd-admin-password
sensitive = true
}

output "student-passwords" {
value = module.training-cluster.student-passwords
sensitive = true
}

output "count-students" {
value = module.training-cluster.count-students
}

output "studentname-prefix" {
value = module.training-cluster.studentname-prefix
}


### End Training Cluster flavor k8s

0 comments on commit 9bd3cb7

Please sign in to comment.