Skip to content

Commit

Permalink
Don't generate ingresses if .Values.ingress.url isn't provided
Browse files Browse the repository at this point in the history
  • Loading branch information
rielas committed Apr 1, 2024
1 parent a0bc4a2 commit ac9b5f3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion charts/brokencrystals/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ description: |
Benchmark application that uses modern technologies and implements a set of
common security vulnerabilities
type: application
version: 0.0.66
version: 0.0.69
icon: https://raw.githubusercontent.com/NeuraLegion/brokencrystals/stable/public/public/assets/img/logo.png
keywords:
- brokencrystals
- brkn
12 changes: 8 additions & 4 deletions charts/brokencrystals/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.ingress.url }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand All @@ -7,9 +8,9 @@ metadata:
annotations:
nginx.ingress.kubernetes.io/proxy-ssl-protocols: "TLSv1.1 TLSv1.2"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
{{ if eq .Values.ingress.cert "" }}
{{- if eq .Values.ingress.cert "" }}
cert-manager.io/cluster-issuer: letsencrypt-cf-prod
{{ end }}
{{- end }}
spec:
ingressClassName: nginx
tls:
Expand All @@ -27,7 +28,9 @@ spec:
name: {{ .Release.Name }}
port:
number: 80
{{- end }}

{{- if .Values.ingress.url }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand All @@ -37,9 +40,9 @@ metadata:
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/proxy-ssl-protocols: "TLSv1.1 TLSv1.2"
{{ if eq .Values.ingress.cert "" }}
{{- if eq .Values.ingress.cert "" }}
cert-manager.io/cluster-issuer: letsencrypt-cf-prod
{{ end }}
{{- end }}
spec:
ingressClassName: nginx
tls:
Expand All @@ -57,3 +60,4 @@ spec:
name: {{ .Release.Name }}-keycloak
port:
number: 8080
{{- end }}
2 changes: 1 addition & 1 deletion charts/brokencrystals/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ingress:
url: k3s.brokencrystals.nexploit.app
url:
cert: ""
authlevel: "."
images:
Expand Down

0 comments on commit ac9b5f3

Please sign in to comment.