xds: cleanup old env vars
We introduce environment variables when we add new features. Initially the default value for these env vars is set to false and the user will have to explicitly set the value to true to enable the feature.
At some point, when we think the feature is stable enough, we set the default value to true. At this point, the user will have to explicitly set the value to false to disable the feature.
One release after setting the default value to true, we should delete the environment variable, which will get rid of conditional code and eventually lead to simpler code. Even though, we have had this policy for a while, env vars have been lingering forever. We should do a one time cleanup for now, and going forward, we should file issues and link them in TODOs for cleanup for future env vars.
As part of https://github.com/grpc/grpc-go/pull/6749, we did end up removing a bunch of env vars.
But some still remain:
-
LeastRequestLB: https://github.com/grpc/grpc-go/blob/9affdbb28e4be9c971fadfb06fb89866863ef634/internal/envconfig/envconfig.go#L39 This has been defaulting tofalsefrom the time it was added (about a year ago). We should set the default to true now and get rid of it in the next release. -
EnforceALPNEnabled: Was defaulted totruein the last release. So, maybe as part of the next release, we can delete it.
We need to provide a mechanism for older users to disable ALPN enforcement before we remove the env variable for ALPN: https://github.com/grpc/grpc-go/issues/7769