Skip to main content

Add your description here

Project description

ctfroute-k8s

This package exposes a lightweight interface to ctfroute via Kubernetes CRDs. Specifically, it allows to create gate instances in Kubernetes via CRDs that will be handled by the ctfroute operator.

Installation

The package can be installed from pypi:

uv add ctfroute-k8s

Managing gates

To create instances, you can either use the models or the wrapper functions which should allow for more intuitive gate declaration.

from ctfroute_k8s.utils.sync_helpers import add_connection_gate

add_connection_gate(
    namespace=NAMESPACE,
    name="close-network",
    conn_src="any-team",
    conn_dst="any-team",
)

If you want to remove gates, fall back to the functionality provided by cloudcoil via the Gate model.

from ctfroute_k8s import Gate
gate = Get.get(namespace="myctf", name="close-network")
gate.delete()

Async

The package provides async wrappers around cloudcoil for creating gates:

from ctfroute_k8s.utils.async_helper import add_connection_gate

await add_connection_gate(
    namespace=NAMESPACE,
    name="close-network",
    conn_src="any-team",
    conn_dst="any-team",
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctfroute_k8s-0.4.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ctfroute_k8s-0.4.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file ctfroute_k8s-0.4.0.tar.gz.

File metadata

  • Download URL: ctfroute_k8s-0.4.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for ctfroute_k8s-0.4.0.tar.gz
Algorithm Hash digest
SHA256 868b94ae4583672ba207edbcb7825aadf621768256d90c23726ea6d47fb6a868
MD5 b710ffc99eea19f4381af9d8133cc7e3
BLAKE2b-256 ca66ac0a9a567c0e045eba203552c3c526b69529d72dd3b27d94d2e00476c1ea

See more details on using hashes here.

File details

Details for the file ctfroute_k8s-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ctfroute_k8s-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4e8b58177301a65663feb1e0f6994d6ea916658a8cdc0ae7c5fc2969fd7d171
MD5 4728a14c5de30a369a4d27800b33a090
BLAKE2b-256 c1dbdc5cd8fb00099cce82c859a9552738ef7b8b91919c27a9f16b173f11c9df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page