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

Improve KnativeEventing finalization for TLS resources #1590

Merged

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Oct 9, 2023

For optional resources like cert-manager's Certificates and Issuers, we don't
want to fail finalization when such operators are not installed, so during
finalization, we split the resources in

  • optional resources (TLS resources, etc)
  • resources (core k8s resources)

Then, we delete resources first and after we delete optional resources
while also ignoring errors returned when such operators are not instaled.

@pierDipi pierDipi requested review from matzew and creydr October 9, 2023 15:04
@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 9, 2023
@knative-prow knative-prow bot requested a review from houshengbo October 9, 2023 15:04
For optional resources like cert-manager's Certificates and Issuers, we don't
want to fail finalization when such operators are not installed, so during
finalization, we split the resources in
- optional resources (TLS resources, etc)
- resources (core k8s resources)

Then, we delete `resources` first and after we delete optional resources
while also ignoring errors returned when such operators are not instaled.

Signed-off-by: Pierangelo Di Pilato <[email protected]>
@pierDipi pierDipi force-pushed the improve-eventing-finalization-for-tls branch from 2584610 to 6fd2b9c Compare October 9, 2023 15:08
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (8412d98) 79.40% compared to head (6fd2b9c) 79.40%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1590   +/-   ##
=======================================
  Coverage   79.40%   79.40%           
=======================================
  Files          41       41           
  Lines        1845     1845           
=======================================
  Hits         1465     1465           
  Misses        277      277           
  Partials      103      103           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pierDipi
Copy link
Member Author

pierDipi commented Oct 9, 2023

/cherry-pick release-1.11

@knative-prow-robot
Copy link
Contributor

@pierDipi: once the present PR merges, I will cherry-pick it on top of release-1.11 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.11

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.

Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2023
@knative-prow
Copy link

knative-prow bot commented Oct 9, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, pierDipi

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 knative-prow bot merged commit 3670be5 into knative:main Oct 9, 2023
17 checks passed
@knative-prow-robot
Copy link
Contributor

@pierDipi: failed to push cherry-picked changes in GitHub: pushToNamedFork is not implemented in the v2 client

In response to this:

/cherry-pick release-1.11

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.

@pierDipi
Copy link
Member Author

pierDipi commented Oct 9, 2023

/cherry-pick release-1.11

@pierDipi pierDipi deleted the improve-eventing-finalization-for-tls branch October 9, 2023 15:54
@knative-prow-robot
Copy link
Contributor

@pierDipi: failed to push cherry-picked changes in GitHub: pushToNamedFork is not implemented in the v2 client

In response to this:

/cherry-pick release-1.11

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.

pierDipi added a commit to pierDipi/operator that referenced this pull request Oct 9, 2023
For optional resources like cert-manager's Certificates and Issuers, we don't
want to fail finalization when such operators are not installed, so during
finalization, we split the resources in
- optional resources (TLS resources, etc)
- resources (core k8s resources)

Then, we delete `resources` first and after we delete optional resources
while also ignoring errors returned when such operators are not instaled.

Signed-off-by: Pierangelo Di Pilato <[email protected]>
@pierDipi
Copy link
Member Author

pierDipi commented Oct 9, 2023

Done manually #1591, bot is broken kubernetes/test-infra#30937

knative-prow bot pushed a commit that referenced this pull request Oct 9, 2023
…#1590) (#1591)

* Improve KnativeEventing finalization for TLS resources (#1590)

For optional resources like cert-manager's Certificates and Issuers, we don't
want to fail finalization when such operators are not installed, so during
finalization, we split the resources in
- optional resources (TLS resources, etc)
- resources (core k8s resources)

Then, we delete `resources` first and after we delete optional resources
while also ignoring errors returned when such operators are not instaled.

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Improve manifest deletion error handling

It might happen that not all resources were created successfully
so we should not fail finalization when resources are not found,
we can just ignore not found errors.

Signed-off-by: Pierangelo Di Pilato <[email protected]>

---------

Signed-off-by: Pierangelo Di Pilato <[email protected]>
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. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants