How do you specify in which namespace execution po...
# ask-ai
c
How do you specify in which namespace execution pods will run by project?
a
To specify the namespace where execution pods run by project, configure the namespace mapping template in FlyteAdmin. You can set the namespace pattern (e.g.,
{{ project }}-{{ domain }}
) or customize it (e.g., include the project name, domain, or even principal) in the
namespace_mapping
configuration. This mapping determines the namespace for each execution based on the project and domain, and can be set in the Flyte deployment configuration or via the cluster resource manager templates. Namespace creation and mapping are managed automatically if the cluster resource manager is enabled and configured with the appropriate templates for namespace resources. If you want to override the default mapping, set the
namespace_mapping.template
to your desired pattern (e.g.,
"my_namespace"
or
"flyte-{{ project }}-{{ domain }}"
). For more advanced use cases, such as mapping to a user-specific namespace, you can use
{{ principal }}
in the template, but you must manage those namespaces out-of-band. See the discussion in GitHub Issue #2927 and the Flyte deployment configuration example for details. Would you like more detail or a configuration example? Sources: - GitHub Issue #2927 - Flyte deployment configuration example 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
c
@ancient-wolf-19325 I cannot find the
namespace_mapping.template
configuration in the helm chart. Can you double check?
a
It seems likely that the
namespace_mapping.template
is not directly exposed as a top-level value in the Flyte Helm chart's
values.yaml
. Instead, the namespace mapping is handled internally by FlyteAdmin, and the default template is
{{ project }}-{{ domain }}
unless overridden in the FlyteAdmin configuration files. You can see the default and how it is used in the FlyteAdmin code (namespace_config_provider.go), but there is no direct Helm value for
namespace_mapping.template
in values.yaml. To customize the namespace mapping, you would need to provide a custom FlyteAdmin config file (YAML) with the
namespace_mapping
section and mount it into the FlyteAdmin pod, rather than setting it via a Helm value. This is not documented as a Helm value in the official chart. Would you like more detail on how to provide a custom FlyteAdmin config for namespace mapping? Sources: - namespace_config_provider.go - values.yaml 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
c
@ancient-wolf-19325 yes provide me an example
a
To customize the namespace mapping, create a FlyteAdmin config file (e.g.,
namespace_config.yaml
) with the following content:
Copy code
namespace_mapping:
  template: '{{ project }}-{{ domain }}'
Then, mount this file into the FlyteAdmin pod (typically at
/etc/flyte/config/namespace_config.yaml
) using a Kubernetes ConfigMap and update the FlyteAdmin deployment to include this config path. This approach is not set via Helm values but by providing the config file directly, as shown in namespace_config_provider.go. Would you like step-by-step instructions for mounting this config in your deployment? Sources: - https://github.com/flyteorg/flyte/issues/2927 - https://github.com/flyteorg/flyte/blob/master/rfc/system/3749-sane-overridable-defaults.md 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.