diff --git a/infra/legacy/ingress.tf b/infra/legacy/ingress.tf deleted file mode 100644 index 7307e91f..00000000 --- a/infra/legacy/ingress.tf +++ /dev/null @@ -1,62 +0,0 @@ -resource "kubernetes_ingress" "grafana_ingress" { - metadata { - name = "grafana-ingress" - namespace = helm_release.prometheus.namespace - } - - spec { - rule { - host = "grafana.${local.domain}" - http { - path { - backend { - service_name = "kube-prometheus-stack-grafana" - service_port = 80 - } - } - } - } - } -} - -resource "kubernetes_ingress" "longhorn" { - metadata { - name = "longhorn-ingress" - namespace = helm_release.longhorn.namespace - } - - spec { - rule { - host = "longhorn.${local.domain}" - http { - path { - backend { - service_name = "longhorn-frontend" - service_port = 80 - } - } - } - } - } -} - -resource "kubernetes_ingress" "vault_ingress" { - metadata { - name = "vault-ingress" - namespace = helm_release.vault.namespace - } - - spec { - rule { - host = "vault.${local.domain}" - http { - path { - backend { - service_name = "vault" - service_port = 8200 - } - } - } - } - } -} diff --git a/infra/legacy/locals.tf b/infra/legacy/locals.tf deleted file mode 100644 index 427aa00f..00000000 --- a/infra/legacy/locals.tf +++ /dev/null @@ -1,3 +0,0 @@ -locals { - domain = "khuedoan.com" -} diff --git a/infra/legacy/main.tf b/infra/legacy/main.tf deleted file mode 100644 index 4dc1bf6b..00000000 --- a/infra/legacy/main.tf +++ /dev/null @@ -1,132 +0,0 @@ -provider "rke" { - debug = true -} - -provider "kubernetes" { - config_path = "${path.root}/kube_config.yaml" -} - -provider "helm" { - kubernetes { - config_path = "${path.root}/kube_config.yaml" - } -} - -resource rke_cluster "cluster" { - dynamic "nodes" { - for_each = [ - "192.168.1.110", - "192.168.1.111", - "192.168.1.112" - ] - content { - address = nodes.value - user = "root" - role = [ - "controlplane", - "etcd", - "worker" - ] - ssh_key = file("~/.ssh/id_rsa") - } - } - - dynamic "nodes" { - for_each = [ - "192.168.1.113" - ] - content { - address = nodes.value - user = "root" - role = [ - "worker" - ] - ssh_key = file("~/.ssh/id_rsa") - } - } - - ingress { - provider = "none" - } -} - -resource "local_file" "kube_config_yaml" { - filename = "${path.root}/kube_config.yaml" - content = rke_cluster.cluster.kube_config_yaml -} - -resource "helm_release" "metallb" { - name = "metallb" - repository = "https://charts.bitnami.com/bitnami" - chart = "metallb" - version = "1.0.1" - - namespace = "metallb-system" - create_namespace = true - - set { - name = "configInline" - value = <