Skip to content

Enable Istio Sidecar injection for activator#966

Merged
google-prow-robot merged 2 commits into
knative:masterfrom
nikkithurmond:prototyping
Jun 11, 2018
Merged

Enable Istio Sidecar injection for activator#966
google-prow-robot merged 2 commits into
knative:masterfrom
nikkithurmond:prototyping

Conversation

@nikkithurmond
Copy link
Copy Markdown
Contributor

Enable istio sidecar injection for activator.

Fixes #838

Proposed Changes

Enable istio sidecar injection for activator.
Since istio does not support direct pod ip access istio/istio#3398, we need to use FQDN when proxy requests.

See #833 for the history of this PR

Release Note

NONE

@google-prow-robot google-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 24, 2018
@nikkithurmond
Copy link
Copy Markdown
Contributor Author

/assign mdemirhan
/assign tcnghia
/assign josephburnett

Comment thread pkg/activator/revision.go Outdated
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.

Hard coded sleeps are non-portable and a value that works in one environment is unlikely to work in another unless a real large value is chosen. Instead of this, is there a way to call the readiness probe of a pod (if one exists) and decide the readiness based on that? If that pod doesn't have one, then a hard coded sleep as a fallback might seem ok.

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.

Agreed. I'm going to file a github issue to replace this with a call to the readinessProbe.

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.

@mdemirhan Is that good for now?

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.

Yes, sorry for taking this long to respond. I completely missed this one.

@nikkithurmond nikkithurmond force-pushed the prototyping branch 2 times, most recently from 007c0e1 to 9932ea4 Compare May 25, 2018 17:32
@nikkithurmond
Copy link
Copy Markdown
Contributor Author

/retest

@mdemirhan
Copy link
Copy Markdown
Contributor

/lgtm

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2018
@tcnghia
Copy link
Copy Markdown
Contributor

tcnghia commented May 25, 2018

/lgtm
/approve

@steuhs
Copy link
Copy Markdown
Contributor

steuhs commented Jun 4, 2018

/test pull-knative-serving-go-coverage

@google-prow-robot google-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2018
@nikkithurmond nikkithurmond force-pushed the prototyping branch 2 times, most recently from 0db67c1 to 24afbca Compare June 5, 2018 23:08
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/. Say /test pull-knative-serving-go-coverage to run the coverage report again

File Old Coverage New Coverage Delta
pkg/activator/revision.go 76.1% 79.5% 3.5%
pkg/activator/revision_test.go 76.1% 79.5% 3.5%

*TestCoverage feature is being tested, do not rely on any info here yet

1 similar comment
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/. Say /test pull-knative-serving-go-coverage to run the coverage report again

File Old Coverage New Coverage Delta
pkg/activator/revision.go 76.1% 79.5% 3.5%
pkg/activator/revision_test.go 76.1% 79.5% 3.5%

*TestCoverage feature is being tested, do not rely on any info here yet

@nikkithurmond
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@nikkithurmond
Copy link
Copy Markdown
Contributor Author

/retest

Comment thread config/100-namespace.yaml Outdated
Copy link
Copy Markdown

@ZhiminXiang ZhiminXiang Jun 6, 2018

Choose a reason for hiding this comment

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

By adding this label, seems like Istio sidecar will be injected into all of pods under knative-serving-system (including controller, webhook, etc.) according to my experiment. Is this what we want in this PR?

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.

Probably not. I'll work on it.

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.

I don't know, looks like you enable sidecar injection for an entire namespace https://istio.io/docs/setup/kubernetes/sidecar-injection/#deploying-an-app

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.

I think I might need to disable it on a case by case basis.

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.

There, that should do it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

yea. or maybe we can move activator and autoscaler into a separate namespace? Just a thought :)

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.

I'll leave that for when we make the autoscaler multitenant

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.

https://istio.io/docs/setup/kubernetes/sidecar-injection/#policy suggests that it should be possible to have this governed by an annotation, but I haven't been able to make this work with experimentation.

@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/. Say /test pull-knative-serving-go-coverage to run the coverage report again

File Old Coverage New Coverage Delta
pkg/activator/revision.go 76.1% 79.5% 3.5%
pkg/activator/revision_test.go 76.1% 79.5% 3.5%

*TestCoverage feature is being tested, do not rely on any info here yet

@mdemirhan
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 6, 2018
@nikkithurmond
Copy link
Copy Markdown
Contributor Author

/assign @vaikas-google
Assigning to an owner

Comment thread sample/helloworld/sample.yaml Outdated
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.

Probably a mistake. Should revert :)

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.

Probably a mistake. Should revert :)

Enable istio sidecar injection for activator.
@google-prow-robot google-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 6, 2018
@mdemirhan
Copy link
Copy Markdown
Contributor

/lgtm

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 6, 2018
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/. Say /test pull-knative-serving-go-coverage to run the coverage report again

File Old Coverage New Coverage Delta
pkg/activator/revision.go 76.1% 79.5% 3.5%
pkg/activator/revision_test.go 76.1% 79.5% 3.5%

*TestCoverage feature is being tested, do not rely on any info here yet

@nikkithurmond
Copy link
Copy Markdown
Contributor Author

PTAL

/assign @evankanderson
/assign @mattmoor

Copy link
Copy Markdown
Member

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

/lgtm
/approve

Comment thread config/100-namespace.yaml Outdated
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.

https://istio.io/docs/setup/kubernetes/sidecar-injection/#policy suggests that it should be possible to have this governed by an annotation, but I haven't been able to make this work with experimentation.

@google-prow-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: evankanderson, mdemirhan, nikkithurmond, tcnghia

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

@google-prow-robot google-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 8, 2018
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/. Say /test pull-knative-serving-go-coverage to run the coverage report again

File Old Coverage New Coverage Delta
pkg/activator/revision.go 76.1% 79.5% 3.5
pkg/activator/revision_test.go 76.1% 79.5% 3.5

*TestCoverage feature is being tested, do not rely on any info here yet

@nikkithurmond
Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@nikkithurmond
Copy link
Copy Markdown
Contributor Author

/retest

@nikkithurmond
Copy link
Copy Markdown
Contributor Author

/retest

@nikkithurmond
Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-integration-tests

1 similar comment
@nikkithurmond
Copy link
Copy Markdown
Contributor Author

/test pull-knative-serving-integration-tests

@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/. Say /test pull-knative-serving-go-coverage to run the coverage report again

File Old Coverage New Coverage Delta
pkg/activator/revision.go 76.1% 79.5% 3.5
pkg/activator/revision_test.go 76.1% 79.5% 3.5

*TestCoverage feature is being tested, do not rely on any info here yet

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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.