Skip to content

Commit

Permalink
Added static ip with tofu config. (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
pantierra authored Jan 6, 2025
1 parent 59c9b92 commit b930c3c
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 62 deletions.
127 changes: 75 additions & 52 deletions gfts-track-reconstruction/jupyterhub/tofu/.terraform.lock.hcl

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

36 changes: 36 additions & 0 deletions gfts-track-reconstruction/jupyterhub/tofu/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,42 @@ resource "ovh_cloud_project_kube" "cluster" {
update_policy = "MINIMAL_DOWNTIME"
}

resource "openstack_networking_floatingip_v2" "floating_ip" {
pool = "Ext-Net"
}

resource "kubernetes_service" "ingress" {
metadata {
name = "webapp-ingress-nginx"
namespace = "webapp"
annotations = {
"loadbalancer.openstack.org/floating-network-id" = openstack_networking_floatingip_v2.floating_ip.address
"kubernetes.io/ingress.class" = "webapp-nginx"
}
}
spec {
type = "loadbalancer"
external_traffic_policy = "local"
load_balancer_ip = openstack_networking_floatingip_v2.floating_ip.address
port {
name = "http"
port = 80
target_port = 80
protocol = "tcp"
}
port {
name = "https"
port = 443
target_port = 443
protocol = "tcp"
}
selector = {
"app.kubernetes.io/name" = "webapp-ingress-nginx"
"app.kubernetes.io/instance" = "webapp-ingress-nginx"
}
}
}

# ovh node flavors: https://www.ovhcloud.com/en/public-cloud/prices/

resource "ovh_cloud_project_kube_nodepool" "core" {
Expand Down
10 changes: 0 additions & 10 deletions webapp/deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@ ingress:
certManagerIssuer: letsencrypt-webapp
certManagerEmail: info@developmentseed.org

ingress-nginx:
controller:
ingressClass: "webapp-nginx"
ingressClassResource:
name: webapp-nginx
enabled: true
default: false
controllerValue: "k8s.io/webapp-ingress-nginx"
fullnameOverride: "webapp-ingress-nginx"

livenessProbe:
httpGet:
path: /
Expand Down

0 comments on commit b930c3c

Please sign in to comment.