Allow custom or multiple OPA package names in Spacelift policies

Spacelift currently requires all policies to use the hardcoded package name “spacelift”. This request is to allow users to configure custom package names or support multiple packages per policy.

Workaround
not really, we needed to adapt our policy code and test automations to the constraint.
Problem
All Spacelift policies must declare package spacelift, which forces every policy into a single shared namespace. This causes: 1. Symbol collisions — Rules and functions with the same name across policies conflict, forcing us to prefix duplicated code in similar policies. 2. Broken OPA tooling — Linting and test execution don't work well with a shared namespace. Tests cannot be scoped per package and must be run per individual policy file instead. 3. No shared code — It is impossible to create a separate helper package with reusable logic and import it into multiple policies.

Please authenticate to join the conversation.

Upvoters
Status

👀 In Review

Board

💡 Feature Requests

Date

About 10 hours ago

Subscribe to post

Get notified by email when there are changes.