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:
+35 -17
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:
- app: ollama-scheduler
template: template:
metadata: metadata:
labels: { app: schedules-api } labels:
- app: ollama-scheduler
spec: spec:
serviceAccountName: schedules-api serviceAccountName: ollama-scheduler
containers: containers:
- name: schedules-api - name: ollama-scheduler
# TODO: build & push your image, then update below image: docker.io/ion606/ollama-scheduler:0.1.0
image: ghcr.io/your-org/schedules-api:0.1.0
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
env: env:
- { name: PORT, value: "3000" } - name: PORT
- { name: NS, value: "argo" } value: "3000"
- name: NS
value: "argo"
ports: ports:
- { name: http, containerPort: 3000 } - name: http
containerPort: 3000
readinessProbe: readinessProbe:
tcpSocket: { port: 3000 } tcpSocket:
- port: 3000
initialDelaySeconds: 3 initialDelaySeconds: 3
periodSeconds: 10 periodSeconds: 10
livenessProbe: livenessProbe:
tcpSocket: { port: 3000 } tcpSocket:
- port: 3000
initialDelaySeconds: 10 initialDelaySeconds: 10
periodSeconds: 20 periodSeconds: 20
resources: resources:
requests: { cpu: "50m", memory: "64Mi" } requests:
limits: { cpu: "200m", memory: "256Mi" } - 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:
- app: ollama-scheduler
ports: ports:
- { name: http, port: 3000, targetPort: 3000 } - name: http
port: 3000
targetPort: 3000
type: ClusterIP type: ClusterIP
+7 -17
View File
@@ -1,13 +1,14 @@
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"]
@@ -19,29 +20,18 @@ rules:
- 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 namespace: argo
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: schedules-api name: ollama-scheduler
namespace: argo namespace: argo
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
kind: Role kind: Role
name: schedules-api name: ollama-scheduler
+1 -2
View File
@@ -1,5 +1,5 @@
{ {
"name": "schedules-api", "name": "ollama-scheduler",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"type": "module", "type": "module",
@@ -11,4 +11,3 @@
"@kubernetes/client-node": "^0.22.1" "@kubernetes/client-node": "^0.22.1"
} }
} }