openclaw: reinstall limpio con Claude API y ArgoCD

- Manifiestos limpios: namespace, rbac, pvc (5Gi local-path), deployment, service, ingress
- nodeSelector chemavx-k8 en deployment para fijar PVC en el nodo correcto
- Imagen fijada a ghcr.io/openclaw/openclaw:2026.4.12
- Sin initContainers ni secrets en el deployment (config post-arranque via exec)
- Elimina artefactos: configmap-kube-root-ca.crt.yaml, serviceaccount-default.yaml, pvc-openclaw-pvc.yaml, rbac-openclaw-agent.yaml
- Añade argocd/application-openclaw.yaml para gestión GitOps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-24 10:40:08 +00:00
parent 8a8f33704c
commit f465f190d8
7 changed files with 98 additions and 66 deletions
+20
View File
@@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: openclaw
namespace: argocd
spec:
project: default
source:
repoURL: http://gitea.gitea.svc.cluster.local:3000/chemavx/k8s-manifests.git
targetRevision: main
path: openclaw
destination:
server: https://kubernetes.default.svc
namespace: openclaw
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
+17 -43
View File
@@ -1,72 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: '5'
kubectl.kubernetes.io/last-applied-configuration: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"name":"openclaw","namespace":"openclaw"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"openclaw"}},"template":{"metadata":{"labels":{"app":"openclaw"}},"spec":{"containers":[{"env":[{"name":"OPENCLAW_DATA_DIR","value":"/data"}],"image":"ghcr.io/openclaw/openclaw:2026.3.2","name":"openclaw","ports":[{"containerPort":18789}],"resources":{"limits":{"cpu":"500m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"256Mi"}},"volumeMounts":[{"mountPath":"/data","name":"data"}]}],"securityContext":{"fsGroup":1000,"runAsUser":1000},"volumes":[{"name":"data","persistentVolumeClaim":{"claimName":"openclaw-pvc"}}]}}}}
'
name: openclaw
namespace: openclaw
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: openclaw
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
kubectl.kubernetes.io/restartedAt: '2026-04-09T18:59:08Z'
labels:
app: openclaw
spec:
nodeSelector:
kubernetes.io/hostname: chemavx-k8
serviceAccountName: openclaw-agent
securityContext:
runAsUser: 1000
fsGroup: 1000
containers:
- env:
- name: openclaw
image: ghcr.io/openclaw/openclaw:2026.4.12
imagePullPolicy: IfNotPresent
ports:
- containerPort: 18789
env:
- name: OPENCLAW_DATA_DIR
value: /data
- name: NODE_OPTIONS
value: --max-old-space-size=1536
- name: OPENCLAW_STATE_DIR
value: /data
- name: OPENCLAW_TOKEN
valueFrom:
secretKeyRef:
key: OPENCLAW_TOKEN
name: openclaw-token
image: ghcr.io/openclaw/openclaw:2026.4.12
imagePullPolicy: IfNotPresent
name: openclaw
ports:
- containerPort: 18789
protocol: TCP
resources:
limits:
cpu: '1'
memory: 2Gi
requests:
cpu: 100m
memory: 512Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
limits:
cpu: "1"
memory: 2Gi
volumeMounts:
- mountPath: /data
name: data
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
fsGroup: 1000
runAsUser: 1000
terminationGracePeriodSeconds: 30
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: openclaw-pvc
+6 -10
View File
@@ -1,29 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
kubectl.kubernetes.io/last-applied-configuration: '{"apiVersion":"networking.k8s.io/v1","kind":"Ingress","metadata":{"annotations":{"cert-manager.io/cluster-issuer":"letsencrypt-prod","traefik.ingress.kubernetes.io/router.entrypoints":"websecure"},"name":"openclaw","namespace":"openclaw"},"spec":{"ingressClassName":"traefik","rules":[{"host":"openclaw.chemavx.xyz","http":{"paths":[{"backend":{"service":{"name":"openclaw","port":{"number":18789}}},"path":"/","pathType":"Prefix"}]}}],"tls":[{"hosts":["openclaw.chemavx.xyz"],"secretName":"openclaw-tls"}]}}
'
traefik.ingress.kubernetes.io/router.entrypoints: websecure
name: openclaw
namespace: openclaw
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
traefik.ingress.kubernetes.io/router.entrypoints: websecure
spec:
ingressClassName: traefik
rules:
- host: openclaw.chemavx.xyz
http:
paths:
- backend:
- path: /
pathType: Prefix
backend:
service:
name: openclaw
port:
number: 18789
path: /
pathType: Prefix
tls:
- hosts:
- openclaw.chemavx.xyz
secretName: openclaw-tls
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: openclaw
+12
View File
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: openclaw-pvc
namespace: openclaw
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 5Gi
+36
View File
@@ -0,0 +1,36 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: openclaw-agent
namespace: openclaw
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: openclaw-agent-readonly
rules:
- apiGroups: [""]
resources: [pods, pods/log, services, nodes, namespaces, events]
verbs: [get, list, watch]
- apiGroups: [apps]
resources: [deployments, replicasets, statefulsets, daemonsets]
verbs: [get, list, watch]
- apiGroups: [networking.k8s.io]
resources: [ingresses]
verbs: [get, list, watch]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: openclaw-agent-readonly-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: openclaw-agent-readonly
subjects:
- kind: ServiceAccount
name: openclaw-agent
namespace: openclaw
+3 -13
View File
@@ -4,19 +4,9 @@ metadata:
name: openclaw
namespace: openclaw
spec:
clusterIP: 10.43.34.126
clusterIPs:
- 10.43.34.126
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- port: 18789
protocol: TCP
targetPort: 18789
selector:
app: openclaw
sessionAffinity: None
ports:
- port: 18789
targetPort: 18789
type: ClusterIP