From e9408646469cd92bcf8279426a5918a4d34623f0 Mon Sep 17 00:00:00 2001 From: Moustafa Nawar Date: Wed, 21 Jun 2023 15:35:30 +0300 Subject: [PATCH 1/2] support a generic ingress --- Chart.yaml | 2 +- templates/ingress.yaml | 39 +++++++++++++++++++++++++++++++++++++++ values.yaml | 16 ++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 templates/ingress.yaml diff --git a/Chart.yaml b/Chart.yaml index cfccaa1..5ec88b9 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.9 +version: 0.2.10 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/templates/ingress.yaml b/templates/ingress.yaml new file mode 100644 index 0000000..a2fbad0 --- /dev/null +++ b/templates/ingress.yaml @@ -0,0 +1,39 @@ +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "qdrant.fullname" . }} + labels: + {{- include "qdrant.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.ingress.hosts }} + rules: + {{- range . }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path | quote }} + pathType: {{ .pathType | default "Prefix" | quote }} + backend: + service: + name: {{ .serviceName | quote }} + port: + number: {{ .servicePort }} + {{- end }} + {{- end }} + {{- end }} + {{- with .Values.ingress.tls }} + tls: + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName | quote }} + {{- end }} +{{- end }} + diff --git a/values.yaml b/values.yaml index 2384d19..54f77b0 100644 --- a/values.yaml +++ b/values.yaml @@ -31,6 +31,22 @@ service: protocol: TCP checksEnabled: false +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: alb + hosts: + - host: example-domain.com + paths: + - path: / + pathType: Prefix + serviceName: example-service + servicePort: 6333 + tls: [] + #- hosts: + # - example-domain.com + # secretName: tls-secret-name + livenessProbe: enabled: true initialDelaySeconds: 5 From 60992471578a4176dd651175aa63ec35ca6c2605 Mon Sep 17 00:00:00 2001 From: Moustafa Nawar Date: Wed, 21 Jun 2023 18:32:15 +0300 Subject: [PATCH 2/2] target the qdrant service by default --- templates/ingress.yaml | 2 +- values.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index a2fbad0..0693174 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -21,7 +21,7 @@ spec: pathType: {{ .pathType | default "Prefix" | quote }} backend: service: - name: {{ .serviceName | quote }} + name: {{ default .serviceName (include "qdrant.fullname" $) }} port: number: {{ .servicePort }} {{- end }} diff --git a/values.yaml b/values.yaml index 54f77b0..9b29dfa 100644 --- a/values.yaml +++ b/values.yaml @@ -40,7 +40,6 @@ ingress: paths: - path: / pathType: Prefix - serviceName: example-service servicePort: 6333 tls: [] #- hosts: