django_kubernetes_manager.models package¶
Submodules¶
django_kubernetes_manager.models.base module¶
-
class
django_kubernetes_manager.models.base.KubernetesBase(*args, **kwargs)¶ Bases:
django_extensions.db.models.TitleSlugDescriptionModel-
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.parentis aForwardManyToOneDescriptorinstance.
-
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.
-
deleted¶ 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 based on the credential associated with this instance
- 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.
-
slugify_function(content)¶
-
-
class
django_kubernetes_manager.models.base.KubernetesContainer(title, description, slug, id, cluster, config, deployed, deleted, image_name, image_tag, image_pull_policy, command, args, port, volume_mount)¶ Bases:
django_kubernetes_manager.models.base.KubernetesBase-
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.parentis aForwardManyToOneDescriptorinstance.
-
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()¶
-
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.
-
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.
-
primary_container¶ 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
secondary_container¶ 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
volume_mount¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
volume_mount_id¶
-
exception
-
class
django_kubernetes_manager.models.base.KubernetesDeployment(title, description, slug, object_status, average_cpu_usage, average_mem_usage, cpu_usage_seconds, mem_usage_seconds, id, cluster, config, deployed, deleted, labels, annotations, api_version, kind, port, namespace, kuid, selector, replicas, pod_template)¶ Bases:
django_kubernetes_manager.models.base.KubernetesNetworkingBase,django_kubernetes_manager.models.base.KubernetesTelemetryMixin-
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.parentis aForwardManyToOneDescriptorinstance.
-
deploy()¶
-
get_obj()¶
-
k_delete()¶
-
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.parentis aForwardManyToOneDescriptorinstance.
-
pod_template_id¶
-
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.
-
exception
-
class
django_kubernetes_manager.models.base.KubernetesIngress(title, description, slug, id, cluster, config, deployed, deleted, labels, annotations, api_version, kind, port, namespace, kuid, hostname, path, target_service)¶ Bases:
django_kubernetes_manager.models.base.KubernetesNetworkingBase-
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.parentis aForwardManyToOneDescriptorinstance.
-
deploy()¶
-
get_obj()¶
-
hostname¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
k_delete()¶
-
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.
-
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.parentis aForwardManyToOneDescriptorinstance.
-
target_service_id¶
-
exception
-
class
django_kubernetes_manager.models.base.KubernetesJob(title, description, slug, object_status, average_cpu_usage, average_mem_usage, cpu_usage_seconds, mem_usage_seconds, id, cluster, config, deployed, deleted, labels, annotations, api_version, kind, port, namespace, kuid, pod_template, backoff_limit)¶ Bases:
django_kubernetes_manager.models.base.KubernetesNetworkingBase,django_kubernetes_manager.models.base.KubernetesTelemetryMixin-
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.parentis aForwardManyToOneDescriptorinstance.
-
deploy()¶
-
get_obj()¶
-
k_delete()¶
-
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.parentis aForwardManyToOneDescriptorinstance.
-
pod_template_id¶
-
exception
-
class
django_kubernetes_manager.models.base.KubernetesMetadataObjBase(*args, **kwargs)¶ Bases:
django_kubernetes_manager.models.base.KubernetesBase-
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.parentis aForwardManyToOneDescriptorinstance.
-
labels¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
django_kubernetes_manager.models.base.KubernetesNamespace(title, description, slug, id, cluster, config, deployed, deleted, labels, annotations, api_version, kind, exists)¶ Bases:
django_kubernetes_manager.models.base.KubernetesMetadataObjBase-
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.parentis aForwardManyToOneDescriptorinstance.
-
deploy()¶
-
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()¶
-
k_delete()¶
-
kind¶ 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>¶
-
exception
-
class
django_kubernetes_manager.models.base.KubernetesNetworkingBase(*args, **kwargs)¶ Bases:
django_kubernetes_manager.models.base.KubernetesMetadataObjBase-
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.parentis aForwardManyToOneDescriptorinstance.
-
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¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
port¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
django_kubernetes_manager.models.base.KubernetesPodTemplate(title, description, slug, id, cluster, config, deployed, deleted, labels, annotations, volume, primary_container, secondary_container, restart_policy)¶ Bases:
django_kubernetes_manager.models.base.KubernetesMetadataObjBase-
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.parentis aForwardManyToOneDescriptorinstance.
-
get_obj()¶
-
get_restart_policy_display(*, field=<django.db.models.fields.CharField: restart_policy>)¶
-
kubernetesdeployment_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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>¶
-
primary_container¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
primary_container_id¶
-
restart_policy¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
secondary_container¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
secondary_container_id¶
-
volume¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
volume_id¶
-
exception
-
class
django_kubernetes_manager.models.base.KubernetesService(title, description, slug, id, cluster, config, deployed, deleted, labels, annotations, api_version, kind, port, namespace, kuid, selector, target_port)¶ Bases:
django_kubernetes_manager.models.base.KubernetesNetworkingBase-
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.parentis aForwardManyToOneDescriptorinstance.
-
deploy()¶
-
get_obj()¶
-
k_delete()¶
-
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.childrenis aReverseManyToOneDescriptorinstance.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>¶
-
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.
-
exception
-
class
django_kubernetes_manager.models.base.KubernetesTelemetryMixin(*args, **kwargs)¶ Bases:
django.db.models.base.Model- Type
mixin
- Inherits
django.db.models.Model
- Fields
object_status, average_cpu_usage, average_mem_usage, cpu_usage_seconds, mem_usage_seconds
-
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)¶
-
read_pod_metrics()¶
-
read_pod_usage()¶
-
splitNumeric(size)¶ - Description
Parses string into numeric component.
:
-
class
django_kubernetes_manager.models.base.KubernetesVolume(title, description, slug, id, cluster, config, deployed, deleted)¶ Bases:
django_kubernetes_manager.models.base.KubernetesBase-
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.parentis aForwardManyToOneDescriptorinstance.
-
get_obj()¶
-
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.childrenis aReverseManyToOneDescriptorinstance.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>¶
-
exception
-
class
django_kubernetes_manager.models.base.KubernetesVolumeMount(title, description, slug, id, cluster, config, deployed, deleted, mount_path, sub_path)¶ Bases:
django_kubernetes_manager.models.base.KubernetesBase-
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.parentis aForwardManyToOneDescriptorinstance.
-
get_obj()¶
-
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.childrenis aReverseManyToOneDescriptorinstance.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.
-
exception
django_kubernetes_manager.models.target_cluster module¶
-
class
django_kubernetes_manager.models.target_cluster.TargetCluster(id, title, description, slug, api_endpoint, telemetry_endpoint, telemetry_source, config)¶ Bases:
django_extensions.db.models.TitleSlugDescriptionModel-
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.
-
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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.
-
exception