GOD I AM SO DUMB

This commit is contained in:
2025-09-13 11:56:35 -04:00
parent a4952581ec
commit 7975430489
5 changed files with 93 additions and 85 deletions
+3 -2
View File
@@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- argo-ollama-scheduler.yaml - ollama-scheduler.yaml
- coderunner.yaml - coderunner.yaml
- tools.yaml - tools.yaml
- rag-server.yaml - rag-server.yaml
@@ -14,10 +14,11 @@ resources:
generatorOptions: generatorOptions:
disableNameSuffixHash: true disableNameSuffixHash: true
# FINDME: The global branch for my repo
configMapGenerator: configMapGenerator:
- name: ollama-plus-revs - name: ollama-plus-revs
literals: literals:
- targetRevision=main - targetRevision=argo
# Inject targetRevision from the ConfigMap into apps (kill me) # Inject targetRevision from the ConfigMap into apps (kill me)
replacements: replacements:
+55 -37
View File
@@ -1,46 +1,64 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: schedules-api name: ollama-scheduler
namespace: argo namespace: argo
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: { app: schedules-api } matchLabels:
template: - app: ollama-scheduler
metadata: template:
labels: { app: schedules-api } metadata:
spec: labels:
serviceAccountName: schedules-api - app: ollama-scheduler
containers:
- name: schedules-api spec:
# TODO: build & push your image, then update below serviceAccountName: ollama-scheduler
image: ghcr.io/your-org/schedules-api:0.1.0 containers:
imagePullPolicy: IfNotPresent - name: ollama-scheduler
env: image: docker.io/ion606/ollama-scheduler:0.1.0
- { name: PORT, value: "3000" } imagePullPolicy: IfNotPresent
- { name: NS, value: "argo" }
ports: env:
- { name: http, containerPort: 3000 } - name: PORT
readinessProbe: value: "3000"
tcpSocket: { port: 3000 } - name: NS
initialDelaySeconds: 3 value: "argo"
periodSeconds: 10 ports:
livenessProbe: - name: http
tcpSocket: { port: 3000 } containerPort: 3000
initialDelaySeconds: 10
periodSeconds: 20 readinessProbe:
resources: tcpSocket:
requests: { cpu: "50m", memory: "64Mi" } - port: 3000
limits: { cpu: "200m", memory: "256Mi" } initialDelaySeconds: 3
periodSeconds: 10
livenessProbe:
tcpSocket:
- port: 3000
initialDelaySeconds: 10
periodSeconds: 20
resources:
requests:
- cpu: "50m"
- memory: "64Mi"
limits:
- cpu: "200m"
- memory: "256Mi"
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: schedules-api name: ollama-scheduler
namespace: argo namespace: argo
spec: spec:
selector: { app: schedules-api } selector:
ports: - app: ollama-scheduler
- { name: http, port: 3000, targetPort: 3000 } ports:
type: ClusterIP - name: http
port: 3000
targetPort: 3000
type: ClusterIP
+23 -33
View File
@@ -1,47 +1,37 @@
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: schedules-api name: ollama-scheduler
namespace: argo namespace: argo
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
name: schedules-api name: ollama-scheduler
namespace: argo namespace: argo
rules: rules:
- apiGroups: ["argoproj.io"] - apiGroups: ["argoproj.io"]
resources: ["cronworkflows"] resources: ["cronworkflows"]
verbs: ["create","get","list","watch","update","patch","delete"] verbs: ["create", "get", "list", "watch", "update", "patch", "delete"]
- apiGroups: ["argoproj.io"] - apiGroups: ["argoproj.io"]
resources: ["workflows"] resources: ["workflows"]
verbs: ["create","get","list"] verbs: ["create", "get", "list"]
- apiGroups: ["argoproj.io"] - apiGroups: ["argoproj.io"]
resources: ["workflowtemplates"] resources: ["workflowtemplates"]
verbs: ["get","list"] verbs: ["get", "list"]
---
# If you need ClusterWorkflowTemplate support, create this ClusterRole and a ClusterRoleBinding
# with subject serviceAccountName: schedules-api, namespace: argo
# apiVersion: rbac.authorization.k8s.io/v1
# kind: ClusterRole
# metadata:
# name: schedules-api-cwft-read
# rules:
# - apiGroups: ["argoproj.io"]
# resources: ["clusterworkflowtemplates"]
# verbs: ["get","list"]
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
name: schedules-api name: ollama-scheduler
namespace: argo
subjects:
- kind: ServiceAccount
name: schedules-api
namespace: argo namespace: argo
subjects:
- kind: ServiceAccount
name: ollama-scheduler
namespace: argo
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
kind: Role kind: Role
name: schedules-api name: ollama-scheduler
+11 -12
View File
@@ -1,14 +1,13 @@
{ {
"name": "schedules-api", "name": "ollama-scheduler",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"start": "bun run server.mjs", "start": "bun run server.mjs",
"dev": "bun run --hot server.mjs" "dev": "bun run --hot server.mjs"
}, },
"dependencies": { "dependencies": {
"@kubernetes/client-node": "^0.22.1" "@kubernetes/client-node": "^0.22.1"
} }
} }