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

Propagate status from KCert to Route #7163

Merged
merged 13 commits into from
May 20, 2020

Conversation

nak3
Copy link
Contributor

@nak3 nak3 commented Mar 6, 2020

Proposed Changes

When autoTLS is enabled, KCert is one of the critical resources so
Route and KSvc should not be Ready status until Cert is deployed
correctly.

This patch changes to propagate status from KCert to Route.

/lint

Fixes #7162

Release Note

Route does not become Ready if KCert is not Ready on autoTLS enabled env

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 6, 2020
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 6, 2020
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@nak3: 2 warnings.

In response to this:

Proposed Changes

When autoTLS is enabled, KCert is one of the critical resources. This
patch changes changes to propagate status status from KCert to Route.

/lint

Fixes #7162

Release Note

Route does not become Ready if KCert is not Ready on autoTLS enabled env

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.

pkg/apis/serving/v1/route_lifecycle.go Outdated Show resolved Hide resolved
pkg/apis/serving/v1alpha1/route_lifecycle.go Outdated Show resolved Hide resolved
@vagababov
Copy link
Contributor

/retry

pkg/apis/serving/v1/route_lifecycle.go Outdated Show resolved Hide resolved
pkg/apis/serving/v1/route_lifecycle.go Outdated Show resolved Hide resolved
@nak3
Copy link
Contributor Author

nak3 commented Mar 7, 2020

/hold

I have modified files under vendor directory until knative/pkg#1148 is accepted.

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 7, 2020
@knative-prow-robot knative-prow-robot added the area/test-and-release It flags unit/e2e/conformance/perf test issues for product features label Mar 20, 2020
@markusthoemmes
Copy link
Contributor

@nak3 seems like the hold can be removed?

@nak3
Copy link
Contributor Author

nak3 commented Mar 20, 2020

/unhold

Yes, it is ready for review now. Thank you.

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 20, 2020
@markusthoemmes
Copy link
Contributor

/assign @ZhiminXiang

@@ -29,6 +29,9 @@ import (
var routeCondSet = apis.NewLivingConditionSet(
RouteConditionAllTrafficAssigned,
RouteConditionIngressReady,

// TODO(nak3): Add RouteConditionCertificateProvisioned in the next release.

Choose a reason for hiding this comment

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

If we don't plan to do this in this release (I assume 0.14), could you remove the "Release Note" from the description of this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, done.

Copy link
Member

Choose a reason for hiding this comment

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

Why in the next release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The downgrade test TestServicePostDowngrade failed if we added the new condition in routeCondSet. The Route became Unknown status. (I have confirmed that it does not happen if previous version already has the condition.)
Here is the failure log

@ZhiminXiang
Copy link

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 20, 2020
@nak3
Copy link
Contributor Author

nak3 commented Mar 24, 2020

/assign @tcnghia

@@ -29,6 +29,9 @@ import (
var routeCondSet = apis.NewLivingConditionSet(
RouteConditionAllTrafficAssigned,
RouteConditionIngressReady,

// TODO(nak3): Add RouteConditionCertificateProvisioned in the next release.
Copy link
Contributor

Choose a reason for hiding this comment

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

File an issue to track?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I do. Thank you!

@tcnghia
Copy link
Contributor

tcnghia commented Mar 24, 2020

/approve

@ZhiminXiang
Copy link

/assgin @mattmoor

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

I'm cool with this change, I would just like to understand the rationale behind the release staging.

thanks!

@nak3
Copy link
Contributor Author

nak3 commented Apr 21, 2020

I think both are good. Making minimal impact to UX is better so we should change it to "only when plain HTTP has been disabled"?

I have added MarkHTTPDownward and set CertificateProvisioned to Ready with MarkHTTPDownward when HTTP is enabled. Otherwise, it is same with original change.

Here is the example output:

$ kubectl get rt -n foo hello-example  -o yaml
apiVersion: serving.knative.dev/v1
kind: Route
  ...
status:
  address:
    url: http://hello-example.foo.svc.cluster.local
  conditions:
  - lastTransitionTime: "2020-04-21T01:48:00Z"
    status: "True"
    type: AllTrafficAssigned
  - lastTransitionTime: "2020-04-21T01:48:02Z"
    message: Certificate foo.example.com is not ready downard HTTP.
    reason: HTTPDownward
    status: "True"
    type: CertificateProvisioned
  - lastTransitionTime: "2020-04-21T01:48:02Z"
    status: "True"
    type: IngressReady
  - lastTransitionTime: "2020-04-21T01:48:02Z"
    status: "True"
    type: Ready
  observedGeneration: 1
  traffic:
  - latestRevision: true
    percent: 100
    revisionName: hello-example-phkdh-1
  url: http://hello-example.foo.example.com

@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/reconciler/route/route.go 84.6% 84.8% 0.2

@nak3
Copy link
Contributor Author

nak3 commented Apr 22, 2020

/retest

@nak3
Copy link
Contributor Author

nak3 commented Apr 22, 2020

/retest

@knative-test-reporter-robot is not correct.. The test failed only TestUpdate and it seems flakiness.

@ZhiminXiang
Copy link

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 6, 2020
@ZhiminXiang
Copy link

When autoTLS is enabled, KCert is one of the critical resources so
Route and KSvc should not be Ready status until Cert is deployed
correctly.

I have been wondering whether we want this behavior in general, or only when plain HTTP has been disabled. What do folks think? 🤔

cc @ZhiminXiang @tcnghia

I think we only want this behavior when plain HTTP has been disabled.

@ZhiminXiang
Copy link

@mattmoor could you take another look? It needs your approval :)

Copy link
Member

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

Sorry for the delay, feel free to ping me more aggressively when things are blocked on me because I get a TON of notifications, and I'd love to have had this bake more.

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, nak3, tcnghia, ZhiminXiang

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 20, 2020
@nak3
Copy link
Contributor Author

nak3 commented May 20, 2020

Thank you! 😄

@nak3
Copy link
Contributor Author

nak3 commented May 20, 2020

/retest

@knative-test-reporter-robot

The following jobs failed:

Test name Triggers Retries
pull-knative-serving-integration-tests pull-knative-serving-integration-tests
pull-knative-serving-integration-tests
2/3

Automatically retrying due to test flakiness...
/test pull-knative-serving-integration-tests

@knative-prow-robot knative-prow-robot merged commit 455185d into knative:master May 20, 2020
@nak3 nak3 deleted the fix-cert-status branch May 20, 2020 05:08
tcnghia pushed a commit that referenced this pull request May 22, 2020
tcnghia pushed a commit that referenced this pull request May 22, 2020
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 area/test-and-release It flags unit/e2e/conformance/perf test issues for product features cla: yes Indicates the PR's author has signed the CLA. 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.

Ksvc becomes Ready status even though KCert is not ready on autoTLS
10 participants