diff --git a/charts/quickwit/Chart.yaml b/charts/quickwit/Chart.yaml index bda0576..ecee380 100644 --- a/charts/quickwit/Chart.yaml +++ b/charts/quickwit/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: quickwit description: Sub-second search & analytics engine on cloud storage. type: application -version: 0.7.14 -appVersion: "v0.8.2" +version: 0.7.15 +appVersion: v0.8.2 keywords: - quickwit - search diff --git a/charts/quickwit/templates/NOTES.txt b/charts/quickwit/templates/NOTES.txt deleted file mode 100644 index cf0d945..0000000 --- a/charts/quickwit/templates/NOTES.txt +++ /dev/null @@ -1,22 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "quickwit.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "quickwit.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "quickwit.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "quickwit.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/charts/quickwit/templates/ingress.yaml b/charts/quickwit/templates/ingress.yaml index 7104218..fba226b 100644 --- a/charts/quickwit/templates/ingress.yaml +++ b/charts/quickwit/templates/ingress.yaml @@ -1,20 +1,9 @@ {{- if .Values.ingress.enabled -}} -{{- $fullName := include "quickwit.fullname" . -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- $fullname := include "quickwit.fullname" . }} 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 }} + name: {{ $fullname }} labels: {{- include "quickwit.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} @@ -22,9 +11,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} ingressClassName: {{ .Values.ingress.className }} - {{- end }} {{- if .Values.ingress.tls }} tls: {{- range .Values.ingress.tls }} @@ -36,25 +23,43 @@ spec: {{- end }} {{- end }} rules: - {{- range .Values.ingress.hosts }} + {{- if and .Values.ingress.hosts (eq (first .Values.ingress.hosts).host "*") }} + {{- $host := first .Values.ingress.hosts }} + - http: + paths: + {{- range $host.paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ $fullname }}-{{ .service | default "searcher" }} + {{- $port := .port | default "rest" }} + port: + {{- if kindIs "string" $port }} + name: {{ $port }} + {{- else }} + number: {{ $port }} + {{- end }} + {{- end }} + {{- else }} + {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: paths: {{- range .paths }} - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} pathType: {{ .pathType }} - {{- end }} backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ $fullName }}-searcher + name: {{ $fullname }}-{{ .service | default "searcher" }} + {{- $port := .port | default "rest" }} port: - name: rest - {{- else }} - serviceName: {{ $fullName }}-searcher - serviceport: rest - {{- end }} + {{- if kindIs "string" $port }} + name: {{ $port }} + {{- else }} + number: {{ $port }} + {{- end }} {{- end }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/quickwit/values.yaml b/charts/quickwit/values.yaml index c027202..6f37e8b 100644 --- a/charts/quickwit/values.yaml +++ b/charts/quickwit/values.yaml @@ -6,7 +6,7 @@ image: repository: quickwit/quickwit pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - # tag: v0.8.1 + # tag: v0.8.2 imagePullSecrets: [] nameOverride: "" @@ -625,12 +625,33 @@ ingress: className: nginx annotations: nginx.ingress.kubernetes.io/proxy-body-size: 10m + nginx.ingress.kubernetes.io/use-regex: "true" hosts: - # hostname required here. - - host: chart-example.local + - host: "*" paths: + # Ingest and ES bulk endpoints to quickwit-indexer + - path: /api/v1/.*/ingest + pathType: ImplementationSpecific + service: indexer + port: rest + - path: /api/v1/_elastic/bulk + pathType: ImplementationSpecific + service: indexer + port: rest + - path: /api/v1/_elastic/.*/_bulk + pathType: ImplementationSpecific + service: indexer + port: rest + # Indexes API endpoints to quickwit-metastore + - path: /api/v1/indexes + pathType: Prefix + service: metastore + port: rest + # Everything else to quickwit-searcher - path: / pathType: ImplementationSpecific + service: searcher + port: rest tls: [] # - secretName: chart-example-tls # hosts: