Skip to content

Few small updates to the mesh config API#1194

Merged
istio-testing merged 7 commits intoistio:masterfrom
costinm:config15
Dec 12, 2019
Merged

Few small updates to the mesh config API#1194
istio-testing merged 7 commits intoistio:masterfrom
costinm:config15

Conversation

@costinm
Copy link
Copy Markdown
Contributor

@costinm costinm commented Dec 5, 2019

Added a mechanism to specify the 'env' that gets injected - to be used instead of values.yaml.

@costinm costinm requested a review from a team as a code owner December 5, 2019 22:05
@googlebot googlebot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Dec 5, 2019
@istio-testing istio-testing added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 5, 2019
@costinm
Copy link
Copy Markdown
Contributor Author

costinm commented Dec 5, 2019

Happy with any name - whatever name is selected will also be used in the inject template for consistency.

// Unix Domain Socket through which Envoy communicates with NodeAgent SDS to get key/cert for mTLS.
// Use secret-mount files instead of SDS if set to empty.
string sds_uds_path = 20;
// @deprecated - istiod agent will detect and send the path to envoy.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/istiod agent/istio-agent

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do not add docs here. It will show up in webpage. Just add a $hide_from_docs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done


// Additional env variables to inject into sidecar.
// Names starting with ISTIO_META_ will be included in the generated bootstrap and sent to the XDS server.
map<string,string> meta = 24;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

name is a little opaque, 'sidecar_env' ?

I don't have a strong opinion about this, otherwise. Shriram / Lin are likely better TOC reviewers than I.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sidecar_env sounds good - unless gRCP expects to use it as well.
Things like CA_ADDR will go here, might be relevant for sidecar-less.

env ? It'll go under container env: section

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To be clear: this is intended for break glass, vendor or advanced features - I will add caAddr as a top-level setting.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Proxy config is processed by the pilot agent before generating envoy bootstrap. It seems confusing to specify env vars here that will be consumed by platform (added to process env var) before pilot agent starts.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does a user really care how it's used? It seems like more of an implementation detail - to the user it's all just configuring the proxy?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The 'default' proxy has all the (default) settings for the sidecar. For now we do indeed do a crazy complicated thing - but the plan (according to the istiod doc) is to simplify things a bit.

One option is to have Pilot return the template and mesh.yaml to agent, so agent doesn't need the crazy stuff. Longer term Pilot can do the rendering of the bootstrap - and return a final bootstrap, plus some env variables needed by pilot-agent.

But in the end - logically this is config for the proxy, and seems reasonable to keep it here. DiscoveryAddress is the same.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let us call this proxy_metadata as it applies to gateways as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can we call it proxy_env ? Metadata is a subset - not all the env are passed to envoy bootstrap and node metadata inside. Some apply to pilot-agent/istio-agent itself.

Not a big deal - I'll change it to proxy_metadata for now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rshriram - to be clear, the gateway can't easily support it (right now), it's used in injection.

We are discussing adding a handler in Pilot to return the 'active' mesh config, and istio-agent using that - either in gateway or sidecar - instead of having the env and other options handled by injector. But in terms of implementation it'll take a bit longer, the use in injection is simpler.

@istio-testing istio-testing added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 9, 2019
@costinm
Copy link
Copy Markdown
Contributor Author

costinm commented Dec 10, 2019

PTAL.

I have few other related changes so we can have injection without values.yaml and helm - trying to use small PRs to avoid problems...

@costinm
Copy link
Copy Markdown
Contributor Author

costinm commented Dec 11, 2019

PTAL - I keep spending time resolving conflicts.

@rshriram
Copy link
Copy Markdown
Member

lgtm after renaming to proxy_metadata

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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants