Skip to content

Commit

Permalink
[stable/polaris] Default to networking/v1 for ingress (#1383)
Browse files Browse the repository at this point in the history
* [stable/polaris] Default to networking/v1 for ingress

* remove the remaining stuff

* Fix ingress
  • Loading branch information
sudermanjr authored Dec 4, 2023
1 parent 5819f98 commit b8aa669
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
3 changes: 3 additions & 0 deletions stable/polaris/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ All notable changes to this Helm chart will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this chart adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 5.17.0
* Removed the switch for networking apiVersion and default to networking/v1

## 5.16.0
* Added default PDBs for both the webhook and the dashboard

Expand Down
2 changes: 1 addition & 1 deletion stable/polaris/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Validation of best practices in your Kubernetes clusters
name: polaris
version: 5.16.0
version: 5.17.0
appVersion: "8.5"
kubeVersion: ">= 1.22.0-0"
icon: https://raw.githubusercontent.com/FairwindsOps/polaris/master/pkg/dashboard/assets/favicon-32x32.png
Expand Down
12 changes: 0 additions & 12 deletions stable/polaris/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{{- if .Values.dashboard.ingress.enabled -}}
{{ $serviceName := printf "%s-dashboard" (include "polaris.fullname" .) -}}
{{- if not (.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: Ingress
metadata:
annotations:
Expand All @@ -17,9 +13,7 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
name: polaris
spec:
{{- if and (.Values.dashboard.ingress.ingressClassName) (.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") }}
ingressClassName: {{ .Values.dashboard.ingress.ingressClassName }}
{{- end }}
{{- if .Values.dashboard.ingress.defaultBackendEnabled }}
defaultBackend:
service:
Expand All @@ -32,19 +26,13 @@ spec:
- host: {{ . }}
http:
paths:
{{- if not ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") }}
- backend:
serviceName: {{ $serviceName }}
servicePort: 80
{{- else }}
- backend:
service:
name: {{ $serviceName }}
port:
number: 80
path: /
pathType: Prefix
{{- end }}
{{- end -}}
{{- if .Values.dashboard.ingress.tls }}
tls:
Expand Down

0 comments on commit b8aa669

Please sign in to comment.