A Kubernetes plugin for the Pants build system
Project description
Kubernetes backend for Pants
Warning This plugin is in development. No stability is guaranteed! Contributions welcome.
This backends implements targets for working with Kubernetes clusters using raw YAML.
- kubectl for cluster operations
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
Built Distribution
File details
Details for the file pants-backend-k8s-0.4.0.tar.gz
.
File metadata
- Download URL: pants-backend-k8s-0.4.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65eeb5c4462f8736fedaae7bbab051550e7e9b8542076f515220dafb19f78cd6 |
|
MD5 | 649ea4a5d59b8d8ee1f37ab0e9809c7c |
|
BLAKE2b-256 | 53b3e12569340df77117bcde09ad713b1613ef66c23fe550e37eb1cae91224d1 |
File details
Details for the file pants_backend_k8s-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: pants_backend_k8s-0.4.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48c42eb9ac9329730feb262166e1ed3e3fe09bc78759215931d56c62a07707e5 |
|
MD5 | 6d5d07ef57e21c4ba059da425b769544 |
|
BLAKE2b-256 | cb411380e11ac963e451cd7a2ef55b6e074ff7b18b52dd065715ef602e886232 |