From 60a8ba22de25b9ffe6d6e50f8654d900636fca62 Mon Sep 17 00:00:00 2001 From: Prafulla Mahindrakar Date: Tue, 11 May 2021 17:58:12 +0530 Subject: [PATCH] Added doc changes Signed-off-by: Prafulla Mahindrakar --- .../matchable_cluster_resource_attribute.go | 11 +- .../matchable_cluster_resource_attribute.go | 11 +- .../matchable_cluster_resource_attribute.go | 18 +-- docs/source/gen/flytectl_delete.rst | 1 + ...ectl_delete_cluster-resource-attribute.rst | 109 +++++++++++++++++ docs/source/gen/flytectl_get.rst | 1 + ...lytectl_get_cluster-resource-attribute.rst | 107 +++++++++++++++++ docs/source/gen/flytectl_update.rst | 1 + ...ectl_update_cluster-resource-attribute.rst | 111 ++++++++++++++++++ 9 files changed, 344 insertions(+), 26 deletions(-) create mode 100644 docs/source/gen/flytectl_delete_cluster-resource-attribute.rst create mode 100644 docs/source/gen/flytectl_get_cluster-resource-attribute.rst create mode 100644 docs/source/gen/flytectl_update_cluster-resource-attribute.rst diff --git a/cmd/delete/matchable_cluster_resource_attribute.go b/cmd/delete/matchable_cluster_resource_attribute.go index 8ab626b9d..228dbdbff 100644 --- a/cmd/delete/matchable_cluster_resource_attribute.go +++ b/cmd/delete/matchable_cluster_resource_attribute.go @@ -31,15 +31,12 @@ eg: content of cra.yaml which will use the project domain and workflow name for .. code-block:: yaml - + domain: development project: flytectldemo - defaults: - cpu: "1" - memory: 150Mi - limits: - cpu: "2" - memory: 450Mi + attributes: + foo: "bar" + buzz: "lightyear" Deleting cluster resource attribute for a workflow Here the command deletes cluster resource attributes for a workflow diff --git a/cmd/get/matchable_cluster_resource_attribute.go b/cmd/get/matchable_cluster_resource_attribute.go index c7b7f4ec9..ff2fd685a 100644 --- a/cmd/get/matchable_cluster_resource_attribute.go +++ b/cmd/get/matchable_cluster_resource_attribute.go @@ -23,7 +23,7 @@ eg : O/P .. code-block:: json - {"Project":"flytectldemo","Domain":"development","Workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} Writing the cluster resource attribute to a file. If there are no cluster resource attributes , command would return an error. Here the command gets task resource attributes and writes the config file to tra.yaml @@ -38,12 +38,9 @@ eg: content of tra.yaml domain: development project: flytectldemo - defaults: - cpu: "1" - memory: 150Mi - limits: - cpu: "2" - memory: 450Mi + attributes: + foo: "bar" + buzz: "lightyear" Usage ` diff --git a/cmd/update/matchable_cluster_resource_attribute.go b/cmd/update/matchable_cluster_resource_attribute.go index 73285b838..a7ea4558e 100644 --- a/cmd/update/matchable_cluster_resource_attribute.go +++ b/cmd/update/matchable_cluster_resource_attribute.go @@ -20,12 +20,9 @@ eg: content of tra.yaml domain: development project: flytectldemo - defaults: - cpu: "1" - memory: 150Mi - limits: - cpu: "2" - memory: 450Mi + attributes: + foo: "bar" + buzz: "lightyear" :: @@ -39,12 +36,9 @@ Update the cluster resource attributes for workflow core.control_flow.run_merge_ domain: development project: flytectldemo workflow: core.control_flow.run_merge_sort.merge_sort - defaults: - cpu: "1" - memory: 150Mi - limits: - cpu: "2" - memory: 450Mi + attributes: + foo: "bar" + buzz: "lightyear" :: diff --git a/docs/source/gen/flytectl_delete.rst b/docs/source/gen/flytectl_delete.rst index 49006715a..be9549557 100644 --- a/docs/source/gen/flytectl_delete.rst +++ b/docs/source/gen/flytectl_delete.rst @@ -71,6 +71,7 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_delete_cluster-resource-attribute` - Deletes matchable resources of cluster attributes * :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. * :doc:`flytectl_delete_task-resource-attribute` - Deletes matchable resources of task attributes diff --git a/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst new file mode 100644 index 000000000..9652bc4e2 --- /dev/null +++ b/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -0,0 +1,109 @@ +.. _flytectl_delete_cluster-resource-attribute: + +flytectl delete cluster-resource-attribute +------------------------------------------ + +Deletes matchable resources of cluster attributes + +Synopsis +~~~~~~~~ + + + +Deletes cluster resource attributes for given project and domain combination or additionally with workflow name. + +Deletes cluster resource attribute for project and domain +Here the command delete cluster resource attributes for project flytectldemo and development domain. +:: + + flytectl delete cluster-resource-attribute -p flytectldemo -d development + + +Deleting cluster resource attribute using config file which was used for creating it. +Here the command deletes cluster resource attributes from the config file cra.yaml +eg: content of cra.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete cluster-resource-attribute --attrFile cra.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" + +Deleting cluster resource attribute for a workflow +Here the command deletes cluster resource attributes for a workflow + +:: + + flytectl delete cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage + + +:: + + flytectl delete cluster-resource-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for delete attribute for the resource type. + -h, --help help for cluster-resource-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/docs/source/gen/flytectl_get.rst b/docs/source/gen/flytectl_get.rst index add9e81c9..7a37881b5 100644 --- a/docs/source/gen/flytectl_get.rst +++ b/docs/source/gen/flytectl_get.rst @@ -71,6 +71,7 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_get_cluster-resource-attribute` - Gets matchable resources of cluster resource attributes * :doc:`flytectl_get_execution` - Gets execution resources * :doc:`flytectl_get_launchplan` - Gets launch plan resources * :doc:`flytectl_get_project` - Gets project resources diff --git a/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/docs/source/gen/flytectl_get_cluster-resource-attribute.rst new file mode 100644 index 000000000..732d4fbb6 --- /dev/null +++ b/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -0,0 +1,107 @@ +.. _flytectl_get_cluster-resource-attribute: + +flytectl get cluster-resource-attribute +--------------------------------------- + +Gets matchable resources of cluster resource attributes + +Synopsis +~~~~~~~~ + + + +Retrieves cluster resource attributes for given project and domain combination or additionally with workflow name. + +Retrieves cluster resource attribute for project and domain +Here the command get cluster resource attributes for project flytectldemo and development domain. +:: + + flytectl get cluster-resource-attribute -p flytectldemo -d development + +eg : O/P + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} + +Writing the cluster resource attribute to a file. If there are no cluster resource attributes , command would return an error. +Here the command gets task resource attributes and writes the config file to tra.yaml +eg: content of tra.yaml + +:: + + flytectl get task-resource-attribute --attrFile tra.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" + +Usage + + +:: + + flytectl get cluster-resource-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for generating attribute for the resource type. + -h, --help help for cluster-resource-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/docs/source/gen/flytectl_update.rst b/docs/source/gen/flytectl_update.rst index a30c1a933..469257516 100644 --- a/docs/source/gen/flytectl_update.rst +++ b/docs/source/gen/flytectl_update.rst @@ -73,6 +73,7 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_update_cluster-resource-attribute` - Updates matchable resources of cluster attributes * :doc:`flytectl_update_launchplan` - Updates launch plan metadata * :doc:`flytectl_update_project` - Updates project resources * :doc:`flytectl_update_task` - Updates task metadata diff --git a/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/docs/source/gen/flytectl_update_cluster-resource-attribute.rst new file mode 100644 index 000000000..76afd9634 --- /dev/null +++ b/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -0,0 +1,111 @@ +.. _flytectl_update_cluster-resource-attribute: + +flytectl update cluster-resource-attribute +------------------------------------------ + +Updates matchable resources of cluster attributes + +Synopsis +~~~~~~~~ + + + +Updates cluster resource attributes for given project and domain combination or additionally with workflow name. + +Updating to the cluster resource attribute is only available from a generated file. See the get section for generating this file. +Here the command updates takes the input for cluster resource attributes from the config file cra.yaml +eg: content of tra.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" + +:: + + flytectl update cluster-resource-attribute -attrFile cra.yaml + +Updating cluster resource attribute for project and domain and workflow combination. This will take precedence over any other +resource attribute defined at project domain level. +Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + attributes: + foo: "bar" + buzz: "lightyear" + +:: + + flytectl update cluster-resource-attribute -attrFile cra.yaml + +Usage + + + +:: + + flytectl update cluster-resource-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for updating attribute for the resource type. + -h, --help help for cluster-resource-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +