Skip to content

Replace 'scope' with 'export_to' namespace#758

Merged
rshriram merged 2 commits intoistio:release-1.1from
louiscryan:ScopeAsExportToNamespace
Jan 28, 2019
Merged

Replace 'scope' with 'export_to' namespace#758
rshriram merged 2 commits intoistio:release-1.1from
louiscryan:ScopeAsExportToNamespace

Conversation

@louiscryan
Copy link
Copy Markdown
Contributor

Currently 'scope' is only implemented on service and virtual service but not destination rule. This change also aligns with the revised naming conventions for referring to namespaces that have been adopted in the Sidecar API.

@istio-testing
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: louiscryan
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: mandarjog

If they are not already assigned, you can assign the PR to them by writing /assign @mandarjog in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@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 Jan 15, 2019
@louiscryan
Copy link
Copy Markdown
Contributor Author

/retest

@louiscryan louiscryan requested a review from rshriram January 15, 2019 01:15
@rshriram
Copy link
Copy Markdown
Member

We do implement scoping for destination rules in a very intricate way. So I suggest adding the exportTo to destination rules as well. Other than that, I would also add a temporary restriction that for this release, only . and * are allowed. [there is a bunch of code that needs to change to incorporate selective exports].

// be overridden by explicitly listing the namespaces that are allowed
// to refer to this declaration.
//
// The value "." is reserved and defines an export to the namespace where
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.

Let's clearly define the defaults - we have the same problem for Sidecar.

  • if field is missing ( no entries ) - we clearly have to support the backward compat mode ( export to all )
  • if it is present - it must have at least one entry ( we can't have an empty list represented in proto). I assume "." will be equivalent with the former "private".
  • not clear what is the use case for '' - I assume it makes sense only if we define a mesh config indicating 'default export_to', allowing transition of the default from '' to '.' (or some other explicit list).

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.

Tidied up the language a bit to match that. I kept asterisk as a reserved value even if the use case is equivalent to the empty list case.

// The value "." is reserved and defines an export to the namespace where
// the service is declared, similarly the value "*" is reserved and
// defines an export to all namespaces.
repeated string export_to = 7;
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.

Also worth noting that export_to still require an explicit 'egress' in the destination namespace.

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.

Why? I thought no egress mean all public (i.e., with export_to my namespace) services in any other namespace.

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.

If no Sidecar is defined and we have the old behavior the export_to can still restrict it. Its an additive feature of the API so doing that does not impose any backward compatability risks

@costinm
Copy link
Copy Markdown
Contributor

costinm commented Jan 15, 2019 via email

@louiscryan louiscryan force-pushed the ScopeAsExportToNamespace branch from 175cfe6 to 661175b Compare January 16, 2019 01:07
@googlebot
Copy link
Copy Markdown
Collaborator

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@googlebot googlebot added cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. and removed cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. labels Jan 16, 2019
@louiscryan louiscryan force-pushed the ScopeAsExportToNamespace branch 6 times, most recently from 8edc9a6 to 68e10f0 Compare January 16, 2019 04:52
@googlebot
Copy link
Copy Markdown
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@louiscryan louiscryan force-pushed the ScopeAsExportToNamespace branch from 68e10f0 to f9f0de9 Compare January 16, 2019 05:00
@louiscryan
Copy link
Copy Markdown
Contributor Author

/retest

@louiscryan louiscryan force-pushed the ScopeAsExportToNamespace branch from f9f0de9 to 47cd7fa Compare January 16, 2019 17:59
@googlebot
Copy link
Copy Markdown
Collaborator

CLAs look good, thanks!

@googlebot googlebot added cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. and removed cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. labels Jan 16, 2019
@linsun
Copy link
Copy Markdown
Member

linsun commented Jan 18, 2019

what is the rational of choosing export_to over just export?

Copy link
Copy Markdown
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

please make the format of exportTo consistent (comma separated string or repeated string).
Also, if you have time, could you please clean up the language for the locality_lb_setting in the mesh config?

@rshriram
Copy link
Copy Markdown
Member

Also missing is the root namespace flag.

@louiscryan
Copy link
Copy Markdown
Contributor Author

what is the rational of choosing export_to over just export?

If we just said 'export' it would read more like a boolean, 'export to' implies a specification of the receiver.

@louiscryan
Copy link
Copy Markdown
Contributor Author

Also missing is the root namespace flag.

This can't be in config.proto as we'll read config.proto from that namespace. It has to be an install time flag for the control plane.

@louiscryan
Copy link
Copy Markdown
Contributor Author

Also missing is the root namespace flag.

This can't be in config.proto as we'll read config.proto from that namespace. It has to be an install time flag for the control plane.

I should say that there are two choices here. Either the control plane reads config.proto from it's own namespace or from the root namespace. I'm fine with either and it might be that reading config.proto from the control-plane namespace makes the most sense

@louiscryan louiscryan force-pushed the ScopeAsExportToNamespace branch from a270321 to 3726c91 Compare January 22, 2019 18:12
@louiscryan
Copy link
Copy Markdown
Contributor Author

@rshriram PTAL

istio.networking.v1alpha3.TLSSettings tls_settings = 2;
}


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.

? I was asking if you would be able to clean up the language in this locality weighted routing stuff. This is the code moved from the destination rule and shoved into the global config. I can clean it up later 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.

ah, ok. Updating

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.

Thanks

@louiscryan
Copy link
Copy Markdown
Contributor Author

PTAL

// The value "." is reserved and defines an export to the same namespace that
// the virtual service is declared in, similarly the value "*" is reserved and
// defines an export to all namespaces.
//
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.

Add ~ for none.

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.

Its not clear that 'none' has any utility on VirtualService or ServiceEntry beyond what 'this namespace only' provides.

This is different from the use of 'none' on the referring side

Add flags to control scopeTo defaults
Update doc for locality weighted LB
@louiscryan louiscryan force-pushed the ScopeAsExportToNamespace branch from f34eef0 to 1ea813d Compare January 28, 2019 18:01
@rshriram rshriram merged commit b524b1e into istio:release-1.1 Jan 28, 2019
rshriram added a commit that referenced this pull request Jan 29, 2019
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants