Skip to content

Commit

Permalink
edjusting test
Browse files Browse the repository at this point in the history
  • Loading branch information
sabamushtashvili committed Aug 14, 2023
1 parent dd70998 commit c3ca1bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions box-chart/templates/_ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Generating ingress rules for pod
*/}}
{{- define "ingress" }}
---
{{- if or (gt (len .Values.component.extendedSettings.service.ingress.urlPaths) 0) }}
{{- if or (gt (len .Values.component.extendedSettings.service.clusterIP) 0)}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand All @@ -27,7 +27,7 @@ spec:
paths:
{{- if and (.Values.component.extendedSettings.service.nodePort) (eq .Values.component.extendedSettings.service.enabled true) }}
{{- range $path := .Values.component.extendedSettings.service.nodePort }}
- path: /{{ $.Release.Namespace }}/{{ trimAll "/" $path }}/{{ ternary "" "(.*)" $.Values.openshift.enabled }}
- path: /{{ $.Release.Namespace }}/{{ trimAll "/" $path.urlPath }}/{{ ternary "" "(.*)" $.Values.openshift.enabled }}
pathType: Prefix
backend:
service:
Expand All @@ -37,7 +37,7 @@ spec:
{{- end }}
{{ else if and (.Values.component.extendedSettings.service.loadBalancer) (eq .Values.component.extendedSettings.service.enabled true) }}
{{- range $path := .Values.component.extendedSettings.service.loadBalancer }}
- path: /{{ $.Release.Namespace }}/{{ trimAll "/" $path }}/{{ ternary "" "(.*)" $.Values.openshift.enabled }}
- path: /{{ $.Release.Namespace }}/{{ trimAll "/" $path.urlPath }}/{{ ternary "" "(.*)" $.Values.openshift.enabled }}
pathType: Prefix
backend:
service:
Expand All @@ -47,7 +47,7 @@ spec:
{{- end }}
{{ else if and (.Values.component.extendedSettings.service.clusterIP) (eq .Values.component.extendedSettings.service.enabled true) }}
{{- range $path := .Values.component.extendedSettings.service.clusterIP }}
- path: /{{ $.Release.Namespace }}/{{ trimAll "/" $path }}/{{ ternary "" "(.*)" $.Values.openshift.enabled }}
- path: /{{ $.Release.Namespace }}/{{ trimAll "/" $path.urlPath }}/{{ ternary "" "(.*)" $.Values.openshift.enabled }}
pathType: Prefix
backend:
service:
Expand Down Expand Up @@ -100,6 +100,8 @@ spec:
{{- range $path := .Values.component.extendedSettings.service.clusterIP }}
number: {{ default "8080" $path.containerPort }}
{{- end }}
{{ else }}
number: 8080
{{- end }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions box-chart/tests/ingress_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tests:
clusterIP:
- name: IP
containerPort: 8081
urlPaths: /test/path/
urlPath: /test/path/
asserts:
- isKind:
of: Ingress
Expand All @@ -44,7 +44,7 @@ tests:
service:
name: testservice
port:
number: 8080
number: 8081
- it: rpt-data-provider - common check
documentIndex: 2
set:
Expand Down

0 comments on commit c3ca1bd

Please sign in to comment.