Skip to content
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

✨ (go/v4): Add Hub and Spoke for conversion webhooks #4254

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented Oct 30, 2024

This PR introduces the initial implementation of the hub-and-spoke model for handling conversion webhooks. The goal is to streamline the conversion process by utilizing a central hub to speak a specific version of the same Group and Kind.

How It Will Work:

  • Single Spoke Support (A to B, Same Kind and Group):
    The system will allow only one spoke version for conversions (i.e., converting from Version A to Version B within the same kind and group).

  • Future Expansion (List of GKV Spokes):
    In the future, based on user feedback or demand, we can expand to support a list of GKV spokes, allowing for greater flexibility in conversions across different versions, kinds, and groups.

  • Advanced Case Handling (Manual Steps):
    For more advanced cases, users can proceed without specifying a spoke. In this scenario, the conversion process will still occur without the spoke, enabling users to continue. However, they will be required to complete specific advanced steps manually.

Closes; #2589

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 30, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 30, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 30, 2024
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 31, 2024
@camilamacedo86 camilamacedo86 marked this pull request as ready for review October 31, 2024 19:10
@camilamacedo86 camilamacedo86 changed the title WIP: Changes Webhooks - Add Hub and Spoke ✨ Add Hub and Spoke for conversion webhooks Oct 31, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 31, 2024
@camilamacedo86 camilamacedo86 changed the title ✨ Add Hub and Spoke for conversion webhooks ✨ (kustomize/v2, go/v4): Add Hub and Spoke for conversion webhooks Nov 2, 2024
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this pull request Nov 2, 2024
The CA injection patch has **not** worked for `go/v4` and `kustomize/v2` (release `3.5.0`) due to the need to replace `vars` with `replacements`, as `vars` are no longer supported in the latest major versions of Kustomize.

However, since webhook `--conversion` was an incomplete feature until the upcoming Kubebuilder future release `v4.4.0` (where [PR kubernetes-sigs#4254](kubernetes-sigs#4254) is expected to be merged), users likely didn’t encounter this issue or addressed it manually by fixing the scaffold.

**Note:** This change only affects projects that require a **conversion webhook**.
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this pull request Nov 9, 2024
The CA injection patch has **not** worked for `go/v4` and `kustomize/v2` (release `3.5.0`) due to the need to replace `vars` with `replacements`, as `vars` are no longer supported in the latest major versions of Kustomize.

However, since webhook `--conversion` was an incomplete feature until the upcoming Kubebuilder future release `v4.4.0` (where [PR kubernetes-sigs#4254](kubernetes-sigs#4254) is expected to be merged), users likely didn’t encounter this issue or addressed it manually by fixing the scaffold.

**Note:** This change only affects projects that require a **conversion webhook**.
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this pull request Nov 9, 2024
The CA injection patch has **not** worked for `go/v4` and `kustomize/v2` (release `3.5.0`) due to the need to replace `vars` with `replacements`, as `vars` are no longer supported in the latest major versions of Kustomize.

However, since webhook `--conversion` was an incomplete feature until the upcoming Kubebuilder future release `v4.4.0` (where [PR kubernetes-sigs#4254](kubernetes-sigs#4254) is expected to be merged), users likely didn’t encounter this issue or addressed it manually by fixing the scaffold.

**Note:** This change only affects projects that require a **conversion webhook**.
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this pull request Nov 10, 2024
The CA injection patch has **not** worked for `go/v4` and `kustomize/v2` (release `3.5.0`) due to the need to replace `vars` with `replacements`, as `vars` are no longer supported in the latest major versions of Kustomize.

However, since webhook `--conversion` was an incomplete feature until the upcoming Kubebuilder future release `v4.4.0` (where [PR kubernetes-sigs#4254](kubernetes-sigs#4254) is expected to be merged), users likely didn’t encounter this issue or addressed it manually by fixing the scaffold.

**Note:** This change only affects projects that require a **conversion webhook**.
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this pull request Nov 10, 2024
The CA injection patch has **not** worked for `go/v4` and `kustomize/v2` (release `3.5.0`) due to the need to replace `vars` with `replacements`, as `vars` are no longer supported in the latest major versions of Kustomize.

However, since webhook `--conversion` was an incomplete feature until the upcoming Kubebuilder future release `v4.4.0` (where [PR kubernetes-sigs#4254](kubernetes-sigs#4254) is expected to be merged), users likely didn’t encounter this issue or addressed it manually by fixing the scaffold.

**Note:** This change only affects projects that require a **conversion webhook**.
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 10, 2024
@camilamacedo86 camilamacedo86 changed the title (WIP - We need to address the review comments) ✨ (kustomize/v2, go/v4): Add Hub and Spoke for conversion webhooks ✨ (kustomize/v2, go/v4): Add Hub and Spoke for conversion webhooks Nov 10, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 10, 2024
defaulting: true
spoke:
- v2
- v2
Copy link
Member Author

@camilamacedo86 camilamacedo86 Nov 10, 2024

Choose a reason for hiding this comment

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

@varshaprasad96

Would having many spokes make sense in this scenario? It might make more sense to convert V1 into another group(s), kind(s), like combining V1 and V2 or something similar.

I think we can have for now

  • allow just one spoke version from A to B (Same Kind and Group)
  • in the future, if we see what the users ask for, we can expand to support a list of GKV spokes.
  • For advanced cases, users can move forward without informing the spoke. The conversion happens without the spoke. This allows users to use it still, but they must complete advanced steps manually.

Do you think this approach makes sense?

@camilamacedo86 camilamacedo86 changed the title ✨ (kustomize/v2, go/v4): Add Hub and Spoke for conversion webhooks ✨ (go/v4): Add Hub and Spoke for conversion webhooks Nov 10, 2024
This PR introduces the initial implementation of the hub-and-spoke model for handling conversion webhooks. The goal is to streamline the conversion process by utilizing a central hub to speak a specific version of the same Group and Kind.

- **Single Spoke Support (A to B, Same Kind and Group):**
  The system will allow only one spoke version for conversions (i.e., converting from Version A to Version B within the same kind and group).

- **Future Expansion (List of GKV Spokes):**
  In the future, based on user feedback or demand, we can expand to support a list of **GKV spokes**, allowing for greater flexibility in conversions across different versions, kinds, and groups.

- **Advanced Case Handling (Manual Steps):**
  For more advanced cases, users can proceed without specifying a spoke. In this scenario, the conversion process will still occur without the spoke, enabling users to continue. However, they will be required to complete specific advanced steps manually.

Closes; kubernetes-sigs#2589
@camilamacedo86
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants