Skip to content

Commit

Permalink
Merge #97
Browse files Browse the repository at this point in the history
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 <gael.demette@qonfucius.team>
Co-authored-by: alallema <alallema@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 26, 2022
2 parents 48dfc09 + 05d0e43 commit d301e12
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
4 changes: 2 additions & 2 deletions charts/meilisearch/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
appVersion: "v0.25.0"
appVersion: "v0.25.2"
description: A Helm chart for the Meilisearch search engine
name: meilisearch
version: 0.1.24
version: 0.1.25
icon: https://res.cloudinary.com/meilisearch/image/upload/v1597822872/Logo/logo_img.svg
home: https://github.com/meilisearch/meilisearch-kubernetes/charts
maintainers:
Expand Down
36 changes: 26 additions & 10 deletions charts/meilisearch/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "meilisearch.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
Expand All @@ -13,10 +19,10 @@ metadata:
{{- with .Values.customLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
{{- . | toYaml | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
Expand All @@ -30,12 +36,22 @@ spec:
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: 80
{{- else }}
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/meilisearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ livenessProbe:

image:
repository: getmeili/meilisearch
tag: v0.25.0
tag: v0.25.2
pullPolicy: IfNotPresent
pullSecret:

Expand Down
2 changes: 1 addition & 1 deletion manifests/meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
serviceAccountName: meilisearch
containers:
- name: meilisearch
image: "getmeili/meilisearch:v0.25.0"
image: "getmeili/meilisearch:v0.25.2"
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
Expand Down

0 comments on commit d301e12

Please sign in to comment.