For the complete documentation index, see llms.txt. This page is also available as Markdown.

How projections work

Understand how DataOS renders, stores, and mounts projection output at runtime.

Use this page to understand what happens after DataOS resolves a projection.

What happens at runtime

After DataOS processes the projection, the generated values are prepared for the container.

Environment variables are injected into the container.

Generated files are mounted into the configured directory.

Generated arguments are passed to the container command.

Dictionary values are made available to the consuming runtime.

The application does not need to know that the values came from a projection. It reads them like normal environment variables, files, or arguments.

Runtime flow

1. Template execution

DataOS processes each template field with Liquid (the default). Items with templateType: none are used as static text.

For every job, DataOS combines the stack's projection with the workload's own spec.use.projection. Both run. If both produce an environment variable with the same name, the workload value wins.

2. Secret creation

Generated files and environment variables are stored in Kubernetes Secrets.

3. Container mounting

DataOS mounts the generated output into the container as:

  • Environment variables through envFrom.secretRef, so the process reads them as normal $VAR values

  • Files through volumeMounts in the configured directory

4. Runtime access

Your application reads the projected values like standard files, variables, and arguments.

Default mount paths

  • Environment variables: available as standard environment variables

  • Files without a directory: /etc/dataos/secret/

  • Files with a custom directory: your specified path

  • Config files: /etc/dataos/config/: reserved. spec.configs is mounted here from a ConfigMap, not from a projection.

  • Work directory: /etc/dataos/work/: reserved

Last updated

Was this helpful?