initial argo commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata: { name: coderunner, namespace: ai }
|
||||
spec:
|
||||
replicas: 1
|
||||
selector: { matchLabels: { app: coderunner } }
|
||||
template:
|
||||
metadata: { labels: { app: coderunner } }
|
||||
spec:
|
||||
serviceAccountName: coderunner-sa
|
||||
containers:
|
||||
- name: coderunner
|
||||
image: docker.io/ion606/coderunner:latest
|
||||
ports: [{ containerPort: 8787 }]
|
||||
env:
|
||||
- { name: PORT, value: "8787" }
|
||||
- {
|
||||
name: NAMESPACE,
|
||||
valueFrom:
|
||||
{ fieldRef: { fieldPath: metadata.namespace } },
|
||||
}
|
||||
readinessProbe:
|
||||
{
|
||||
httpGet: { path: "/openapi.json", port: 8787 },
|
||||
initialDelaySeconds: 5,
|
||||
periodSeconds: 10,
|
||||
}
|
||||
livenessProbe:
|
||||
{
|
||||
httpGet: { path: "/openapi.json", port: 8787 },
|
||||
initialDelaySeconds: 15,
|
||||
periodSeconds: 20,
|
||||
}
|
||||
resources:
|
||||
requests: { cpu: "100m", memory: "128Mi" }
|
||||
limits: { cpu: "500m", memory: "512Mi" }
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata: { name: coderunner, namespace: ai }
|
||||
spec:
|
||||
selector: { app: coderunner }
|
||||
ports: [{ name: http, port: 8787, targetPort: 8787 }]
|
||||
type: ClusterIP
|
||||
@@ -0,0 +1,27 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata: { name: coderunner-sa, namespace: ai }
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata: { name: coderunner-job-role, namespace: ai }
|
||||
rules:
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["create", "get", "list", "watch", "delete"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods", "pods/log"]
|
||||
verbs: ["get", "list", "watch", "delete"]
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata: { name: coderunner-job-rb, namespace: ai }
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: coderunner-sa
|
||||
namespace: ai
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: coderunner-job-role
|
||||
Reference in New Issue
Block a user