https://circleci.com/gh/IntrospectData/django-kubernetes-manager.svg?style=shield Maintainability Test Coverage DjangoKubernetesManager

Welcome to Django Kubernetes Manager’s documentation!ΒΆ

Django Kubernetes Manager is an open source project to wrap the complexity of Kubernetes management in the simplicity of Django Rest Framework.

Documentation is (mostly) autogenerated, so if you notice anything that should be changed or added, please create a PR πŸ™‹

IntroductionΒΆ

Our engineering team has developed several data processing apps, and found celery wasn’t quite enough for dispatching heavier tasks. We decided to try Kubernetes Jobs, and while pleased with performance, wanted a less verbose, more object oriented way to interact with our clusters.

And thus Django Kubernetes Manager was spawned. Using Django Rest Framework and the kubernetes client library, our devs came up with the idea to treat each object we’d be deploying as a Model instance, and use the DRF viewsets and actions to create an RESTful API framework from which we could extend for each projects particular needs.

Table of ContentsΒΆ

Getting StartedΒΆ

QuickstartΒΆ

  • Install from PyPi

pip install django-kubernetes-manager
  • In settings.py (or module) add the app

INSTALLED_APPS = [
  ... ,
  rest_framework,
  kubernetes_manager,
]
  • In urls.py include the package urls

urlpatterns = [
  ... ,
  path('dkm/', include('kubernetes_manager.urls')),
]
  • Run migrations and start server

./manage.py migrate
./manage.py runserver
  • Navigate to django admin and create a TargetCluster

  • Sample request

curl http://127.0.0.1:8000/dkm/api/namespaces/?format=json
[
  {
    "title": "veridian-dynamics-aerodynamic-bagels",
    "description": null,
    "cluster": "http://127.0.0.1:8000/dkm/api/clusters/1/?format=json",
    "config": {},
    "labels": {
      "project": "aerodynamic-bagels",
      "organization": "veridian-dynamics"
    },
    "annotations": {},
    "api_version": "v1",
    "kind": "Namespace",
    "exists": true
  }
]

Sample Use-casesΒΆ

  • Creating a labelled namespace for a client project:

from kubernetes_manager.models import KubernetesNamespace, TargetCluster
from django.db import models
from django_extensions.models import TitleDescriptionModel

class AppNamespace(TitleDescriptionModel):
  project = models.OneToOneField("client.Project", on_delete=models.CASCADE)
  organization = models.ForeignKey("client.Org", on_delete=models.CASCADE)
  cluster = models.ForeignKey("kubernetes_manager.TargetCluster", on_delete=models.CASCADE)
  namespace = models.ForeignKey("kubernetes_manager.KubernetesNamespace", null=True, blank=True, on_delete=models.CASCADE)
  status = models.CharField(max_length = 128, null=True, blank=True)

  def save(self, *args, **kwargs):
      if not self.status == "{'phase': 'Active'}":
          self.namespace = KubernetesNamespace.objects.create(
              title = "ns-" + self.organization.slug + "-" + self.project.slug,
              cluster = self.cluster,
              labels = {"organization":self.organization.slug, "project": self.project.slug},
              kind = "Namespace"
          )
          self.status = self.namespace.deploy()
      super().save(*args, **kwargs)

  def remove(self, *args, **kwargs):
      self.status = self.namespace.k_delete()

  def delete(self, *args, **kwargs):
      self.remove()
      super().delete(*args, **kwargs)
  • Creating a two-container deployment:

from kubernetes_manager.models import KubernetesNamespace, TargetCluster
from django.db import models
from django_extensions.models import TitleDescriptionModel

from .ns import AppNamespace

class FileServer(TitleDescriptionModel):
    name = models.CharField(max_length=128)
    organization = models.ForeignKey("client.Org", on_delete=models.CASCADE)
    project = models.ForeignKey("client.Project", on_delete=models.CASCADE)
    cluster = models.ForeignKey("kubernetes_manager.TargetCluster", on_delete=models.CASCADE)
    namespace = models.ForeignKey(AppNamespace, on_delete=models.CASCADE)
    file = models.ForeignKey("library.FileItem", on_delete=models.CASCADE)
    docker_image = models.CharField(max_length=256, help_text="Docker repo path for image")
    docker_tag = models.CharField(max_length=16, help_text="Docker tag for image")
    definition = JSONField(null=True, blank=True)

    # define volume
    def vol(self, *args, **kwargs):
        volume = KubernetesVolume.objects.create(
            title = self.name + "-vol",
            cluster = self.cluster
        )
        return volume

    # create primary container
    def container_spec(self, *args, **kwargs):
        container = KubernetesContainer.objects.create(
            title = self.name,
            cluster = self.cluster,
            image_name = self.docker_image,
            image_tag = self.docker_tag,
            volume_mount = KubernetesVolumeMount.objects.create(
                title = self.name + "-vol",
                cluster = self.cluster
            ) if not kwargs.get("mount", None) else kwargs.get("mount"),
            command = "ls",
            args ="/media"
        )
        return container

    # create download sidecar
    def sidecar_spec(self, *args, **kwargs):
        sidecar = KubernetesContainer.objects.create(
            title = self.name,
            cluster = self.cluster,
            image_name = "curlimages/curl",
            image_tag = "7.69.1",
            volume_mount = KubernetesVolumeMount.objects.create(
                title = self.name + "-vol",
                cluster = self.cluster
            ) if not kwargs.get("mount", None) else kwargs.get("mount"),
            command = "/bin/sh",
            args = '-c,curl -oL {} {}'.format(self.file.name, self.file.url)
        )
        return sidecar

    # create pod template
    def pod_template_spec(self, *args, **kwargs):
        volume_mount = KubernetesVolumeMount.objects.create(
            title = self.name + "-vol",
            cluster = self.cluster
        )
        pod = KubernetesPodTemplate.objects.create(
            title = self.name,
            cluster = self.cluster,
            volume = self.vol(),
            primary_container = self.container_spec(mount=volume_mount),
            secondary_container = self.sidecar_spec(mount=volume_mount),
            restart_policy = "Always",
            labels = {"project": self.project.slug}
        )
        return pod

    # tie it up and deplioy
    def deploy(self):
        pod = self.pod_template_spec()
        deployment = KubernetesDeployment.objects.create(
            title = self.name,
            cluster = self.cluster,
            api_version = "apps/v1",
            kind = "Deployment",
            namespace = self.namespace.namespace.slug,
            labels = {"project": self.project.slug},
            selector = {"project": self.project.slug},
            pod_template = pod
        )
        self.definition = deployment.get_obj().to_dict()
        self.save()
        return deployment.deploy()

ModelsΒΆ

Base ModelsΒΆ

