Skip to content

Conversation

@reoring
Copy link
Contributor

@reoring reoring commented Oct 26, 2025

v1beta2

- Added v1beta2 API types and conversion logic for CAPTCluster, CAPTControlPlane, and their templates.
- Updated CRDs to serve v1beta1 and store v1beta2 versions.
- Implemented conversion webhook for handling API version transitions.
- Enhanced Makefile and kustomization files for new API versioning and webhook integration.
- Added end-to-end tests for conversion roundtrip functionality.
- Updated dependencies in go.mod and go.sum for compatibility with new features.
…eta1 resources

- Changed API versions in cluster-template.yaml, samples, and templates from v1beta1 to v1beta2.
- Added conversion functions for CaptMachineSet, CaptMachineDeployment, WorkspaceTemplate, and WorkspaceTemplateApply to facilitate transitions between v1beta1 and v1beta2.
- Updated conversion webhook configurations to only support v1.
- Enhanced end-to-end tests to verify conversion functionality for new and existing resources.
…hineDeployment, CaptMachineSet, WorkspaceTemplate, and WorkspaceTemplateApply
…chineSet, WorkspaceTemplate, and WorkspaceTemplateApply

- Streamlined conversion functions by removing redundant nil checks and directly assigning spec fields.
- Updated conversion webhook configuration to support only v1.
- Enhanced end-to-end tests to verify conversion roundtrip functionality for both v1beta1 and v1beta2 resources.
- Added pull request triggers for opened, synchronize, reopened, and ready_for_review events to the smoke test workflow.
…me-merge patches; add CA injection to MWC/VWC/CRDs; add webhook readiness to e2e
…logy; expose workspace via status\n\n- Add status.workspaceTemplateStatus.workspaceName to CAPTControlPlane/CAPTCluster (v1beta1/v1beta2) and conversions\n- Resolve deterministic WorkspaceTemplateApply names without writing to spec.WorkspaceTemplateApplyName\n- Populate status with actual Terraform workspace name\n- Update unit tests to assert deterministic naming and status-based observability\n\nBREAKING-CHANGE: controllers no longer write spec.workspaceTemplateApplyName under ClusterTopology (field retained for compatibility)
…deterministic WTA naming\n\n- CHANGELOG: include in v0.5.0 (Added/Changed/Deprecated/Notes)\n- README: topology immutability and status-based observability\n- CAPTEP-0055: spec-to-status migration design and rollout\n\nRefs: #v0.5.0
…paceTemplateStatus.workspaceName (v1beta1/v1beta2)\n\n- Update generated schemas in control-plane and infrastructure bundles\n- Reflect new workspaceName field for observability
…bservability\n\n- Use WorkspaceTemplateApply.status.workspaceName in test fixtures\n- Keep endpoint/secret assertions unchanged
…ate manifests\n\n- Implement defaulter/validator for v1beta2 with topology immutability enforcement\n- Register v1beta2 webhook in manager\n- Generate webhook manifests for v1beta2
@reoring reoring requested a review from Copilot October 28, 2025 02:28
Copy link

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.

Pull Request Overview

This PR migrates CAPT to Cluster API v1beta2 contract, introducing dual-version support (v1beta1 and v1beta2) with v1beta2 as the storage version. The update includes comprehensive webhook infrastructure improvements, conversion webhook implementation, and e2e testing enhancements.

Key Changes:

  • Introduced v1beta2 API types for all CRDs with Hub markers and conversion webhooks
  • Implemented bidirectional conversion between v1beta1 and v1beta2 versions
  • Enhanced webhook infrastructure with cert-manager integration and proper service references
  • Added comprehensive e2e tests for conversion webhook validation
  • Migrated spec writes to status-based observability for ClusterTopology immutability

Reviewed Changes

Copilot reviewed 122 out of 145 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
api/v1beta2/*.go New v1beta2 API type definitions with Hub markers
api/v1beta1/*_conversion.go Bidirectional conversion functions for v1beta1 ↔ v1beta2
config/clusterapi/*/bases/*.yaml Updated CRDs with dual version support and conversion webhooks
config/webhook/*.yaml New webhook service and configuration resources
config/certmanager/*.yaml Added cert-manager Issuer and Certificate for webhook TLS
test/e2e/scripts/conversion-webhook-kind.sh New e2e script for conversion webhook testing
internal/controller/controlplane/workspace.go Removed spec mutations for topology immutability
cmd/main.go Registered v1beta2 schemes and webhooks
Comments suppressed due to low confidence (1)

go.mod:3

  • Go version 1.24.4 does not exist. The latest stable Go version as of October 2025 should be used (likely 1.23.x). This appears to be a typo or invalid version specification.
go 1.24.4

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +33 to +34
"/home/reoring/dev/capt/config/clusterapi/infrastructure/bases",
"/home/reoring/dev/capt/config/clusterapi/controlplane/bases",
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Hardcoded absolute paths should be replaced with relative paths using filepath operations to ensure portability across different development environments.

Suggested change
"/home/reoring/dev/capt/config/clusterapi/infrastructure/bases",
"/home/reoring/dev/capt/config/clusterapi/controlplane/bases",
filepath.Join("..", "..", "config", "clusterapi", "infrastructure", "bases"),
filepath.Join("..", "..", "config", "clusterapi", "controlplane", "bases"),

Copilot uses AI. Check for mistakes.
clusterName = name
} else {
// Fallback to OwnerReference if present
const kindCluster = "Cluster"
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Duplicate constant definition. The constant kindCluster is already defined at line 36. Remove this local shadowing declaration and use the package-level constant instead.

Suggested change
const kindCluster = "Cluster"

Copilot uses AI. Check for mistakes.
@reoring reoring merged commit 83afc2a into main Oct 28, 2025
14 checks passed
reoring added a commit that referenced this pull request Oct 30, 2025
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