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 support for system-internal-tls in net-istio #1085

Merged

Conversation

ReToCode
Copy link
Member

@ReToCode ReToCode commented Mar 28, 2023

Changes

Things to discuss

  1. config/700-istio-secret.yaml is necessary because the CA secrets needs to be in istio-system namespace for istio to pick it up. It's currently the only way to get the CA there. This is why https://docs.google.com/document/d/1YdcdBVg_zpT4WSNRsWlihut5JuLddOTIggFvLni3A28/edit?disco=AAAAtaDADjo proposes to add the CA to KIngress
  2. Handling of DomainMappings is a bit hacky. It is adapted based on net-kourier. If we do Provide HTTPS for cluster.local domains knative/serving#13472 this handling can be dropped (here and in net-kourier and net-contour)
  3. Handling/detection of http2 is currently based on service naming, which is not ideal. Thus https://docs.google.com/document/d/1YdcdBVg_zpT4WSNRsWlihut5JuLddOTIggFvLni3A28/edit?disco=AAAAtaDADjo also proposes to add the upstream protocol to the KIngress resource to avoid this in the future.

Release Note
No release notes yet, as this is still an internal/alpha feature.

Docs
No docs yet, as this still an internal/alpha feature.

/kind enhancement
Fixes #1063

@knative-prow knative-prow bot added kind/enhancement size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 28, 2023
@ReToCode
Copy link
Member Author

/assign @nak3, @skonto, @evankanderson for review

/cc @dprotaso, @KauzClay for inputs/opinions on the discussion points (and - of course - also review if you'd like)

@ReToCode
Copy link
Member Author

/hold I'm going to look into the test failures.

@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 28, 2023
@evankanderson
Copy link
Contributor

I like the suggestion to do https://github.com/knative/serving/issue/13472, particularly since we've seen it show up three times and within-cluster TLS is not an unreasonable desire.

(Non-blocking, will review the rest soon.)

@evankanderson
Copy link
Contributor

One other thought: with websockets being defined for http2, I wonder whether we should simply run http2 to the queue-proxy and do the down-conversion there.

Downside: we may get scale-from-zero wakeups for requests the app won't actually be able to handle.

Upside: people can stop needing to worry about naming their port.

Copy link
Contributor

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

Initial review; this was less painful than I anticipated.

.github/workflows/kind-e2e.yaml Outdated Show resolved Hide resolved
pkg/reconciler/ingress/ingress.go Outdated Show resolved Hide resolved
pkg/reconciler/ingress/ingress.go Outdated Show resolved Hide resolved
pkg/reconciler/ingress/ingress.go Outdated Show resolved Hide resolved
pkg/reconciler/ingress/ingress.go Outdated Show resolved Hide resolved
pkg/reconciler/ingress/resources/destinationrule.go Outdated Show resolved Hide resolved
@ReToCode
Copy link
Member Author

I like the suggestion to do https://github.com/knative/serving/issue/13472, particularly since we've seen it show up three times and within-cluster TLS is not an unreasonable desire.

I synced with @KauzClay. Well come up with some GH-issues to track tasks out of the Findings document shortly to start working on that. But we'd need to agree on the contract and KIngress changes first.

One other thought: with websockets being defined for http2, I wonder whether we should simply run http2 to the queue-proxy and do the down-conversion there.

I think it would be worth to look into this. Should we track/discuss this in a new issue?

Initial review; this was less painful than I anticipated.

That's a hopefully a good thing? ;)

@ReToCode
Copy link
Member Author

/test integration-tests

/test latest-mesh

Copy link
Contributor

@nak3 nak3 left a comment

Choose a reason for hiding this comment

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

I guess we should add the same #114 for DestinationRules in cmd/controller/main.go?

@ReToCode
Copy link
Member Author

I guess we should add the same #114 for DestinationRules in cmd/controller/main.go?

@nak3 any idea why we are configuring v1beta1 here but are using v1alpha3 everywhere else?

@nak3
Copy link
Contributor

nak3 commented Mar 31, 2023

I don't know the reason. As far as I researched the commit history (you might already know but...)

The revert is waiting for knative/serving#8896 but knative/serving#8896 should be fixed most probably so we should bump the API to v1beta1. I opened #1087

@ReToCode
Copy link
Member Author

/test latest-mesh

@ReToCode
Copy link
Member Author

ReToCode commented Apr 3, 2023

/unhold

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 3, 2023
@nak3
Copy link
Contributor

nak3 commented Apr 4, 2023

Overall looks good to me.

With said, Istio has a large variety of network configuration so I am worried that adding a non-edge network feature conflicts with their features 😥 For example, does this internal-encryption in net-istio assume that there is no sidecar at all? Or it can work with the partial mesh (moreover using PERMISSIVE mode but it means HTTPS over mTLS)?...etc
This is still alpha feature so we can move forward, though.

@nak3
Copy link
Contributor

nak3 commented Apr 4, 2023

@evankanderson Would you like to have another review?

@ReToCode
Copy link
Member Author

For example, does this internal-encryption in net-istio assume that there is no sidecar at all?

My personal take would be, if you use service-mesh, you do not need the Knative internal-encryption feature. I also would not invest in making this compatible with istios internal mesh certificates.

@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Merging #1085 (28dd4c5) into main (a271e0b) will increase coverage by 0.24%.
Report is 5 commits behind head on main.
The diff coverage is 87.35%.

@@            Coverage Diff             @@
##             main    #1085      +/-   ##
==========================================
+ Coverage   81.42%   81.66%   +0.24%     
==========================================
  Files          18       19       +1     
  Lines        1599     1680      +81     
==========================================
+ Hits         1302     1372      +70     
- Misses        213      220       +7     
- Partials       84       88       +4     
Files Coverage Δ
pkg/reconciler/ingress/controller.go 92.30% <100.00%> (+0.48%) ⬆️
...kg/reconciler/ingress/resources/destinationrule.go 100.00% <100.00%> (ø)
pkg/reconciler/ingress/ingress.go 69.49% <69.44%> (-0.01%) ⬇️

@ReToCode
Copy link
Member Author

/test latest-mesh

@ReToCode
Copy link
Member Author

Rebased and istio version bumped.

@evankanderson any thoughts about #1085 (comment) and #1085 (comment)? For the latter, what is the plan to move/migrate stuff from control-protocol to networking? Can we maybe start with migrating the constants instead of adding another dependency on control-protocol?

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 29, 2023
@github-actions
Copy link

This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Reopen with /reopen. Mark as fresh by adding the
comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 29, 2023
@ReToCode
Copy link
Member Author

/remove-lifecycle stale

@knative-prow knative-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 31, 2023
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 9, 2023
@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 11, 2023
@ReToCode
Copy link
Member Author

/test latest

@ReToCode
Copy link
Member Author

/retest

@nak3
Copy link
Contributor

nak3 commented Oct 12, 2023

/lgtm
/approve
/hold please feel free to unhold if there is no other reviewers.

@knative-prow knative-prow bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Oct 12, 2023
@knative-prow
Copy link

knative-prow bot commented Oct 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nak3, ReToCode

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

The pull request process is described here

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

@ReToCode
Copy link
Member Author

@dprotaso do you want to take a look as well?

@ReToCode
Copy link
Member Author

/unhold

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 17, 2023
@knative-prow knative-prow bot merged commit d06426a into knative-extensions:main Oct 17, 2023
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/enhancement lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support system-internal-tls in net-istio
4 participants