class kubernetes_manager.models.base.KubernetesBase(*args, **kwargs)ΒΆ

Bases: django_extensions.db.models.TitleSlugDescriptionModel

Type

model (abstract)

Description

Base parent model that all subsequent models inherit from.

Inherits

django_extensions.db.models.TitleSlugDescriptionModel

Fields

id, cluster, config, deployed, deleted

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

class MetaΒΆ

Bases: object

abstract = FalseΒΆ
clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

cluster_idΒΆ
configΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

deployedΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_client(API=<class 'kubernetes.client.apis.core_v1_api.CoreV1Api'>, **kwargs)ΒΆ

Gets a k8s api client

Args:

API (client.<type>) - Kubernetes Client Type

Returns:

object of type <API>

idΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

removedΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

slugify_function(content)ΒΆ
Description

Overrides default slugify with custom logic.

class kubernetes_manager.models.base.KubernetesMetadataObjBase(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesBase

Type

model (abstract)

Description

Extends KubernetesBase to include metadata fields.

Inherits

kubernetes_manager.models.base.KubernetesBase

Fields

labels, annotations

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • labels (JSONField) – Dictionary store equivalent to Labels in Kubernetes API

  • annotations (JSONField) – Dictionary store equivalent to Annotations in Kubernetes API

class MetaΒΆ

Bases: object

abstract = FalseΒΆ
annotationsΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

labelsΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class kubernetes_manager.models.base.KubernetesNetworkingBase(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesMetadataObjBase

Type

model (abstract)

Description

Extends KubernetesMetadataObjBase to include network fields.

Inherits

kubernetes_manager.models.base.KubernetesMetadataObjBase

Fields

labels, annotations

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • labels (JSONField) – Dictionary store equivalent to Labels in Kubernetes API

  • annotations (JSONField) – Dictionary store equivalent to Annotations in Kubernetes API

  • api_version (CharField) – API version used to deploy child object.

  • kind (CharField) – String representation of Kubernetes object kind

  • port (IntegerField) – Port object will expose

  • namespace_id (ForeignKey) – Live namespace the object is associated with.

  • kuid (CharField) – Object’s UID in the cluster

class MetaΒΆ

Bases: object

abstract = FalseΒΆ
api_versionΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

kindΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

kuidΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

namespaceΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

namespace_idΒΆ
portΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Kubernetes ModelsΒΆ

class kubernetes_manager.models.kube.KubernetesConfigMap(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesMetadataObjBase

Type

model

Description

Holds data related to a kubernetes volume mount.

Inherits

kubernetes_manager.models.base.KubernetesMetadataObjBase

Fields

kind, data, binary, override_name, namespace

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • labels (JSONField) – Dictionary store equivalent to Labels in Kubernetes API

  • annotations (JSONField) – Dictionary store equivalent to Annotations in Kubernetes API

  • kind (CharField) – Kind

  • data (JSONField) – Data

  • binary (BinaryField) – Binary

  • override_name (CharField) – Override name

  • namespace_id (ForeignKey) – Namespace

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

binaryΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

dataΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

deploy()ΒΆ
Description

Deploy configmap obj.

get_obj()ΒΆ
Description

Generate configmap spec.

kindΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

namespaceΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

namespace_idΒΆ
objects = <django.db.models.manager.Manager object>ΒΆ
override_nameΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

remove()ΒΆ
Description

Delete configmap from namespace.

class kubernetes_manager.models.kube.KubernetesContainer(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesBase

Type

model

Description

Holds data related to a kubernetes contaienr.

Inherits

kubernetes_manager.models.base.KubernetesBase

Fields

image_name, image_tag, image_pull_policy, command, args, port, volume_mount

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • image_name (CharField) – Properly qualified image name.

  • image_tag (CharField) – Tag name for the image to be used for this job

  • image_pull_policy (CharField) – Image pull policy

  • command (TextField) – Command to run when start container

  • args (TextField) – Comma separated args to run with command when instantiating container.

  • port (IntegerField) – Port to expose.

  • volume_mounts (ManyToManyField) – Mounts for any number of volumes

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

argsΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

commandΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_image_pull_policy_display(*, field=<django.db.models.fields.CharField: image_pull_policy>)ΒΆ
get_obj()ΒΆ
Description

Generate container spec.

image_nameΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

image_pull_policyΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

image_tagΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

kubernetespodtemplate_setΒΆ

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>ΒΆ
portΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

volume_mountsΒΆ

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class kubernetes_manager.models.kube.KubernetesDeployment(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesNetworkingBase, kubernetes_manager.models.mixins.KubernetesTelemetryMixin

Type

model

Description

Holds data related to a kubernetes deployment.

Inherits

kubernetes_manager.models.base.KubernetesNetworkingBase, kubernetes_manager.models.base.KubernetesTelemetryMixin

Fields

selector, replicas, pod_template

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • labels (JSONField) – Dictionary store equivalent to Labels in Kubernetes API

  • annotations (JSONField) – Dictionary store equivalent to Annotations in Kubernetes API

  • api_version (CharField) – API version used to deploy child object.

  • kind (CharField) – String representation of Kubernetes object kind

  • port (IntegerField) – Port object will expose

  • namespace_id (ForeignKey) – Live namespace the object is associated with.

  • kuid (CharField) – Object’s UID in the cluster

  • object_status (CharField) – status of the object in Kubernetes

  • average_cpu_usage (DecimalField) – Average PIT CPU units consumed

  • average_mem_usage (IntegerField) – Average PIT bytes consumed

  • cpu_usage_seconds (DecimalField) – Average cpu usage * seconds live

  • mem_usage_seconds (IntegerField) – Average mem usage * seconds live

  • selector (JSONField) – Selector

  • replicas (IntegerField) – Replicas

  • pod_template_id (ForeignKey) – Pod template

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

deploy()ΒΆ
Description

Deploy deployment obj.

get_obj()ΒΆ
Description

Generate Deployment spec.

namespaceΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

objects = <django.db.models.manager.Manager object>ΒΆ
pod_templateΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

pod_template_idΒΆ
remove()ΒΆ
Description

Remove deployment from namespace.

replicasΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

selectorΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class kubernetes_manager.models.kube.KubernetesIngress(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesNetworkingBase

Type

model

Description

Holds data related to a kubernetes ingress.

Inherits

kubernetes_manager.models.base.KubernetesNetworkingBase

Fields

hostname, path, target_service

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • labels (JSONField) – Dictionary store equivalent to Labels in Kubernetes API

  • annotations (JSONField) – Dictionary store equivalent to Annotations in Kubernetes API

  • api_version (CharField) – API version used to deploy child object.

  • kind (CharField) – String representation of Kubernetes object kind

  • port (IntegerField) – Port object will expose

  • namespace_id (ForeignKey) – Live namespace the object is associated with.

  • kuid (CharField) – Object’s UID in the cluster

  • hostname (CharField) – Hostname

  • path (CharField) – Path

  • target_service_id (ForeignKey) – Target service

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

deploy()ΒΆ
Description

Deploy ingress to ns.

get_obj()ΒΆ
Description

Generate ingress obj.

hostnameΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

namespaceΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

objects = <django.db.models.manager.Manager object>ΒΆ
pathΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

remove()ΒΆ
Description

Remove ingress from ns.

target_serviceΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

target_service_idΒΆ
class kubernetes_manager.models.kube.KubernetesJob(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesNetworkingBase, kubernetes_manager.models.mixins.KubernetesTelemetryMixin

Type

model

Description

Holds data related to a kubernetes pod spec.

Inherits

kubernetes_manager.models.base.KubernetesNetworkingBase, kubernetes_manager.models.base.KubernetesTelemetryMixin

Fields

selector, replicas, pod_template

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • labels (JSONField) – Dictionary store equivalent to Labels in Kubernetes API

  • annotations (JSONField) – Dictionary store equivalent to Annotations in Kubernetes API

  • api_version (CharField) – API version used to deploy child object.

  • kind (CharField) – String representation of Kubernetes object kind

  • port (IntegerField) – Port object will expose

  • namespace_id (ForeignKey) – Live namespace the object is associated with.

  • kuid (CharField) – Object’s UID in the cluster

  • object_status (CharField) – status of the object in Kubernetes

  • average_cpu_usage (DecimalField) – Average PIT CPU units consumed

  • average_mem_usage (IntegerField) – Average PIT bytes consumed

  • cpu_usage_seconds (DecimalField) – Average cpu usage * seconds live

  • mem_usage_seconds (IntegerField) – Average mem usage * seconds live

  • pod_template_id (ForeignKey) – Pod template

  • backoff_limit (IntegerField) – Backoff limit

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

backoff_limitΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

deploy()ΒΆ
Description

Deploy job to ns.

get_obj()ΒΆ
Description

Generate job spec.

namespaceΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

objects = <django.db.models.manager.Manager object>ΒΆ
pod_templateΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

pod_template_idΒΆ
remove()ΒΆ
Description

Remove job from ns.

class kubernetes_manager.models.kube.KubernetesNamespace(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesMetadataObjBase

Type

model

Description

Holds data related to a Kubernetes namespace.

Inherits

kubernetes_manager.models.base.KubernetesBase

Fields

api_version, kind, exists

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • labels (JSONField) – Dictionary store equivalent to Labels in Kubernetes API

  • annotations (JSONField) – Dictionary store equivalent to Annotations in Kubernetes API

  • api_version (CharField) – Api version

  • kind (CharField) – Kind

  • exists (BooleanField) – Exists

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

api_versionΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

deploy()ΒΆ
Description

Deploy namespace obj.

existsΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_obj()ΒΆ
Description

Generate namespace spec.

kindΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

kubernetesconfigmap_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesdeployment_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesingress_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesjob_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesservice_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>ΒΆ
remove()ΒΆ
Description

Delete namespace from cluster.

class kubernetes_manager.models.kube.KubernetesPodTemplate(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesMetadataObjBase

Type

model

Description

Holds data related to a kubernetes pod spec.

Inherits

kubernetes_manager.models.base.KubernetesMetadataObjBase

Fields

volume, primary_container, secondary_container, restart_policy

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • labels (JSONField) – Dictionary store equivalent to Labels in Kubernetes API

  • annotations (JSONField) – Dictionary store equivalent to Annotations in Kubernetes API

  • restart_policy (CharField) – How the pod should handle restart om case of failures

  • volumes (ManyToManyField) – All volumes to be created for a pod.

  • containers (ManyToManyField) – All containers to be included in a pod.

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

containersΒΆ

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_obj()ΒΆ
Description

Generate pod spec.

get_restart_policy_display(*, field=<django.db.models.fields.CharField: restart_policy>)ΒΆ
kubernetesdeployment_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesjob_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>ΒΆ
restart_policyΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

volumesΒΆ

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class kubernetes_manager.models.kube.KubernetesService(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesNetworkingBase

Type

model

Description

Holds data related to a kubernetes service.

Inherits

kubernetes_manager.models.base.KubernetesNetworkingBase

Fields

selector, target_port

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • labels (JSONField) – Dictionary store equivalent to Labels in Kubernetes API

  • annotations (JSONField) – Dictionary store equivalent to Annotations in Kubernetes API

  • api_version (CharField) – API version used to deploy child object.

  • kind (CharField) – String representation of Kubernetes object kind

  • port (IntegerField) – Port object will expose

  • namespace_id (ForeignKey) – Live namespace the object is associated with.

  • kuid (CharField) – Object’s UID in the cluster

  • selector (JSONField) – Selector

  • target_port (IntegerField) – Target port

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

deploy()ΒΆ
Description

Deploy service to ns.

get_obj()ΒΆ
Description

Generate service spec.

kubernetesingress_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

namespaceΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

objects = <django.db.models.manager.Manager object>ΒΆ
remove()ΒΆ
Description

Remove service from ns.

selectorΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

target_portΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class kubernetes_manager.models.kube.KubernetesVolume(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesBase

Type

model

Description

Holds data related to a kubernetes volume.

Inherits

kubernetes_manager.models.base.KubernetesBase

Fields
Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

get_obj()ΒΆ
Description

Generate volume spec.

kubernetespodtemplate_setΒΆ

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>ΒΆ
class kubernetes_manager.models.kube.KubernetesVolumeMount(*args, **kwargs)ΒΆ

Bases: kubernetes_manager.models.base.KubernetesBase

Type

model

Description

Holds data related to a kubernetes volume mount.

Inherits

kubernetes_manager.models.base.KubernetesBase

Fields

mount_path, sub_path

Parameters
  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • id (UUIDField) – UUID Auto field.

  • cluster_id (ForeignKey) – ForeignKey to TargetCluster object.

  • config (JSONField) – Pass in extra parameters here.

  • deployed (DateTimeField) – Time when object is applied to cluster.

  • removed (DateTimeField) – Time when object is removed from cluster.

  • mount_path (CharField) – Mount path

  • sub_path (CharField) – Sub path

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

clusterΒΆ

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

get_obj()ΒΆ
Description

Generate mount spec.

kubernetescontainer_setΒΆ

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

mount_pathΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>ΒΆ
sub_pathΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Kubernetes Model-MixinsΒΆ

class kubernetes_manager.models.mixins.KubernetesTelemetryMixin(*args, **kwargs)ΒΆ

Bases: django.db.models.base.Model

Type

mixin

Description

Extends child model to include telemetry features.

Inherits

django.db.models.Model

Fields

object_status, average_cpu_usage, average_mem_usage, cpu_usage_seconds, mem_usage_seconds

Parameters
  • object_status (CharField) – status of the object in Kubernetes

  • average_cpu_usage (DecimalField) – Average PIT CPU units consumed

  • average_mem_usage (IntegerField) – Average PIT bytes consumed

  • cpu_usage_seconds (DecimalField) – Average cpu usage * seconds live

  • mem_usage_seconds (IntegerField) – Average mem usage * seconds live

class MetaΒΆ

Bases: object

abstract = FalseΒΆ
average_cpu_usageΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

average_mem_usageΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

cpu_usage_secondsΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

mem_usage_secondsΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

object_statusΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

parseSize(size)ΒΆ
Description

Parses string as numeric, suffix and converts to bytes.

read_pod_metrics()ΒΆ
Description

Uses metrics_server to get cadvisor data.

read_pod_usage()ΒΆ
Description

Converts metrics into dictionary for api usage.

splitNumeric(size)ΒΆ
Description

Parses string into numeric component.

status()ΒΆ
Description

Returns status data of object.

Target Cluster ModelΒΆ

class kubernetes_manager.models.target_cluster.TargetCluster(*args, **kwargs)ΒΆ

Bases: django_extensions.db.models.TitleSlugDescriptionModel

Type

model

Description

Holds data related to a cluster context.

Inherits

django_extensions.db.models.TitleSlugDescriptionModel

Fields

api_endpoint, telemetry_endpoint, telemetry_source, config

Parameters
  • id (AutoField) – Id

  • title (CharField) – Title

  • description (TextField) – Description

  • slug (AutoSlugField) – Slug

  • api_endpoint (URLField) – Cluster Endpoint URL

  • telemetry_endpoint (URLField) – Telemetry Endpoint URL

  • telemetry_source (CharField) – Telemetry source

  • config (JSONField) – Equivalent to .kube/config but all JSON

exception DoesNotExistΒΆ

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturnedΒΆ

Bases: django.core.exceptions.MultipleObjectsReturned

classmethod add(kubeconfig)ΒΆ

Class method to a new TargetCluster

Args:

kubeconfig (str) - string contents of kubeconfig file

Returns:

list(TargetCluster)

api_endpointΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

configΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_telemetry_source_display(*, field=<django.db.models.fields.CharField: telemetry_source>)ΒΆ
idΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

kubernetesconfigmap_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetescontainer_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesdeployment_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesingress_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesjob_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesnamespace_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetespodtemplate_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesservice_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesvolume_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

kubernetesvolumemount_setΒΆ

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>ΒΆ
telemetry_endpointΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

telemetry_sourceΒΆ

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

SerializersΒΆ

API SerializersΒΆ

class kubernetes_manager.serializers.base.KubernetesBaseSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.serializers.HyperlinkedModelSerializer

class MetaΒΆ

Bases: object

abstract = TrueΒΆ
fields = ['title', 'description', 'cluster', 'config']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.base.KubernetesBase

class kubernetes_manager.serializers.base.KubernetesConfigMapSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesMetadataObjBaseSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'description', 'cluster', 'config', 'labels', 'annotations', 'data', 'kind']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.kube.KubernetesConfigMap

class kubernetes_manager.serializers.base.KubernetesContainerSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesBaseSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'description', 'cluster', 'config', 'image_name', 'image_tag', 'image_pull_policy', 'command', 'args', 'port', 'volume_mounts']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.kube.KubernetesContainer

class kubernetes_manager.serializers.base.KubernetesDeploymentSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesNetworkingBaseSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'description', 'cluster', 'config', 'labels', 'annotations', 'api_version', 'kind', 'port', 'namespace', 'kuid', 'selector', 'replicas', 'pod_template']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.kube.KubernetesDeployment

class kubernetes_manager.serializers.base.KubernetesIngressSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesNetworkingBaseSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'description', 'cluster', 'config', 'labels', 'annotations', 'api_version', 'kind', 'port', 'namespace', 'kuid', 'hostname', 'path', 'target_service']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.kube.KubernetesIngress

class kubernetes_manager.serializers.base.KubernetesJobSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesNetworkingBaseSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'description', 'cluster', 'config', 'labels', 'annotations', 'api_version', 'kind', 'port', 'namespace', 'kuid', 'backoff_limit', 'pod_template']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.kube.KubernetesJob

class kubernetes_manager.serializers.base.KubernetesMetadataObjBaseSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesBaseSerializer

class MetaΒΆ

Bases: object

abstract = TrueΒΆ
fields = ['title', 'description', 'cluster', 'config', 'labels', 'annotations']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.base.KubernetesMetadataObjBase

class kubernetes_manager.serializers.base.KubernetesNamespaceSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesMetadataObjBaseSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'description', 'cluster', 'config', 'labels', 'annotations', 'api_version', 'kind', 'exists']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.kube.KubernetesNamespace

class kubernetes_manager.serializers.base.KubernetesNetworkingBaseSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesMetadataObjBaseSerializer

class MetaΒΆ

Bases: object

abstract = TrueΒΆ
fields = ['title', 'description', 'cluster', 'config', 'labels', 'annotations', 'api_version', 'kind', 'port', 'namespace', 'kuid']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.base.KubernetesNetworkingBase

class kubernetes_manager.serializers.base.KubernetesPodTemplateSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesMetadataObjBaseSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'description', 'cluster', 'config', 'labels', 'annotations', 'volumes', 'containers', 'restart_policy']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.kube.KubernetesPodTemplate

class kubernetes_manager.serializers.base.KubernetesServiceSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesNetworkingBaseSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'description', 'cluster', 'config', 'labels', 'annotations', 'api_version', 'kind', 'port', 'namespace', 'kuid', 'selector', 'target_port']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.kube.KubernetesService

class kubernetes_manager.serializers.base.KubernetesVolumeMountSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesBaseSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'description', 'cluster', 'config', 'mount_path', 'sub_path']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.kube.KubernetesVolumeMount

class kubernetes_manager.serializers.base.KubernetesVolumeSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: kubernetes_manager.serializers.base.KubernetesBaseSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'description', 'cluster', 'config']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.kube.KubernetesVolume

class kubernetes_manager.serializers.base.TargetClusterSerializer(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.serializers.HyperlinkedModelSerializer

class MetaΒΆ

Bases: object

fields = ['title', 'api_endpoint', 'telemetry_endpoint', 'config']ΒΆ
modelΒΆ

alias of kubernetes_manager.models.target_cluster.TargetCluster

ViewsΒΆ

API ViewsΒΆ

class kubernetes_manager.views.model_views.KubernetesConfigMapViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows configmaps to be edited or deleted

deploy(request, *args, **kwargs)ΒΆ

Action to deploy the ConfigMap resource to target cluster.

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
querysetΒΆ
remove(request, *args, **kwargs)ΒΆ

Action to delete the kubernetes ConfigMap from the cluster.

serializer_classΒΆ

alias of kubernetes_manager.serializers.base.KubernetesConfigMapSerializer

class kubernetes_manager.views.model_views.KubernetesContainerViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows containers to be edited or deleted.

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
querysetΒΆ
serializer_classΒΆ

alias of kubernetes_manager.serializers.base.KubernetesContainerSerializer

class kubernetes_manager.views.model_views.KubernetesDeploymentViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows deployments to be edited or deleted.

deploy(request, *args, **kwargs)ΒΆ

Action to deploy the kubernetes resource to target cluster.

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
pod_usage(request, *args, **kwargs)ΒΆ

Action to fetch point-in-time cpu and memory usage of pod.

querysetΒΆ
remove(request, *args, **kwargs)ΒΆ

Action to delete the kubernetes resource from the cluster/namespaces

serializer_classΒΆ

alias of kubernetes_manager.serializers.base.KubernetesDeploymentSerializer

class kubernetes_manager.views.model_views.KubernetesIngressViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows ingress to be edited or deleted.

deploy(request, *args, **kwargs)ΒΆ

Action to deploy the kubernetes resource to target cluster.

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
querysetΒΆ
remove(request, *args, **kwargs)ΒΆ

Action to delete the kubernetes resource from the cluster/namespace.

serializer_classΒΆ

alias of kubernetes_manager.serializers.base.KubernetesIngressSerializer

class kubernetes_manager.views.model_views.KubernetesJobViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows jobs to be edited or deleted.

deploy(request, *args, **kwargs)ΒΆ

Action to deploy the kubernetes resource to target cluster.

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
pod_usage(request, *args, **kwargs)ΒΆ

Action to fetch point-in-time cpu and memory usage of pod.

querysetΒΆ
remove(request, *args, **kwargs)ΒΆ

Action to delete the kubernetes resource from the target cluster/ns.

serializer_classΒΆ

alias of kubernetes_manager.serializers.base.KubernetesJobSerializer

class kubernetes_manager.views.model_views.KubernetesNamespaceViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows namespaces to be created or deleted

deploy(request, *args, **kwargs)ΒΆ

Action to deploy the namespace resource to target cluster.

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
querysetΒΆ
remove(request, *args, **kwargs)ΒΆ

Action to delete the kubernetes namespace from the cluster.

serializer_classΒΆ

alias of kubernetes_manager.serializers.base.KubernetesNamespaceSerializer

class kubernetes_manager.views.model_views.KubernetesPodTemplateViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows pod templates to be edited or deleted.

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
querysetΒΆ
serializer_classΒΆ

alias of kubernetes_manager.serializers.base.KubernetesPodTemplateSerializer

class kubernetes_manager.views.model_views.KubernetesServiceViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows services to be edited or deleted.

deploy(request, *args, **kwargs)ΒΆ

Action to deploy the kubernetes resource to target cluster.

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
querysetΒΆ
remove(request, *args, **kwargs)ΒΆ

Action to delete the kubernetes resource from the cluster/namespace.

serializer_classΒΆ

alias of kubernetes_manager.serializers.base.KubernetesServiceSerializer

class kubernetes_manager.views.model_views.KubernetesVolumeMountViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows volumes to be edited or deleted.

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
querysetΒΆ
serializer_classΒΆ

alias of kubernetes_manager.serializers.base.KubernetesVolumeMountSerializer

class kubernetes_manager.views.model_views.KubernetesVolumeViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows volumes to be edited or deleted.

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
querysetΒΆ
serializer_classΒΆ

alias of kubernetes_manager.serializers.base.KubernetesVolumeSerializer

class kubernetes_manager.views.model_views.TargetClusterViewSet(*args: Any, **kwargs: Any)ΒΆ

Bases: rest_framework.viewsets.ModelViewSet

API endpoint that allows cluster configs to be edited or deleted

permission_classes = [rest_framework.permissions.IsAuthenticated]ΒΆ
querysetΒΆ
serializer_classΒΆ

alias of kubernetes_manager.serializers.base.TargetClusterSerializer

UtilsΒΆ

Kubernetes UtilsΒΆ

kubernetes_manager.utils.coalesce_dicts(target=<class 'dict'>, source=<class 'dict'>)ΒΆ
kubernetes_manager.utils.find_namespaced_pods(namespace, job_name, api_client)ΒΆ

find pod by namespace and job name

Args:

namespace (str) - job_name (str) - api_client (CoreV1Api) -

Returns:

str - Name of the pod if found

kubernetes_manager.utils.generate_kubeconfig(context, cluster, user, default_name='k8s-job-runner')ΒΆ

Format helper for generating individual cluster kubeconfigs

Args:

context (dict) - cluster (dict) - user (dict) -

Returns:

dict -

kubernetes_manager.utils.get_command_output(cmd)ΒΆ

retrieve command output for a given command provided

kubernetes_manager.utils.get_dict_hash(data)ΒΆ
kubernetes_manager.utils.run_command(cmd, log_method=<bound method Logger.info of <Logger kubernetes_manager.utils (WARNING)>>)ΒΆ

Subprocess wrapper for capturing output of processes to logs

kubernetes_manager.utils.split_kubeconfig(kubeconfig)ΒΆ

Helper method to split a kubeconfig into separate, per-cluster configurations

Args:

kubeconfig (dict or str) -

Returns:

list(dict)

API SpecΒΆ

clustersΒΆ

GET /clusters/ΒΆ

API endpoint that allows cluster configs to be edited or deleted

Status Codes
Response JSON Object
  • [].api_endpoint (string) – Cluster Endpoint URL (required)

  • [].telemetry_endpoint (string) – Telemetry Endpoint URL (required)

  • [].title (string) – (required)

POST /clusters/ΒΆ

API endpoint that allows cluster configs to be edited or deleted

Request JSON Object
  • api_endpoint (string) – Cluster Endpoint URL (required)

  • telemetry_endpoint (string) – Telemetry Endpoint URL (required)

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_endpoint (string) – Cluster Endpoint URL (required)

  • telemetry_endpoint (string) – Telemetry Endpoint URL (required)

  • title (string) – (required)

GET /clusters/{id}/ΒΆ

API endpoint that allows cluster configs to be edited or deleted

Parameters
  • id (integer) – A unique integer value identifying this target cluster.

Status Codes
Response JSON Object
  • api_endpoint (string) – Cluster Endpoint URL (required)

  • telemetry_endpoint (string) – Telemetry Endpoint URL (required)

  • title (string) – (required)

PUT /clusters/{id}/ΒΆ

API endpoint that allows cluster configs to be edited or deleted

Parameters
  • id (integer) – A unique integer value identifying this target cluster.

Request JSON Object
  • api_endpoint (string) – Cluster Endpoint URL (required)

  • telemetry_endpoint (string) – Telemetry Endpoint URL (required)

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_endpoint (string) – Cluster Endpoint URL (required)

  • telemetry_endpoint (string) – Telemetry Endpoint URL (required)

  • title (string) – (required)

PATCH /clusters/{id}/ΒΆ

API endpoint that allows cluster configs to be edited or deleted

Parameters
  • id (integer) – A unique integer value identifying this target cluster.

Request JSON Object
  • api_endpoint (string) – Cluster Endpoint URL (required)

  • telemetry_endpoint (string) – Telemetry Endpoint URL (required)

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_endpoint (string) – Cluster Endpoint URL (required)

  • telemetry_endpoint (string) – Telemetry Endpoint URL (required)

  • title (string) – (required)

DELETE /clusters/{id}/ΒΆ

API endpoint that allows cluster configs to be edited or deleted

Parameters
  • id (integer) – A unique integer value identifying this target cluster.

Status Codes

configmapsΒΆ

GET /configmaps/ΒΆ

API endpoint that allows configmaps to be edited or deleted

Status Codes
Response JSON Object
  • [].cluster (string) – ForeignKey to TargetCluster object.

  • [].description (string) –

  • [].kind (string) –

  • [].title (string) – (required)

POST /configmaps/ΒΆ

API endpoint that allows configmaps to be edited or deleted

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) –

  • title (string) – (required)

GET /configmaps/{id}/ΒΆ

API endpoint that allows configmaps to be edited or deleted

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) –

  • title (string) – (required)

