Skip to content

Complete webhook validation for topology references#531

Merged
openshift-merge-bot[bot] merged 1 commit intoopenstack-k8s-operators:mainfrom
fmount:topologyref_webhook
Mar 24, 2025
Merged

Complete webhook validation for topology references#531
openshift-merge-bot[bot] merged 1 commit intoopenstack-k8s-operators:mainfrom
fmount:topologyref_webhook

Conversation

@fmount
Copy link
Copy Markdown
Contributor

@fmount fmount commented Mar 20, 2025

This patch is a follow up of [1] in the validation webhook area. It enhances the validation workflow and it aims to complete the pattern by distributing the ValidateTopology logic across the API instances.
It is based on [2] and the key improvements include:

  • Distributed validation: it provides a ValidateTopology function across all API instances, ensuring consistent validation throughout the system
  • Optimized validation calls: it refines how validation is triggered and reduce code duplication; it still requires a basic struct refactor to fully de-duplicate the existing functions, but it can be done as part of a follow up

This patch leverages the centralized topology validator introduced in infra-operator [3].

Jira: https://issues.redhat.com/browse/OSPRH-14626

[1] openstack-k8s-operators#924
[2] openstack-k8s-operators/nova-operator#936
[3] openstack-k8s-operators/infra-operator#356

@fmount fmount requested a review from stuggi March 20, 2025 13:16
@openshift-ci openshift-ci bot requested a review from juliakreger March 20, 2025 13:16
@fmount fmount force-pushed the topologyref_webhook branch from af5f9d9 to b33678b Compare March 21, 2025 15:11
@fmount fmount requested a review from steveb March 21, 2025 15:12
This patch is a follow up of [1] in the validation webhook area. It
enhances the validation workflow and it aims to complete the pattern by
distributing the ValidateTopology logic across the API instances. It is
based on [2] and the key improvements include:

- Distributed validation: it provides a ValidateTopology function across
  all API instances, ensuring consistent validation throughout the
  system
- Optimized validation calls: it refines how validation is triggered and
  reduce code duplication; it still requires a basic struct refactor to
  fully de-duplicate the existing functions, but it can be done as part
  of a follow up

This patch leverages the centralized topology validator introduced in
infra-operator [3].

Jira: https://issues.redhat.com/browse/OSPRH-14626

[1] openstack-k8s-operators#924
[2] openstack-k8s-operators/nova-operator#936
[3] openstack-k8s-operators/infra-operator#356

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
Copy link
Copy Markdown
Collaborator

@steveb steveb left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Copy Markdown
Contributor

@stuggi stuggi left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fmount, stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@openshift-merge-bot openshift-merge-bot bot merged commit 28c1a73 into openstack-k8s-operators:main Mar 24, 2025
7 checks passed
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.

3 participants