Skip to content

Commit

Permalink
Use default openshift ingress (#414)
Browse files Browse the repository at this point in the history
* use default openshift ingress

* update comments
  • Loading branch information
shaynafinocchiaro authored Apr 30, 2024
1 parent e6b55d3 commit 9c2ba6c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/csm-authorization/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ dependencies:
- name: ingress-nginx
version: 4.0.19
repository: https://kubernetes.github.io/ingress-nginx
condition: ingress-nginx.enabled
condition: nginx.enabled
19 changes: 12 additions & 7 deletions charts/csm-authorization/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ kind: Ingress
metadata:
name: proxy-server
namespace: {{ include "custom.namespace" . }}
{{- if .Values.authorization.proxyServerIngress.annotations }}
annotations:
{{- if eq .Values.openshift true }}
route.openshift.io/termination: "edge"
{{- end }}
{{- if .Values.authorization.proxyServerIngress.annotations }}
{{- range $key, $value := .Values.authorization.proxyServerIngress.annotations }}
{{ $key }}: {{ tpl $value $ | quote }}
{{- end }}
{{- end }}
spec:
{{- if eq .Values.nginx.enabled true }}
ingressClassName: {{ .Values.authorization.proxyServerIngress.ingressClassName }}
{{- end }}
tls:
- hosts:
- {{ .Values.authorization.hostname }}
Expand All @@ -28,24 +33,24 @@ spec:
- host: {{ .Values.authorization.hostname }}
http:
paths:
- path: /
pathType: Prefix
backend:
- backend:
service:
name: proxy-server
port:
number: 8080
path: /
pathType: Prefix
{{- if .Values.authorization.proxyServerIngress.hosts }}
{{- range .Values.authorization.proxyServerIngress.hosts }}
- host: {{ tpl . $}}
http:
paths:
- path: /
pathType: Prefix
backend:
- backend:
service:
name: proxy-server
port:
number: 8080
path: /
pathType: Prefix
{{- end }}
{{- end}}
12 changes: 9 additions & 3 deletions charts/csm-authorization/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# if enabled, nginx ingress controller will be deployed
# set to true if installing on an OpenShift Container Platform
# if enabled, the OpenShift Ingress Operator will be used
# if you have your own ingress controller, keep this false and set the appropriate annotations for the ingresses in the authorization section
ingress-nginx:
openshift: false

# set to true if installing on a Kubernetes Container Platform
# if enabled, NGINX Ingress Controller will be deployed
# if you have your own ingress controller, keep this false and set the appropriate annotations for the ingresses in the authorization section
nginx:
enabled: true

# if enabled, cert-manager will be deployed
Expand Down Expand Up @@ -60,4 +66,4 @@ vault:
address: https://10.0.0.1:8400
kvEnginePath: secret
skipCertificateValidation: true


0 comments on commit 9c2ba6c

Please sign in to comment.