PUT /configmaps/{id}/ΒΆ

API endpoint that allows configmaps to be edited or deleted

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) –

  • title (string) – (required)

PATCH /configmaps/{id}/ΒΆ

API endpoint that allows configmaps to be edited or deleted

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) –

  • title (string) – (required)

DELETE /configmaps/{id}/ΒΆ

API endpoint that allows configmaps to be edited or deleted

Parameters
  • id (string) – UUID Auto field.

Status Codes
GET /configmaps/{id}/deploy/ΒΆ

Action to deploy the ConfigMap resource to target cluster.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) –

  • title (string) – (required)

GET /configmaps/{id}/remove/ΒΆ

Action to delete the kubernetes ConfigMap from the cluster.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) –

  • title (string) – (required)

containersΒΆ

GET /containers/ΒΆ

API endpoint that allows containers to be edited or deleted.

Status Codes
Response JSON Object
  • [].args (string) – Comma separated args to run with command when instantiating container.

  • [].cluster (string) – ForeignKey to TargetCluster object.

  • [].command (string) – Command to run when start container

  • [].description (string) –

  • [].image_name (string) – Properly qualified image name.

  • [].image_pull_policy (string) –

  • [].image_tag (string) – Tag name for the image to be used for this job

  • [].port (integer) –

  • [].title (string) – (required)

  • [].volume_mount (string) –

