diff --git a/infrastructure/helm-chart/charts/ingress-controller/templates/ingress-controller.yaml b/infrastructure/helm-chart/charts/ingress-controller/templates/ingress-controller.yaml index 66f879623d..8f69240691 100644 --- a/infrastructure/helm-chart/charts/ingress-controller/templates/ingress-controller.yaml +++ b/infrastructure/helm-chart/charts/ingress-controller/templates/ingress-controller.yaml @@ -247,21 +247,3 @@ spec: securityContext: runAsNonRoot: true runAsUser: 2000 ---- -{{ if .Values.global.ingress.nodePort }} -kind: Service -apiVersion: v1 -metadata: - name: traefik-node-port - namespace: kube-system -spec: - selector: - k8s-app: traefik-ingress-lb - ports: - - protocol: TCP - port: 80 - nodePort: {{ .Values.global.ingress.nodePort }} - targetPort: 80 - name: web - type: NodePort -{{ end }} diff --git a/infrastructure/helm-chart/charts/ingress-controller/templates/service.yaml b/infrastructure/helm-chart/charts/ingress-controller/templates/service.yaml index 1236bfcb13..2023652e48 100644 --- a/infrastructure/helm-chart/charts/ingress-controller/templates/service.yaml +++ b/infrastructure/helm-chart/charts/ingress-controller/templates/service.yaml @@ -59,7 +59,7 @@ spec: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/component: controller --- -{{ if .Values.global.kubernetes.ngrokEnabled }} +{{ if or ( .Values.global.kubernetes.ngrokEnabled ) ( .Values.global.ingress.nodePort ) }} kind: Service apiVersion: v1 metadata: @@ -70,7 +70,7 @@ spec: ports: - protocol: TCP port: 80 - nodePort: 80 + nodePort: {{ default 80 .Values.global.ingress.nodePort }} targetPort: 80 name: web selector: diff --git a/infrastructure/terraform/demos/analytics/files/values.yaml b/infrastructure/terraform/demos/analytics/files/values.yaml index 35146f847e..02a1f395d4 100644 --- a/infrastructure/terraform/demos/analytics/files/values.yaml +++ b/infrastructure/terraform/demos/analytics/files/values.yaml @@ -1,6 +1,6 @@ global: kubernetes: - appImageTag: 0.30.0 + appImageTag: ${app_image_tag} containerRegistry: ghcr.io/airyhq namespace: default ngrokEnabled: false diff --git a/infrastructure/terraform/demos/analytics/main.tf b/infrastructure/terraform/demos/analytics/main.tf index a766bf6308..77dd3fc540 100644 --- a/infrastructure/terraform/demos/analytics/main.tf +++ b/infrastructure/terraform/demos/analytics/main.tf @@ -19,14 +19,14 @@ provider "helm" { module "vpc" { source = "scholzj/vpc/aws" - aws_region = "${var.aws_region}" - aws_zones = "${var.aws_zones}" - vpc_name = "${var.vpc_name}" - vpc_cidr = "${var.vpc_cidr}" - private_subnets = "${var.private_subnets}" + aws_region = var.aws_region + aws_zones = var.aws_zones + vpc_name = var.vpc_name + vpc_cidr = var.vpc_cidr + private_subnets = var.private_subnets ## Tags - tags = "${var.tags}" + tags = var.tags } module "minikube" { @@ -34,7 +34,7 @@ module "minikube" { version = "1.14.1" aws_subnet_id = module.vpc.subnet_ids[0] - aws_instance_type = "m4.large" + aws_instance_type = "m4.xlarge" cluster_name = var.host hosted_zone = var.hosted_zone tags = { @@ -52,8 +52,8 @@ module "minikube" { resource "null_resource" "k8s_configuration" { triggers = { - host = var.host - hosted_zone = var.hosted_zone + host = var.host + hosted_zone = var.hosted_zone } provisioner "local-exec" { command = "sleep 240 && scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null centos@${self.triggers.host}.${var.hosted_zone}:/home/centos/kubeconfig ${var.kubeconfig_file}" @@ -68,8 +68,9 @@ data "template_file" "values_yaml" { template = file("${path.module}/files/values.yaml") vars = { - host = var.host - hosted_zone = var.hosted_zone + host = var.host + hosted_zone = var.hosted_zone + app_image_tag = replace(file("${path.module}/../../../../VERSION"), "\n", "") } } @@ -94,10 +95,10 @@ resource "helm_release" "airy_core" { } resource "helm_release" "jupyterhub" { - name = "jupyterhub" + name = "jupyterhub" chart = "https://jupyterhub.github.io/helm-chart/jupyterhub-1.1.3.tgz" - values = [ file("${path.module}/files/jupyter-config.yaml") ] + values = [file("${path.module}/files/jupyter-config.yaml")] depends_on = [ null_resource.k8s_configuration