Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #306 from Oteemo/fix-ingress-checks
Browse files Browse the repository at this point in the history
Fix ingress api checks
  • Loading branch information
rjkernick authored Sep 18, 2021
2 parents c9c8c18 + 4aa0da5 commit d801666
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion charts/sonarqube/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: sonarqube
description: SonarQube is an open sourced code quality scanning tool
version: 9.8.0
version: 9.8.1
appVersion: 8.5.1-community
keywords:
- coverage
Expand Down
8 changes: 4 additions & 4 deletions charts/sonarqube/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $serviceName := include "sonarqube.fullname" . -}}
{{- $servicePort := .Values.service.externalPort -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}}
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
Expand Down Expand Up @@ -44,11 +44,11 @@ spec:
http:
paths:
- path: {{ .path}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: Prefix
{{- end }}
backend:
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
service:
name: {{ default $serviceName .serviceName }}
port:
Expand Down
2 changes: 1 addition & 1 deletion charts/sonatype-nexus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: sonatype-nexus
version: 5.3.2
version: 5.3.3
appVersion: 3.33.0
description: Sonatype Nexus is an open source repository manager
keywords:
Expand Down
6 changes: 3 additions & 3 deletions charts/sonatype-nexus/templates/ingress-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
{{- $servicePort = .Values.nexusProxy.port -}}
{{- end }}

{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}}
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
Expand Down Expand Up @@ -40,7 +40,7 @@ spec:
http:
paths:
- path: {{ .Values.ingressDocker.path }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: {{ .Values.ingressDocker.pathType }}
backend:
service:
Expand Down
6 changes: 3 additions & 3 deletions charts/sonatype-nexus/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
{{- $servicePort = .Values.nexusProxy.port -}}
{{- end }}

{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}}
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
Expand Down Expand Up @@ -40,7 +40,7 @@ spec:
http:
paths:
- path: {{ .Values.ingress.path }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: {{ .Values.ingress.pathType }}
backend:
service:
Expand Down

0 comments on commit d801666

Please sign in to comment.