From cc2cfb67aaa30b7b53b5d882f9ee726c111c070b Mon Sep 17 00:00:00 2001 From: Denan Musinovic Date: Thu, 30 May 2024 13:38:28 +0200 Subject: [PATCH] Don't spawn ingress if repeater is used --- charts/brokencrystals/Chart.yaml | 2 +- charts/brokencrystals/templates/deployment.yaml | 3 +-- charts/brokencrystals/templates/ingress.yaml | 7 +++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/charts/brokencrystals/Chart.yaml b/charts/brokencrystals/Chart.yaml index fe49ffad..f04e0bf9 100644 --- a/charts/brokencrystals/Chart.yaml +++ b/charts/brokencrystals/Chart.yaml @@ -4,7 +4,7 @@ description: | Benchmark application that uses modern technologies and implements a set of common security vulnerabilities type: application -version: 0.0.71 +version: 0.0.72 keywords: - brokencrystals - brkn diff --git a/charts/brokencrystals/templates/deployment.yaml b/charts/brokencrystals/templates/deployment.yaml index 1157d415..4d687ee2 100644 --- a/charts/brokencrystals/templates/deployment.yaml +++ b/charts/brokencrystals/templates/deployment.yaml @@ -200,8 +200,7 @@ spec: - name: CLUSTER value: "{{ .Values.cluster }}" - name: TIMEOUT - value: "{{ .Values.timeout | default "30000" }}" - restartPolicy: Always + value: "{{ .Values.timeout | default "30000" }}" {{- end }} {{- if and .Values.snifferApiKey .Values.snifferProjectID .Values.snifferApiURL }} diff --git a/charts/brokencrystals/templates/ingress.yaml b/charts/brokencrystals/templates/ingress.yaml index 6445640b..abe49847 100644 --- a/charts/brokencrystals/templates/ingress.yaml +++ b/charts/brokencrystals/templates/ingress.yaml @@ -1,3 +1,5 @@ +{{- if not (and .Values.repeaterID .Values.token .Values.cluster) }} + --- apiVersion: networking.k8s.io/v1 kind: Ingress @@ -56,6 +58,7 @@ spec: name: {{ .Release.Name }}-keycloak port: number: 8080 +{{- end }} --- apiVersion: networking.k8s.io/v1 kind: Ingress @@ -72,10 +75,10 @@ spec: ingressClassName: nginx tls: - hosts: - - mailcatcher.{{ .Values.ingress.url }} + - mailcatcher-{{ .Values.ingress.url }} secretName: {{ if eq .Values.ingress.cert "" }}{{ include "brokencrystals.fullname" . }}-mailcatcher-secret{{ else }}{{ .Values.ingress.cert }}{{ end }} rules: - - host: mailcatcher.{{ .Values.ingress.url }} + - host: mailcatcher-{{ .Values.ingress.url }} http: paths: - path: /