POST /containers/ΒΆ

API endpoint that allows containers to be edited or deleted.

Request JSON Object
  • args (string) – Comma separated args to run with command when instantiating container.

  • cluster (string) – ForeignKey to TargetCluster object.

  • command (string) – Command to run when start container

  • description (string) –

  • image_name (string) – Properly qualified image name.

  • image_pull_policy (string) –

  • image_tag (string) – Tag name for the image to be used for this job

  • port (integer) –

  • title (string) – (required)

  • volume_mount (string) –

Status Codes
Response JSON Object
  • args (string) – Comma separated args to run with command when instantiating container.

  • cluster (string) – ForeignKey to TargetCluster object.

  • command (string) – Command to run when start container

  • description (string) –

  • image_name (string) – Properly qualified image name.

  • image_pull_policy (string) –

  • image_tag (string) – Tag name for the image to be used for this job

  • port (integer) –

  • title (string) – (required)

  • volume_mount (string) –

GET /containers/{id}/ΒΆ

API endpoint that allows containers to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • args (string) – Comma separated args to run with command when instantiating container.

  • cluster (string) – ForeignKey to TargetCluster object.

  • command (string) – Command to run when start container

  • description (string) –

  • image_name (string) – Properly qualified image name.

  • image_pull_policy (string) –

  • image_tag (string) – Tag name for the image to be used for this job

  • port (integer) –

  • title (string) – (required)

  • volume_mount (string) –

