Skip to content

injector changes for health check, pilot agent take over app readines…#10175

Merged
istio-testing merged 3 commits intoistio:release-1.1from
incfly:release-1.1
Dec 7, 2018
Merged

injector changes for health check, pilot agent take over app readines…#10175
istio-testing merged 3 commits intoistio:release-1.1from
incfly:release-1.1

Conversation

@incfly
Copy link
Copy Markdown

@incfly incfly commented Nov 28, 2018

CP #9266 in release 1.1. Pilot agent status server part is already in this branch.

  • WIP injector change to modify istio-proxy.

  • move out to app_probe.go

  • Iterating sidecartmpl to find the statusPort.

  • use the same name for ready path.

  • Get rewrite work, almost.

  • Some clean up on test and check one container criteria.

  • fix the injected test file.

  • Add inject test for readiness probe itself.

  • Add missing added test file.

  • fix helm test.

  • fix lint.

  • update header based finding the port.

  • return to previous injected file status.

  • fixing TestIntoResource test.

  • sed fixing all remaining injecting files.

  • handling named port.

  • fixing merginge failure.

  • remove the debug print.

  • lint fixing.

  • Apply the suggestions for finding statusPort arg.

  • Address comments, regex support more port value format.

  • add app_probe_test.go

  • add more test.

  • merge fix the test.

…s check. (istio#9266)

* WIP injector change to modify istio-proxy.

* move out to app_probe.go

* Iterating sidecartmpl to find the statusPort.

* use the same name for ready path.

* Get rewrite work, almost.

* Some clean up on test and check one container criteria.

* fix the injected test file.

* Add inject test for readiness probe itself.

* Add missing added test file.

* fix helm test.

* fix lint.

* update header based finding the port.

* return to previous injected file status.

* fixing TestIntoResource test.

* sed fixing all remaining injecting files.

* handling named port.

* fixing merginge failure.

* remove the debug print.

* lint fixing.

* Apply the suggestions for finding statusPort arg.

* Address comments, regex support more port value format.

* add app_probe_test.go

* add more test.

* merge fix the test.
@incfly incfly requested review from hzxuzhonghu and removed request for rshriram November 28, 2018 20:57
@incfly
Copy link
Copy Markdown
Author

incfly commented Nov 28, 2018

/cc @liminw

FYI after this merge, release 1.1 mtls can work with liveness and readiness probe.

@istio-testing istio-testing requested a review from liminw November 28, 2018 20:59
@incfly
Copy link
Copy Markdown
Author

incfly commented Nov 28, 2018

/test e2e-mixer-no_auth

injectCmd.PersistentFlags().StringVar(&imagePullPolicy, "imagePullPolicy", inject.DefaultImagePullPolicy,
"Sets the container image pull policy. Valid options are Always,IfNotPresent,Never."+
"The default policy is IfNotPresent.")
injectCmd.PersistentFlags().IntVar(&statusPort, "statusPort", inject.DefaultStatusPort,
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.

I don't think we can make backward incompatible flag changes.
Keep old flag, add new if needed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is the same flag. I just refactor the flag name with inject.StatusPortCmdFlagName which equals to "statusPort".

statusPortPattern = regexp.MustCompile(fmt.Sprintf(`^-{1,2}%s(=(?P<port>\d+))?$`, StatusPortCmdFlagName))
)

func rewriteAppHTTPProbe(spec *SidecarInjectionSpec, podSpec *corev1.PodSpec) {
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.

For new (and risky) features - please add a flag or env variable to disable the behavior (that's a generic requirement)

Copy link
Copy Markdown
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.

In general lgtm, but please add env variable or flag, and setting in values.yaml.
I think it should be disabled by default since it changes the behavior, and existing users without mtls should not be affected ( same for mtls users using different port ).

Should this be opt-in at pod level ?

@incfly
Copy link
Copy Markdown
Author

incfly commented Nov 30, 2018

I'll do helm install option in a spearate PR on master and then cherrypick that one here.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 6, 2018

Codecov Report

Merging #10175 into release-1.1 will increase coverage by 7%.
The diff coverage is 81%.

Impacted file tree graph

@@              Coverage Diff               @@
##           release-1.1   #10175     +/-   ##
==============================================
+ Coverage           64%      70%     +7%     
==============================================
  Files              559      443    -116     
  Lines            50830    41529   -9301     
==============================================
- Hits             32120    28989   -3131     
+ Misses           16904    11134   -5770     
+ Partials          1806     1406    -400
Impacted Files Coverage Δ
istioctl/cmd/istioctl/kubeinject.go 46% <100%> (ø) ⬆️
pilot/pkg/kube/inject/inject.go 80% <100%> (+1%) ⬆️
pilot/pkg/kube/inject/app_probe.go 80% <80%> (ø)
mixer/adapter/inventory.gen.go 0% <0%> (-100%) ⬇️
mixer/adapter/rbac/rbac.go 0% <0%> (-72%) ⬇️
pilot/pkg/serviceregistry/memory/discovery.go 57% <0%> (-29%) ⬇️
pilot/pkg/proxy/envoy/discovery.go 0% <0%> (-29%) ⬇️
mixer/template/template.gen.go 0% <0%> (-28%) ⬇️
mixer/adapter/stackdriver/stackdriver.go 50% <0%> (-26%) ⬇️
mixer/adapter/cloudwatch/cloudwatch.go 58% <0%> (-23%) ⬇️
... and 170 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 360fb67...68a1bb0. Read the comment docs.

@incfly
Copy link
Copy Markdown
Author

incfly commented Dec 6, 2018

I've already have an PR on top of this one ready to do a helm flag guarded. https://github.com/incfly/istio/compare/release-1.1...incfly:health-flag?expand=1

Let's get this in first and I'll send out the other PR separately. This way we can avoid the conflicts we'll have when merging back to master.

PTAL, @costinm @nmittler @hzxuzhonghu

@incfly
Copy link
Copy Markdown
Author

incfly commented Dec 7, 2018

/test e2e-dashboard
/test e2e-mixer-no_auth

@hzxuzhonghu
Copy link
Copy Markdown
Member

/lgtm

@nmittler
Copy link
Copy Markdown
Contributor

nmittler commented Dec 7, 2018

/lgtm
/approve

@istio-testing
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu, incfly, nmittler

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

@istio-testing
Copy link
Copy Markdown
Collaborator

istio-testing commented Dec 7, 2018

@incfly: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow//e2e-simpleTests-minProfile.sh cc0c84a link /test e2e-simpleTestsMinProfile
Details

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. I understand the commands that are listed here.

@incfly
Copy link
Copy Markdown
Author

incfly commented Dec 7, 2018

/test istio-unit-tests

@istio-testing istio-testing merged commit a2ad0d1 into istio:release-1.1 Dec 7, 2018
antonioberben pushed a commit to antonioberben/istio that referenced this pull request Jan 29, 2024
* [incubator/jaeger] fix hotrod demo application

Signed-off-by: Sébastien Prud'homme <sebastien.prudhomme@gmail.com>

* [incubator/jaeger} bump version

Signed-off-by: Sébastien Prud'homme <sebastien.prudhomme@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants