<#5599 Feat: Declarative management of matcheable ...
# flyte-github
c
#5599 Feat: Declarative management of matcheable resources Pull request opened by fg91 on <!date^1722085922^{date_short}|2024-07-27T13:12:02Z> Tracking issue RFC #3749 Why are the changes needed? Currently, config overrides/matchable attributes/matchable resources can only be created imperatively via
flytectl update
. In RFC #3749, which aims to improve the UX around these config overrides, we agreed that there must be a declarative way to managed them using infrastructure as code. This PR adds such a declarative mechanism. --- Details on config overrides: From the Flyte docs:
Customizing project, domain, and workflow resources with flytectl
For critical projects and workflows, you can use the flytectl update command to configure settings for task, cluster, and workflow execution resources, set matching executions to execute on specific clusters, set execution queue attributes, and more that differ from the default values set for your global Flyte installation. These customizable settings are created, updated, and deleted via the API and stored in the FlyteAdmin database.
In code, these settings are sometimes called matchable attributes or matchable resources, because we use a hierarchy for matching the customizations to applicable Flyte inventory and executions.
What changes were proposed in this pull request? How was this patch tested? • Added unit tests • Used the following config to ensure that the database entries are the exact same compared to creating the config overrides with `flytectl update`:
flyteadmin --config configs/*.yaml migrate seed-resources
matcheableResources: workflowExecutionConfigs: declarative: true values: - domain: development project: flytesnacks max_parallelism: 5 security_context: run_as: k8s_service_account: demo pluginOverrides: declarative: true values: - domain: development project: flytesnacks overrides: - task_type: python_task # Task type for which to apply plugin implementation overrides plugin_id: # Plugin id(s) to be used in place of the default for the task type. - plugin_override1 - plugin_override2 missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT executionQueueAttributes: declarative: true values: - domain: development project: flyteexamples tags: - foo - bar clusterResourceAttributes: declarative: true values: - domain: development project: flytetest attributes: foo: "bar" buzz: "lightyear" taskResourceAttributes: declarative: true values: - project: flytesnacks domain: development defaults: cpu: "1" memory: "150Mi" limits: cpu: "2" memory: "450Mi" gpu: "1" executionClusterLabels: declarative: true values: - project: flytetest domain: development workflow: my-wf label: "my-label" Setup process Screenshots Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. Related PRs Docs link flyteorg/flyte