PUT /containers/{id}/ΒΆ

API endpoint that allows containers to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • args (string) – Comma separated args to run with command when instantiating container.

  • cluster (string) – ForeignKey to TargetCluster object.

  • command (string) – Command to run when start container

  • description (string) –

  • image_name (string) – Properly qualified image name.

  • image_pull_policy (string) –

  • image_tag (string) – Tag name for the image to be used for this job

  • port (integer) –

  • title (string) – (required)

  • volume_mount (string) –

Status Codes
Response JSON Object
  • args (string) – Comma separated args to run with command when instantiating container.

  • cluster (string) – ForeignKey to TargetCluster object.

  • command (string) – Command to run when start container

  • description (string) –

  • image_name (string) – Properly qualified image name.

  • image_pull_policy (string) –

  • image_tag (string) – Tag name for the image to be used for this job

  • port (integer) –

  • title (string) – (required)

  • volume_mount (string) –

PATCH /containers/{id}/ΒΆ

API endpoint that allows containers to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • args (string) – Comma separated args to run with command when instantiating container.

  • cluster (string) – ForeignKey to TargetCluster object.

  • command (string) – Command to run when start container

  • description (string) –

  • image_name (string) – Properly qualified image name.

  • image_pull_policy (string) –

  • image_tag (string) – Tag name for the image to be used for this job

  • port (integer) –

  • title (string) – (required)

  • volume_mount (string) –

