From 7cb72c27cef92edd118da7922efe55ffe7e56c33 Mon Sep 17 00:00:00 2001 From: Adam Rush Date: Wed, 19 Oct 2022 11:49:20 +0100 Subject: [PATCH] Fixed ingress --- charts/sonatype-nexus/Chart.yaml | 2 +- charts/sonatype-nexus/templates/ingress.yaml | 26 +++++++++----------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/charts/sonatype-nexus/Chart.yaml b/charts/sonatype-nexus/Chart.yaml index 688d9a7..e78a1cc 100644 --- a/charts/sonatype-nexus/Chart.yaml +++ b/charts/sonatype-nexus/Chart.yaml @@ -3,7 +3,7 @@ name: sonatype-nexus description: Sonatype Nexus is an open source repository manager type: application # This is the chart version -version: 0.3.0 +version: 0.3.1 # This is the version number of the application being deployed appVersion: 3.42.0 keywords: diff --git a/charts/sonatype-nexus/templates/ingress.yaml b/charts/sonatype-nexus/templates/ingress.yaml index be0532b..24529cc 100644 --- a/charts/sonatype-nexus/templates/ingress.yaml +++ b/charts/sonatype-nexus/templates/ingress.yaml @@ -1,18 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "sonatype-nexus.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }} @@ -42,13 +31,20 @@ spec: paths: - path: / backend: - serviceName: {{ $fullName }} - servicePort: {{ .Values.nexus.nexusPort }} + service: + name: {{ $fullName }} + port: + number: {{ .Values.nexus.nexusPort }} + pathType: ImplementationSpecific + - host: docker.{{ .Values.nexus.baseDomain }} http: paths: - path: / backend: - serviceName: {{ $fullName }} - servicePort: {{ .Values.nexus.dockerPort }} + service: + name: {{ $fullName }} + port: + number: {{ .Values.nexus.dockerPort }} + pathType: ImplementationSpecific {{- end }}