Skip to content

Support Network Polcices in the Sandboxes#54

Open
lukaszo wants to merge 1 commit into
mainfrom
KOYEB-5970-np
Open

Support Network Polcices in the Sandboxes#54
lukaszo wants to merge 1 commit into
mainfrom
KOYEB-5970-np

Conversation

@lukaszo

@lukaszo lukaszo commented Jul 6, 2026

Copy link
Copy Markdown
Member

No description provided.

@lukaszo lukaszo force-pushed the KOYEB-5970-np branch 3 times, most recently from 8fbae3a to 4860e55 Compare July 7, 2026 08:52
Comment thread .openapi-generator/VERSION Outdated
@@ -0,0 +1 @@
7.24.0-SNAPSHOT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this? 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea, dropped. I guess some leftover

Comment thread koyeb/sandbox/sandbox.py

def update_egress_policy(
self,
block_network: bool = False,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name might not be super future proof, no? If we add policies ruling inbound, for example

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-named

Comment thread examples/README.md
- **18_create_sandbox_with_existing_app.py** - Create a sandbox in an existing app
- **19_entrypoint_and_command.py** - Create sandboxes with custom entrypoint and command
- **20_config_files.py** - Config files with secrets and interpolation
- **21_egress_policy.py** - Block outbound network access or restrict it to an allowlist

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will break MAIS e2e tests. It's because network policies are not yet implemented in MAIS but the e2e clone the repository & run all examples 🥲

https://github.com/mistralai/api.koyeb.com/blob/main/test/e2e/flows/sandbox.go#L170

It's my fault sorry, do you mind patching? I think we have multiple choices:

  • Clone at a specific commit SHA
  • Maintain a whitelist for e2e tests to run
  • Have a better strategy than clone the repo
  • ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could mirror the test else where, maybe in our main repo.
Because there are some tests we'd like to include that might not be user facing as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread koyeb/sandbox/sandbox.py

def update_egress_policy(
self,
block_network: bool = False,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be directly update_network_policy ?

Forgetting parameters in this function looks a bit dangerous if that's reseting the policy.

Comment thread koyeb/sandbox/sandbox.py
block_network: bool = False,
outbound_allowlist: Optional[List[str]] = None,
) -> None:
"""Update the sandbox's egress network policy asynchronously.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should mention it's re-deploying

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants