Skip to main content

A Kubernetes plugin for the Pants build system

Project description

Kubernetes backend for Pants

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.

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

pants-backend-k8s-0.5.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

pants_backend_k8s-0.5.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file pants-backend-k8s-0.5.0.tar.gz.

File metadata

  • Download URL: pants-backend-k8s-0.5.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for pants-backend-k8s-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b8c62fba0078e72691adabdc6500020d6ea3645ecf40af8139b7894f03fa50a3
MD5 f81cd00b7eb7cb57282b0ccfd4e65fbc
BLAKE2b-256 5c0259155555a2e5575e09140821e4e01e737974064cce128ac04f5681f7c9e1

See more details on using hashes here.

File details

Details for the file pants_backend_k8s-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pants_backend_k8s-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93eed9aafd46da1676dd63fa181ad0e5dc2fc8967cfb4c57c7d5294651b08baf
MD5 3ed22ceb5849c2ac9533c97c2699bb6d
BLAKE2b-256 a704f754a482707f4c6bcf51c9235ddc151b6fe3838708b2e006032897cb7913

See more details on using hashes here.

Supported by

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