Skip to content

Commit d301e12

Browse files
bors[bot]Nainterceptoralallema
authored
Merge #97
97: Ingress compatibility with kubernetes 1.23+ r=alallema a=Nainterceptor # Pull Request ## What does this PR do? Fixes #96 ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue? - [ ] Have you read the contributing guidelines? - [ ] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to MeiliSearch! Co-authored-by: Nainterceptor <[email protected]> Co-authored-by: alallema <[email protected]>
2 parents 48dfc09 + 05d0e43 commit d301e12

File tree

4 files changed

+30
-14
lines changed

4 files changed

+30
-14
lines changed

charts/meilisearch/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
2-
appVersion: "v0.25.0"
2+
appVersion: "v0.25.2"
33
description: A Helm chart for the Meilisearch search engine
44
name: meilisearch
5-
version: 0.1.24
5+
version: 0.1.25
66
icon: https://res.cloudinary.com/meilisearch/image/upload/v1597822872/Logo/logo_img.svg
77
home: https://github.com/meilisearch/meilisearch-kubernetes/charts
88
maintainers:
Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{{- if .Values.ingress.enabled -}}
22
{{- $fullName := include "meilisearch.fullname" . -}}
33
{{- $ingressPath := .Values.ingress.path -}}
4+
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
5+
apiVersion: networking.k8s.io/v1
6+
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
47
apiVersion: networking.k8s.io/v1beta1
8+
{{- else -}}
9+
apiVersion: extensions/v1beta1
10+
{{- end }}
511
kind: Ingress
612
metadata:
713
name: {{ $fullName }}
@@ -13,10 +19,10 @@ metadata:
1319
{{- with .Values.customLabels }}
1420
{{- toYaml . | nindent 4 }}
1521
{{- end }}
16-
{{- with .Values.ingress.annotations }}
22+
{{- with .Values.ingress.annotations }}
1723
annotations:
18-
{{ toYaml . | indent 4 }}
19-
{{- end }}
24+
{{- . | toYaml | nindent 4 }}
25+
{{- end }}
2026
spec:
2127
{{- if .Values.ingress.tls }}
2228
tls:
@@ -30,12 +36,22 @@ spec:
3036
{{- end }}
3137
rules:
3238
{{- range .Values.ingress.hosts }}
33-
- host: {{ . | quote }}
34-
http:
35-
paths:
36-
- path: {{ $ingressPath }}
37-
backend:
38-
serviceName: {{ $fullName }}
39-
servicePort: http
39+
- host: {{ . | quote }}
40+
http:
41+
paths:
42+
- path: {{ $ingressPath }}
43+
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
44+
pathType: Prefix
45+
{{- end }}
46+
backend:
47+
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
48+
service:
49+
name: {{ $fullName }}
50+
port:
51+
number: 80
52+
{{- else }}
53+
serviceName: {{ $fullName }}
54+
servicePort: http
55+
{{- end }}
4056
{{- end }}
4157
{{- end }}

charts/meilisearch/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ livenessProbe:
1414

1515
image:
1616
repository: getmeili/meilisearch
17-
tag: v0.25.0
17+
tag: v0.25.2
1818
pullPolicy: IfNotPresent
1919
pullSecret:
2020

manifests/meilisearch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ spec:
6363
serviceAccountName: meilisearch
6464
containers:
6565
- name: meilisearch
66-
image: "getmeili/meilisearch:v0.25.0"
66+
image: "getmeili/meilisearch:v0.25.2"
6767
imagePullPolicy: IfNotPresent
6868
envFrom:
6969
- configMapRef:

0 commit comments

Comments
 (0)