Skip to content

RedHatQE/openshift-python-utilities

Folders and files

NameName
Last commit message
Last commit date
Aug 9, 2023
Mar 18, 2025
May 1, 2024
Mar 30, 2023
May 6, 2025
Jul 6, 2022
Jan 26, 2025
Jun 30, 2022
Jan 26, 2025
Jan 26, 2025
Jan 9, 2025
May 5, 2025
Jan 27, 2025
Aug 3, 2023
May 5, 2025

Repository files navigation

openshift-python-utilities

Pypi: openshift-python-utilities
A utilities repository for openshift-restclient-python

Release new version

requirements

  • Export GitHub token
export GITHUB_TOKEN=<your_github_token>

Run the following once (execute outside repository dir for example ~/):

sudo npm install --global release-it
npm install --save-dev @release-it/bumper

usage

  • Create a release, run from the relevant branch.
    To create a 4.11 release, run:
git checkout v4.11
git pull
release-it # Follow the instructions

Installation

From source using uv.

git clone https://github.com/RedHatQE/openshift-python-utilities.git
cd openshift-python-utilities
uv sync

Examples

Get Client

from ocp_utilities.infra import get_client
client = get_client(config_file=<path to kubeconfig>))

Install Operator

from ocp_utilities.operators import install_operator
install_operator(
    admin_client=client,
    name=<operator name>,
    channel=<channel>,
    source=<source>,
)