Skip to content

Conversation

@davidhadas
Copy link
Contributor

@davidhadas davidhadas commented Jul 24, 2022

Align QP volume mounting options

Fixes knative#13118
Alternative to knative#13122
Proposed Changes
Enabling downstream and anyone creating an image of queue proxy to extend queue proxy
This extendibility is a step to enable the runtime security proposal here

Release Note
Refactored queue-proxy binary to more easily support out-of-tree extension.
Fixes knative#13118

Annotation based configuration for activat8ing and configuring QP Extensions
Support defaults in deployment config map
@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/API API objects and controllers area/autoscale area/networking labels Jul 24, 2022
@codecov
Copy link

codecov bot commented Jul 25, 2022

Codecov Report

Merging #13146 (4d14497) into main (24e1ec2) will decrease coverage by 0.02%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##             main   #13146      +/-   ##
==========================================
- Coverage   86.72%   86.70%   -0.03%     
==========================================
  Files         196      196              
  Lines       14463    14463              
==========================================
- Hits        12543    12540       -3     
- Misses       1624     1626       +2     
- Partials      296      297       +1     
Impacted Files Coverage Δ
pkg/queue/sharedmain/main.go 0.64% <ø> (ø)
pkg/reconciler/revision/resources/deploy.go 90.54% <0.00%> (ø)
pkg/reconciler/revision/resources/queue.go 98.14% <100.00%> (ø)
pkg/autoscaler/statforwarder/leases.go 72.39% <0.00%> (-1.57%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@davidhadas
Copy link
Contributor Author

/assign davidhadas

@davidhadas
Copy link
Contributor Author

/retest

@davidhadas
Copy link
Contributor Author

davidhadas commented Jul 25, 2022

/cc evankanderson

  • cant seem to get the e2e tests to not fail, but I could not see anything to do with this change.

@knative-prow knative-prow bot requested a review from evankanderson July 25, 2022 15:52
@knative-prow knative-prow bot removed the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 26, 2022
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 2, 2022
@davidhadas davidhadas closed this Aug 2, 2022
@knative-prow knative-prow bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 2, 2022
@davidhadas
Copy link
Contributor Author

/reopen

@knative-prow
Copy link

knative-prow bot commented Aug 2, 2022

@davidhadas: Reopened this PR.

Details

In response to this:

/reopen

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 knative-prow bot reopened this Aug 2, 2022
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 2, 2022
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 2, 2022
Copy link
Member

@psschwei psschwei left a comment

Choose a reason for hiding this comment

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

One small question , otherwise LGTM

@davidhadas
Copy link
Contributor Author

/cc @psschwei, @dprotaso - this is now simple refactoring, if all is ok, let's merge so we have one less PR in the list

@psschwei
Copy link
Member

/cc @psschwei, @dprotaso - this is now simple refactoring, if all is ok, let's merge so we have one less PR in the list

Can you edit the PR title / body to reflect that this is now a refactor of the queue volume constants?

@davidhadas
Copy link
Contributor Author

davidhadas commented Aug 10, 2022

Changing the pr title will make it impossible to follow - other PRs were referring to this PR.

I can create a new PR and close this one if this makes sense.

@psschwei
Copy link
Member

All the links should be to the PR number (#13146 ), so it should be fine to change the title.

The reason for the change is so that the git commit is accurate... prow squashes all the commits, then uses the PR title/body as the commit message, which is why those need to be up to date.

@davidhadas
Copy link
Contributor Author

davidhadas commented Aug 10, 2022

As a reference:
This use to be the original fix for #13153
Configuration for extensions enabled by #13133

##Proposed Changes

  • Adding the ability to activate and configure queue proxy extensions per service using service annotations
  • This is a third step to enable the runtime security proposal here

Note: Changes to annotations result in a new revision of the service that has the new extension configuration.

Next possible steps:

  1. Add Default Deployment Annotations via deployment configmap - the annotations will be added to the deployment podSpec before adding the service annotations. Changing the deployment configmap results in changes to the deployments of all services
  2. Add documentation (See draft documentation in https://github.com/knative/docs/compare/main...davidhadas:knativedocs:qpextensions?expand=1)

Release Note

Refactored queue-proxy binary to more easily support out-of-tree extension.

@davidhadas davidhadas changed the title Qp options config A refactor of the queue volume constants Aug 10, 2022
Copy link
Member

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

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Aug 10, 2022
@knative-prow
Copy link

knative-prow bot commented Aug 10, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidhadas, psschwei

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

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 10, 2022
@knative-prow knative-prow bot merged commit 5bba016 into knative:main Aug 10, 2022
// CertDirectory is the name of the directory path where certificates are stored.
CertDirectory = "/var/lib/knative/certs"
// CertVolumeMountPath is the name of the directory path where certificates are stored.
CertVolumeMountPath = "/var/lib/knative/certs"
Copy link
Contributor

Choose a reason for hiding this comment

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

minor nit pick: From a user's point of view, it does not matter whether a directory is mounted or part or a original directory of that file directory. Therefore I really would prefer "directory" instead of "mountPath" except when you would actually would do the mount yourself (I doubt that). I would better rename the other MountPath constants to use Directory instead (like PodInfoVolumeMountPath)

Copy link
Contributor Author

@davidhadas davidhadas Aug 11, 2022

Choose a reason for hiding this comment

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

Fine either way, as long as all mount points use the same convention.

Note however that we added a config feature to control if podInfo is mounted or not - this is also reflected in the documentation as a result - so we do expose this externally as a mounted volume.

If we open a new PR for this, I would like to also add a PodInfoAnnotationsPath (or we can call it AnnotationsPath) const in shardmain - this allows Options importing shardmain to use the shardmain const rather than importing also pkg/queue to gain access to the consts defining the annotations file path to open and read.

Copy link
Member

Choose a reason for hiding this comment

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

"directory" works for me (it also seems more in line with the spirit of these variables, as the original comments note these are for "the name of the directory path")

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/autoscale area/networking 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.

6 participants