mirror of
https://github.com/open-webui/terminals.git
synced 2026-11-23 14:10:43 -05:00
89 lines
2.6 KiB
YAML
89 lines
2.6 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: terminals
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: terminals-operator
|
|
namespace: terminals
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: terminals-operator
|
|
rules:
|
|
# Terminal CRDs
|
|
- apiGroups: ["openwebui.com"]
|
|
resources: ["terminals", "terminals/status"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
# Pods, Services, PVCs, and API-key Secrets managed by the operator
|
|
- apiGroups: [""]
|
|
resources: ["pods", "services", "persistentvolumeclaims", "secrets"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
# Events (Kopf posts events for status)
|
|
- apiGroups: [""]
|
|
resources: ["events"]
|
|
verbs: ["create"]
|
|
# Kopf needs these for leader election and state tracking
|
|
- apiGroups: [""]
|
|
resources: ["configmaps"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
|
- apiGroups: ["coordination.k8s.io"]
|
|
resources: ["leases"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: terminals-operator
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: terminals-operator
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: terminals-operator
|
|
namespace: terminals
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: terminals-operator
|
|
namespace: terminals
|
|
labels:
|
|
app.kubernetes.io/name: terminals-operator
|
|
app.kubernetes.io/part-of: open-terminal
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: terminals-operator
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: terminals-operator
|
|
spec:
|
|
serviceAccountName: terminals-operator
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: operator
|
|
image: ghcr.io/open-webui/terminals-operator:latest
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
resources:
|
|
requests:
|
|
memory: "64Mi"
|
|
cpu: "50m"
|
|
limits:
|
|
memory: "256Mi"
|
|
cpu: "200m"
|