From c4403f297a32034b72470cf9cd1bf37dcc567ede Mon Sep 17 00:00:00 2001 From: Ein Anderssono Date: Tue, 20 Oct 2026 11:42:13 +0200 Subject: [PATCH] Restrict worker egress and publish manifest --- .gitea/workflows/publish.yaml | 9 ++++++--- README.md | 4 +++- .../ai-spel-rule-engine/templates/networkpolicy.yaml | 4 +--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index a8b2cb4..ea67d68 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -100,9 +100,12 @@ jobs: install "$RUNNER_TEMP/oras/oras" "$RUNNER_TEMP/oras-bin" printf '%s' "$HARBOR_PASSWORD" | "$RUNNER_TEMP/oras-bin" login harbor.k3s.k0.nu --username "$HARBOR_USERNAME" --password-stdin unset HARBOR_PASSWORD - "$RUNNER_TEMP/oras-bin" push --artifact-type application/vnd.ai-spel.kubernetes-manifest.v1 \ - "harbor.k3s.k0.nu/ai-spel/rule-engine-manifest:$version" \ - "$package_dir/manifest.yaml:application/yaml" + ( + cd "$package_dir" + "$RUNNER_TEMP/oras-bin" push --artifact-type application/vnd.ai-spel.kubernetes-manifest.v1 \ + "harbor.k3s.k0.nu/ai-spel/rule-engine-manifest:$version" \ + "manifest.yaml:application/yaml" + ) echo "version=$version" >> "$GITHUB_OUTPUT" - name: Deploy rule engine through Argo CD diff --git a/README.md b/README.md index 5ed5bdd..6156839 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ Responses echo the correlation ID and have status `evaluated` or `rejected`. The NATS user may subscribe only to the evaluation subject and publish only to reply inboxes. The service receives no credentials other than its own NATS -identity and has no configured database or AI-provider secrets. +identity and has no configured database or AI-provider secrets. Its chart +limits pod egress to NATS and cluster DNS; Luau evaluation has no external +network path. ## Local commands diff --git a/deploy/helm/ai-spel-rule-engine/templates/networkpolicy.yaml b/deploy/helm/ai-spel-rule-engine/templates/networkpolicy.yaml index b0ba2bb..d15cf45 100644 --- a/deploy/helm/ai-spel-rule-engine/templates/networkpolicy.yaml +++ b/deploy/helm/ai-spel-rule-engine/templates/networkpolicy.yaml @@ -12,6 +12,7 @@ spec: - to: - podSelector: matchLabels: + app.kubernetes.io/name: ai-spel-nats app.kubernetes.io/instance: ai-spel-nats ports: - protocol: TCP @@ -20,9 +21,6 @@ spec: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: kube-system - podSelector: - matchLabels: - k8s-app: kube-dns ports: - protocol: UDP port: 53