Conversation
There was a problem hiding this comment.
@skonto: 4 warnings.
Details
In response to this:
Fixes #2009
Proposed Changes
- Re-enqueue until deployments are available. This make sure resources can be reconciled properly.
Release Note
Proper order is enforced now during manifest installation.
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-sigs/prow repository.
| return nil | ||
| } | ||
|
|
||
| func InstallWebhookConfigs(ctx context.Context, manifest *mf.Manifest, instance base.KComponent) error { |
There was a problem hiding this comment.
Golint comments: exported function InstallWebhookConfigs should have comment or be unexported. More info.
pkg/reconciler/common/install.go
Outdated
| return nil | ||
| } | ||
|
|
||
| func InstallWebhookDepResources(ctx context.Context, manifest *mf.Manifest, instance base.KComponent) error { |
There was a problem hiding this comment.
Golint comments: exported function InstallWebhookDepResources should have comment or be unexported. More info.
| return nil | ||
| } | ||
|
|
||
| func MarkStatusSuccess(ctx context.Context, manifest *mf.Manifest, instance base.KComponent) error { |
There was a problem hiding this comment.
Golint comments: exported function MarkStatusSuccess should have comment or be unexported. More info.
| return nil | ||
| } | ||
|
|
||
| func SetManifestPaths(ctx context.Context, manifest *mf.Manifest, instance base.KComponent) error { |
There was a problem hiding this comment.
Golint comments: exported function SetManifestPaths should have comment or be unexported. More info.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2010 +/- ##
==========================================
+ Coverage 62.76% 62.81% +0.04%
==========================================
Files 49 49
Lines 2291 2294 +3
==========================================
+ Hits 1438 1441 +3
Misses 761 761
Partials 92 92 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Istio cni is not coming up for e2e tests |
|
|
verify should be fixed with #2011 |
|
@houshengbo gentle ping. |
pkg/reconciler/common/deployments.go
Outdated
| if len(nonReadyDeployments) > 0 { | ||
| status.MarkDeploymentsNotReady(nonReadyDeployments) | ||
| return nil | ||
| return controller.NewRequeueAfter(1 * time.Second) |
There was a problem hiding this comment.
Do we need to requeue blindly as this could create a hard loop when there is not actual progress?
The controllers are setting up informers for deployments, so the resource will get requeued anyway when they change (including when they become ready)
operator/pkg/reconciler/knativeeventing/controller.go
Lines 71 to 74 in 59db3c0
operator/pkg/reconciler/knativeserving/controller.go
Lines 71 to 74 in 59db3c0
There was a problem hiding this comment.
and if that's not happening, then the informer handling is where we need to tweak to fix the issue
There was a problem hiding this comment.
I am aware of that, I wanted to make sure it happens faster in case something is slow.
The idea is that you cannot progress with an install if your deployments are not up and I wanted to enforce that. So it is not exactly blindly done.
There was a problem hiding this comment.
The other thing is that if I dont re-enqueue there and block the logic we still face the problem (an error is printed) as the dependent resources will be deployed e.g. Certificate. We need to interrupt the deployment (returning an error) or block until deployments are up. I have tested both options, here I have the former.
There was a problem hiding this comment.
These are the stages:
stages := common.Stages{
common.AppendTarget,
ingress.AppendTargetIngress,
security.AppendTargetSecurity,
common.AppendAdditionalManifests,
r.appendExtensionManifests,
r.transform,
manifests.Install,
common.CheckDeployments, // <- Make sure we are up here otherwise don't progress bellow
common.InstallWebhookConfigs,
common.InstallWebhookDependentResources,
manifests.SetManifestPaths,
common.MarkStatusSuccess,
common.DeleteObsoleteResources(ctx, ks, r.installed),
}
|
@pierDipi I removed the re-enqueue thing and now I just skip the next stages until we are up. If no deployment change happens no reconciliation will happen. |
|
@houshengbo gentle ping |
|
@skonto I just fixed the CI issue, could you rebase this PR? |
|
Sure. |
pkg/reconciler/common/install.go
Outdated
| role mf.Predicate = mf.Any(mf.ByKind("ClusterRole"), mf.ByKind("Role")) | ||
| rolebinding mf.Predicate = mf.Any(mf.ByKind("ClusterRoleBinding"), mf.ByKind("RoleBinding")) | ||
| webhook mf.Predicate = mf.Any(mf.ByKind("MutatingWebhookConfiguration"), mf.ByKind("ValidatingWebhookConfiguration")) | ||
| webhookDependentResources mf.Predicate = mf.ByGVK(schema.GroupVersionKind{Group: "networking.internal.knative.dev", Version: "v1alpha1", Kind: "Certificate"}) |
There was a problem hiding this comment.
Do we need to specify Version: "v1alpha1" here, as it may change in future? If version is empty, it will just return a GroupKind. It should be fine, right?
There was a problem hiding this comment.
@houshengbo I added a new predicate ByGK because ByGVK
func ByGVK(gvk schema.GroupVersionKind) Predicate {
return func(u *unstructured.Unstructured) bool {
return u.GroupVersionKind() == gvk
}
}
would not work, as u will have a version so I cannot leave version as empty, comparison would fail.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: houshengbo, skonto 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 |
|
@dsimansk: GitHub didn't allow me to request PR reviews from the following users: skonto. Note that only knative members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
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-sigs/prow repository. |
|
@dsimansk: #2010 failed to apply on top of branch "release-1.15": DetailsIn response to this:
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-sigs/prow repository. |
|
/cherry-pick release-1.16 |
|
/cherry-pick release-1.17 |
|
@dsimansk: new pull request created: #2034 DetailsIn response to this:
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-sigs/prow repository. |
|
@dsimansk: new pull request created: #2035 DetailsIn response to this:
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-sigs/prow repository. |
* Wait for deployments * enable telemetry to debug * fix Istio cni * typos etc * lint * skip net stages if deployments are not ready * fix tests * use gk only for Certificate

Fixes #2009
Proposed Changes
Release Note