Skip to content

Commit 432d3b2

Browse files
todpunkTod Hansmann
andauthored
feat: update Ingress Template (#28)
* add parameter to disable second ingress path * update ingress apiversion * add paths to be more idiomatic * add paths separate from hosts * add default paths list to include base path * rename extension api value to descriptive of the change in ingress template Co-authored-by: Tod Hansmann <[email protected]>
1 parent dd62673 commit 432d3b2

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

charts/verdaccio/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: A lightweight private npm proxy registry (sinopia fork)
33
name: verdaccio
4-
version: 0.13.0
4+
version: 0.14.0
55
appVersion: 4.6.2
66
home: https://verdaccio.org
77
icon: https://cdn.verdaccio.dev/logos/default.png

charts/verdaccio/templates/ingress.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
{{- if .Values.ingress.enabled }}
22
{{- $serviceName := include "verdaccio.fullname" . -}}
33
{{- $servicePort := .Values.service.port -}}
4+
{{- $paths := .Values.ingress.paths -}}
5+
{{- if .Values.ingress.useExtensionsApi }}
46
apiVersion: extensions/v1beta1
7+
{{- else }}
8+
apiVersion: networking.k8s.io/v1beta1
9+
{{- end }}
510
kind: Ingress
611
metadata:
712
name: {{ template "verdaccio.fullname" . }}
@@ -16,19 +21,28 @@ metadata:
1621
{{- end }}
1722
spec:
1823
rules:
24+
{{- if .Values.ingress.hosts }}
1925
{{- range $host := .Values.ingress.hosts }}
2026
- host: {{ $host }}
2127
http:
2228
paths:
23-
- path: /
29+
{{- range $p := $paths }}
30+
- path: {{ $p }}
2431
backend:
2532
serviceName: {{ $serviceName }}
2633
servicePort: {{ $servicePort }}
27-
- path: /*
34+
{{- end -}}
35+
{{- end -}}
36+
{{- else }}
37+
- http:
38+
paths:
39+
{{- range $p := $paths }}
40+
- path: {{ $p }}
2841
backend:
2942
serviceName: {{ $serviceName }}
3043
servicePort: {{ $servicePort }}
3144
{{- end -}}
45+
{{- end -}}
3246
{{- if .Values.ingress.tls }}
3347
tls:
3448
{{ toYaml .Values.ingress.tls | indent 4 }}

charts/verdaccio/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ resources: {}
3939

4040
ingress:
4141
enabled: false
42+
# Set to true if you are on an old cluster where apiVersion extensions/v1beta1 is required
43+
useExtensionsApi: false
44+
paths:
45+
- /
4246
# hosts:
4347
# - npm.blah.com
4448
# annotations:

0 commit comments

Comments
 (0)