mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
Use new Ingress API (#1659)
`extensions/v1beta1` API for Ingress is deprecated since Kuberentes 1.14. Ref: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.14.md#deprecations This commit adds a check using Helm Capabilities to deploy Ingress with newer API.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
name: athens-proxy
|
||||
version: 0.4.12
|
||||
version: 0.4.13
|
||||
appVersion: 0.9.0
|
||||
description: The proxy server for Go modules
|
||||
icon: https://raw.githubusercontent.com/gomods/athens/main/docs/static/banner.png
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $serviceName := include "fullname" . -}}
|
||||
{{- $servicePort := .Values.service.servicePort -}}
|
||||
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
|
||||
Reference in New Issue
Block a user