You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.0 KiB
Plaintext
58 lines
2.0 KiB
Plaintext
[Unit]
|
|
Description=Virt Cloud Go host agent
|
|
Documentation=https://g.luoli.live/root/virt/-/blob/go-agent/docs/GO_AGENT_DEPLOYMENT.md
|
|
After=network-online.target libvirtd.service virtqemud.service
|
|
Wants=network-online.target
|
|
|
|
# This unit deliberately has no ExecStartPre permission/ownership probe. The
|
|
# agent must keep a loopback liveness endpoint available when its journal,
|
|
# identity, or TLS material is unavailable. A remote bind without usable mTLS
|
|
# exits instead of exposing a plaintext listener; loopback remains degraded
|
|
# and rejects mutating requests (fail closed).
|
|
|
|
[Service]
|
|
Type=exec
|
|
User=root
|
|
Group=root
|
|
WorkingDirectory=/
|
|
EnvironmentFile=-/etc/virt-cloud-agent/agent.env
|
|
ExecStart=/usr/local/bin/virt-cloud-agent
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
TimeoutStopSec=30s
|
|
UMask=0077
|
|
|
|
# The agent invokes the host libvirt client and may need to access the
|
|
# operator-selected libvirt storage paths. Root is an interim deployment
|
|
# boundary until those paths and libvirt ACLs have been proven for a dedicated
|
|
# service account. Do not broaden ReadWritePaths without reviewing the
|
|
# artifact/storage operation contract.
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=read-only
|
|
ReadWritePaths=/var/lib/virt-cloud-agent
|
|
ReadWritePaths=/var/lib/virt-cloud-agent/artifacts
|
|
ReadWritePaths=/var/lib/virt-cloud-agent/tmp
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
ProtectKernelTunables=true
|
|
ProtectKernelModules=true
|
|
ProtectControlGroups=true
|
|
LockPersonality=true
|
|
RestrictSUIDSGID=true
|
|
RestrictRealtime=true
|
|
SystemCallArchitectures=native
|
|
LimitNOFILE=65536
|
|
LimitCORE=0
|
|
|
|
# The current release writes the operation journal and uses the host libvirt
|
|
# adapter. When artifact or VM-disk operations land, add their exact host
|
|
# paths in a reviewed drop-in,
|
|
# for example:
|
|
# ReadWritePaths=/var/lib/libvirt/images
|
|
# ReadWritePaths=/var/lib/virt-cloud-agent/artifacts
|
|
# Never grant the whole filesystem or a user-controlled path.
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|