Skip to main content

Wrapper around kubernetes-clients/python

Project description

Build Status Code style: black Type checker: mypy Packaging: poetry

Tulips

A small wrapper around https://github.com/kubernetes-client/python which understands Kubernetes charts.

Why

I needed something simple that would read Kubernetes charts and push them to the Kubernetes cluster and be extensible. So something like helm+kubectl with ability to write you own tools around them.

Supported CRDS aka Kubernetes objects

  • Deployment
  • Service
  • Ingress
  • Secret
  • Issuer (cert-manager)
  • PersistentVolumeClaim

Example

import yaml
from tulips import class_for_kind
from kubernetes import client as k8s


spec = yaml.load('ingress.yaml')

ingress_cls = class_for_kind(spec['kind'])
ingress = ingress_cls(config.client)
ingress.create(namespace='default')
print ingress.status(namespace='default')
ingress.delete(namespace='default')

Tulip

Tulip is a sample client that emulates Helm but without Tiller.

$ python tulips push --help                                    06/25/18 -  9:49
Usage: tulips push [OPTIONS] CHART

  You can pass chart variables via foo=bar, for example '$ tulip push
  app.yaml foo=bar'

Options:
  --namespace TEXT   Kubernetes namespace
  --release TEXT     Name of the release
  --kubeconfig PATH  Path to kubernetes config
  --help             Show this message and exit.

Example

TODO

  • Custom container for yaml(eliminates class_for_kind function)

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

tulips-0.1.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

tulips-0.1.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file tulips-0.1.2.tar.gz.

File metadata

  • Download URL: tulips-0.1.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tulips-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ab451f0e2b434eb7d64cbe2ce161cca7900f48ab04eef6716fcdee8272af1d74
MD5 ffc23bc7db9110aa3a905b4f08a50cf6
BLAKE2b-256 2ab4451863109ce17000184dd6f016c788fbded76ce40f06901786c04549d1e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulips-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 248d84ca386a94d0631c30139ad88570b6f3952973fc7234cd8214f5befa8169
MD5 bdfa4872a592b1f80be21851c72ce1cc
BLAKE2b-256 0ce6df034202a34f9d8252e9b21d2b4ab8288499ba855ae22ee1455e4636eb9f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page