From c5159f35b852f0e327f30ec2d608a9d195a63768 Mon Sep 17 00:00:00 2001 From: Eamonn Mansour <47121388+eamansour@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:28:27 +0100 Subject: [PATCH] Parameterise inttest ingress to be able to deploy on different servers (#616) * Parameterise inttests ingress values Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com> * Fix CONTEXTROOT to serve inttests on a different server path Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com> --------- Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com> --- .../inttests/templates/deployment.yaml | 2 +- .../inttests/templates/ingress.yaml | 16 +++++++++------- .../galasa-development/inttests/values.yaml | 11 ++++++++++- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/templates/deployment.yaml b/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/templates/deployment.yaml index 453cf7a9..3bde630b 100644 --- a/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/templates/deployment.yaml +++ b/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/templates/deployment.yaml @@ -27,6 +27,6 @@ spec: name: inttests-{{ .Values.branch }} env: - name: CONTEXTROOT - value: {{ .Values.branch }}/maven-repo/inttests + value: {{ .Values.branch }}/maven-repo/{{ .Values.ingress.pathSuffix }} ports: - containerPort: 80 \ No newline at end of file diff --git a/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/templates/ingress.yaml b/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/templates/ingress.yaml index 5b15f3ee..5aaff908 100644 --- a/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/templates/ingress.yaml +++ b/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/templates/ingress.yaml @@ -9,16 +9,18 @@ kind: Ingress metadata: name: inttests-{{ .Values.branch }} namespace: {{ .Values.namespace }} + {{- with .Values.ingress.annotations }} annotations: - kubernetes.io/ingress.class: "public-iks-k8s-nginx" - + {{- toYaml . | nindent 4 }} + {{- end }} spec: + ingressClassName: {{ .Values.ingress.ingressClassName }} + {{- with .Values.ingress.tls }} tls: - - hosts: - - development.galasa.dev - secretName: galasa-wildcard-cert + {{- toYaml . | nindent 4 }} + {{- end }} rules: - - host: development.galasa.dev + - host: {{ .Values.ingress.externalHostname }} http: paths: - backend: @@ -26,5 +28,5 @@ spec: name: inttests-{{ .Values.branch }} port: number: 80 - path: /{{ .Values.branch }}/maven-repo/{{ .Values.ingressPathSuffix }} + path: /{{ .Values.branch }}/maven-repo/{{ .Values.ingress.pathSuffix }} pathType: Prefix \ No newline at end of file diff --git a/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/values.yaml b/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/values.yaml index 2c5ab2eb..f3c019c6 100644 --- a/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/values.yaml +++ b/infrastructure/galasa-plan-b-lon02/galasa-development/inttests/values.yaml @@ -8,4 +8,13 @@ namespace: galasa-development branch: main imageName: ghcr.io/galasa-dev/inttests-maven-artefacts imageTag: main -ingressPathSuffix: inttests + +ingress: + externalHostname: development.galasa.dev + ingressClassName: public-iks-k8s-nginx + pathSuffix: inttests + annotations: {} + tls: + - hosts: + - development.galasa.dev + secretName: galasa-wildcard-cert