Skip to content

Prefix system environment variables with KNATIVE_ #4060

@dgerd

Description

@dgerd

In what area(s)?

/area API

/area autoscale
/area build
/area monitoring
/area networking
/area test-and-release

Describe the feature

We currently have three system environment variables that we prefix with K_ such as K_REVISION, K_CONFIGURATION, and K_SERVICE. It is highly likely that there will be additional environment variables we want to add in the future (K_ROUTE anyone?). As we do not allow users to specify environment variables that match system environment variables (#4050) adding a environment variable can be a breaking change to existing Services and Configurations. For example, if a user has K_FOO defined in their Service in Knative 0.6 and we decide to make K_FOO a system environment variable in Knative 0.7 the Service will begin to fail in Knative 0.7.

This proposal is to reserve a prefix for system environment variables set by Knative so that (1) we do not have to update validation for each environment variable we add and (2) we don't have to worry if adding environment variables is a breaking change. The prefix K_ is likely too short and may conflict with other applications so I propose we expand it to be KNATIVE_.

As our existing environment variables may be in use we should not remove them, but we should add a copy of them under the KNATIVE_ prefix (i.e. KNATIVE_SERVICE) so that they can be consumed consistency with future environment variables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/APIAPI objects and controllerskind/featureWell-understood/specified features, ready for coding.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.triage/needs-user-inputIssues which are waiting on a response from the reporter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions