Refactor the Configuration controller to use level-based reconciliation.#1202
Conversation
|
The following is the coverage report on pkg/. Say
*TestCoverage feature is being tested, do not rely on any info here yet |
|
This is WIP because the baseline change (#1198) needs to land first. |
There was a problem hiding this comment.
@smarterclayton I hand rolled this based on spelunking and guesswork. If there are useful utilities for this I'd appreciate any pointers.
7822953 to
caac408
Compare
|
The following is the coverage report on pkg/. Say
*TestCoverage feature is being tested, do not rely on any info here yet |
caac408 to
5f0293e
Compare
|
The following is the coverage report on pkg/. Say
*TestCoverage feature is being tested, do not rely on any info here yet |
There was a problem hiding this comment.
can we construct this from one of the api directories instead of hard coding?
There was a problem hiding this comment.
nit: The no longer
Configuration no longer...
There was a problem hiding this comment.
s/looking up Revision/failed to Get Revision/
? Not a big deal but seems more readable.
There was a problem hiding this comment.
I think you can get rid of this and use:
https://github.com/kubernetes/client-go/blob/master/tools/cache/controller.go#L254
There was a problem hiding this comment.
That's what I copied this from. Since I want the Obj that is embedded as well (to determine its controller below) I inlines and adapted that same delete-handling logic.
I definitely want something better to use here. I think that my bias would be to actually rip out a lot of the complexity of this function (which we don't need yet) unless there is something better to use.
Based on the guidance from Clayton and others at today's working group meeting, this starts to move our controllers towards more conventional reconciliation. Previously, we did work in the callbacks from informers directly. With this, we still listen to these secondary events, but when they occur instead of taking immediate action, we instead queue a reconciliation of any primary resources with which they are associated. In simpler terms, instead of having the Configuration controller take direct action when Revision events occur we instead queue a reconciliation of the Controller that created it. This core reconciliation loop is now responsible for 100% of the logic so there are changes there as well to accommodate this shift.
5f0293e to
8b3a616
Compare
|
The following is the coverage report on pkg/. Say
*TestCoverage feature is being tested, do not rely on any info here yet |
|
/assign @vaikas-google |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor, vaikas-google The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The following is the coverage report on pkg/. Say
*TestCoverage feature is being tested, do not rely on any info here yet |
This moves the service controller to the more level-based model started in #1202. This also makes the service controller start to listen to Route and Configuration events to trigger reconciliation, so that we can reflect a basic overall readiness condition based on the combination of these two sub-resources readiness conditions (I don't expect this will be the final model, but is a start). Fixes: #1134
grantr
left a comment
There was a problem hiding this comment.
LGTM. Nice improvement, thanks!
…ase/artifacts` (knative#1202) * Add secret to 1.4 CI yaml * auto generated
…ase/artifacts` (knative#1202) * Add secret to 1.5 CI yaml * auto generated
…ically (knative#1236) * [RELEASE-v1.5] Add manifest patch for internal-tls to `openshift/release/artifacts` (knative#1202) * Add secret to 1.5 CI yaml * auto generated * Support config to deploy internal certificates automatically (knative#13005) * Add certificate reconciler for internal certs * Fix cert path * Temporary use local networking repo * Support internal-encryption configuration * Use const for cert name * Fix lint * rm blank line * Drop unused variable * Use one line style * Use one line code * Update net-kourier nightly bumping knative.dev/net-kourier d758682...b9b1e8b: > b9b1e8b Use `internal-encryption` to deploy internal certificates automatically (# 855) > 427434c bump kind and k8s versions in kind-e2e tests (# 859) Signed-off-by: Knative Automation <automation@knative.team> * Verify SecretPKKey as well * Do not drop activator always in the path * Comment about ctrl-ca suffix Co-authored-by: Knative Automation <automation@knative.team> * Update deps * Enable internal-tls on ocp-tls (knative#1203) * Enable internal-tls on OCP 4.8 * Use tls to match JOB name * Add a target to enable internal-tls in Makefile (knative#1224) * Add a target to enable internal-tls in Makefile * Update CI template for internal-tls enabled * Tests for encryption with Kourier local gateway (knative#13263) * Generate Secrets * Commit generated cert-secret.yaml * httpproxy enables tls client * httpproxy uses https when CA_CERT specified * Pass CA_CERT and SERVER_NAME env variables properly to tests * Avoid using cluster-local certificates for external services * Enable tls tests for cluster-local Kourier gateway * Need to create test resources including the test namespace first before installing Knative so that applying test/config/tls/cert-secret.yaml succeeds * TMP: Enable tls in the standard e2e make target - test purposes * Use knative-serving-ingress ns for deploying server-certs * Deploy certificates at test phase * Separate test and install of installing certs * Wait for knative-serving-ingress to exist * Revert "TMP: Enable tls in the standard e2e make target - test purposes" This reverts commit 5bb3549. Co-authored-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com> Co-authored-by: Knative Automation <automation@knative.team>
Based on the guidance from today's working group meeting, this starts to move our controllers towards more conventional reconciliation. Previously, we did work in the callbacks from informers directly. With this, we still listen to these secondary events, but when they occur instead of taking immediate action, we instead queue a reconciliation of any primary resources with which they are associated.
In simpler terms, instead of having the Configuration controller take direct action when Revision events occur we instead queue a reconciliation of the Controller that created it. This core reconciliation loop is now responsible for 100% of the logic so there are changes there as well to accommodate this shift.
Progress towards: #823