igz_mgmt.schemas.app_services

Contents

igz_mgmt.schemas.app_services#

class igz_mgmt.schemas.app_services.AdvancedSpec(*, node_selector: Optional[Dict[str, List[Dict[str, str]]]] = None, priority_class_name: Optional[str] = None, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

Advanced app service spec.

node_selector: Optional[Dict[str, List[Dict[str, str]]]]#
priority_class_name: Optional[str]#
class igz_mgmt.schemas.app_services.AppServiceBase(*, spec: AppServiceSpec, meta: Optional[Meta] = None, status: Optional[AppServiceStatus] = None, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

App service base class.

meta: Optional[Meta]#
spec: AppServiceSpec#
status: Optional[AppServiceStatus]#
class igz_mgmt.schemas.app_services.AppServiceSpec(*, name: str, kind: str, owner: Optional[str] = None, display_name: Optional[str] = None, description: Optional[str] = None, credentials: Optional[CredentialsSpec] = None, resources: Optional[ResourcesSpec] = None, target_cpu: Optional[int] = None, max_replicas: Optional[int] = None, min_replicas: Optional[int] = None, enabled: Optional[bool] = None, avatar: Optional[str] = None, mark_for_restart: bool = False, mark_as_changed: bool = False, visible_to_all: Optional[bool] = None, scale_to_zero: Optional[ScaleToZeroSpec] = None, pvc: Optional[PvcSpec] = None, desired_state: Optional[AppServiceDesiredStates] = None, authentication_mode: Optional[str] = None, security_context: Optional[SecurityContextSpec] = None, persistency_mode: Optional[str] = None, advanced: Optional[AdvancedSpec] = None, jupyter: Optional[JupyterSpec] = None, filebeat: Optional[FilebeatSpec] = None, webapi: Optional[CustomAppServiceSpec] = None, v3io_prometheus: Optional[CustomAppServiceSpec] = None, nuclio: Optional[CustomAppServiceSpec] = None, docker_registry: Optional[CustomAppServiceSpec] = None, shell: Optional[CustomAppServiceSpec] = None, presto: Optional[CustomAppServiceSpec] = None, grafana: Optional[CustomAppServiceSpec] = None, mariadb: Optional[CustomAppServiceSpec] = None, hive: Optional[CustomAppServiceSpec] = None, monitoring: Optional[CustomAppServiceSpec] = None, dex: Optional[CustomAppServiceSpec] = None, oauth2_proxy: Optional[CustomAppServiceSpec] = None, metrics_server_exporter: Optional[CustomAppServiceSpec] = None, mlrun: Optional[CustomAppServiceSpec] = None, spark_history_server: Optional[CustomAppServiceSpec] = None, tensorboard: Optional[CustomAppServiceSpec] = None, coredns_updater: Optional[CustomAppServiceSpec] = None, aws_node_termination_handler: Optional[CustomAppServiceSpec] = None, nvidia_device_plugin: Optional[CustomAppServiceSpec] = None, tsdb_nuclio: Optional[CustomAppServiceSpec] = None, netops_demo: Optional[CustomAppServiceSpec] = None, zeppelin: Optional[CustomAppServiceSpec] = None, **kwargs)#

Bases: AppServicesOperationBaseModel

App service spec.

advanced: Optional[AdvancedSpec]#
authentication_mode: Optional[str]#
avatar: Optional[str]#
aws_node_termination_handler: Optional[CustomAppServiceSpec]#
coredns_updater: Optional[CustomAppServiceSpec]#
credentials: Optional[CredentialsSpec]#
description: Optional[str]#
desired_state: Optional[AppServiceDesiredStates]#
dex: Optional[CustomAppServiceSpec]#
display_name: Optional[str]#
docker_registry: Optional[CustomAppServiceSpec]#
enabled: Optional[bool]#
filebeat: Optional[FilebeatSpec]#
grafana: Optional[CustomAppServiceSpec]#
hive: Optional[CustomAppServiceSpec]#
jupyter: Optional[JupyterSpec]#
kind: str#
mariadb: Optional[CustomAppServiceSpec]#
mark_as_changed: bool#
mark_for_restart: bool#
max_replicas: Optional[int]#
metrics_server_exporter: Optional[CustomAppServiceSpec]#
min_replicas: Optional[int]#
mlrun: Optional[CustomAppServiceSpec]#
monitoring: Optional[CustomAppServiceSpec]#
name: str#
netops_demo: Optional[CustomAppServiceSpec]#
nuclio: Optional[CustomAppServiceSpec]#
nvidia_device_plugin: Optional[CustomAppServiceSpec]#
oauth2_proxy: Optional[CustomAppServiceSpec]#
owner: Optional[str]#
persistency_mode: Optional[str]#
presto: Optional[CustomAppServiceSpec]#
pvc: Optional[PvcSpec]#
resources: Optional[ResourcesSpec]#
scale_to_zero: Optional[ScaleToZeroSpec]#
security_context: Optional[SecurityContextSpec]#
shell: Optional[CustomAppServiceSpec]#
spark_history_server: Optional[CustomAppServiceSpec]#
target_cpu: Optional[int]#
tensorboard: Optional[CustomAppServiceSpec]#
tsdb_nuclio: Optional[CustomAppServiceSpec]#
v3io_prometheus: Optional[CustomAppServiceSpec]#
visible_to_all: Optional[bool]#
webapi: Optional[CustomAppServiceSpec]#
zeppelin: Optional[CustomAppServiceSpec]#
class igz_mgmt.schemas.app_services.AppServiceStatus(*, state: str, urls: Optional[List[Url]] = None, api_urls: Optional[List[Url]] = None, internal_api_urls: Optional[List[Url]] = None, version: Optional[str] = None, last_error: Optional[str] = None, display_name: Optional[str] = None, error_info: Optional[StatusErrorInfo] = None, presto: Optional[Dict[str, Any]] = None, filebeat: Optional[Dict[str, Any]] = None, shell: Optional[Dict[str, Any]] = None, jupyter: Optional[Dict[str, Any]] = None, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

App service status.

api_urls: Optional[List[Url]]#
display_name: Optional[str]#
error_info: Optional[StatusErrorInfo]#
filebeat: Optional[Dict[str, Any]]#
internal_api_urls: Optional[List[Url]]#
jupyter: Optional[Dict[str, Any]]#
last_error: Optional[str]#
presto: Optional[Dict[str, Any]]#
shell: Optional[Dict[str, Any]]#
state: str#
urls: Optional[List[Url]]#
version: Optional[str]#
class igz_mgmt.schemas.app_services.AppServicesOperationBaseModel(**extra_data: Any)#

Bases: BaseModel

Base model for all operations.

class Config#

Bases: object

extra = 'allow'#
orm_mode = True#
use_enum_values = True#
class igz_mgmt.schemas.app_services.CredentialsSpec(*, username: str, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

Credentials spec.

Spec for describing credentials with which the app service will preform its operations with in the Iguazio cluster.

username: str#
class igz_mgmt.schemas.app_services.CustomAppServiceSpec(**extra_data: Any)#

Bases: AppServicesOperationBaseModel

Base class for custom app service spec.

class igz_mgmt.schemas.app_services.FilebeatSpec(*, elasticsearch_url: Optional[str] = None, elasticsearch_username: Optional[str] = None, elasticsearch_password: Optional[str] = None, elasticsearch_ssl_verification_mode: Optional[SslVerificationMode] = SslVerificationMode.full, update_index_template: Optional[bool] = True, **extra_data: Any)#

Bases: CustomAppServiceSpec

Filebeat app service spec.

elasticsearch_password: Optional[str]#
elasticsearch_ssl_verification_mode: Optional[SslVerificationMode]#
elasticsearch_url: Optional[str]#
elasticsearch_username: Optional[str]#
update_index_template: Optional[bool]#
class igz_mgmt.schemas.app_services.HomeContainer(*, container: str, prefix: str, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

Home container.

container: str#
prefix: str#
class igz_mgmt.schemas.app_services.JupyterSpec(*, image_name: str = 'jupyter-all', spark_name: Optional[str] = None, presto_name: Optional[str] = None, framesd: Optional[str] = None, home_spec: Optional[HomeContainer] = None, extra_environment_vars: Optional[Dict[str, List[Dict[str, str]]]] = None, demos_datasets_archive_address: Optional[str] = None, docker_registry_name: Optional[str] = None, ssh_enabled: Optional[bool] = None, ssh_server: Optional[SSHServerSpec] = None, **extra_data: Any)#

Bases: CustomAppServiceSpec

Jupyter app service spec.

demos_datasets_archive_address: Optional[str]#
docker_registry_name: Optional[str]#
extra_environment_vars: Optional[Dict[str, List[Dict[str, str]]]]#
framesd: Optional[str]#
home_spec: Optional[HomeContainer]#
image_name: str#
presto_name: Optional[str]#
spark_name: Optional[str]#
ssh_enabled: Optional[bool]#
ssh_server: Optional[SSHServerSpec]#
class igz_mgmt.schemas.app_services.Meta(*, labels: Optional[Dict[str, str]] = None, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

App services metadata class.

labels: Optional[Dict[str, str]]#
class igz_mgmt.schemas.app_services.PvcSpec(*, mounts: Optional[Dict[str, List[Dict[str, str]]]] = None, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

Pvc - kubernetes persistent volume claim spec for app service pod.

mounts: Optional[Dict[str, List[Dict[str, str]]]]#
class igz_mgmt.schemas.app_services.ResourcesSpec(*, limits: Optional[SystemResources] = None, requests: Optional[SystemResources] = None, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

Resource spec describing the limits and requests for each app service.

limits: Optional[SystemResources]#
requests: Optional[SystemResources]#
class igz_mgmt.schemas.app_services.SSHServerSpec(*, force_key_regeneration: bool, port: int, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

SSH configuration for accessing interactive shell app services (e.g. jupyter, shell).

force_key_regeneration: bool#
port: int#
class igz_mgmt.schemas.app_services.ScaleResource(*, metric_name: str, threshold: int = 0, window_size: str, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

Threshold descriptor for scaling app services to zero.

metric_name: str#
threshold: int#
window_size: str#
class igz_mgmt.schemas.app_services.ScaleToZeroSpec(*, mode: ScaleToZeroMode, scale_resources: Optional[List[ScaleResource]] = None, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

Spec describing the scale to zero resources/rules.

mode: ScaleToZeroMode#
scale_resources: Optional[List[ScaleResource]]#
class igz_mgmt.schemas.app_services.ScaleToZeroSpecPresets#

Bases: object

Scale to zero spec presets.

disabled = ScaleToZeroSpec(mode='disabled', scale_resources=None)#
five_minutes = ScaleToZeroSpec(mode='enabled', scale_resources=[ScaleResource(metric_name='num_of_requests', threshold=0, window_size='5m'), ScaleResource(metric_name='jupyter_kernel_busyness', threshold=0, window_size='5m')])#
four_hours = ScaleToZeroSpec(mode='enabled', scale_resources=[ScaleResource(metric_name='num_of_requests', threshold=0, window_size='4h'), ScaleResource(metric_name='jupyter_kernel_busyness', threshold=0, window_size='4h')])#
one_hour = ScaleToZeroSpec(mode='enabled', scale_resources=[ScaleResource(metric_name='num_of_requests', threshold=0, window_size='1h'), ScaleResource(metric_name='jupyter_kernel_busyness', threshold=0, window_size='1h')])#
one_minute = ScaleToZeroSpec(mode='enabled', scale_resources=[ScaleResource(metric_name='num_of_requests', threshold=0, window_size='1m'), ScaleResource(metric_name='jupyter_kernel_busyness', threshold=0, window_size='1m')])#
ten_minutes = ScaleToZeroSpec(mode='enabled', scale_resources=[ScaleResource(metric_name='num_of_requests', threshold=0, window_size='10m'), ScaleResource(metric_name='jupyter_kernel_busyness', threshold=0, window_size='10m')])#
two_hours = ScaleToZeroSpec(mode='enabled', scale_resources=[ScaleResource(metric_name='num_of_requests', threshold=0, window_size='2h'), ScaleResource(metric_name='jupyter_kernel_busyness', threshold=0, window_size='2h')])#
class igz_mgmt.schemas.app_services.SecurityContextSpec(*, run_as_user: str, run_as_group: str, fs_group: str, supplemental_groups: List[str], run_as_non_root: bool, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

Kubernetes Security context spec for app service pods.

fs_group: str#
run_as_group: str#
run_as_non_root: bool#
run_as_user: str#
supplemental_groups: List[str]#
class igz_mgmt.schemas.app_services.StatusErrorInfo(*, description: str, timestamp: str, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

App service Status error info.

description: str#
timestamp: str#
class igz_mgmt.schemas.app_services.SystemResources(*, cpu: Optional[str] = None, memory: Optional[str] = None, nvidia_gpu: Optional[str] = None, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

System resource description for use with limits and requests.

cpu: Optional[str]#
memory: Optional[str]#
nvidia_gpu: Optional[str]#
class igz_mgmt.schemas.app_services.Url(*, kind: str, url: str, **extra_data: Any)#

Bases: AppServicesOperationBaseModel

URL for accessing app services.

kind: str#
url: str#
igz_mgmt.schemas.app_services.generate_scale_to_zero_spec(window_size: str) List[ScaleResource]#

Generates scale resource with metric name and window size.

Parameters:

window_size (str) – Time to wait before scaling the service to zero.

Returns:

scale to zero spec.

Return type:

List[“ScaleResource”]