Skip to content

Commit

Permalink
adding ingress template for ciso-assistant
Browse files Browse the repository at this point in the history
Signed-off-by: Sanskar Bhushan <sanskar@obmondo.com>
  • Loading branch information
sbdtu5498 authored and ashish1099 committed Jan 14, 2025
1 parent 9344460 commit b2db6ed
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,67 @@
{{- if .Values.ingress.enabled -}}

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
name: ciso-assistant-{{ .Values.clientName }}
name: ciso-assistant
labels:
client: {{ .Values.clientName }}
{{- include "common.labels" . | nindent 4 }}
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
ingressClassName: nginx
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .hosts | join ", " | quote }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.clientName }}.{{ .Values.clusterDomain }}
http:
paths:
- backend:
service:
name: ciso-assistant-{{ .Values.clientName }}
port:
number: 443
path: /
pathType: Prefix
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- if $.Values.caddy.enabled }}
- backend:
service:
name: ciso-assistant-{{ $.Values.clientName }}
port:
number: 443
path: /
pathType: Prefix
{{- else }}
- backend:
service:
name: ciso-assistant-ciso
port:
number: 3000
path: /
pathType: Prefix
- backend:
service:
name: ciso-assistant-ciso
port:
number: 8000
path: /api/iam/sso/redirect/
pathType: Prefix
- backend:
service:
name: ciso-assistant-ciso
port:
number: 8000
path: /api/accounts/saml/0/acs/
pathType: Prefix
- backend:
service:
name: ciso-assistant-ciso
port:
number: 8000
path: /api/accounts/saml/0/acs/finish/
pathType: Prefix
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
{{- include "common.labels" . | nindent 4 }}
spec:
ports:
{{- if .Values.caddy.enabled }}
- name: http
port: 80
protocol: TCP
Expand All @@ -15,6 +16,16 @@ spec:
port: 443
protocol: TCP
targetPort: 443
{{- else }}
- name: http-backend
port: 8000
protocol: TCP
targetPort: 8000
- name: http-frontend
port: 3000
protocol: TCP
targetPort: 3000
{{- end }}
selector:
app: ciso-assistant
client: {{ .Values.clientName }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ spec:
client: {{ .Values.clientName }}
name: db-data
spec:
storageClassName: {{ .Values.persistence.storageClass | quote }}
accessModes:
- {{ .Values.persistence.accessMode }}
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ image:
persistence:
size: 5Gi
accessMode: ReadWriteOnce

ingress:
enabled: false
8 changes: 8 additions & 0 deletions argocd-helm-charts/ciso-assistant/values.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
---
ciso-assistant:
clientName: ciso
email:
debug: true
ingress:
enabled: true
caddy:
enabled: false

0 comments on commit b2db6ed

Please sign in to comment.