Add support for additional annotations in Kubernetes resource templates (#359)

* Add support for additional annotations in Kubernetes resource templates

* Bumping changelog

* Fixing version

* Reverting version bumps
This commit is contained in:
Craig Rueda
2025-07-24 04:29:09 -07:00
committed by GitHub
parent d13c85bad9
commit 08a8e2b0cf
11 changed files with 56 additions and 8 deletions

View File

@@ -4,6 +4,10 @@ metadata:
name: {{ include "qdrant.fullname" . }}
labels:
{{- include "qdrant.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
initialize.sh: |
#!/bin/sh

View File

@@ -8,10 +8,15 @@ metadata:
{{- with .Values.ingress.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
{{- if or .Values.ingress.annotations .Values.additionalAnnotations }}
annotations:
{{- with .Values.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}

View File

@@ -5,6 +5,10 @@ metadata:
name: {{ include "qdrant.fullname" . }}
labels:
{{- include "qdrant.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.podDisruptionBudget.maxUnavailable}}
maxUnavailable: {{ . }}

View File

@@ -5,6 +5,10 @@ metadata:
name: {{ include "qdrant.fullname" . }}-apikey
labels:
{{- include "qdrant.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
{{ include "qdrant.secret" . | indent 2}}
{{- end }}

View File

@@ -8,9 +8,14 @@ metadata:
{{- with .Values.service.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
{{- if or .Values.service.annotations .Values.additionalAnnotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- with .Values.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
clusterIP: None

View File

@@ -7,9 +7,14 @@ metadata:
{{- with .Values.service.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
{{- if or .Values.service.annotations .Values.additionalAnnotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- with .Values.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.service.type | default "ClusterIP" }}

View File

@@ -2,9 +2,14 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "qdrant.fullname" . }}
{{- if .Values.serviceAccount.annotations }}
{{- if or .Values.serviceAccount.annotations .Values.additionalAnnotations }}
annotations:
{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
{{- with .Values.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
labels:
{{- include "qdrant.labels" . | nindent 4 }}

View File

@@ -8,6 +8,10 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ include "qdrant.fullname" . }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- honorLabels: true

View File

@@ -7,6 +7,10 @@ metadata:
{{- with .Values.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
podManagementPolicy: {{ .Values.podManagementPolicy }}

View File

@@ -8,6 +8,9 @@ metadata:
{{- include "qdrant.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
{{- with .Values.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
containers:
- name: test-script
@@ -45,6 +48,9 @@ metadata:
{{- include "qdrant.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
{{- with .Values.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
entrypoint.sh: |
#!/bin/bash

View File

@@ -82,6 +82,8 @@ startupProbe:
successThreshold: 1
additionalLabels: {}
# additionalAnnotations will be added to all top-level resources (StatefulSet, Service, ConfigMap, etc.)
additionalAnnotations: {}
podAnnotations: {}
podLabels: {}