Status Codes
Response JSON Object
  • args (string) – Comma separated args to run with command when instantiating container.

  • cluster (string) – ForeignKey to TargetCluster object.

  • command (string) – Command to run when start container

  • description (string) –

  • image_name (string) – Properly qualified image name.

  • image_pull_policy (string) –

  • image_tag (string) – Tag name for the image to be used for this job

  • port (integer) –

  • title (string) – (required)

  • volume_mount (string) –

DELETE /containers/{id}/ΒΆ

API endpoint that allows containers to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes

deploymentsΒΆ

GET /deployments/ΒΆ

API endpoint that allows deployments to be edited or deleted.

Status Codes
Response JSON Object
  • [].api_version (string) – API version used to deploy child object.

  • [].cluster (string) – ForeignKey to TargetCluster object.

  • [].description (string) –

  • [].kind (string) – String representation of Kubernetes object kind (required)

  • [].kuid (string) – Object’s UID in the cluster

  • [].namespace (string) – Live namespace the object is associated with. (required)

  • [].pod_template (string) – (required)

  • [].port (integer) – Port object will expose

  • [].replicas (integer) –

  • [].title (string) – (required)

POST /deployments/ΒΆ

API endpoint that allows deployments to be edited or deleted.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • replicas (integer) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • replicas (integer) –

  • title (string) – (required)

