Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add feature status to environment vars #266

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

therealmitchconnors
Copy link
Contributor

This adds the concept of feature support for our various environment variables, and sets all variables to unknown for now. Users can call SetVarStatus to update the support level of a given env var.

@therealmitchconnors therealmitchconnors requested a review from a team as a code owner November 4, 2020 21:41
@istio-testing istio-testing added the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Nov 4, 2020
@istio-policy-bot
Copy link

😊 Welcome @therealmitchconnors! This is either your first contribution to the Istio pkg repo, or it's been
awhile since you've been here.

You can learn more about the Istio working groups, code of conduct, and contributing guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@google-cla google-cla bot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Nov 4, 2020
@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 4, 2020
case Beta:
return "Beta"
case Stable:
return "Stable"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it mean for an env var to be stable? Don't we currently document that all env vars are alpha?

Put another way, why would we promote an env var to stable vs moving it to an API/mesh config?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am all for the idea of migrating all stable environment variables to an API, but that does not represent the current state of the project. For instance, I believe we set the PILOT_TRACE_SAMPLING variable on every istio deployment, and it should probably be considered stable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PILOT_TRACE_SAMPLING will be deprecated in 1.9 by the tracing api. We shouldn't mark something "stable" just because its been around for a while, we should mark it stable if we know its the right long term API and its properly tested

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall idea here is to give users a way to visualize the maturity of the features they are leveraging. We've already got that for Annotations with Nate's PR, and this would provide visibility into env vars, which could be combined in a single istioctl command to show users what features they are using, and what support they can expect. Given the prominence of many env vars, I doubt we would feed comfortable telling our users that all of them have only alpha level support.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we track the same state we're now tracking for annotation to cover the transition intent

deprecated, deprecatedBy

etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It might be helpful to track the removal of deprecated features too, so we can highlight that when checking upgrade readiness.

It's also useful to note that users may not be setting these directly, but via operator or helm values.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add experimental to here as well?

type FeatureStatus byte

const (
Alpha FeatureStatus = iota
Copy link
Contributor

@louiscryan louiscryan Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a world where we canonicalize these Unknown's should become forbidden. Can we add a 'Dev' status

I think there's also a class of 'industry std' environment variables that we depend on which would not belong to our canonicalization. (PATH, USER, ...) How would we handle those? Maybe add a "Platform" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Platform env vars are not registered with the env package, and the ctrlz page lists their default values as UNKNOWN. I don't think we have any concept of 'Dev' status elsewhere in the project. Would 'experimental' make more sense?

@louiscryan
Copy link
Contributor

What format does the ctrlz page take? Hopefully the same one we will use for the checked-in canonicalization.

@therealmitchconnors
Copy link
Contributor Author

What format does the ctrlz page take? Hopefully the same one we will use for the checked-in canonicalization.

You can see the format here: https://drive.google.com/file/d/1EU9f711kP4TR6ixttN7GFohVcw48AGwR/view?usp=sharing

@louiscryan
Copy link
Contributor

In the UI it says the 'Set of environment variables defined for the process" which implies we're dumping everything. Does it make sense to be more selective? Options include

  • Only show the environment variables that are 'read'
  • Sort the display to show non-UNKNOWN variables first

WDYT?

@therealmitchconnors
Copy link
Contributor Author

The env vars are already sorted to show known env vars first. I am happy to move the env vars which are not known to the ctrlz system (and therefore have no default) into a separate table if that helps.

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label Jan 10, 2021
@istio-testing
Copy link
Contributor

@therealmitchconnors: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@louiscryan
Copy link
Contributor

louiscryan commented Jan 11, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. needs-rebase Indicates a PR needs to be rebased before being merged size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants