Skip to content

Conversation

@dspo
Copy link
Contributor

@dspo dspo commented Apr 28, 2025

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

Add webhook to prevent GatewayClass from being deleted when referenced by gateway

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

dspo added 4 commits April 28, 2025 10:08
This commit introduces a validating webhook for GatewayClass resources, preventing deletion when in use by Gateways. It adds the necessary configuration files, including service definitions, kustomization files, and RBAC rules. The implementation includes both create/update/delete validation logic and corresponding unit tests using Ginkgo. Additionally, it sets up cert-manager configurations for webhook certificates and updates the Makefile to deploy webhook configurations during installation.
This commit removes all webhook-related and cert-manager configurations, including certificates,
issuers, network policies, and associated tests. The changes also update the Kustomize setup and
related manifests to eliminate webhook support entirely.
Clean up redundant license header, TODOs, and unused variables to streamline the code. This improves readability and focuses on the essential functionality of the webhook setup.
@dspo dspo requested a review from Copilot April 28, 2025 09:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@dspo dspo changed the title Add webhook to prevent GatewayClass from being deleted when referenced by gateway chore: Add webhook to prevent GatewayClass from being deleted when referenced by gateway Apr 28, 2025
@github-actions
Copy link
Contributor

conformance test report

apiVersion: gateway.networking.k8s.io/v1
date: "2025-04-28T10:00:59Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
  contact: null
  organization: API7
  project: api7-ingress-controller
  url: https://github.com/api7/api7-ingress-controller.git
  version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
    result: partial
    skippedTests:
    - GatewayInvalidTLSConfiguration
    - GatewaySecretInvalidReferenceGrant
    - GatewaySecretMissingReferenceGrant
    - GatewaySecretReferenceGrantAllInNamespace
    - GatewaySecretReferenceGrantSpecific
    - HTTPRouteExactPathMatching
    - HTTPRouteHTTPSListener
    - HTTPRouteHeaderMatching
    - HTTPRouteHostnameIntersection
    - HTTPRouteInvalidBackendRefUnknownKind
    - HTTPRouteInvalidCrossNamespaceBackendRef
    - HTTPRouteInvalidCrossNamespaceParentRef
    - HTTPRouteInvalidNonExistentBackendRef
    - HTTPRouteInvalidParentRefNotMatchingSectionName
    - HTTPRouteInvalidReferenceGrant
    - HTTPRouteListenerHostnameMatching
    - HTTPRouteMatching
    - HTTPRouteMatchingAcrossRoutes
    - HTTPRoutePartiallyInvalidViaInvalidReferenceGrant
    - HTTPRouteReferenceGrant
    - HTTPRouteRequestHeaderModifier
    - HTTPRouteWeight
    statistics:
      Failed: 0
      Passed: 11
      Skipped: 22
  name: GATEWAY-HTTP
  summary: Core tests partially succeeded with 22 test skips.

@dspo dspo closed this Apr 29, 2025
@dspo dspo deleted the chore/delete-gatewayclass branch June 23, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants