File tree Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v2
2
2
description : An e-mail testing tool for developers
3
3
name : mailhog
4
4
appVersion : v1.0.1
5
- version : 5.0.1
5
+ version : 5.0.2
6
6
type : application
7
7
keywords :
8
8
- mailhog
Original file line number Diff line number Diff line change @@ -81,14 +81,3 @@ Create the name for the outgoing-smtp secret.
81
81
{ {- template " mailhog.fullname" . -} }-outgoing-smtp
82
82
{ {- end -} }
83
83
{ {- end -} }
84
-
85
- { {/*
86
- Return the appropriate apiVersion for ingress.
87
- */} }
88
- { {- define " mailhog.ingressAPIVersion" -} }
89
- { {- if .Capabilities.APIVersions.Has " networking.k8s.io/v1/Ingress" -} }
90
- { {- print " networking.k8s.io/v1" -} }
91
- { {- else -} }
92
- { {- print " networking.k8s.io/v1beta1" -} }
93
- { {- end -} }
94
- { {- end -} }
Original file line number Diff line number Diff line change 1
1
{{- if .Values.ingress.enabled -}}
2
2
{{- $fullName := include "mailhog.fullname" . -}}
3
- apiVersion : {{ include "mailhog.ingressAPIVersion" . }}
3
+ {{- $apiV1 := false -}}
4
+ {{- $apiVersion := "extensions/v1beta1" -}}
5
+ {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= v1.19.0-0" .Capabilities.KubeVersion.Version) -}}
6
+ {{- $apiVersion = "networking.k8s.io/v1" -}}
7
+ {{- $apiV1 = true -}}
8
+ {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
9
+ {{- $apiVersion = "networking.k8s.io/v1beta1" -}}
10
+ {{- else -}}
11
+ {{- $apiVersion = "extensions/v1beta1" -}}
12
+ {{- end }}
13
+ apiVersion : {{ $apiVersion }}
4
14
kind : Ingress
5
15
metadata :
6
16
name : {{ $fullName }}
37
47
paths :
38
48
{{- range .paths }}
39
49
- path : {{ .path }}
40
- {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
50
+ {{- if $apiV1 }}
41
51
pathType : {{ .pathType }}
42
52
backend :
43
53
service :
You can’t perform that action at this time.
0 commit comments