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.db.models.base.Model
- 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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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.
-
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 aForwardManyToOneDescriptor
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.
-
property
slug
¶
-
slugify_function
()¶ - Description
Overrides default slugify with custom logic.
-
title
¶ 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.
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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
-
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 aForwardManyToOneDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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
-
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 aForwardManyToOneDescriptor
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 aForwardManyToOneDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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 aForwardManyToOneDescriptor
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 aForwardManyToOneDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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 aForwardManyToOneDescriptor
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.
-
init_container
¶ 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
andTopping.pizzas
areManyToManyDescriptor
instances.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 forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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 aForwardManyToOneDescriptor
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 aForwardManyToOneDescriptor
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 aForwardManyToOneDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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 aForwardManyToOneDescriptor
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 aForwardManyToOneDescriptor
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 aForwardManyToOneDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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 aForwardManyToOneDescriptor
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 aForwardManyToOneDescriptor
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 aForwardManyToOneDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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 aForwardManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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.
init_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 aForwardManyToOneDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
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>)¶
-
init_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
andTopping.pizzas
areManyToManyDescriptor
instances.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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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 aForwardManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aForwardManyToOneDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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 aForwardManyToOneDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
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
id (UUIDField) – UUID Auto field.
title (CharField) – Title
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 aForwardManyToOneDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
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
-
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.
-
property
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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
kubernetes_manager.serializers.base.
KubernetesConfigMapSerializer
(*args: Any, **kwargs: Any)¶ Bases:
kubernetes_manager.serializers.base.KubernetesMetadataObjBaseSerializer
-
class
kubernetes_manager.serializers.base.
KubernetesContainerSerializer
(*args: Any, **kwargs: Any)¶ Bases:
kubernetes_manager.serializers.base.KubernetesBaseSerializer
-
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
-
class
kubernetes_manager.serializers.base.
KubernetesIngressSerializer
(*args: Any, **kwargs: Any)¶ Bases:
kubernetes_manager.serializers.base.KubernetesNetworkingBaseSerializer
-
class
kubernetes_manager.serializers.base.
KubernetesJobSerializer
(*args: Any, **kwargs: Any)¶ Bases:
kubernetes_manager.serializers.base.KubernetesNetworkingBaseSerializer
-
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
-
class
kubernetes_manager.serializers.base.
KubernetesNamespaceSerializer
(*args: Any, **kwargs: Any)¶ Bases:
kubernetes_manager.serializers.base.KubernetesMetadataObjBaseSerializer
-
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
-
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
-
class
kubernetes_manager.serializers.base.
KubernetesServiceSerializer
(*args: Any, **kwargs: Any)¶ Bases:
kubernetes_manager.serializers.base.KubernetesNetworkingBaseSerializer
-
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
-
class
kubernetes_manager.serializers.base.
KubernetesVolumeSerializer
(*args: Any, **kwargs: Any)¶ Bases:
kubernetes_manager.serializers.base.KubernetesBaseSerializer
-
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
-
-
class
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
200 OK –
- Response JSON Object
[].api_endpoint (string) – Cluster Endpoint URL (required)
[].config (object) – Configuration data stored as an encrypted blob in the database
[].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)
config (object) – Configuration data stored as an encrypted blob in the database
telemetry_endpoint (string) – Telemetry Endpoint URL (required)
title (string) – (required)
- Status Codes
- Response JSON Object
api_endpoint (string) – Cluster Endpoint URL (required)
config (object) – Configuration data stored as an encrypted blob in the database
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
200 OK –
- Response JSON Object
api_endpoint (string) – Cluster Endpoint URL (required)
config (object) – Configuration data stored as an encrypted blob in the database
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)
config (object) – Configuration data stored as an encrypted blob in the database
telemetry_endpoint (string) – Telemetry Endpoint URL (required)
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
api_endpoint (string) – Cluster Endpoint URL (required)
config (object) – Configuration data stored as an encrypted blob in the database
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)
config (object) – Configuration data stored as an encrypted blob in the database
telemetry_endpoint (string) – Telemetry Endpoint URL (required)
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
api_endpoint (string) – Cluster Endpoint URL (required)
config (object) – Configuration data stored as an encrypted blob in the database
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
200 OK –
- Response JSON Object
[].annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
[].cluster (string) – ForeignKey to TargetCluster object.
[].config (object) – Pass in extra parameters here.
[].data (object) –
[].description (string) –
[].kind (string) –
[].labels (object) – Dictionary store equivalent to Labels in Kubernetes API
[].title (string) – (required)
-
POST
/configmaps/
¶ API endpoint that allows configmaps to be edited or deleted
- Request JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
data (object) –
description (string) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
- Status Codes
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
data (object) –
description (string) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
-
GET
/configmaps/{id}/
¶ API endpoint that allows configmaps to be edited or deleted
- Parameters
id (string) – UUID Auto field.
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
data (object) –
description (string) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
data (object) –
description (string) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
data (object) –
description (string) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
data (object) –
description (string) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
data (object) –
description (string) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
data (object) –
description (string) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
-
GET
/configmaps/{id}/remove/
¶ Action to delete the kubernetes ConfigMap from the cluster.
- Parameters
id (string) – UUID Auto field.
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
data (object) –
description (string) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
containers¶
-
GET
/containers/
¶ API endpoint that allows containers to be edited or deleted.
- Status Codes
200 OK –
- 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
[].config (object) – Pass in extra parameters here.
[].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
config (object) – Pass in extra parameters here.
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
config (object) – Pass in extra parameters here.
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
200 OK –
- 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
config (object) – Pass in extra parameters here.
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
config (object) – Pass in extra parameters here.
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
200 OK –
- 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
config (object) – Pass in extra parameters here.
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
config (object) – Pass in extra parameters here.
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
200 OK –
- 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
config (object) – Pass in extra parameters here.
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
200 OK –
- Response JSON Object
[].annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
[].api_version (string) – API version used to deploy child object.
[].cluster (string) – ForeignKey to TargetCluster object.
[].config (object) – Pass in extra parameters here.
[].description (string) –
[].kind (string) – String representation of Kubernetes object kind (required)
[].kuid (string) – Object’s UID in the cluster
[].labels (object) – Dictionary store equivalent to Labels in Kubernetes API
[].namespace (string) – Live namespace the object is associated with. (required)
[].pod_template (string) – (required)
[].port (integer) – Port object will expose
[].replicas (integer) –
[].selector (object) –
[].title (string) – (required)
-
POST
/deployments/
¶ API endpoint that allows deployments to be edited or deleted.
- Request JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
pod_template (string) – (required)
port (integer) – Port object will expose
replicas (integer) –
selector (object) –
title (string) – (required)
- Status Codes
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
pod_template (string) – (required)
port (integer) – Port object will expose
replicas (integer) –
selector (object) –
title (string) – (required)
-
GET
/deployments/{id}/
¶ API endpoint that allows deployments to be edited or deleted.
- Parameters
id (string) – UUID Auto field.
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
pod_template (string) – (required)
port (integer) – Port object will expose
replicas (integer) –
selector (object) –
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
pod_template (string) – (required)
port (integer) – Port object will expose
replicas (integer) –
selector (object) –
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
pod_template (string) – (required)
port (integer) – Port object will expose
replicas (integer) –
selector (object) –
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
pod_template (string) – (required)
port (integer) – Port object will expose
replicas (integer) –
selector (object) –
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
pod_template (string) – (required)
port (integer) – Port object will expose
replicas (integer) –
selector (object) –
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
pod_template (string) – (required)
port (integer) – Port object will expose
replicas (integer) –
selector (object) –
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
pod_template (string) – (required)
port (integer) – Port object will expose
replicas (integer) –
selector (object) –
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
pod_template (string) – (required)
port (integer) – Port object will expose
replicas (integer) –
selector (object) –
title (string) – (required)
ingresses¶
-
GET
/ingresses/
¶ API endpoint that allows ingress to be edited or deleted.
- Status Codes
200 OK –
- Response JSON Object
[].annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
[].api_version (string) – API version used to deploy child object.
[].cluster (string) – ForeignKey to TargetCluster object.
[].config (object) – Pass in extra parameters here.
[].description (string) –
[].hostname (string) –
[].kind (string) – String representation of Kubernetes object kind (required)
[].kuid (string) – Object’s UID in the cluster
[].labels (object) – Dictionary store equivalent to Labels in Kubernetes API
[].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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
hostname (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
hostname (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
hostname (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
hostname (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
hostname (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
hostname (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
hostname (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
hostname (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
hostname (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
[].annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
[].api_version (string) – API version used to deploy child object.
[].backoff_limit (integer) –
[].cluster (string) – ForeignKey to TargetCluster object.
[].config (object) – Pass in extra parameters here.
[].description (string) –
[].kind (string) – String representation of Kubernetes object kind (required)
[].kuid (string) – Object’s UID in the cluster
[].labels (object) – Dictionary store equivalent to Labels in Kubernetes API
[].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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
backoff_limit (integer) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
backoff_limit (integer) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
backoff_limit (integer) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
backoff_limit (integer) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
backoff_limit (integer) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
backoff_limit (integer) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
backoff_limit (integer) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
backoff_limit (integer) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
backoff_limit (integer) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
backoff_limit (integer) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
[].cluster (string) – ForeignKey to TargetCluster object.
[].config (object) – Pass in extra parameters here.
[].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.
config (object) – Pass in extra parameters here.
description (string) –
mount_path (string) –
sub_path (string) –
title (string) – (required)
- Status Codes
- Response JSON Object
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
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
200 OK –
- Response JSON Object
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
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.
config (object) – Pass in extra parameters here.
description (string) –
mount_path (string) –
sub_path (string) –
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
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.
config (object) – Pass in extra parameters here.
description (string) –
mount_path (string) –
sub_path (string) –
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
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
200 OK –
- Response JSON Object
[].annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
[].api_version (string) –
[].cluster (string) – ForeignKey to TargetCluster object.
[].config (object) – Pass in extra parameters here.
[].description (string) –
[].exists (boolean) –
[].kind (string) –
[].labels (object) – Dictionary store equivalent to Labels in Kubernetes API
[].title (string) – (required)
-
POST
/namespaces/
¶ API endpoint that allows namespaces to be created or deleted
- Request JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
exists (boolean) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
- Status Codes
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
exists (boolean) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
-
GET
/namespaces/{id}/
¶ API endpoint that allows namespaces to be created or deleted
- Parameters
id (string) – UUID Auto field.
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
exists (boolean) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
exists (boolean) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
exists (boolean) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
exists (boolean) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
exists (boolean) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
exists (boolean) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
-
GET
/namespaces/{id}/remove/
¶ Action to delete the kubernetes namespace from the cluster.
- Parameters
id (string) – UUID Auto field.
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) –
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
exists (boolean) –
kind (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
title (string) – (required)
pods¶
-
GET
/pods/
¶ API endpoint that allows pod templates to be edited or deleted.
- Status Codes
200 OK –
- Response JSON Object
[].annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
[].cluster (string) – ForeignKey to TargetCluster object.
[].config (object) – Pass in extra parameters here.
[].description (string) –
[].labels (object) – Dictionary store equivalent to Labels in Kubernetes API
[].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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
primary_container (string) – (required)
restart_policy (string) –
secondary_container (string) –
title (string) – (required)
volume (string) –
- Status Codes
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
primary_container (string) – (required)
restart_policy (string) –
secondary_container (string) –
title (string) – (required)
volume (string) –
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
primary_container (string) – (required)
restart_policy (string) –
secondary_container (string) –
title (string) – (required)
volume (string) –
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
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
200 OK –
- Response JSON Object
[].annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
[].api_version (string) – API version used to deploy child object.
[].cluster (string) – ForeignKey to TargetCluster object.
[].config (object) – Pass in extra parameters here.
[].description (string) –
[].kind (string) – String representation of Kubernetes object kind (required)
[].kuid (string) – Object’s UID in the cluster
[].labels (object) – Dictionary store equivalent to Labels in Kubernetes API
[].namespace (string) – Live namespace the object is associated with. (required)
[].port (integer) – Port object will expose
[].selector (object) –
[].target_port (integer) –
[].title (string) – (required)
-
POST
/services/
¶ API endpoint that allows services to be edited or deleted.
- Request JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
port (integer) – Port object will expose
selector (object) –
target_port (integer) –
title (string) – (required)
- Status Codes
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
port (integer) – Port object will expose
selector (object) –
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
port (integer) – Port object will expose
selector (object) –
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
port (integer) – Port object will expose
selector (object) –
target_port (integer) –
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
port (integer) – Port object will expose
selector (object) –
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
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
port (integer) – Port object will expose
selector (object) –
target_port (integer) –
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
port (integer) – Port object will expose
selector (object) –
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
port (integer) – Port object will expose
selector (object) –
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
200 OK –
- Response JSON Object
annotations (object) – Dictionary store equivalent to Annotations in Kubernetes API
api_version (string) – API version used to deploy child object.
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
description (string) –
kind (string) – String representation of Kubernetes object kind (required)
kuid (string) – Object’s UID in the cluster
labels (object) – Dictionary store equivalent to Labels in Kubernetes API
namespace (string) – Live namespace the object is associated with. (required)
port (integer) – Port object will expose
selector (object) –
target_port (integer) –
title (string) – (required)
volumes¶
-
GET
/volumes/
¶ API endpoint that allows volumes to be edited or deleted.
- Status Codes
200 OK –
- Response JSON Object
[].cluster (string) – ForeignKey to TargetCluster object.
[].config (object) – Pass in extra parameters here.
[].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.
config (object) – Pass in extra parameters here.
description (string) –
title (string) – (required)
- Status Codes
- Response JSON Object
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
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
200 OK –
- Response JSON Object
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
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.
config (object) – Pass in extra parameters here.
description (string) –
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
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.
config (object) – Pass in extra parameters here.
description (string) –
title (string) – (required)
- Status Codes
200 OK –
- Response JSON Object
cluster (string) – ForeignKey to TargetCluster object.
config (object) – Pass in extra parameters here.
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