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

No reason for API ServerSource adapter to not inject istio sidecar #6789

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Mar 3, 2023

The reasoning as per the comment was that you cannot have istio
sidecar when it needs to talk with the API Server but that is not
true, pods can talk to the API Server even with istio sidecar
injected.

For example, I'm injecting a sidecar in eventing-istio for
PingSource adapter or Kafka controller and they both work
fine.

Part of #6596

Proposed Changes

  • Set sidecar.istio.io/inject to true for API Server Source adapters

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note

Set sidecar.istio.io/inject to true for API Server Source adapter pods.

@knative-prow knative-prow bot requested review from aliok and aslom March 3, 2023 08:55
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 3, 2023
@creydr
Copy link
Member

creydr commented Mar 3, 2023

/test unit-tests

The reasoning as per the comment was that you cannot have istio
sidecar when it needs to talk with the API Server but that is not
true, pods can talk to the API Server even with istio sidecar
injected.

For example, I'm injecting a sidecar in eventing-istio for
PingSource adapter or Kafka controller and they both work
fine.

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
@pierDipi pierDipi force-pushed the inject-istio-sidecar-in-api-server-source branch from 2525e61 to 10924c7 Compare March 3, 2023 09:16
@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (7d7df2d) 80.44% compared to head (10924c7) 80.44%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6789   +/-   ##
=======================================
  Coverage   80.44%   80.44%           
=======================================
  Files         236      236           
  Lines       12206    12206           
=======================================
  Hits         9819     9819           
  Misses       1896     1896           
  Partials      491      491           
Impacted Files Coverage Δ
...ciler/apiserversource/resources/receive_adapter.go 92.24% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -77,7 +77,7 @@ func MakeReceiveAdapter(args *ReceiveAdapterArgs) (*appsv1.Deployment, error) {
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
"sidecar.istio.io/inject": "false", // needs to talk to the api server.
Copy link
Member

Choose a reason for hiding this comment

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

I was actually wonder if remove this 😅

@pierDipi
Copy link
Member Author

pierDipi commented Mar 3, 2023

/test upgrade-tests

Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2023
@knative-prow
Copy link

knative-prow bot commented Mar 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, pierDipi

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

@knative-prow knative-prow bot merged commit b474770 into knative:main Mar 3, 2023
@pierDipi pierDipi deleted the inject-istio-sidecar-in-api-server-source branch March 3, 2023 11:44
vishal-chdhry pushed a commit to vishal-chdhry/eventing that referenced this pull request Mar 14, 2023
…native#6789)

The reasoning as per the comment was that you cannot have istio
sidecar when it needs to talk with the API Server but that is not
true, pods can talk to the API Server even with istio sidecar
injected.

For example, I'm injecting a sidecar in eventing-istio for
PingSource adapter or Kafka controller and they both work
fine.

Part of knative#6596 

<!-- Please include the 'why' behind your changes if no issue exists -->

## Proposed Changes

<!-- Please categorize your changes:
- 🎁 Add new feature
- 🐛 Fix bug
- 🧹 Update or clean up current behavior
- 🗑️ Remove feature or internal logic
-->

- Set sidecar.istio.io/inject to true for API Server Source adapters

### Pre-review Checklist

<!-- If these boxes are not checked, you will be asked to complete these
requirements or explain why they do not apply to your PR. -->

- [ ] **At least 80% unit test coverage**
- [ ] **E2E tests** for any new behavior
- [ ] **Docs PR** for any user-facing impact
- [ ] **Spec PR** for any new API feature
- [ ] **Conformance test** for any change to the spec

**Release Note**

<!--
📄 If this change has user-visible impact, write a release
note in the block
below. Include the string "action required" if additional action is
required of
users switching to the new release, for example in case of a breaking
change.

Write as if you are speaking to users, not other Knative contributors.
If this
change has no user-visible impact, no release note is needed.
-->

```release-note
Set sidecar.istio.io/inject to true for API Server Source adapter pods.
```

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
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. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants