Skip to content

Commit

Permalink
cleanup: empty doks and doks-public Kubernetes clusters (jenkins-infr…
Browse files Browse the repository at this point in the history
…a#198)

* cleanup: empty doks and doks-public Kubernetes clusters as per https://github.com/jenkins-infra/helpdesk/issues/3954\#issuecomment-2119858778

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>

* fixup

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>

* fixup

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>

---------

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
  • Loading branch information
dduportal authored May 21, 2024
1 parent e39fc4d commit 56dc4d4
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 70 deletions.
22 changes: 0 additions & 22 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ resource "digitalocean_domain" "do_jenkins_io" {
name = "do.jenkins.io"
}

resource "digitalocean_record" "repo_ipv4" {
domain = digitalocean_domain.do_jenkins_io.id
type = "A"
name = "repo"
value = data.digitalocean_loadbalancer.doks_public.ip
}

resource "digitalocean_record" "archives_ipv4" {
domain = digitalocean_domain.do_jenkins_io.id
type = "A"
Expand Down
16 changes: 0 additions & 16 deletions doks-cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,3 @@ provider "kubernetes" {
"--version=v1beta1", digitalocean_kubernetes_cluster.doks_cluster.id]
}
}

# Configure the jenkins-infra/kubernetes-management admin service account
module "doks_admin_sa" {
providers = {
kubernetes = kubernetes.doks
}
source = "./.shared-tools/terraform/modules/kubernetes-admin-sa"
cluster_name = local.cluster_name
cluster_hostname = digitalocean_kubernetes_cluster.doks_cluster.kube_config.0.host
cluster_ca_certificate_b64 = digitalocean_kubernetes_cluster.doks_cluster.kube_config.0.cluster_ca_certificate
}

output "kubeconfig_doks" {
sensitive = true
value = module.doks_admin_sa.kubeconfig
}
24 changes: 0 additions & 24 deletions doks-public-cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,3 @@ provider "kubernetes" {
"--version=v1beta1", digitalocean_kubernetes_cluster.doks_public_cluster.id]
}
}

# Configure the jenkins-infra/kubernetes-management admin service account
module "doks_public_admin_sa" {
providers = {
kubernetes = kubernetes.doks_public
}
source = "./.shared-tools/terraform/modules/kubernetes-admin-sa"
cluster_name = local.public_cluster_name
cluster_hostname = digitalocean_kubernetes_cluster.doks_public_cluster.kube_config.0.host
cluster_ca_certificate_b64 = digitalocean_kubernetes_cluster.doks_public_cluster.kube_config.0.cluster_ca_certificate
}

output "kubeconfig_doks_public" {
sensitive = true
value = module.doks_public_admin_sa.kubeconfig
}

data "digitalocean_loadbalancer" "doks_public" {
name = "a04ff19a8410b4ac5a2b5c383b23a8b2"
}

output "doks_public_public_ipv4_address" {
value = data.digitalocean_loadbalancer.doks_public.ip
}

0 comments on commit 56dc4d4

Please sign in to comment.