Skip to content

Commit

Permalink
use either stable or beta ingress resource
Browse files Browse the repository at this point in the history
  • Loading branch information
zubenkoivan committed Feb 19, 2022
1 parent 004fa0d commit ef29c8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/platform-monitoring/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ version: $CHART_VERSION
appVersion: $APP_VERSION
dependencies:
- name: k8s-resources
version: "1.0.0"
version: "1.0.1"
repository: https://neuro-inc.github.io/helm-charts
8 changes: 3 additions & 5 deletions charts/platform-monitoring/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
{{- if .Values.ingress.enabled }}
{{- $ingressApiIsStable := eq (include "k8s.ingress.isStable" .) "true" -}}
{{- $ingressSupportsIngressClassName := eq (include "k8s.ingress.supportsIngressClassName" .) "true" -}}
{{- $ingressSupportsPathType := eq (include "k8s.ingress.supportsPathType" .) "true" -}}
apiVersion: {{ include "k8s.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "platformMonitoring.fullname" . }}
labels: {{ include "platformMonitoring.labels.standard" . | nindent 4 }}
service: platform-monitoring
annotations:
{{- if not $ingressSupportsIngressClassName }}
{{- if and (not $ingressApiIsStable) .Values.ingress.ingressClassName }}
kubernetes.io/ingress.class: {{ .Values.ingress.ingressClassName }}
{{- end }}
{{- with .Values.ingress.annotations }}
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if $ingressSupportsIngressClassName }}
{{- if and $ingressApiIsStable .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- end }}
rules:
Expand All @@ -25,7 +23,7 @@ spec:
http:
paths:
- path: /api/v1/jobs
{{- if $ingressSupportsPathType }}
{{- if $ingressApiIsStable }}
pathType: Prefix
{{- end }}
backend:
Expand Down

0 comments on commit ef29c8d

Please sign in to comment.