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

add uid/gid and target port #1488

Closed

Conversation

TaichiHo
Copy link

Add a couple annotations for an upcoming istio/cni change.
This change will enable us to control cni behavior over kubernetes annotation.

  • targetPort
  • proxyUID
  • proxyGID

@googlebot
Copy link
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. label Jun 29, 2020
@istio-testing istio-testing added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test labels Jun 29, 2020
@istio-testing
Copy link
Collaborator

Hi @TaichiHo. Thanks for your PR.

I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@howardjohn
Copy link
Member

Can you give a little more info about why we would want this? I don't see why this needs to be customizable

@TaichiHo
Copy link
Author

Thanks for the reply.

We are planning to use istio/cni without using istio.

This change would allow us to redirect the traffic to the port our envoy is listening on. Same applies to uid and gid.

hidden: false
resources:
- Pod
- name: traffic.sidecar.istio.io/noRedirectUID
Copy link
Contributor

Choose a reason for hiding this comment

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

How about 'sidecarGID'/'sidecarUID' ? Or 'noCaptureUID/noCaptureGID' ?

Redirect happens to be what we use now - may change in future, and users may not understand it.

Also: do we still need both UID and GID ? I thought we found a way to use only GID ( which has the benefit of allowing other UIDs to be excluded ).

@@ -267,6 +267,26 @@ annotations:
hidden: false
resources:
- Pod
- name: traffic.sidecar.istio.io/targetPort
Copy link
Contributor

Choose a reason for hiding this comment

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

Except we now have 2 ports ? Generic words like 'target' should be avoided - this is not the only target in the world or on 'traffic'.

captureInPort/captureOutPort ( or ingress/egeress ) maybe ?

Copy link
Contributor

@costinm costinm left a comment

Choose a reason for hiding this comment

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

The other use case is VMs, where multiple sidecars may be running on different ports and different users.

I don't mind too much adding this - we have proxyAdminPort and statusPort in ProxyConfig.

However I do mind adding them as annotations, and CNI or init container continuing to rely exclusively on annotations. This is a major limitation: there are plenty of applications using the K8S API directly to create pods, and we can't go an modify the apps to get them to add our annotations. This is a known and old problem - we couldn't fix it when the injection was a shell script and CNI was barely maintained, but we have to address it at some point.

The solution is simple: use ProxyConfig, which currently is also an annotation - but can also be returned from the XDS server ( using MCP-over-XDS), or can be turned into a CRD or ConfigMap that CNI can read.

There is an effort to organize the capture settings in ProxyConfig ( from global.yaml, etc) - so ideally we'll not have 5 inconsistent PRs without any RFC or discussion.

As I asked the other developers working on moving include/exclude ports/ranges to API - please start a small RFC, have it discussed in Net/Env WGs. I know it takes time and it can be frustrating - but that's the process we have, and API changes need broader visibility than 2 reviews in api.

And for people who approve API changes: please start requesting an approved RFC link or at least a WG agenda item before approving !

@TaichiHo
Copy link
Author

Thanks @costinm
Is there an existing RFC I can contribute to? I took a look at the team drive but didn't find one yet.

I might need to take some time to learn the history and understand the other use cases to come up with a proper RFC

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label Jul 19, 2020
@istio-testing
Copy link
Collaborator

@TaichiHo: 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.

@google-cla google-cla bot 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 Nov 9, 2021
@howardjohn howardjohn removed the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label May 15, 2024
@istio-policy-bot
Copy link

🚧 This issue or pull request has been closed due to not having had activity from an Istio team member since 2020-06-29. If you feel this issue or pull request deserves attention, please reopen the issue. Please see this wiki page for more information. Thank you for your contributions.

Created by the issue and PR lifecycle manager.

@istio-policy-bot istio-policy-bot added the lifecycle/automatically-closed Indicates a PR or issue that has been closed automatically. label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/automatically-closed Indicates a PR or issue that has been closed automatically. needs-ok-to-test needs-rebase Indicates a PR needs to be rebased before being merged 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