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 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: 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 name: openclaw
namespace: openclaw namespace: openclaw
spec: spec:
progressDeadlineSeconds: 600
replicas: 1 replicas: 1
revisionHistoryLimit: 10
selector: selector:
matchLabels: matchLabels:
app: openclaw app: openclaw
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template: template:
metadata: metadata:
annotations:
kubectl.kubernetes.io/restartedAt: '2026-04-09T18:59:08Z'
labels: labels:
app: openclaw app: openclaw
spec: spec:
nodeSelector:
kubernetes.io/hostname: chemavx-k8
serviceAccountName: openclaw-agent
securityContext:
runAsUser: 1000
fsGroup: 1000
containers: containers:
- env: - name: openclaw
image: ghcr.io/openclaw/openclaw:2026.4.12
imagePullPolicy: IfNotPresent
ports:
- containerPort: 18789
env:
- name: OPENCLAW_DATA_DIR - name: OPENCLAW_DATA_DIR
value: /data value: /data
- name: NODE_OPTIONS - name: NODE_OPTIONS
value: --max-old-space-size=1536 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: resources:
limits:
cpu: '1'
memory: 2Gi
requests: requests:
cpu: 100m cpu: 100m
memory: 512Mi memory: 512Mi
terminationMessagePath: /dev/termination-log limits:
terminationMessagePolicy: File cpu: "1"
memory: 2Gi
volumeMounts: volumeMounts:
- mountPath: /data - name: data
name: data mountPath: /data
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
fsGroup: 1000
runAsUser: 1000
terminationGracePeriodSeconds: 30
volumes: volumes:
- name: data - name: data
persistentVolumeClaim: persistentVolumeClaim:
claimName: openclaw-pvc claimName: openclaw-pvc
+6 -10
View File
@@ -1,29 +1,25 @@
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: 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 name: openclaw
namespace: openclaw namespace: openclaw
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
traefik.ingress.kubernetes.io/router.entrypoints: websecure
spec: spec:
ingressClassName: traefik ingressClassName: traefik
rules: rules:
- host: openclaw.chemavx.xyz - host: openclaw.chemavx.xyz
http: http:
paths: paths:
- backend: - path: /
pathType: Prefix
backend:
service: service:
name: openclaw name: openclaw
port: port:
number: 18789 number: 18789
path: /
pathType: Prefix
tls: tls:
- hosts: - hosts:
- openclaw.chemavx.xyz - openclaw.chemavx.xyz
secretName: openclaw-tls 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 name: openclaw
namespace: openclaw namespace: openclaw
spec: 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: selector:
app: openclaw app: openclaw
sessionAffinity: None ports:
- port: 18789
targetPort: 18789
type: ClusterIP type: ClusterIP