From 81924fc95fd2a967b066c569c5362a70bde9d048 Mon Sep 17 00:00:00 2001 From: fcomte Date: Wed, 18 May 2022 09:39:35 +0000 Subject: [PATCH] ingress opa --- charts/opa/Chart.yaml | 2 +- charts/opa/templates/ingress.yaml | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/charts/opa/Chart.yaml b/charts/opa/Chart.yaml index 08d39cf..10ed252 100644 --- a/charts/opa/Chart.yaml +++ b/charts/opa/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.0 +version: 0.3.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/opa/templates/ingress.yaml b/charts/opa/templates/ingress.yaml index 3373ee1..f13ffd1 100644 --- a/charts/opa/templates/ingress.yaml +++ b/charts/opa/templates/ingress.yaml @@ -1,11 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "opa.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -33,9 +29,12 @@ spec: paths: {{- range .paths }} - path: {{ . }} + pathType: Prefix backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} {{- end }} {{- end }} {{- end }}