Browse Source

add annotations

duhow 1 year ago
parent
commit
f82347ead6

+ 4 - 0
kubernetes/helm/templates/ollama-service.yaml

@@ -4,6 +4,10 @@ metadata:
   name: {{ include "ollama.name" . }}
   labels:
     {{- include "ollama.labels" . | nindent 4 }}
+  {{- with .Values.ollama.service.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
 spec:
   selector:
     {{- include "ollama.selectorLabels" . | nindent 4 }}

+ 8 - 0
kubernetes/helm/templates/ollama-statefulset.yaml

@@ -4,6 +4,10 @@ metadata:
   name: {{ include "ollama.name" . }}
   labels:
     {{- include "ollama.labels" . | nindent 4 }}
+  {{- with .Values.ollama.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
 spec:
   serviceName: {{ include "ollama.name" . }}
   replicas: {{ .Values.ollama.replicaCount }}
@@ -14,6 +18,10 @@ spec:
     metadata:
       labels:
         {{- include "ollama.labels" . | nindent 8 }}
+      {{- with .Values.ollama.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
     spec:
       containers:
       - name: {{ include "ollama.name" . }}

+ 8 - 0
kubernetes/helm/templates/webui-deployment.yaml

@@ -4,6 +4,10 @@ metadata:
   name: {{ include "open-webui.name" . }}
   labels:
     {{- include "open-webui.labels" . | nindent 4 }}
+  {{- with .Values.webui.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
 spec:
   replicas: {{ .Values.webui.replicaCount }}
   selector:
@@ -13,6 +17,10 @@ spec:
     metadata:
       labels:
         {{- include "open-webui.labels" . | nindent 8 }}
+      {{- with .Values.webui.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
     spec:
       containers:
       - name: {{ .Chart.Name }}

+ 2 - 2
kubernetes/helm/templates/webui-ingress.yaml

@@ -5,10 +5,10 @@ metadata:
   name: {{ include "open-webui.name" . }}
   labels:
     {{- include "open-webui.labels" . | nindent 4 }}
-{{- with .Values.webui.ingress.annotations }}
+  {{- with .Values.webui.ingress.annotations }}
   annotations:
     {{- toYaml . | nindent 4 }}
-{{- end }}
+  {{- end }}
 spec:
   rules:
   - host: {{ .Values.webui.ingress.host }}

+ 6 - 0
kubernetes/helm/values.yaml

@@ -1,4 +1,6 @@
 ollama:
+  annotations: {}
+  podAnnotations: {}
   replicaCount: 1
   image:
     repository: ollama/ollama
@@ -20,6 +22,7 @@ ollama:
     effect: NoSchedule
   service:
     type: ClusterIP
+    annotations: {}
     port: 80
     containerPort: 11434
   gpu:
@@ -27,6 +30,8 @@ ollama:
     enabled: false
 
 webui:
+  annotations: {}
+  podAnnotations: {}
   replicaCount: 1
   image:
     repository: ghcr.io/open-webui/open-webui
@@ -52,6 +57,7 @@ webui:
   tolerations: []
   service:
     type: ClusterIP
+    annotations: {}
     port: 80
     containerPort: 8080
     nodePort: ""