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

Remove /var/log symlink logic from the queue proxy #7882

Merged
merged 3 commits into from
May 8, 2020

Conversation

dprotaso
Copy link
Member

@dprotaso dprotaso commented May 7, 2020

This can now be accomplished in K8s 1.15 using volume subpath
expressions

https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath-with-expanded-environment-variables

A notable side-effect is variables which populated the subpath
expression come from the container's environment.

Thus I exposed the pod's name, namespace and container name as
environment variables. Each has a prefix K_INTERNAL_ denoting
this shouldn't be consumed by users

Part of #7881

Release Note

/var/log log capture now supports containers that aren't named `user-container`

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label May 7, 2020
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 7, 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.

@dprotaso: 0 warnings.

In response to this:

This can now be accomplished in K8s 1.15 using volume subpath
expressions

https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath-with-expanded-environment-variables

A notable side-effect is variables which populated the subpath
expression come from the container's environment.

Thus I exposed the pod's name, namespace and container name as
environment variables. Each has a prefix K_INTERNAL_ denoting
this shouldn't be consumed by users

Part of #7881

Release Note

/var/log log capture now supports containers that aren't named `user-container`

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.

@knative-prow-robot knative-prow-robot added area/API API objects and controllers area/monitoring area/networking area/test-and-release It flags unit/e2e/conformance/perf test issues for product features labels May 7, 2020
@dprotaso
Copy link
Member Author

dprotaso commented May 7, 2020

/assign @JRBANCEL

@dprotaso
Copy link
Member Author

dprotaso commented May 7, 2020

cc @mattmoor as an FYI for the K_INTERNAL_ env var exposure

This can now be accomplished in K8s 1.15 using volume subpath
expressions

https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath-with-expanded-environment-variables

A notable side-effect is variables which populated the subpath
expression come from the container's environment.

Thus I exposed the pod's name, namespace and container name as
environment variables. Each has a prefix `K_INTERNAL_` denoting
this shouldn't be consumed by users
@dprotaso dprotaso force-pushed the varlog-with-subpath branch from 734e0d3 to 6c8c8bf Compare May 7, 2020 18:36
@JRBANCEL
Copy link
Contributor

JRBANCEL commented May 7, 2020

Looks very clean!
/approve

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, JRBANCEL

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 7, 2020
@JRBANCEL
Copy link
Contributor

JRBANCEL commented May 7, 2020

/retest

@knative-prow-robot
Copy link
Contributor

@JRBANCEL: The /retest command does not accept any targets.
The following commands are available to trigger jobs:

  • /test pull-knative-serving-build-tests
  • /test pull-knative-serving-unit-tests
  • /test pull-knative-serving-integration-tests
  • /test pull-knative-serving-upgrade-tests
  • /test pull-knative-serving-autotls-tests
  • /test pull-knative-serving-go-coverage
  • /test pull-knative-serving-go-coverage-dev
  • /test pull-knative-serving-istio-1.5-mesh
  • /test pull-knative-serving-istio-1.5-no-mesh
  • /test pull-knative-serving-istio-1.4-mesh
  • /test pull-knative-serving-istio-1.4-no-mesh
  • /test pull-knative-serving-gloo-0.17.1
  • /test pull-knative-serving-kourier-stable
  • /test pull-knative-serving-contour-latest
  • /test pull-knative-serving-ambassador-latest
  • /test pull-knative-serving-https

Use /test all to run all jobs.

In response to this:

/retest
lgtm

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.

@JRBANCEL
Copy link
Contributor

JRBANCEL commented May 7, 2020

/retest all

@knative-prow-robot
Copy link
Contributor

@JRBANCEL: The /retest command does not accept any targets.
The following commands are available to trigger jobs:

  • /test pull-knative-serving-build-tests
  • /test pull-knative-serving-unit-tests
  • /test pull-knative-serving-integration-tests
  • /test pull-knative-serving-upgrade-tests
  • /test pull-knative-serving-autotls-tests
  • /test pull-knative-serving-go-coverage
  • /test pull-knative-serving-go-coverage-dev
  • /test pull-knative-serving-istio-1.5-mesh
  • /test pull-knative-serving-istio-1.5-no-mesh
  • /test pull-knative-serving-istio-1.4-mesh
  • /test pull-knative-serving-istio-1.4-no-mesh
  • /test pull-knative-serving-gloo-0.17.1
  • /test pull-knative-serving-kourier-stable
  • /test pull-knative-serving-contour-latest
  • /test pull-knative-serving-ambassador-latest
  • /test pull-knative-serving-https

Use /test all to run all jobs.

In response to this:

/retest all

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.

@dprotaso
Copy link
Member Author

dprotaso commented May 7, 2020

whoops forgot to delete a test

@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/revision/revision.go 98.1% 98.1% 0.0

@dprotaso
Copy link
Member Author

dprotaso commented May 7, 2020

/hold

I should probably add logic reserving K_INTERNAL_* for internal use only

@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 May 7, 2020
@dprotaso
Copy link
Member Author

dprotaso commented May 8, 2020

/hold

I should probably add logic reserving K_INTERNAL_* for internal use only

/hold cancel

I'll actually make this a separate PR since it may warrant a discussion

@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 May 8, 2020
@JRBANCEL
Copy link
Contributor

JRBANCEL commented May 8, 2020

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 8, 2020
@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

Copy link
Contributor

@markusthoemmes markusthoemmes 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 not qualified to review if this is a non-breaking change but: I love the simplification!

@dprotaso
Copy link
Member Author

dprotaso commented May 8, 2020

/retest

@knative-prow-robot knative-prow-robot merged commit 16c1963 into knative:master May 8, 2020
@dprotaso dprotaso deleted the varlog-with-subpath branch May 8, 2020 14:05
@knative-prow-robot
Copy link
Contributor

@dprotaso: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-knative-serving-integration-tests abd74df link /test pull-knative-serving-integration-tests

Full PR test history. Your PR dashboard.

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.

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/monitoring 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.

7 participants