Skip to content

Commit 0c874a4

Browse files
committed
feat: add ollama workload with linter overrides
1 parent cd8f100 commit 0c874a4

4 files changed

Lines changed: 144 additions & 0 deletions

File tree

workloads/apps/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ resources:
1212
- ansible-app.yaml
1313
- arc-app.yaml
1414
- grafana-app.yaml
15+
- ollama-app.yaml
1516
- ../openshift-gitops # Direct include - TunnelBinding for ArgoCD

workloads/apps/ollama-app.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
apiVersion: argoproj.io/v1alpha1
3+
kind: Application
4+
metadata:
5+
name: ollama
6+
namespace: openshift-gitops
7+
annotations:
8+
argocd.argoproj.io/sync-wave: "1"
9+
spec:
10+
project: default
11+
source:
12+
repoURL: https://github.com/makeitworkcloud/kustomize-cluster.git
13+
path: workloads/ollama
14+
targetRevision: main
15+
destination:
16+
server: https://kubernetes.default.svc
17+
namespace: ollama
18+
syncPolicy:
19+
automated:
20+
prune: true
21+
selfHeal: true
22+
syncOptions:
23+
- CreateNamespace=true
24+
retry:
25+
limit: 5
26+
backoff:
27+
duration: 30s
28+
maxDuration: 5m
29+
factor: 2
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- ollama.yaml

workloads/ollama/ollama.yaml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: ollama
5+
annotations:
6+
argocd.argoproj.io/sync-wave: "0"
7+
---
8+
apiVersion: v1
9+
kind: PersistentVolumeClaim
10+
metadata:
11+
name: ollama-data
12+
namespace: ollama
13+
annotations:
14+
argocd.argoproj.io/sync-wave: "2"
15+
argocd.argoproj.io/sync-options: Delete=false,Prune=false
16+
argocd.argoproj.io/ignore-healthcheck: "true"
17+
spec:
18+
accessModes:
19+
- ReadWriteOnce
20+
resources:
21+
requests:
22+
storage: 50Gi
23+
---
24+
apiVersion: rbac.authorization.k8s.io/v1
25+
kind: RoleBinding
26+
metadata:
27+
name: ollama-anyuid
28+
namespace: ollama
29+
annotations:
30+
argocd.argoproj.io/sync-wave: "0"
31+
roleRef:
32+
apiGroup: rbac.authorization.k8s.io
33+
kind: ClusterRole
34+
name: system:openshift:scc:privileged
35+
subjects:
36+
- kind: ServiceAccount
37+
name: default
38+
namespace: ollama
39+
---
40+
apiVersion: apps/v1
41+
kind: Deployment
42+
metadata:
43+
name: ollama
44+
namespace: ollama
45+
annotations:
46+
argocd.argoproj.io/sync-wave: "2"
47+
ignore-check.kube-linter.io/unset-cpu-requirements: "No requests on single-node cluster"
48+
ignore-check.kube-linter.io/unset-memory-requirements: "No limits on single-node cluster"
49+
ignore-check.kube-linter.io/no-read-only-root-fs: "Ollama requires writable root for model management"
50+
ignore-check.kube-linter.io/run-as-non-root: "Ollama requires root for certain operations"
51+
ignore-check.kube-linter.io/latest-tag: "Using latest for initial deployment"
52+
spec:
53+
replicas: 1
54+
selector:
55+
matchLabels:
56+
app: ollama
57+
template:
58+
metadata:
59+
labels:
60+
app: ollama
61+
spec:
62+
containers:
63+
- name: ollama
64+
image: ollama/ollama:0.5.7
65+
ports:
66+
- containerPort: 11434
67+
name: api
68+
env:
69+
- name: OLLAMA_HOST
70+
value: "0.0.0.0"
71+
- name: OLLAMA_KEEP_ALIVE
72+
value: "24h"
73+
resources: {}
74+
volumeMounts:
75+
- name: data
76+
mountPath: /root/.ollama
77+
volumes:
78+
- name: data
79+
persistentVolumeClaim:
80+
claimName: ollama-data
81+
---
82+
apiVersion: v1
83+
kind: Service
84+
metadata:
85+
name: ollama
86+
namespace: ollama
87+
annotations:
88+
argocd.argoproj.io/sync-wave: "2"
89+
spec:
90+
selector:
91+
app: ollama
92+
ports:
93+
- protocol: TCP
94+
port: 11434
95+
targetPort: api
96+
---
97+
apiVersion: networking.cfargotunnel.com/v1alpha1
98+
kind: TunnelBinding
99+
metadata:
100+
name: ollama
101+
namespace: ollama
102+
annotations:
103+
argocd.argoproj.io/sync-wave: "2"
104+
spec:
105+
tunnelRef:
106+
kind: ClusterTunnel
107+
name: cluster-apps
108+
subjects:
109+
- name: ollama
110+
spec:
111+
fqdn: ollama.makeitwork.cloud
112+
target: http://ollama.ollama.svc:11434

0 commit comments

Comments
 (0)