Skip to main content

Kubernetes backend for Pants

This release targets Pants 2.30.0. Install it with pants-backend-k8s==0.6.1 in [GLOBAL].plugins in pants.toml.

PyPI

Warning This plugin is in development. No stability is guaranteed! Contributions welcome.

This backends implements targets for working with Kubernetes clusters using raw YAML.

Targets

There's currently three targets for pants-backend-k8s:

k8s_source

A file that can be passed into other k8s fields that are not source fields. For example, k8s_object.template.

k8s_source(
    name="namespace.yaml",
    source="namespace.yaml",
)
Argument Meaning Default value
name The target name Same as any other target, which is the directory name
source The raw file Required
decsription A description of the target
tags List of tags []

This'll eventually be automated like other rules once a suitable heuristic for generation with tailor is found. PRs welcome!

k8s_object

Input for a kubernetes command, either generated via kustomize or via k8s_source.

k8s_object(
    name="k8s",
    description="the chat backend"
    template=[":kustomize"],
    namespace="chat-app",
    cluster="prod",
)
Argument Meaning Default value
name The target name Same as any other target, which is the directory name
template The target to act on Required
namespace Namespace to target Optional, will use default kubectl namespace
cluster cluster to target Optional, will use default kubectl cluster
decsription A description of the target
tags List of tags []

k8s_object is a generator for kubernetes target parametrized by the potential commands that are available: apply, create, get, describe, replace, and delete.

k8s_objects

A collection of kubernetes objects that should be managed together.

k8s_objects(
    name="my-service",
    description="all components of service-x"
    objects=[":namespace", ":deployment"],
)
Argument Meaning Default value
name The target name Same as any other target, which is the directory name
objects k8s_object targets that should be managed Required
decsription A description of the target
tags List of tags []

Like k8s_object, k8s_objects is a generator for parametrized targets for the commands that are available: apply, create, get, describe, replace, and delete.

Metadata

Release files for pants-backend-k8s 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pants-backend-k8s 0.6.1
File Size Uploaded
pants_backend_k8s-0.6.1.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pants-backend-k8s 0.6.1
File Interpreter ABI Platform
pants_backend_k8s-0.6.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 22.7 kB

Release files / pants_backend_k8s-0.6.1.tar.gz

Download URL pants_backend_k8s-0.6.1.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f7ce750ca8f8968556d95830a957b1ae15bc028be0ac90a1e45b89642ad3c3b0
BLAKE2b-256 checksum
How to use checksums
cdc03e9119359f16d2492abc0a5b3ab05cdd977313b51b414ffc67ec4ab67a40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / pants_backend_k8s-0.6.1-py2.py3-none-any.whl

Download URL pants_backend_k8s-0.6.1-py2.py3-none-any.whl
Size 12.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
93603bc7de760ffae4835a794b7c3ff01433d180544d9018e2ca54f401ec7eab
BLAKE2b-256 checksum
How to use checksums
9b5c7a4ca6065ce39689a18f88d1d26e53346722f97276e02cbe37c34d382aa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release history Release notifications | RSS feed

0.7.0

2 release files

This release

0.6.1 This release

2 release files

0.6.0

1 release file

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page