pants-backend-k8s


Namepants-backend-k8s JSON
Version 0.3.0 PyPI version JSON
download
home_page
SummaryA Kubernetes plugin for the Pants build system
upload_time2023-11-21 18:46:32
maintainer
docs_urlNone
author
requires_python
license
keywords pantsbuild pants backend kubernetes
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Kubernetes backend for Pants

![PyPI](https://img.shields.io/pypi/v/pants-backend-k8s?label=Latest%20release)

> **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](https://github.com/kubernetes/kubectl) for cluster operations

## Targets

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

* [`k8s_source`](#k8s_source)
* [`k8s_object`](#k8s_object)
* [`k8s_objects`](#k8s_objects)

### `k8s_source`

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

``` python
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`](https://github.com/tgolsson/pants-backend-kustomize#kustomize) or via [`k8s_source`](#k8s_source).

``` python
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.

``` python
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`.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pants-backend-k8s",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pantsbuild,pants,backend,kubernetes",
    "author": "",
    "author_email": "Tom Solberg <me@sbg.dev>",
    "download_url": "https://files.pythonhosted.org/packages/3c/33/4a94bbf321a956eaec3039a09c1e4566684a8b9fb3f54cace0942a7d216a/pants-backend-k8s-0.3.0.tar.gz",
    "platform": null,
    "description": "# Kubernetes backend for Pants\n\n![PyPI](https://img.shields.io/pypi/v/pants-backend-k8s?label=Latest%20release)\n\n> **Warning**\n> This plugin is in development. No stability is guaranteed! Contributions welcome.\n\nThis backends implements targets for working with Kubernetes clusters using raw YAML.\n\n* [kubectl](https://github.com/kubernetes/kubectl) for cluster operations\n\n## Targets\n\nThere's currently three targets for `pants-backend-k8s`:\n\n* [`k8s_source`](#k8s_source)\n* [`k8s_object`](#k8s_object)\n* [`k8s_objects`](#k8s_objects)\n\n### `k8s_source`\n\nA file that can be passed into other k8s fields that are not source fields. For example, `k8s_object.template`.\n\n``` python\nk8s_source(\n    name=\"namespace.yaml\",\n    source=\"namespace.yaml\",\n)\n```\n\n\n| Argument | Meaning | Default value |\n| --- | --- | --- |\n| `name` | The target name | Same as any other target, which is the directory name |\n| `source` | The raw file | **Required** |\n| `decsription` | A description of the target |  |\n| `tags` | List of tags | `[]` |\n\n\nThis'll eventually be automated like other rules once a suitable heuristic for generation with tailor is found. PRs welcome!\n\n\n### `k8s_object`\n\nInput for a kubernetes command, either generated via [`kustomize`](https://github.com/tgolsson/pants-backend-kustomize#kustomize) or via [`k8s_source`](#k8s_source).\n\n``` python\nk8s_object(\n    name=\"k8s\",\n    description=\"the chat backend\"\n    template=[\":kustomize\"],\n    namespace=\"chat-app\",\n    cluster=\"prod\",\n)\n```\n\n\n| Argument      | Meaning                     | Default value                                         |\n|---------------|-----------------------------|-------------------------------------------------------|\n| `name`        | The target name             | Same as any other target, which is the directory name |\n| `template`    | The target to act on        | **Required**                                          |\n| `namespace`   | Namespace to target         | Optional, will use default kubectl namespace          |\n| `cluster`     | cluster to target           | Optional, will use default kubectl cluster            |\n| `decsription` | A description of the target |                                                       |\n| `tags`        | List of tags                | `[]`                                                  |\n\n`k8s_object` is a generator for `kubernetes` target parametrized by the potential commands that are available: `apply`,\n`create`, `get`, `describe`, `replace`, and `delete`.\n\n### `k8s_objects`\n\nA collection of kubernetes objects that should be managed together.\n\n``` python\nk8s_objects(\n    name=\"my-service\",\n    description=\"all components of service-x\"\n    objects=[\":namespace\", \":deployment\"],\n)\n```\n\n\n| Argument      | Meaning                                   | Default value                                         |\n|---------------|-------------------------------------------|-------------------------------------------------------|\n| `name`        | The target name                           | Same as any other target, which is the directory name |\n| `objects`     | k8s_object targets that should be managed | **Required**                                          |\n| `decsription` | A description of the target               |                                                       |\n| `tags`        | List of tags                              | `[]`                                                  |\n\nLike `k8s_object`, `k8s_objects` is a generator for parametrized targets for the commands that are available: `apply`,\n`create`, `get`, `describe`, `replace`, and `delete`.\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Kubernetes plugin for the Pants build system",
    "version": "0.3.0",
    "project_urls": {
        "Changelog": "https://github.com/tgolsson/pants-backends/tree/main/pants-plugins/k8s/CHANGELOG.md",
        "Code": "https://github.com/tgolsson/pants-backends/tree/main/pants-plugins/k8s",
        "Repository": "https://github.com/tgolsson/pants-backends"
    },
    "split_keywords": [
        "pantsbuild",
        "pants",
        "backend",
        "kubernetes"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "785c4d06e607cd0d220dfe08809f1cf37172b68dd47ceeddae5ca175b6566aa0",
                "md5": "b56335eb154170a01ae508a13f6bf361",
                "sha256": "163a2b2b35b08a454d89ab1d95e3721be8df4acc288b0dfa9c0315989304b9d9"
            },
            "downloads": -1,
            "filename": "pants_backend_k8s-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b56335eb154170a01ae508a13f6bf361",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7916,
            "upload_time": "2023-11-21T18:46:29",
            "upload_time_iso_8601": "2023-11-21T18:46:29.588062Z",
            "url": "https://files.pythonhosted.org/packages/78/5c/4d06e607cd0d220dfe08809f1cf37172b68dd47ceeddae5ca175b6566aa0/pants_backend_k8s-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c334a94bbf321a956eaec3039a09c1e4566684a8b9fb3f54cace0942a7d216a",
                "md5": "771f62c8a5dc183258bbdb64c0be56e1",
                "sha256": "dc8c73b1cead6c01bfcd671036da2b72bd06eefbc057bae45de2f85f122d2742"
            },
            "downloads": -1,
            "filename": "pants-backend-k8s-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "771f62c8a5dc183258bbdb64c0be56e1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6714,
            "upload_time": "2023-11-21T18:46:32",
            "upload_time_iso_8601": "2023-11-21T18:46:32.486905Z",
            "url": "https://files.pythonhosted.org/packages/3c/33/4a94bbf321a956eaec3039a09c1e4566684a8b9fb3f54cace0942a7d216a/pants-backend-k8s-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-21 18:46:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tgolsson",
    "github_project": "pants-backends",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pants-backend-k8s"
}
        
Elapsed time: 0.15443s