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

feat: proxy for renaming 3rd party resources #23

Closed
wants to merge 8 commits into from

Conversation

diafour
Copy link
Member

@diafour diafour commented Mar 13, 2024

Description

New image with kube-api-proxy component. This proxy sits between some controller and a Kubernetes API Server to make controller request original resources while resoures in cluster are renamed.

New and updated components:

  • images/kube-api-proxy — new image for sidecar container that sits between controller and Kubernetes API server
  • images/vmi-router — refactor to use IP address from VMs, moved to refactor(vmi-router): Use IP from our VirtualMachine #69
  • change artifact: to image: in werf.inc.yaml
  • cdi
    • Rename apiVersion and kind in manifests.
    • Add proxy sidecar to deployment/cdi-operator.
    • Add proxy sidecars to cdi components using strategic patches in cdi/cdi
    • Remove renaming patches.
  • kubevirt
    • Rename apiVersion and kind in manifests.
    • Add proxy sidecar to deployment/virt-operator.
    • Add proxy sidecars to cdi components using strategic patches in kubevirt/kubevirt.
    • Remove renaming patches.
  • virtualization-controller
    • Remove kubevirt API renaming in main.go.
    • Add proxy sidecar to the Deployment manifest.

Why do we need it, and what problem does it solve?

Resource renaming allows to avoid naming clashes.

What is the expected result?

  1. Resources in cluster: implementationdetailvirtualmachines.x.virtualization.deckhouse.io.
  2. virt-controller works with virtualmachines.kubevirt.io.
  3. virt-controller webhooks works as expected.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

@diafour diafour self-assigned this Mar 13, 2024
@diafour diafour marked this pull request as draft March 14, 2024 10:44
@diafour diafour added the build/self-hosted/virt-runners Run jobs on virtualization git hub runners label Mar 28, 2024
@universal-itengineer universal-itengineer added build/self-hosted/virt-runners Run jobs on virtualization git hub runners and removed build/self-hosted/virt-runners Run jobs on virtualization git hub runners labels Mar 29, 2024
@diafour diafour removed the build/self-hosted/virt-runners Run jobs on virtualization git hub runners label Mar 29, 2024
@diafour diafour added build/self-hosted/virt-runners Run jobs on virtualization git hub runners and removed build/self-hosted/virt-runners Run jobs on virtualization git hub runners labels Apr 1, 2024
@universal-itengineer universal-itengineer added build/self-hosted/virt-runners Run jobs on virtualization git hub runners and removed build/self-hosted/virt-runners Run jobs on virtualization git hub runners labels Apr 1, 2024
@diafour diafour force-pushed the feat/rewrite_kv_resources branch 4 times, most recently from ad44ca2 to 3ca8c10 Compare April 17, 2024 10:38
@diafour diafour removed the build/self-hosted/virt-runners Run jobs on virtualization git hub runners label Apr 18, 2024
@diafour diafour mentioned this pull request Apr 25, 2024
4 tasks
diafour and others added 3 commits April 26, 2024 16:11
- Resource renaming allows to avoid naming clashes.

Signed-off-by: Ivan Mikheykin <[email protected]>
Signed-off-by: Yaroslav Borbat <[email protected]>
++ fixes and patches
++ non buffered writer for watch streams of objects without rewrite

Signed-off-by: Ivan Mikheykin <[email protected]>
yaroslavborbat and others added 5 commits April 26, 2024 16:12
Signed-off-by: yaroslavborbat <[email protected]>
++ patch port in kubevirt webhooks, remove WEBHOOK_PROXY=no, add rules with all known webhook paths

Signed-off-by: Ivan Mikheykin <[email protected]>
- Use KUBECONFIG env in all CDI and Kubevirt controllers.
- One template for no-webhook-proxy configuration.
- Cleanups.

Signed-off-by: yaroslavborbat <[email protected]>
++ vm-controller: force application/json
++ simplify ownerReferences renaming
++ fix proxy in virtualization-controler deployment
++ make proxy container first in virtualization-controller, add default-container annotations
++ fix goroutines deadlock and possible DATA RACEs in kube proxy
++ cleanup debugging and dev time code

Signed-off-by: Ivan Mikheykin <[email protected]>
Signed-off-by: yaroslavborbat <[email protected]>
@diafour diafour mentioned this pull request Apr 26, 2024
4 tasks
@diafour diafour marked this pull request as ready for review April 27, 2024 10:56
@diafour
Copy link
Member Author

diafour commented May 6, 2024

Close in favor of #73

@diafour diafour closed this May 6, 2024
@diafour diafour deleted the feat/rewrite_kv_resources branch October 16, 2024 17:42
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.

3 participants