Skip to content

Commit

Permalink
Update charts to start ollama and orchestrator
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Peixoto Ferreira <[email protected]>
  • Loading branch information
alexandref75 committed Feb 21, 2025
1 parent 67b852c commit f06a2f1
Showing 1 changed file with 84 additions and 7 deletions.
91 changes: 84 additions & 7 deletions charts/home-orchestrator/templates/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ metadata:
name: {{ .Values.application.appName }}
labels:
name: {{ .Values.application.appName }}
role: agent
spec:
updateStrategy:
type: RollingUpdate
replicas: 1
selector:
matchLabels:
app: {{ .Values.application.appName }}
template:
metadata:
labels:
name: {{ .Values.application.appName }}
annotations:
node.kubernetes.io/bootstrap-checkpoint: "true"
labels:
app: {{ .Values.application.appName }}
spec:
hostname: {{ .Values.application.appName }}
hostNetwork: false
Expand All @@ -39,3 +38,81 @@ spec:
capabilities:
drop: ["ALL"]
terminationGracePeriodSeconds: 30
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.application.appName }}-ollama
labels:
name: {{ .Values.application.appName }}-ollama
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Values.application.appName }}-ollama
template:
metadata:
labels:
app: {{ .Values.application.appName }}-ollama
spec:
hostname: {{ .Values.application.appName }}-ollama
hostNetwork: false
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: ollama-host
image: ollama/ollama
env:
- name: OLLAMA_HOST
value: http://0.0.0.0:{{ .Values.configuration.portHost }}
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
volumeMounts:
- name: models
mountPath: /root/.ollama
- name: ollama-guest
image: ollama/ollama
env:
- name: OLLAMA_HOST
value: http://0.0.0.0:{{ .Values.configuration.portGuest }}
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
volumeMounts:
- name: models
mountPath: /root/.ollama
volumes:
- name: models
hostPath:
path: /srv/shared-container-volumes/ollama:/root/.ollama
terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.application.appName }}-ollama-host
spec:
type: NodePort
selector:
name: {{ .Values.application.appName }}-ollama
ports:
- port: {{ .Values.configuration.portHost }}
targetPort: {{ .Values.configuration.portHost }}
nodePort: {{ .Values.configuration.portHost }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.application.appName }}-ollama-guest
spec:
type: NodePort
selector:
name: {{ .Values.application.appName }}-ollama
ports:
- port: {{ .Values.configuration.portGuest }}
targetPort: {{ .Values.configuration.portGuest }}
nodePort: {{ .Values.configuration.portGuest }}

0 comments on commit f06a2f1

Please sign in to comment.