Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy cluster for next helm training #7

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 86 additions & 86 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,91 +45,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 = 4
#
# # User VMs
# user-vms-enabled = false
#
# # RBAC in Webshell
# webshell-rbac-enabled = true
#
# webshell-settings = {
# version = "0.5.3"
#
# 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
# }
#
#
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 = 0

# User VMs
user-vms-enabled = false

# RBAC in Webshell
webshell-rbac-enabled = true

webshell-settings = {
version = "0.5.5"

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
#
Loading