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

Attempt to fix our probes with mTLS enabled. #4017

Merged

Conversation

mattmoor
Copy link
Member

@mattmoor mattmoor commented May 6, 2019

Currently, we check for the kubelet's user-agent to attempt to distinguish
between proper requests and probes, however, with Istio mTLS enabled they
rewrite probes, but they do not spoof the Kubelet's User-Agent. This leads
to all manner of failure modes (see linked issue for one, another is likely
that the probe traffic will prevent scaling to zero).

To combat this, in the places we currently key off of the User-Agent we will
now be sensitive to a header, which we will explicitly pass in our Activator
probes, and rewrite user probes to provide.

Fixes: #3751


This is WIP mainly because I'd like some form of confirmation that it works before we let it in.

Currently, we check for the kubelet's user-agent to attempt to distinguish
between proper requests and probes, however, with Istio mTLS enabled they
rewrite probes, but they do not spoof the Kubelet's User-Agent.  This leads
to all manner of failure modes (see linked issue for one, another is likely
that the probe traffic will prevent scaling to zero).

To combat this, in the places we currently key off of the User-Agent we will
now be sensitive to a header, which we will explicitly pass in our Activator
probes, and rewrite user probes to provide.

Fixes: knative#3751
@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 6, 2019
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label May 6, 2019
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 6, 2019
@knative-prow-robot knative-prow-robot added area/API API objects and controllers area/networking labels May 6, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor

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-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 6, 2019
@mattmoor mattmoor changed the title [WIP] Attempt to fix our probes with mTLS enabled. Attempt to fix our probes with mTLS enabled. May 6, 2019
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 6, 2019
@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/network/network.go 96.2% 96.7% 0.5

Copy link
Contributor

@vagababov vagababov 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-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 6, 2019
@knative-prow-robot knative-prow-robot merged commit 03d8f61 into knative:master May 6, 2019
@mattmoor mattmoor deleted the kubelet-probe-with-headers branch May 6, 2019 22:54
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. area/API API objects and controllers area/networking cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

activator error: revision.serving.knative.dev "" not found
6 participants