-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #292 from PrefectHQ/update-metadata-09-19-2023
Update metadata for collection releases
- Loading branch information
Showing
5 changed files
with
385 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"prefect-kubernetes": { | ||
"block_types": { | ||
"kubernetes-credentials": { | ||
"name": "Kubernetes Credentials", | ||
"slug": "kubernetes-credentials", | ||
"logo_url": "https://images.ctfassets.net/zscdif0zqppk/oYuHjIbc26oilfQSEMjRv/a61f5f6ef406eead2df5231835b4c4c2/logo.png?h=250", | ||
"documentation_url": "https://prefecthq.github.io/prefect-kubernetes/credentials/#prefect_kubernetes.credentials.KubernetesCredentials", | ||
"description": "Credentials block for generating configured Kubernetes API clients. This block is part of the prefect-kubernetes collection. Install prefect-kubernetes with `pip install prefect-kubernetes` to use this block.", | ||
"code_example": "Load stored Kubernetes credentials:\n```python\nfrom prefect_kubernetes.credentials import KubernetesCredentials\n\nkubernetes_credentials = KubernetesCredentials.load(\"BLOCK_NAME\")\n```", | ||
"block_schema": { | ||
"checksum": "sha256:957fa8dca90bd1b5fb9c575ee09e80b454116c0b134287fbc2eff47a72564c3b", | ||
"fields": { | ||
"title": "KubernetesCredentials", | ||
"description": "Credentials block for generating configured Kubernetes API clients.", | ||
"type": "object", | ||
"properties": { | ||
"cluster_config": { | ||
"$ref": "#/definitions/KubernetesClusterConfig" | ||
} | ||
}, | ||
"block_type_slug": "kubernetes-credentials", | ||
"secret_fields": [], | ||
"block_schema_references": { | ||
"cluster_config": { | ||
"block_type_slug": "kubernetes-cluster-config", | ||
"block_schema_checksum": "sha256:90d421e948bfbe4cdc98b124995f0edd0f84b0837549ad1390423bad8e31cf3b" | ||
} | ||
}, | ||
"definitions": { | ||
"KubernetesClusterConfig": { | ||
"title": "KubernetesClusterConfig", | ||
"description": "Stores configuration for interaction with Kubernetes clusters.\n\nSee `from_file` for creation.", | ||
"type": "object", | ||
"properties": { | ||
"config": { | ||
"title": "Config", | ||
"description": "The entire contents of a kubectl config file.", | ||
"type": "object" | ||
}, | ||
"context_name": { | ||
"title": "Context Name", | ||
"description": "The name of the kubectl context to use.", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"config", | ||
"context_name" | ||
], | ||
"block_type_slug": "kubernetes-cluster-config", | ||
"secret_fields": [], | ||
"block_schema_references": {} | ||
} | ||
} | ||
}, | ||
"capabilities": [], | ||
"version": "0.2.12" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
{ | ||
"prefect-kubernetes": { | ||
"run_namespaced_job": { | ||
"description": { | ||
"summary": "Example:\n\n ```python\n from prefect_kubernetes import KubernetesJob, run_namespaced_job\n from prefect_kubernetes.credentials import KubernetesCredentials\n\n run_namespaced_job(\n kubernetes_job=KubernetesJob.from_yaml_file(\n credentials=KubernetesCredentials.load(\"k8s-creds\"),\n manifest_path=\"path/to/job.yaml\",\n )\n )\n ```", | ||
"returns": "The a dict of logs from each pod in the job, e.g. {'pod_name': 'pod_log_str'}.", | ||
"examples": [] | ||
}, | ||
"documentation_url": "https://prefecthq.github.io/prefect-kubernetes/flows/#prefect_kubernetes.flows.run_namespaced_job", | ||
"entrypoint": "prefect_kubernetes/flows.py:run_namespaced_job", | ||
"install_command": "pip install prefect-kubernetes", | ||
"logo_url": "https://images.ctfassets.net/zscdif0zqppk/oYuHjIbc26oilfQSEMjRv/a61f5f6ef406eead2df5231835b4c4c2/logo.png?h=250", | ||
"name": "run-namespaced-job", | ||
"parameters": { | ||
"title": "Parameters", | ||
"type": "object", | ||
"properties": { | ||
"kubernetes_job": { | ||
"title": "kubernetes_job", | ||
"description": "The `KubernetesJob` block that specifies the job to run.", | ||
"position": 0, | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/KubernetesJob" | ||
} | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"kubernetes_job" | ||
], | ||
"definitions": { | ||
"KubernetesClusterConfig": { | ||
"title": "KubernetesClusterConfig", | ||
"description": "Stores configuration for interaction with Kubernetes clusters.\n\nSee `from_file` for creation.", | ||
"type": "object", | ||
"properties": { | ||
"config": { | ||
"title": "Config", | ||
"description": "The entire contents of a kubectl config file.", | ||
"type": "object" | ||
}, | ||
"context_name": { | ||
"title": "Context Name", | ||
"description": "The name of the kubectl context to use.", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"config", | ||
"context_name" | ||
], | ||
"block_type_slug": "kubernetes-cluster-config", | ||
"secret_fields": [], | ||
"block_schema_references": {} | ||
}, | ||
"KubernetesCredentials": { | ||
"title": "KubernetesCredentials", | ||
"description": "Credentials block for generating configured Kubernetes API clients.", | ||
"type": "object", | ||
"properties": { | ||
"cluster_config": { | ||
"$ref": "#/definitions/KubernetesClusterConfig" | ||
} | ||
}, | ||
"block_type_slug": "kubernetes-credentials", | ||
"secret_fields": [], | ||
"block_schema_references": { | ||
"cluster_config": { | ||
"block_type_slug": "kubernetes-cluster-config", | ||
"block_schema_checksum": "sha256:90d421e948bfbe4cdc98b124995f0edd0f84b0837549ad1390423bad8e31cf3b" | ||
} | ||
} | ||
}, | ||
"KubernetesJob": { | ||
"title": "KubernetesJob", | ||
"description": "A block representing a Kubernetes job configuration.", | ||
"type": "object", | ||
"properties": { | ||
"v1_job": { | ||
"title": "Job Manifest", | ||
"description": "The Kubernetes job manifest to run. This dictionary can be produced using `yaml.safe_load`.", | ||
"type": "object" | ||
}, | ||
"api_kwargs": { | ||
"title": "Additional API Arguments", | ||
"description": "Additional arguments to include in Kubernetes API calls.", | ||
"example": { | ||
"pretty": "true" | ||
}, | ||
"type": "object" | ||
}, | ||
"credentials": { | ||
"title": "Credentials", | ||
"description": "The credentials to configure a client from.", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/KubernetesCredentials" | ||
} | ||
] | ||
}, | ||
"delete_after_completion": { | ||
"title": "Delete After Completion", | ||
"description": "Whether to delete the job after it has completed.", | ||
"default": true, | ||
"type": "boolean" | ||
}, | ||
"interval_seconds": { | ||
"title": "Interval Seconds", | ||
"description": "The number of seconds to wait between job status checks.", | ||
"default": 5, | ||
"type": "integer" | ||
}, | ||
"namespace": { | ||
"title": "Namespace", | ||
"description": "The namespace to create and run the job in.", | ||
"default": "default", | ||
"type": "string" | ||
}, | ||
"timeout_seconds": { | ||
"title": "Timeout Seconds", | ||
"description": "The number of seconds to wait for the job run before timing out.", | ||
"type": "integer" | ||
} | ||
}, | ||
"required": [ | ||
"v1_job", | ||
"credentials" | ||
], | ||
"block_type_slug": "k8s-job", | ||
"secret_fields": [], | ||
"block_schema_references": { | ||
"credentials": { | ||
"block_type_slug": "kubernetes-credentials", | ||
"block_schema_checksum": "sha256:957fa8dca90bd1b5fb9c575ee09e80b454116c0b134287fbc2eff47a72564c3b" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"path_containing_flow": "prefect_kubernetes/flows.py", | ||
"repo_url": "https://github.com/PrefectHQ/prefect-kubernetes", | ||
"slug": "run_namespaced_job" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
{ | ||
"prefect-kubernetes": { | ||
"kubernetes": { | ||
"default_base_job_configuration": { | ||
"job_configuration": { | ||
"command": "{{ command }}", | ||
"env": "{{ env }}", | ||
"labels": "{{ labels }}", | ||
"name": "{{ name }}", | ||
"namespace": "{{ namespace }}", | ||
"job_manifest": { | ||
"apiVersion": "batch/v1", | ||
"kind": "Job", | ||
"metadata": { | ||
"labels": "{{ labels }}", | ||
"namespace": "{{ namespace }}", | ||
"generateName": "{{ name }}-" | ||
}, | ||
"spec": { | ||
"backoffLimit": 0, | ||
"ttlSecondsAfterFinished": "{{ finished_job_ttl }}", | ||
"template": { | ||
"spec": { | ||
"parallelism": 1, | ||
"completions": 1, | ||
"restartPolicy": "Never", | ||
"serviceAccountName": "{{ service_account_name }}", | ||
"containers": [ | ||
{ | ||
"name": "prefect-job", | ||
"env": "{{ env }}", | ||
"image": "{{ image }}", | ||
"imagePullPolicy": "{{ image_pull_policy }}", | ||
"args": "{{ command }}" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"cluster_config": "{{ cluster_config }}", | ||
"job_watch_timeout_seconds": "{{ job_watch_timeout_seconds }}", | ||
"pod_watch_timeout_seconds": "{{ pod_watch_timeout_seconds }}", | ||
"stream_output": "{{ stream_output }}" | ||
}, | ||
"variables": { | ||
"description": "Default variables for the Kubernetes worker.\n\nThe schema for this class is used to populate the `variables` section of the default\nbase job template.", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"title": "Name", | ||
"description": "Name given to infrastructure created by a worker.", | ||
"type": "string" | ||
}, | ||
"env": { | ||
"title": "Environment Variables", | ||
"description": "Environment variables to set when starting a flow run.", | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"labels": { | ||
"title": "Labels", | ||
"description": "Labels applied to infrastructure created by a worker.", | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"command": { | ||
"title": "Command", | ||
"description": "The command to use when starting a flow run. In most cases, this should be left blank and the command will be automatically generated by the worker.", | ||
"type": "string" | ||
}, | ||
"namespace": { | ||
"title": "Namespace", | ||
"description": "The Kubernetes namespace to create jobs within.", | ||
"default": "default", | ||
"type": "string" | ||
}, | ||
"image": { | ||
"title": "Image", | ||
"description": "The image reference of a container image to use for created jobs. If not set, the latest Prefect image will be used.", | ||
"example": "docker.io/prefecthq/prefect:2-latest", | ||
"type": "string" | ||
}, | ||
"service_account_name": { | ||
"title": "Service Account Name", | ||
"description": "The Kubernetes service account to use for job creation.", | ||
"type": "string" | ||
}, | ||
"image_pull_policy": { | ||
"title": "Image Pull Policy", | ||
"description": "The Kubernetes image pull policy to use for job containers.", | ||
"default": "IfNotPresent", | ||
"enum": [ | ||
"IfNotPresent", | ||
"Always", | ||
"Never" | ||
], | ||
"type": "string" | ||
}, | ||
"finished_job_ttl": { | ||
"title": "Finished Job TTL", | ||
"description": "The number of seconds to retain jobs after completion. If set, finished jobs will be cleaned up by Kubernetes after the given delay. If not set, jobs will be retained indefinitely.", | ||
"type": "integer" | ||
}, | ||
"job_watch_timeout_seconds": { | ||
"title": "Job Watch Timeout Seconds", | ||
"description": "Number of seconds to wait for each event emitted by a job before timing out. If not set, the worker will wait for each event indefinitely.", | ||
"type": "integer" | ||
}, | ||
"pod_watch_timeout_seconds": { | ||
"title": "Pod Watch Timeout Seconds", | ||
"description": "Number of seconds to watch for pod creation before timing out.", | ||
"default": 60, | ||
"type": "integer" | ||
}, | ||
"stream_output": { | ||
"title": "Stream Output", | ||
"description": "If set, output will be streamed from the job to local standard output.", | ||
"default": true, | ||
"type": "boolean" | ||
}, | ||
"cluster_config": { | ||
"title": "Cluster Config", | ||
"description": "The Kubernetes cluster config to use for job creation.", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/KubernetesClusterConfig" | ||
} | ||
] | ||
} | ||
}, | ||
"definitions": { | ||
"KubernetesClusterConfig": { | ||
"title": "KubernetesClusterConfig", | ||
"description": "Stores configuration for interaction with Kubernetes clusters.\n\nSee `from_file` for creation.", | ||
"type": "object", | ||
"properties": { | ||
"config": { | ||
"title": "Config", | ||
"description": "The entire contents of a kubectl config file.", | ||
"type": "object" | ||
}, | ||
"context_name": { | ||
"title": "Context Name", | ||
"description": "The name of the kubectl context to use.", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"config", | ||
"context_name" | ||
], | ||
"block_type_slug": "kubernetes-cluster-config", | ||
"secret_fields": [], | ||
"block_schema_references": {} | ||
} | ||
} | ||
} | ||
}, | ||
"description": "Execute flow runs within jobs scheduled on a Kubernetes cluster. Requires a Kubernetes cluster.", | ||
"display_name": "Kubernetes", | ||
"documentation_url": "https://prefecthq.github.io/prefect-kubernetes/worker/", | ||
"install_command": "pip install prefect-kubernetes", | ||
"is_beta": false, | ||
"logo_url": "https://images.ctfassets.net/gm98wzqotmnx/1zrSeY8DZ1MJZs2BAyyyGk/20445025358491b8b72600b8f996125b/Kubernetes_logo_without_workmark.svg.png?h=250", | ||
"type": "kubernetes" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7560,7 +7560,7 @@ | |
} | ||
}, | ||
"capabilities": [], | ||
"version": "0.2.11" | ||
"version": "0.2.12" | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.