diff options
Diffstat (limited to 'bundles/geopulse/items.py')
| -rw-r--r-- | bundles/geopulse/items.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/bundles/geopulse/items.py b/bundles/geopulse/items.py new file mode 100644 index 0000000..f9fa882 --- /dev/null +++ b/bundles/geopulse/items.py @@ -0,0 +1,37 @@ +directories = { + "/var/lib/geopulse": {}, +} + +files = { + "/etc/deployments/geopulse/kube.yaml": { + "content_type": "mako", + "context": node.metadata.get("containers")["geopulse"], + "triggers": {"svc_s6rc:geopulse:restart"}, + }, + "/etc/deployments/geopulse/secret.yaml": { + "content_type": "mako", + "mode": "0600", + "triggers": {"svc_s6rc:geopulse:restart"}, + }, +} + +actions = { + "keygen": { + "command": """ + set -ex + cd /var/lib/geopulse/ + curl -sSfL https://raw.githubusercontent.com/tess1o/geopulse/refs/tags/1.2.0/generate-keys.sh | + sed -e 's|KEYS_DIR="/keys"|KEYS_DIR="./keys"|' | + sh - + """, + "unless": """ + cd /var/lib/geopulse/keys && + test -f jwt-private-key.pem && + test -f jwt-public-key.pem && + test -f ai-encryption-key.txt + """, + "needs": { + "directory:/var/lib/geopulse", + }, + }, +} |