Skip to content

v2alpha1 as stored version #1777

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

kubicar
Copy link
Contributor

@kubicar kubicar commented Mar 12, 2025

Description

Changes proposed in this pull request:

This PR implements a complete conversion and mutating webhook system for APIRule resources
across multiple API versions (v1beta1, v2alpha1, v2) with v2alpha1 as the hub version.

Key changes:

  • Implement conversion logic (ConvertTo/ConvertFrom) between v1beta1, v2alpha1, and v2
  • Configure v2alpha1 as the storage/hub version
  • Add robust annotation handling for tracking original versions
  • Implement compatibility checks for safe conversions
  • Add comprehensive test coverage for conversion scenarios
  • Fix reconciliation to properly handle version differences
  • Add improved logging for debugging conversion issues
  • Optimize handling of error states during gateway discovery

Pre-Merge Checklist

  • As a PR reviewer, verify code coverage and evaluate if it is acceptable.

Related issues

@kubicar kubicar force-pushed the api-gateway-1727 branch 2 times, most recently from 97b8453 to 92b4172 Compare March 18, 2025 14:52
@kubicar kubicar marked this pull request as ready for review March 18, 2025 15:00
@kubicar kubicar requested a review from a team as a code owner March 18, 2025 15:00
@kubicar kubicar mentioned this pull request Apr 2, 2025
14 tasks
@mluk-sap mluk-sap self-requested a review April 8, 2025 10:13
@barchw
Copy link
Contributor

barchw commented Apr 28, 2025

Tested migration: v1beta1 -> v2alpha1 -> v2 with success
logs.zip

@@ -64,7 +64,7 @@ func (s *scenario) thereIsApiRuleVirtualServiceWithHttpbinServiceDestination() e

func (s *scenario) resourceOwnedByApiRuleDoesNotExist(resourceKind string) error {
res := resource.GetResourceGvr(resourceKind)
ownerLabelSelector := fmt.Sprintf("apirule.gateway.kyma-project.io/v1beta1=%s-%s.%s", s.name, s.TestID, s.Namespace)
ownerLabelSelector := fmt.Sprintf("apirule.gateway.kyma-project.io/v2alpha1=%s-%s.%s", s.name, s.TestID, s.Namespace)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was the ownerlabel switched here?

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