created agent

This commit is contained in:
Donato Mastronardi
2026-03-17 22:51:04 +01:00
parent 79544b67de
commit 0dfcd13369
6 changed files with 82 additions and 3 deletions

7
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"cSpell.words": [
"beszel",
"henrygd",
"microk"
]
}

View File

@@ -0,0 +1,51 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: beszel-agent
spec:
selector:
matchLabels:
app: beszel-agent
template:
metadata:
name: beszel-agent
labels:
app: beszel-agent
spec:
hostNetwork: true
tolerations:
- key: node-role.kubernetes.io/control-plane
volumes:
- name: beszel-agent-data
persistentVolumeClaim:
claimName: beszel-agent-pvc
- name: containerd
hostPath:
path: /var/snap/microk8s/common/run/containerd.sock
containers:
- name: beszel-agent
image: henrygd/beszel-agent
volumeMounts:
- name: beszel-agent-data
mountPath: /var/lib/beszel-agent
- name: containerd
mountPath: /var/run/docker.sock
readOnly: true
env:
- name: LISTEN
value: "45876"
- name: KEY
valueFrom:
configMapKeyRef:
key: api_public_key
name: beszel-cnf
- name: HUB_URL
valueFrom:
configMapKeyRef:
key: app_url
name: beszel-cnf
- name: TOKEN
valueFrom:
configMapKeyRef:
key: universal_token
name: beszel-cnf

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: beszel-agent-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: microk8s-hostpath # to work also on the master node without longhorn
resources:
requests:
storage: 1Gi

View File

@@ -3,4 +3,6 @@ kind: ConfigMap
metadata: metadata:
name: beszel-cnf name: beszel-cnf
data: data:
app_url: http://monitoring.portfoli.it app_url: http://monitoring.portfoli.it
universal_token: ea9c5051-1c1d-4572-9ce8-efdd81894a5f
api_public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxp0JmsT+/ytOiVkJF4ASSaQNUXcopO3D0gFbJ0tJYx

View File

@@ -3,4 +3,6 @@ resources:
- beszel-hub-pvc.yaml - beszel-hub-pvc.yaml
- beszel-hub-dpl.yaml - beszel-hub-dpl.yaml
- beszel-hub-svc.yaml - beszel-hub-svc.yaml
- beszel-hub-ingress.yaml - beszel-hub-ingress.yaml
- beszel-agent-pvc.yaml
- beszel-agent-ds.yaml

View File

@@ -1,4 +1,10 @@
resources: resources:
- ../../manifests - ../../manifests
namespace: monitoring namespace: monitoring
images:
- name: henrygd/beszel
newTag: 0.18.3
- name: henrygd/beszel-agent
newTag: 0.18.3