Skip to content

Commit

Permalink
Merge pull request #20 from adamrushuk/fix-nexus-ingress
Browse files Browse the repository at this point in the history
Fixed ingress
  • Loading branch information
adamrushuk authored Oct 19, 2022
2 parents df91979 + 7cb72c2 commit 1235c55
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion charts/sonatype-nexus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
26 changes: 11 additions & 15 deletions charts/sonatype-nexus/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down Expand Up @@ -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 }}

0 comments on commit 1235c55

Please sign in to comment.