GET /deployments/{id}/ΒΆ

API endpoint that allows deployments to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • replicas (integer) –

  • title (string) – (required)

PUT /deployments/{id}/ΒΆ

API endpoint that allows deployments to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • replicas (integer) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • replicas (integer) –

  • title (string) – (required)

PATCH /deployments/{id}/ΒΆ

API endpoint that allows deployments to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • replicas (integer) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • replicas (integer) –

  • title (string) – (required)

DELETE /deployments/{id}/ΒΆ

API endpoint that allows deployments to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
GET /deployments/{id}/deploy/ΒΆ

Action to deploy the kubernetes resource to target cluster.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • replicas (integer) –

  • title (string) – (required)

GET /deployments/{id}/pod_usage/ΒΆ

Action to fetch point-in-time cpu and memory usage of pod.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • replicas (integer) –

  • title (string) – (required)

GET /deployments/{id}/remove/ΒΆ

Action to delete the kubernetes resource from the cluster/namespaces

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • replicas (integer) –

  • title (string) – (required)

ingressesΒΆ

GET /ingresses/ΒΆ

API endpoint that allows ingress to be edited or deleted.

Status Codes
Response JSON Object
  • [].api_version (string) – API version used to deploy child object.

  • [].cluster (string) – ForeignKey to TargetCluster object.

  • [].description (string) –

  • [].hostname (string) –

  • [].kind (string) – String representation of Kubernetes object kind (required)

  • [].kuid (string) – Object’s UID in the cluster

  • [].namespace (string) – Live namespace the object is associated with. (required)

  • [].path (string) –

  • [].port (integer) – Port object will expose

  • [].target_service (string) – (required)

  • [].title (string) – (required)

POST /ingresses/ΒΆ

