Skip to content

Track 5: Split deploy/ into target modules #16

@nielsweistra

Description

@nielsweistra

Track 5: Split deploy/ into target modules

Overview

deploy/ contains logic for deploying policies to multiple targets (Azure Policy,
Kubernetes OPA/Gatekeeper, etc.) in a single file. This makes it hard to add new
targets or test them in isolation.

Target Structure

deploy/
├── __init__.py         (re-exports for backward compatibility)
├── azure.py            (Azure Policy deployment logic)
└── kubernetes.py       (Kubernetes OPA/Gatekeeper deployment logic)

Implementation Steps

  1. Create src/itl_policy_builder/deploy/ as a package
  2. Move Azure deployment logic to deploy/azure.py
  3. Move Kubernetes deployment logic to deploy/kubernetes.py
  4. Update deploy/__init__.py to re-export all public functions for backward compatibility
  5. Update any internal imports that reference the old module path

Acceptance Criteria

  • from itl_policy_builder.deploy import deploy_to_azure (and all others) still works
  • from itl_policy_builder.deploy.azure import deploy_to_azure also works
  • All existing tests pass unchanged
  • New deployment targets can be added as deploy/newplatform.py without touching other files
  • No circular imports

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrefactoringCode structure, architecture, and technical debt

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions