Skip to content

Commit

Permalink
feat(api): 3rd party resource renaming
Browse files Browse the repository at this point in the history
- Resource Management:
  - Rename resources to avoid naming clashes.

- CDI Changes:
  - Add 'DVPInternal' prefix to enhance naming clarity.
  - Implement fixes and patches for stability improvements.
  - Introduce non-buffered writer for object watch streams to prevent rewrite.
  - Patches for kubevirt-operator:
    - Patch port in kubevirt webhooks, remove 'WEBHOOK_PROXY=no', add rules covering all known webhook paths.

- Kubevirt Adjustments:
  - VM controller enhancements:
    - Add subscription to detect VMI phase changes.
    - Force 'application/json' in vm-controller for consistent data handling.
    - Simplify ownerReferences renaming to reduce complexity.
  - Virtualization-controller adjustments:
    - Fix proxy settings in deployment.
    - Prioritize proxy container, add 'default-container' annotations to streamline operations.
    - Address goroutines deadlock and potential DATA RACEs in kube proxy.
    - Remove debugging and development-time code for production readiness.
  - Minor:
    - Fix renamed field in VM status.
    - Add certmanager to automatically reload certificates from updated Secrets.
    - Introduce Cyrillic linter to support non-Latin scripts.
    - Change contentType from Error to Warning to reduce log severity.

- Template Enhancements:
  - Rewrite templates to unify configuration settings:
    - Use 'KUBECONFIG' environment variable across all CDI and Kubevirt controllers.
    - Consolidate configurations into a single template for no-webhook-proxy setup.
  - Fix template issues to ensure stability and correctness.

Signed-off-by: Aleksei Igrychev <[email protected]>
Signed-off-by: Yaroslav Borbat <[email protected]>
Signed-off-by: Ivan Mikheykin <[email protected]>
  • Loading branch information
diafour authored and alexey-igrychev committed May 2, 2024
1 parent 966982d commit 9aaa05d
Show file tree
Hide file tree
Showing 96 changed files with 8,692 additions and 1,670 deletions.
18 changes: 10 additions & 8 deletions crds/embedded/cdi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
name: cdis.x.virtualization.deckhouse.io
name: dvpinternalcdis.internal.virtualization.deckhouse.io
spec:
group: x.virtualization.deckhouse.io
group: internal.virtualization.deckhouse.io
names:
kind: CDI
listKind: CDIList
plural: cdis
categories:
- dvpinternal
kind: DVPInternalCDI
listKind: DVPInternalCDIList
plural: dvpinternalcdis
shortNames:
- xcdi
- xcdis
singular: cdi
- dvpcdi
- dvpcdis
singular: dvpinternalcdi
scope: Cluster
versions:
- additionalPrinterColumns:
Expand Down
15 changes: 9 additions & 6 deletions crds/embedded/kubevirt.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
# Source:
# https://github.com/kubevirt/kubevirt/releases/download/v1.0.0/kubevirt-operator.yaml
# Changes:
# - 2024.04.16
# - Add prefixes xinternal, XInternal
# - 2023.12.12
# - Add x.virtualization.deckhouse prefix
# - Remove short names.
# - Remove all category, add kubevirt category.

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
operator.kubevirt.io: ""
name: kubevirts.x.virtualization.deckhouse.io
name: dvpinternalkubevirts.internal.virtualization.deckhouse.io
spec:
group: x.virtualization.deckhouse.io
group: internal.virtualization.deckhouse.io
names:
categories:
- kubevirt
kind: KubeVirt
plural: kubevirts
singular: kubevirt
- dvpinternal
kind: DVPInternalKubeVirt
plural: dvpinternalkubevirts
singular: dvpinternalkubevirt
scope: Namespaced
versions:
- additionalPrinterColumns:
Expand Down
4 changes: 2 additions & 2 deletions docs/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,12 @@ kind: VirtualMachineBlockDeviceAttachment
metadata:
name: vmd-blank-attachment
spec:
virtualMachine: linux-vm # имя виртуальной машины, к которой будет подключен диск
virtualMachine: linux-vm # Name of the virtual machine to attach disk to.
blockDevice:
type: ObjectRef
objectRef:
kind: VirtualDisk
name: vmd-blank # имя подключаемого диска
name: vmd-blank # Name of the disk that should be attached.
```

If you change the machine name in this resource to another machine name, the disk will be reconnected from one virtual machine to another.
Expand Down
2 changes: 1 addition & 1 deletion images/cdi-apiserver/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
image: {{ $.ImageName }}
fromImage: base-scratch
import:
- artifact: cdi-artifact
- image: cdi-artifact
add: /images/kubevirt/{{ $.ImageName }}:latest
excludePaths:
- 'sys'
Expand Down
Loading

0 comments on commit 9aaa05d

Please sign in to comment.