API endpoint that allows ingress to be edited or deleted.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • hostname (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • path (string) –

  • port (integer) – Port object will expose

  • target_service (string) – (required)

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • hostname (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • path (string) –

  • port (integer) – Port object will expose

  • target_service (string) – (required)

  • title (string) – (required)

GET /ingresses/{id}/ΒΆ

API endpoint that allows ingress to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • hostname (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • path (string) –

  • port (integer) – Port object will expose

  • target_service (string) – (required)

  • title (string) – (required)

PUT /ingresses/{id}/ΒΆ

API endpoint that allows ingress to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • hostname (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • path (string) –

  • port (integer) – Port object will expose

  • target_service (string) – (required)

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • hostname (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • path (string) –

  • port (integer) – Port object will expose

  • target_service (string) – (required)

  • title (string) – (required)

PATCH /ingresses/{id}/ΒΆ

API endpoint that allows ingress to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • hostname (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • path (string) –

  • port (integer) – Port object will expose

  • target_service (string) – (required)

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • hostname (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • path (string) –

  • port (integer) – Port object will expose

  • target_service (string) – (required)

  • title (string) – (required)

DELETE /ingresses/{id}/ΒΆ

API endpoint that allows ingress to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
GET /ingresses/{id}/deploy/ΒΆ

Action to deploy the kubernetes resource to target cluster.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • hostname (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • path (string) –

  • port (integer) – Port object will expose

  • target_service (string) – (required)

  • title (string) – (required)

GET /ingresses/{id}/remove/ΒΆ

Action to delete the kubernetes resource from the cluster/namespace.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • hostname (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • path (string) –

  • port (integer) – Port object will expose

  • target_service (string) – (required)

  • title (string) – (required)

jobsΒΆ

GET /jobs/ΒΆ

API endpoint that allows jobs to be edited or deleted.

Status Codes
Response JSON Object
  • [].api_version (string) – API version used to deploy child object.

  • [].backoff_limit (integer) –

  • [].cluster (string) – ForeignKey to TargetCluster object.

  • [].description (string) –

  • [].kind (string) – String representation of Kubernetes object kind (required)

  • [].kuid (string) – Object’s UID in the cluster

  • [].namespace (string) – Live namespace the object is associated with. (required)

  • [].pod_template (string) – (required)

  • [].port (integer) – Port object will expose

  • [].title (string) – (required)

POST /jobs/ΒΆ

API endpoint that allows jobs to be edited or deleted.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • backoff_limit (integer) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • backoff_limit (integer) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • title (string) – (required)

GET /jobs/{id}/ΒΆ

API endpoint that allows jobs to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • backoff_limit (integer) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • title (string) – (required)

PUT /jobs/{id}/ΒΆ

API endpoint that allows jobs to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • backoff_limit (integer) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • backoff_limit (integer) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • title (string) – (required)

PATCH /jobs/{id}/ΒΆ

API endpoint that allows jobs to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • backoff_limit (integer) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • backoff_limit (integer) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • title (string) – (required)

DELETE /jobs/{id}/ΒΆ

API endpoint that allows jobs to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
GET /jobs/{id}/deploy/ΒΆ

Action to deploy the kubernetes resource to target cluster.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • backoff_limit (integer) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • title (string) – (required)

GET /jobs/{id}/pod_usage/ΒΆ

Action to fetch point-in-time cpu and memory usage of pod.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • backoff_limit (integer) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • title (string) – (required)

GET /jobs/{id}/remove/ΒΆ

Action to delete the kubernetes resource from the target cluster/ns.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • backoff_limit (integer) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • pod_template (string) – (required)

  • port (integer) – Port object will expose

  • title (string) – (required)

mountsΒΆ

GET /mounts/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Status Codes
Response JSON Object
  • [].cluster (string) – ForeignKey to TargetCluster object.

  • [].description (string) –

  • [].mount_path (string) –

  • [].sub_path (string) –

  • [].title (string) – (required)

POST /mounts/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • mount_path (string) –

  • sub_path (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • mount_path (string) –

  • sub_path (string) –

  • title (string) – (required)

GET /mounts/{id}/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • mount_path (string) –

  • sub_path (string) –

  • title (string) – (required)

PUT /mounts/{id}/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • mount_path (string) –

  • sub_path (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • mount_path (string) –

  • sub_path (string) –

  • title (string) – (required)

PATCH /mounts/{id}/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • mount_path (string) –

  • sub_path (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • mount_path (string) –

  • sub_path (string) –

  • title (string) – (required)

DELETE /mounts/{id}/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes

namespacesΒΆ

GET /namespaces/ΒΆ

API endpoint that allows namespaces to be created or deleted

Status Codes
Response JSON Object
  • [].api_version (string) –

  • [].cluster (string) – ForeignKey to TargetCluster object.

  • [].description (string) –

  • [].exists (boolean) –

  • [].kind (string) –

  • [].title (string) – (required)

POST /namespaces/ΒΆ

API endpoint that allows namespaces to be created or deleted

Request JSON Object
  • api_version (string) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • exists (boolean) –

  • kind (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • exists (boolean) –

  • kind (string) –

  • title (string) – (required)

GET /namespaces/{id}/ΒΆ

API endpoint that allows namespaces to be created or deleted

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • exists (boolean) –

  • kind (string) –

  • title (string) – (required)

PUT /namespaces/{id}/ΒΆ

API endpoint that allows namespaces to be created or deleted

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • api_version (string) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • exists (boolean) –

  • kind (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • exists (boolean) –

  • kind (string) –

  • title (string) – (required)

PATCH /namespaces/{id}/ΒΆ

API endpoint that allows namespaces to be created or deleted

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • api_version (string) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • exists (boolean) –

  • kind (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • exists (boolean) –

  • kind (string) –

  • title (string) – (required)

DELETE /namespaces/{id}/ΒΆ

API endpoint that allows namespaces to be created or deleted

Parameters
  • id (string) – UUID Auto field.

Status Codes
GET /namespaces/{id}/deploy/ΒΆ

Action to deploy the namespace resource to target cluster.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • exists (boolean) –

  • kind (string) –

  • title (string) – (required)

GET /namespaces/{id}/remove/ΒΆ

Action to delete the kubernetes namespace from the cluster.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) –

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • exists (boolean) –

  • kind (string) –

  • title (string) – (required)

podsΒΆ

GET /pods/ΒΆ

API endpoint that allows pod templates to be edited or deleted.

Status Codes
Response JSON Object
  • [].cluster (string) – ForeignKey to TargetCluster object.

  • [].description (string) –

  • [].primary_container (string) – (required)

  • [].restart_policy (string) –

  • [].secondary_container (string) –

  • [].title (string) – (required)

  • [].volume (string) –

POST /pods/ΒΆ

API endpoint that allows pod templates to be edited or deleted.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • primary_container (string) – (required)

  • restart_policy (string) –

  • secondary_container (string) –

  • title (string) – (required)

  • volume (string) –

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • primary_container (string) – (required)

  • restart_policy (string) –

  • secondary_container (string) –

  • title (string) – (required)

  • volume (string) –

GET /pods/{id}/ΒΆ

API endpoint that allows pod templates to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • primary_container (string) – (required)

  • restart_policy (string) –

  • secondary_container (string) –

  • title (string) – (required)

  • volume (string) –

PUT /pods/{id}/ΒΆ

API endpoint that allows pod templates to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • primary_container (string) – (required)

  • restart_policy (string) –

  • secondary_container (string) –

  • title (string) – (required)

  • volume (string) –

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • primary_container (string) – (required)

  • restart_policy (string) –

  • secondary_container (string) –

  • title (string) – (required)

  • volume (string) –

PATCH /pods/{id}/ΒΆ

API endpoint that allows pod templates to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • primary_container (string) – (required)

  • restart_policy (string) –

  • secondary_container (string) –

  • title (string) – (required)

  • volume (string) –

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • primary_container (string) – (required)

  • restart_policy (string) –

  • secondary_container (string) –

  • title (string) – (required)

  • volume (string) –

DELETE /pods/{id}/ΒΆ

API endpoint that allows pod templates to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes

servicesΒΆ

GET /services/ΒΆ

API endpoint that allows services to be edited or deleted.

Status Codes
Response JSON Object
  • [].api_version (string) – API version used to deploy child object.

  • [].cluster (string) – ForeignKey to TargetCluster object.

  • [].description (string) –

  • [].kind (string) – String representation of Kubernetes object kind (required)

  • [].kuid (string) – Object’s UID in the cluster

  • [].namespace (string) – Live namespace the object is associated with. (required)

  • [].port (integer) – Port object will expose

  • [].target_port (integer) –

  • [].title (string) – (required)

POST /services/ΒΆ

API endpoint that allows services to be edited or deleted.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • port (integer) – Port object will expose

  • target_port (integer) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • port (integer) – Port object will expose

  • target_port (integer) –

  • title (string) – (required)

GET /services/{id}/ΒΆ

API endpoint that allows services to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • port (integer) – Port object will expose

  • target_port (integer) –

  • title (string) – (required)

PUT /services/{id}/ΒΆ

API endpoint that allows services to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • port (integer) – Port object will expose

  • target_port (integer) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • port (integer) – Port object will expose

  • target_port (integer) –

  • title (string) – (required)

PATCH /services/{id}/ΒΆ

API endpoint that allows services to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • port (integer) – Port object will expose

  • target_port (integer) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • port (integer) – Port object will expose

  • target_port (integer) –

  • title (string) – (required)

DELETE /services/{id}/ΒΆ

API endpoint that allows services to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
GET /services/{id}/deploy/ΒΆ

Action to deploy the kubernetes resource to target cluster.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • port (integer) – Port object will expose

  • target_port (integer) –

  • title (string) – (required)

GET /services/{id}/remove/ΒΆ

Action to delete the kubernetes resource from the cluster/namespace.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • api_version (string) – API version used to deploy child object.

  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • kind (string) – String representation of Kubernetes object kind (required)

  • kuid (string) – Object’s UID in the cluster

  • namespace (string) – Live namespace the object is associated with. (required)

  • port (integer) – Port object will expose

  • target_port (integer) –

  • title (string) – (required)

volumesΒΆ

GET /volumes/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Status Codes
Response JSON Object
  • [].cluster (string) – ForeignKey to TargetCluster object.

  • [].description (string) –

  • [].title (string) – (required)

POST /volumes/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • title (string) – (required)

GET /volumes/{id}/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • title (string) – (required)

PUT /volumes/{id}/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • title (string) – (required)

PATCH /volumes/{id}/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Request JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • title (string) – (required)

Status Codes
Response JSON Object
  • cluster (string) – ForeignKey to TargetCluster object.

  • description (string) –

  • title (string) – (required)

DELETE /volumes/{id}/ΒΆ

API endpoint that allows volumes to be edited or deleted.

Parameters
  • id (string) – UUID Auto field.

Status Codes

Indices and tablesΒΆ