Skip to content

Expose instance_id as an environment variable #709

@yorugac

Description

@yorugac

Feature Description

Since there is lack of aggregation across pods, some k6 OSS operations or arguments don't make much sense without exposing the ID of instance in some way.

Most noticeable example are k6 summaries which can be enabled by passing --summary-export file.json in CLI arguments. Currently it really works only for parallelism: 1. But it should be possible to store N summary files instead, if instance ID was available. There can be other examples of similar nature, like setting tags depending on instance ID, etc.

Suggested Solution (optional)

Expose INSTANCE_ID environment variable in each k6 runner with the value equal to index of the runner. (the name of var might need some additional thinking)

Already existing or connected issues / PRs (optional)

This assumes that the issue #162 is solved too and env vars can be used in .spec.arguments reliably.

A bit related issue:
#609

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions