-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Prefix system environment variables with KNATIVE_ #4060
Copy link
Copy link
Closed
Labels
area/APIAPI objects and controllersAPI objects and controllerskind/featureWell-understood/specified features, ready for coding.Well-understood/specified features, ready for coding.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates 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 reporterIssues which are waiting on a response from the reporter
Metadata
Metadata
Assignees
Labels
area/APIAPI objects and controllersAPI objects and controllerskind/featureWell-understood/specified features, ready for coding.Well-understood/specified features, ready for coding.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates 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 reporterIssues which are waiting on a response from the reporter
In what area(s)?
/area API
Describe the feature
We currently have three system environment variables that we prefix with
K_such asK_REVISION,K_CONFIGURATION, andK_SERVICE. It is highly likely that there will be additional environment variables we want to add in the future (K_ROUTEanyone?). 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 hasK_FOOdefined in their Service in Knative 0.6 and we decide to makeK_FOOa 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 beKNATIVE_.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.