Skip to content

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented Aug 4, 2025

What this PR does / why we need it:

Do not skip checking certificates in gateway listeners that does not has "Programmed" condition if the GatewayClass is not managed by KIC. The change fixes an issue when KIC is deployed by gateway operator, certificates gets deleted when dataplane (Kong gateway) pods are changed.

Which issue this PR fixes:

fixes #7660 (then also Kong/kong-operator#1769)

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@randmonkey randmonkey requested a review from a team as a code owner August 4, 2025 06:44
@randmonkey randmonkey force-pushed the fix/do_not_skip_gateway_listener_certs branch from 9016641 to 915a344 Compare August 4, 2025 07:51
Copy link

codecov bot commented Aug 4, 2025

Codecov Report

❌ Patch coverage is 80.43478% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.2%. Comparing base (5eea70b) to head (1aca435).
⚠️ Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
...nal/controllers/gateway/gatewayclass_controller.go 20.0% 3 Missing and 1 partial ⚠️
internal/store/store.go 66.6% 2 Missing and 1 partial ⚠️
internal/dataplane/translator/translate_certs.go 88.2% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #7666   +/-   ##
=====================================
  Coverage   77.2%   77.2%           
=====================================
  Files        222     222           
  Lines      25870   25903   +33     
=====================================
+ Hits       19994   20020   +26     
  Misses      4849    4849           
- Partials    1027    1034    +7     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@randmonkey randmonkey added this pull request to the merge queue Sep 17, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 17, 2025
@randmonkey randmonkey added this pull request to the merge queue Sep 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 18, 2025
@randmonkey randmonkey added this pull request to the merge queue Sep 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 18, 2025
@randmonkey randmonkey added this pull request to the merge queue Sep 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 18, 2025
@randmonkey randmonkey added this pull request to the merge queue Sep 18, 2025
Merged via the queue into main with commit 2562662 Sep 18, 2025
42 checks passed
@randmonkey randmonkey deleted the fix/do_not_skip_gateway_listener_certs branch September 18, 2025 08:45
@team-k8s-bot
Copy link
Collaborator

The backport to release/3.4.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.4.x release/3.4.x
# Navigate to the new working tree
cd .worktrees/backport-release/3.4.x
# Create a new branch
git switch --create backport-7666-to-release/3.4.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 25626627e3c762ac3cc12a0637b5802126b913be
# Push it to GitHub
git push --set-upstream origin backport-7666-to-release/3.4.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.4.x

Then, create a pull request where the base branch is release/3.4.x and the compare/head branch is backport-7666-to-release/3.4.x.

team-k8s-bot pushed a commit that referenced this pull request Sep 18, 2025
…ateway class is not managed by KIC (#7666)

* check gateway class and do not skip listeners when gateway class is not managed by KIC

* update changelog

* store gatewayclass into cache in gwc controller

* fix comments and move gwc controller name check after getting gwc

(cherry picked from commit 2562662)
@team-k8s-bot
Copy link
Collaborator

The backport to release/2.12.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/2.12.x release/2.12.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.12.x
# Create a new branch
git switch --create backport-7666-to-release/2.12.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 25626627e3c762ac3cc12a0637b5802126b913be
# Push it to GitHub
git push --set-upstream origin backport-7666-to-release/2.12.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.12.x

Then, create a pull request where the base branch is release/2.12.x and the compare/head branch is backport-7666-to-release/2.12.x.

randmonkey added a commit that referenced this pull request Sep 19, 2025
…not skip listeners when gateway class is not managed by KIC (#7711)

* fix(translator): check gateway class and do not skip listeners when gateway class is not managed by KIC (#7666)

* check gateway class and do not skip listeners when gateway class is not managed by KIC

* update changelog

* store gatewayclass into cache in gwc controller

* fix comments and move gwc controller name check after getting gwc

(cherry picked from commit 2562662)

* fix changlog

---------

Co-authored-by: Tao Yi <[email protected]>
randmonkey added a commit that referenced this pull request Sep 19, 2025
…ateway class is not managed by KIC (#7666)

* check gateway class and do not skip listeners when gateway class is not managed by KIC

* update changelog

* store gatewayclass into cache in gwc controller

* fix comments and move gwc controller name check after getting gwc

(cherry picked from commit 2562662)
randmonkey added a commit that referenced this pull request Sep 23, 2025
…ateway class is not managed by KIC (#7666)

* check gateway class and do not skip listeners when gateway class is not managed by KIC

* update changelog

* store gatewayclass into cache in gwc controller

* fix comments and move gwc controller name check after getting gwc

(cherry picked from commit 2562662)
randmonkey added a commit that referenced this pull request Sep 24, 2025
…not skip listeners when gateway class is not managed by KIC (#7718)

* fix(translator): check gateway class and do not skip listeners when gateway class is not managed by KIC (#7666)

* check gateway class and do not skip listeners when gateway class is not managed by KIC

* update changelog

* store gatewayclass into cache in gwc controller

* fix comments and move gwc controller name check after getting gwc

(cherry picked from commit 2562662)

* fix changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not skip certificates for not programmed listeners
3 participants