No project description provided
Project description
The Idem Helm provider
About
An Idem plug-in to manage Helm resources. Helm is a package manager for Kubernetes.
What is POP?
This project is built with pop, a Python-based implementation of Plugin Oriented Programming (POP). POP seeks to bring together concepts and wisdom from the history of computing in new ways to solve modern computing problems.
For more information:
Getting Started
Prerequisites
Python 3.7+
git (if installing from source or contributing to the project)
To contribute to the project and set up your local development environment, see CONTRIBUTING.rst in the source repository for this project.
Installation
You can install idem-helm with the Python package installer (PyPI) or from source.
Install from PyPI
pip install idem-helm
Install from Source
# Clone repo
git clone git@<your-project-path>/idem-helm.git
cd idem-helm
# Set up venv
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
Usage
Setup
After installation, idem-helm execution and state modules are accessible to the pop hub.
For more information:
To use idem-helm execution and state modules to manage cluster resources, you need to set up authentication in one of the following ways.
With environment variables
Set KUBE_CONFIG_PATH and KUBE_CTX environment variables to the Kubernetes configuration file and context found in your kube_config file.
In the Idem config file
Edit the Idem config file to include the kube_config_path and context under account extras. Use the following example as a guideline.
acct:
extras:
helm:
default:
kube_config_path: ~/.kube/config
context: default
In a credentials.yaml file
Create or edit an Idem credentials.yaml file to add the kube_config_path and context to a Helm profile. Use the following example as a guideline.
helm:
default:
kube_config_path: ~/.kube/config
context: kubernetes-admin@kubernetes
For more about Idem credentials files, including recommended steps for encryption and environment variables, see Authenticating with Idem
You are now ready to use idem-helm.
States
Idem SLS files use states to ensure that resources are in a desired configuration. An idem-helm SLS file supports three state functions: present, absent, and describe.
present
The present function ensures that a resource exists. If a resource doesn’t exist, running present creates it. If the resource already exists, running present might leave it unchanged, or update it if there are any configuration changes.
absent
The absent function ensures that a resource does not exist. If the resource exists, running absent deletes it. If the resource doesn’t exist, running absent has no effect.
describe
The describe function returns a list of all resources in the Kubernetes cluster of the same type as specified in the credential profile.
Accessing States
States can be accessed by their relative location in idem-helm/idem_helm/states.
For example, a Helm release state can be created with the present function as shown in the following SLS file.
helm_release.sls:
idem-helm-release-test:
helm.release.present:
- name: idem-redis
- repository: https://charts.bitnami.com/bitnami
- chart: redis
- namespace: kube-system
- resource_id: idem-redis
- values:
image:
pullPolicy: IfNotPresent
The Idem command to create the preceding release state is:
idem state $PWD/helm_release.sls
Current Supported Resources
helm
release
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 idem-helm-2.0.0.tar.gz
.
File metadata
- Download URL: idem-helm-2.0.0.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.4 tqdm/4.65.0 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79bf33c6bdf3ef5e2771c245cfdeedf4938ddfd2c487e3c7798024d441d3d120 |
|
MD5 | 6dd8c6467c10864892c8b7d0952b20ef |
|
BLAKE2b-256 | da75012b3ef8bbaa3b87e10b9c7bf71538cd2c1587f1ccf6dd6d1bedcff5720d |
File details
Details for the file idem_helm-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: idem_helm-2.0.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.4 tqdm/4.65.0 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0db029a1238af663b611bc2bb06e8a4c85383fb902950d14bb5db9e40f360ff8 |
|
MD5 | 8b7cac46f959c5ce117020ca8e9647ae |
|
BLAKE2b-256 | b4cc02194cbf40e14171d9015486d0cbe5bdf4428550aac3c7316072e9087862 |