Does Flyte sets any environment variables on the p...
# ask-the-community
a
Does Flyte sets any environment variables on the pods it runs which we could use? We’re interested in
flytekit.current_context().execution_id.domain
in particular. It’s a bit of a chore that now our libraries have to include 300+mb of deps of
flytekit
to just get the runtime env.
y
yes it is pretty heavy weight. it would be nice to trim down some of the dependencies. however flytekit itself is needed to interpret I/O.
however yes it does set some environment variables.
here’s the env block from a recent run
Copy code
env:
    - name: FLYTE_INTERNAL_EXECUTION_WORKFLOW
      value: flytesnacks:development:k8s_spark.pyspark_pi.my_spark
    - name: FLYTE_INTERNAL_EXECUTION_ID
      value: af7fpflg7jm9brzhsb4d
    - name: FLYTE_INTERNAL_EXECUTION_PROJECT
      value: flytesnacks
    - name: FLYTE_INTERNAL_EXECUTION_DOMAIN
      value: development
    - name: FLYTE_ATTEMPT_NUMBER
      value: "0"
    - name: FLYTE_INTERNAL_TASK_PROJECT
      value: flytesnacks
    - name: FLYTE_INTERNAL_TASK_DOMAIN
      value: development
    - name: FLYTE_INTERNAL_TASK_NAME
      value: k8s_spark.pyspark_pi.hello_spark
    - name: FLYTE_INTERNAL_TASK_VERSION
      value: _D0HBZEHULPjncyU5i056w==
    - name: FLYTE_INTERNAL_PROJECT
      value: flytesnacks
    - name: FLYTE_INTERNAL_DOMAIN
      value: development
    - name: FLYTE_INTERNAL_NAME
      value: k8s_spark.pyspark_pi.hello_spark
    - name: FLYTE_INTERNAL_VERSION
      value: _D0HBZEHULPjncyU5i056w==
    - name: AWS_METADATA_SERVICE_TIMEOUT
      value: "5"
    - name: AWS_METADATA_SERVICE_NUM_ATTEMPTS
      value: "20"
    - name: AWS_DEFAULT_REGION
      value: us-east-2
    - name: AWS_REGION
      value: us-east-2
    - name: AWS_ROLE_ARN
      value: arn:aws:iam::123:role/development-service-flyte-userflyterole
    - name: AWS_WEB_IDENTITY_TOKEN_FILE
      value: /var/run/secrets/eks.amazonaws.com/serviceaccount/token
a
Thanks, maybe we could depend on this in our library then
173 Views