Skip to content

Commit

Permalink
Revert "Don't generate ingresses if .Values.ingress.url isn't provided"
Browse files Browse the repository at this point in the history
This reverts commit 76ca2ca.
  • Loading branch information
rielas committed Apr 1, 2024
1 parent 76ca2ca commit da005f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion charts/brokencrystals/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: |
Benchmark application that uses modern technologies and implements a set of
common security vulnerabilities
type: application
version: 0.0.67
version: 0.0.68
keywords:
- brokencrystals
- brkn
16 changes: 6 additions & 10 deletions charts/brokencrystals/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.ingress.url }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand All @@ -8,15 +7,15 @@ 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:
- hosts:
- {{ .Values.ingress.url }}
secretName: {{- if eq .Values.ingress.cert "" }}{{ include "brokencrystals.fullname" . }}-brokencrystals-secret{{ else }}{{ .Values.ingress.cert }}{{- end }}
secretName: {{ if eq .Values.ingress.cert "" }}{{ include "brokencrystals.fullname" . }}-brokencrystals-secret{{ else }}{{ .Values.ingress.cert }}{{ end }}
rules:
- host: {{ .Values.ingress.url }}
http:
Expand All @@ -28,9 +27,7 @@ spec:
name: {{ .Release.Name }}
port:
number: 80
{{- end }}

{{- if .Values.ingress.url }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand All @@ -40,15 +37,15 @@ 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:
- hosts:
- auth{{ .Values.ingress.authlevel }}{{ .Values.ingress.url }}
secretName: {{- if eq .Values.ingress.cert "" }}{{ include "brokencrystals.fullname" . }}-brokencrystals-keycloak-secret{{ else }}{{ .Values.ingress.cert }}{{- end }}
secretName: {{ if eq .Values.ingress.cert "" }}{{ include "brokencrystals.fullname" . }}-brokencrystals-keycloak-secret{{ else }}{{ .Values.ingress.cert }}{{ end }}
rules:
- host: auth{{ .Values.ingress.authlevel }}{{ .Values.ingress.url }}
http:
Expand All @@ -60,4 +57,3 @@ 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:
url: k3s.brokencrystals.nexploit.app
cert: ""
authlevel: "."
images:
Expand Down

0 comments on commit da005f3

Please sign in to comment.