Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

charmarr_lib_krm-0.1.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

charmarr_lib_krm-0.1.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

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

Hashes for charmarr_lib_krm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c3c89e665b576ef676240d29f1f4ac7d29f6ed2ee6a9d5fc720028c1776d0fd0
MD5 20bc35b99e35e823b255d126aa366529
BLAKE2b-256 53c2a0cd475fa0d3a81836801825e5d2767f6cefc9238e2007ab39107731516a

See more details on using hashes here.

Provenance

The following attestation bundles were made for charmarr_lib_krm-0.1.2.tar.gz:

Publisher: release.yml on charmarr/charmarr-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file charmarr_lib_krm-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for charmarr_lib_krm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dcfd192777d4def6c3e8f482dbc19c6cf30ec47d78ac5c0e5b13a99d75eb5c73
MD5 31dadb89be80344629287b6341c11e60
BLAKE2b-256 2fc2139907b494f3998940ae88465852e13475065d2cc090f7f212e4b176d3d8

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

Supported by

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