Kubernetes Resource Manager with retry logic and reconciliation utilities
Project description
charmarr-lib-krm
Kubernetes Resource Manager with retry logic and reconciliation utilities.
Features
- Generic CRUD operations for any K8s resource type via lightkube
- Automatic retry on transient errors (409 Conflict, 429 Rate Limit, 5xx)
- Strategic merge patch and server-side apply support
- Reconciliation result types for idempotent operations
Installation
pip install charmarr-lib-krm
Usage
from charmarr_lib.krm import K8sResourceManager, ReconcileResult
from lightkube.resources.apps_v1 import StatefulSet
# Create manager (uses in-cluster config or kubeconfig)
manager = K8sResourceManager()
# Get a resource
sts = manager.get(StatefulSet, "my-app", "my-namespace")
# Patch with automatic retry on conflict
manager.patch(StatefulSet, "my-app", patch_data, "my-namespace")
# Server-side apply for idempotent create/update
manager.apply(resource)
# Check existence
if manager.exists(StatefulSet, "my-app", "my-namespace"):
...
# Delete with 404 handling
deleted = manager.delete(StatefulSet, "my-app", "my-namespace")
License
LGPL-3.0-or-later
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file charmarr_lib_krm-0.1.2.tar.gz.
File metadata
- Download URL: charmarr_lib_krm-0.1.2.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3c89e665b576ef676240d29f1f4ac7d29f6ed2ee6a9d5fc720028c1776d0fd0
|
|
| MD5 |
20bc35b99e35e823b255d126aa366529
|
|
| BLAKE2b-256 |
53c2a0cd475fa0d3a81836801825e5d2767f6cefc9238e2007ab39107731516a
|
Provenance
The following attestation bundles were made for charmarr_lib_krm-0.1.2.tar.gz:
Publisher:
release.yml on charmarr/charmarr-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
charmarr_lib_krm-0.1.2.tar.gz -
Subject digest:
c3c89e665b576ef676240d29f1f4ac7d29f6ed2ee6a9d5fc720028c1776d0fd0 - Sigstore transparency entry: 829432841
- Sigstore integration time:
-
Permalink:
charmarr/charmarr-lib@4af6b497eac916035d551876e0bb67ebea64137f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/charmarr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4af6b497eac916035d551876e0bb67ebea64137f -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file charmarr_lib_krm-0.1.2-py3-none-any.whl.
File metadata
- Download URL: charmarr_lib_krm-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcfd192777d4def6c3e8f482dbc19c6cf30ec47d78ac5c0e5b13a99d75eb5c73
|
|
| MD5 |
31dadb89be80344629287b6341c11e60
|
|
| BLAKE2b-256 |
2fc2139907b494f3998940ae88465852e13475065d2cc090f7f212e4b176d3d8
|
Provenance
The following attestation bundles were made for charmarr_lib_krm-0.1.2-py3-none-any.whl:
Publisher:
release.yml on charmarr/charmarr-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
charmarr_lib_krm-0.1.2-py3-none-any.whl -
Subject digest:
dcfd192777d4def6c3e8f482dbc19c6cf30ec47d78ac5c0e5b13a99d75eb5c73 - Sigstore transparency entry: 829432859
- Sigstore integration time:
-
Permalink:
charmarr/charmarr-lib@4af6b497eac916035d551876e0bb67ebea64137f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/charmarr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4af6b497eac916035d551876e0bb67ebea64137f -
Trigger Event:
workflow_run
-
Statement type: