diff --git a/deploy/00crds.yaml b/deploy/00crds.yaml index 3d51ef8..5e037a3 100644 --- a/deploy/00crds.yaml +++ b/deploy/00crds.yaml @@ -9,6 +9,388 @@ metadata: --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: bmconfigs.vjailbreak.k8s.pf9.io +spec: + group: vjailbreak.k8s.pf9.io + names: + kind: BMConfig + listKind: BMConfigList + plural: bmconfigs + singular: bmconfig + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + BMConfig is the Schema for the bmconfigs API that defines authentication and configuration + details for Bare Metal Controller (BMC) providers such as MAAS. It contains credentials, + connection information, and boot source configurations needed to provision physical hosts + for use during the ESXi to PCD migration process. BMConfig enables the automatic + provisioning of PCD hosts as replacement infrastructure for migrated ESXi hosts. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: BMConfigSpec defines the desired state of BMConfig + properties: + apiKey: + description: APIKey is the API key for the BM server + type: string + apiUrl: + description: APIUrl is the API URL for the BM server + type: string + bootSource: + description: BootSource is the boot source for the BMC + properties: + release: + default: jammy + description: Release is the OS release version to be used (e.g., + "jammy" for Ubuntu 22.04) + type: string + required: + - release + type: object + insecure: + default: false + description: Insecure is a boolean indicating whether to use insecure + connection + type: boolean + password: + description: Password is the password for the BM server + type: string + providerType: + default: MAAS + description: ProviderType is the BMC provider type + type: string + userDataSecretRef: + description: UserDataSecretRef is the reference to the secret containing + user data for the BMC + properties: + name: + description: name is unique within a namespace to reference a + secret resource. + type: string + namespace: + description: namespace defines the space within which the secret + name must be unique. + type: string + type: object + x-kubernetes-map-type: atomic + userName: + description: UserName is the username for the BM server + type: string + required: + - apiKey + - apiUrl + - providerType + type: object + status: + description: BMConfigStatus defines the observed state of BMConfig + properties: + validationMessage: + description: ValidationMessage is the message associated with the + validation + type: string + validationStatus: + description: ValidationStatus is the status of the validation + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: clustermigrations.vjailbreak.k8s.pf9.io +spec: + group: vjailbreak.k8s.pf9.io + names: + kind: ClusterMigration + listKind: ClusterMigrationList + plural: clustermigrations + singular: clustermigration + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .status.currentESXI + name: Current ESXI + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + ClusterMigration is the Schema for the clustermigrations API that orchestrates the migration + of an entire VMware vCenter cluster to Platform9 Distributed Cloud (PCD). + It manages the ordered migration of ESXi hosts within a cluster, tracking progress + and maintaining references to required credentials and migration plans. + ClusterMigration resources coordinate with ESXIMigration resources to ensure + hosts are migrated in the correct sequence with proper dependency management. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: ClusterMigrationSpec defines the desired state of ClusterMigration + properties: + clusterName: + description: ClusterName is the name of the vCenter cluster to be + migrated + type: string + esxiMigrationSequence: + description: ESXIMigrationSequence is the sequence of ESXi hosts to + be migrated + items: + type: string + type: array + openstackCredsRef: + description: OpenstackCredsRef is the reference to the OpenStack credentials + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + rollingMigrationPlanRef: + description: RollingMigrationPlanRef is the reference to the RollingMigrationPlan + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + vmwareCredsRef: + description: VMwareCredsRef is the reference to the VMware credentials + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + required: + - clusterName + - esxiMigrationSequence + - openstackCredsRef + - rollingMigrationPlanRef + - vmwareCredsRef + type: object + status: + description: ClusterMigrationStatus defines the observed state of ClusterMigration + properties: + currentESXi: + description: CurrentESXi is the name of the current ESXi host being + migrated + type: string + message: + description: Message is the message associated with the current state + of the migration + type: string + phase: + description: Phase is the current phase of the migration + enum: + - Pending + - Running + - Succeeded + - Failed + - Paused + type: string + required: + - currentESXi + - message + - phase + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: esximigrations.vjailbreak.k8s.pf9.io +spec: + group: vjailbreak.k8s.pf9.io + names: + kind: ESXIMigration + listKind: ESXIMigrationList + plural: esximigrations + singular: esximigration + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + ESXIMigration is the Schema for the esximigrations API that defines + the process of migrating an ESXi host to PCD, including putting it in maintenance mode, + migrating all VMs, and finally removing it from vCenter inventory after completion + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + ESXIMigrationSpec defines the desired state of ESXIMigration including + the ESXi host to migrate and the references to credentials and migration plan + properties: + esxiName: + description: ESXiName is the name of the ESXi host to be migrated + type: string + openstackCredsRef: + description: OpenstackCredsRef is the reference to the OpenStack credentials + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + rollingMigrationPlanRef: + description: RollingMigrationPlanRef is the reference to the RollingMigrationPlan + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + vmwareCredsRef: + description: VMwareCredsRef is the reference to the VMware credentials + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + required: + - esxiName + - openstackCredsRef + - rollingMigrationPlanRef + - vmwareCredsRef + type: object + status: + description: |- + ESXIMigrationStatus defines the observed state of ESXIMigration including + the list of VMs on the host, current phase, and status messages + properties: + message: + description: Message is the message associated with the current state + of the migration + type: string + phase: + description: |- + Phase is the current phase of the migration lifecycle + The final phases include 'Succeeded' when the ESXi host has been successfully + removed from vCenter inventory after migration is complete + type: string + vms: + description: VMs is the list of VMs present on the ESXi host + items: + type: string + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.1 @@ -29,7 +411,11 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: MigrationPlan is the Schema for the migrationplans API + description: |- + MigrationPlan is the Schema for the migrationplans API that defines + how to migrate virtual machines from VMware to OpenStack including migration strategy and scheduling. + It allows administrators to configure migration parameters such as timing, health checks, + and VM-specific settings for bulk VM migration operations between environments. properties: apiVersion: description: |- @@ -49,19 +435,27 @@ spec: metadata: type: object spec: - description: MigrationPlanSpec defines the desired state of MigrationPlan + description: |- + MigrationPlanSpec defines the desired state of MigrationPlan including + the migration template, strategy, and the list of virtual machines to migrate properties: advancedOptions: + description: AdvancedOptions is a list of advanced options for the + migration properties: granularNetworks: + description: GranularNetworks is a list of networks to be migrated items: type: string type: array granularPorts: + description: GranularPorts is a list of ports to be migrated items: type: string type: array granularVolumeTypes: + description: GranularVolumeTypes is a list of volume types to + be migrated items: type: string type: array @@ -70,6 +464,8 @@ spec: default: echo "Add your startup script here!" type: string migrationStrategy: + description: MigrationStrategy is the strategy to be used for the + migration properties: adminInitiatedCutOver: default: false @@ -98,10 +494,27 @@ spec: - type type: object migrationTemplate: + description: MigrationTemplate is the template to be used for the + migration type: string + postMigrationAction: + description: PostMigrationAction defines the post migration action + for the virtual machine + properties: + folderName: + type: string + moveToFolder: + type: boolean + renameVm: + type: boolean + suffix: + type: string + type: object retry: + description: Retry the migration if it fails type: boolean virtualMachines: + description: VirtualMachines is a list of virtual machines to be migrated items: items: type: string @@ -113,11 +526,17 @@ spec: - virtualMachines type: object status: - description: MigrationPlanStatus defines the observed state of MigrationPlan + description: |- + MigrationPlanStatus defines the observed state of MigrationPlan including + the current status and progress of the migration properties: migrationMessage: + description: MigrationMessage is the message associated with the migration type: string migrationStatus: + description: |- + MigrationStatus is the status of the migration using Kubernetes PodPhase states + (Pending, Running, Succeeded, Failed, Unknown) type: string required: - migrationMessage @@ -149,12 +568,21 @@ spec: name: Phase type: string - jsonPath: .status.agentName - name: AgentName + name: Agent Name type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date name: v1alpha1 schema: openAPIV3Schema: - description: Migration is the Schema for the migrations API + description: |- + Migration is the Schema for the migrations API that represents a single virtual machine + migration job from VMware to OpenStack. It tracks the complete migration lifecycle + including validation, data transfer, disk conversion, and cutover phases. Migration resources + provide detailed status monitoring, error handling, and manual intervention points like + cutover initiation. Each Migration is associated with a MigrationPlan and executes on a specific + VjailbreakNode agent, tracking progress via status updates and condition changes. properties: apiVersion: description: |- @@ -250,6 +678,18 @@ spec: type: array phase: description: Phase is the current phase of the migration + enum: + - Pending + - Validating + - AwaitingDataCopyStart + - CopyingBlocks + - CopyingChangedBlocks + - ConvertingDisk + - AwaitingCutOverStartTime + - AwaitingAdminCutOver + - Succeeded + - Failed + - Unknown type: string required: - phase @@ -278,7 +718,12 @@ spec: - name: v1alpha1 schema: openAPIV3Schema: - description: MigrationTemplate is the Schema for the migrationtemplates API + description: |- + MigrationTemplate is the Schema for the migrationtemplates API that defines how VMs should be migrated + from VMware to OpenStack including network and storage mappings. It serves as a reusable template + that can be referenced by multiple migration plans, providing configuration for source and destination + environments, OS-specific settings, and network/storage mappings. Migration templates enable consistent + configuration across multiple VM migrations and simplify the definition of migration plans. properties: apiVersion: description: |- @@ -299,35 +744,50 @@ spec: type: object spec: description: MigrationTemplateSpec defines the desired state of MigrationTemplate + including source/destination environments and mappings properties: destination: - description: MigrationTemplateDestination defines the destination - details for the migrationtemplate + description: Destination is the destination details for the virtual + machine properties: openstackRef: + description: OpenstackRef is the reference to the OpenStack credentials + to be used as the destination environment type: string required: - openstackRef type: object networkMapping: + description: NetworkMapping is the reference to the NetworkMapping + resource that defines source to destination network mappings type: string - osType: + osFamily: + description: OSFamily is the OS type of the virtual machine enum: - windows - linux type: string source: - description: MigrationTemplateSource defines the source details for - the migrationtemplate + description: Source is the source details for the virtual machine properties: vmwareRef: + description: VMwareRef is the reference to the VMware credentials + to be used as the source environment type: string required: - vmwareRef type: object storageMapping: + description: StorageMapping is the reference to the StorageMapping + resource that defines source to destination storage mappings + type: string + targetPCDClusterName: + description: TargetPCDClusterName is the name of the PCD cluster where + the virtual machine will be migrated type: string virtioWinDriver: + description: VirtioWinDriver is the driver to be used for the virtual + machine type: string required: - destination @@ -357,13 +817,18 @@ spec: scope: Namespaced versions: - additionalPrinterColumns: - - jsonPath: .status.NetworkmappingValidationStatus + - jsonPath: .status.networkMappingValidationStatus name: Status type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date name: v1alpha1 schema: openAPIV3Schema: - description: NetworkMapping is the Schema for the networkmappings API + description: |- + NetworkMapping is the Schema for the networkmappings API that defines + mappings between VMware and OpenStack networks to be used during migration properties: apiVersion: description: |- @@ -383,15 +848,22 @@ spec: metadata: type: object spec: - description: NetworkMappingSpec defines the desired state of NetworkMapping + description: |- + NetworkMappingSpec defines the desired state of NetworkMapping including + mappings between VMware and OpenStack networks properties: networks: - description: Networks is the list of networks + description: Networks is the list of network mappings between source + (VMware) and target (OpenStack) environments items: + description: Network represents a mapping between source and target + networks properties: source: + description: Source is the name of the source network in VMware type: string target: + description: Target is the name of the target network in OpenStack type: string required: - source @@ -405,8 +877,14 @@ spec: description: NetworkMappingStatus defines the observed state of NetworkMapping properties: networkMappingValidationMessage: + description: |- + NetworkmappingValidationMessage provides detailed validation information including + information about available networks and any validation errors type: string networkMappingValidationStatus: + description: |- + NetworkmappingValidationStatus indicates the validation status of the network mapping + Valid states include: "Valid", "Invalid", "Pending", "ValidationFailed" type: string type: object type: object @@ -437,7 +915,11 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: OpenstackCreds is the Schema for the openstackcreds API + description: |- + OpenstackCreds is the Schema for the OpenStack credentials API that defines authentication + and connection details for OpenStack environments. It provides a secure way to store and validate + OpenStack credentials for use in migration operations, including authentication information, + available compute flavors, volume types, networks, and Platform9 Distributed Cloud host configurations. properties: apiVersion: description: |- @@ -511,6 +993,34 @@ spec: - vcpus type: object type: array + pcdHostConfig: + description: PCDHostConfig is the list of available clusters in openstack + items: + description: HostConfig defines the configuration for a Platform9 + Distributed Cloud host + properties: + clusterName: + type: string + hostLivenessInterface: + type: string + id: + type: string + imagelibInterface: + type: string + mgmtInterface: + type: string + name: + type: string + networkLabels: + additionalProperties: + type: string + type: object + tunnelingInterface: + type: string + vmConsoleInterface: + type: string + type: object + type: array secretRef: description: SecretRef is the reference to the Kubernetes secret holding OpenStack credentials @@ -560,7 +1070,7 @@ spec: description: OpenstackCredsStatus defines the observed state of OpenstackCreds properties: openstack: - description: Openstack is the Openstack configuration for the openstackcreds + description: Openstack is the OpenStack configuration for the openstackcreds properties: networks: items: @@ -572,8 +1082,495 @@ spec: type: array type: object openstackValidationMessage: + description: OpenStackValidationMessage is the message associated + with the OpenStack validation type: string openstackValidationStatus: + description: OpenStackValidationStatus is the status of the OpenStack + validation + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: pcdclusters.vjailbreak.k8s.pf9.io +spec: + group: vjailbreak.k8s.pf9.io + names: + kind: PCDCluster + listKind: PCDClusterList + plural: pcdclusters + singular: pcdcluster + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + PCDCluster is the Schema for the pcdclusters API that represents a Platform9 Distributed Cloud + cluster in the migration system. It defines cluster configuration including host membership, + high availability settings, and resource rebalancing policies. PCDCluster resources track both + the desired state of clusters as part of migration planning and the observed state of actual + PCD clusters in the target environment. They serve as destination targets for VM migrations + from VMware ESXi environments. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: PCDClusterSpec defines the desired state of PCDCluster + properties: + clusterName: + description: ClusterName is the name of the PCD cluster + type: string + description: + description: Description is the description of the PCD cluster + type: string + enableAutoResourceRebalancing: + description: EnableAutoResourceRebalancing indicates if auto resource + rebalancing is enabled + type: boolean + hosts: + description: Hosts is the list of hosts in the PCD cluster + items: + type: string + type: array + rebalancingFrequencyMins: + description: RebalancingFrequencyMins defines how often rebalancing + occurs in minutes + type: integer + vmHighAvailability: + description: VMHighAvailability indicates if VM high availability + is enabled + type: boolean + type: object + status: + description: PCDClusterStatus defines the observed state of PCDCluster + properties: + aggregateID: + description: AggregateID is the aggregate ID in the PCD cluster + type: integer + clusterID: + description: ClusterID is the ID of the PCD cluster + type: string + createdAt: + description: CreatedAt indicates when the cluster was created + type: string + updatedAt: + description: UpdatedAt indicates when the cluster was last updated + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: pcdhosts.vjailbreak.k8s.pf9.io +spec: + group: vjailbreak.k8s.pf9.io + names: + kind: PCDHost + listKind: PCDHostList + plural: pcdhosts + singular: pcdhost + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + PCDHost is the Schema for the pcdhosts API that represents a physical or virtual host + in a Platform9 Distributed Cloud environment. It tracks the host's configuration, + network interfaces, assigned roles, and operational status. PCDHost resources are created + as part of the migration process when converting ESXi hosts to PCD hosts or when provisioning + new infrastructure to replace migrated VMware hosts. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: PCDHostSpec defines the desired state of PCDHost + properties: + arch: + type: string + hostID: + description: HostID is the ID of the host + type: string + hostName: + description: HostName is the name of the host + type: string + hostState: + description: HostState is the state of the host + type: string + interfaces: + items: + description: |- + PCDHostInterface defines the network interface configuration for a Platform9 Distributed Cloud host, + including IP addresses, MAC address, and interface name. It's used to configure proper network + connectivity for PCD hosts created during the migration process. + properties: + ipAddresses: + items: + type: string + type: array + macAddress: + type: string + name: + type: string + type: object + type: array + osFamily: + type: string + osInfo: + type: string + rolesAssigned: + description: RolesAssigned is the list of roles assigned to the host + items: + type: string + type: array + type: object + status: + description: PCDHostStatus defines the observed state of PCDHost + properties: + responding: + type: boolean + roleStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: rollingmigrationplans.vjailbreak.k8s.pf9.io +spec: + group: vjailbreak.k8s.pf9.io + names: + kind: RollingMigrationPlan + listKind: RollingMigrationPlanList + plural: rollingmigrationplans + singular: rollingmigrationplan + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + RollingMigrationPlan is the Schema for the rollingmigrationplans API that defines a coordinated + migration of multiple VMware clusters and ESXi hosts to Platform9 Distributed Cloud (PCD). + It supports sequenced migration of VMs across clusters with configurable batch sizes, + cluster-to-cluster mapping, and tracking of migration progress across the entire datacenter migration. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: RollingMigrationPlanSpec defines the desired state of RollingMigrationPlan + properties: + advancedOptions: + description: AdvancedOptions is a list of advanced options for the + migration + properties: + granularNetworks: + description: GranularNetworks is a list of networks to be migrated + items: + type: string + type: array + granularPorts: + description: GranularPorts is a list of ports to be migrated + items: + type: string + type: array + granularVolumeTypes: + description: GranularVolumeTypes is a list of volume types to + be migrated + items: + type: string + type: array + type: object + bmConfigRef: + description: BMConfigRef is the reference to the BMC credentials + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + cloudInitConfigRef: + description: CloudInitConfigRef is the reference to the cloud-init + configuration + properties: + name: + description: name is unique within a namespace to reference a + secret resource. + type: string + namespace: + description: namespace defines the space within which the secret + name must be unique. + type: string + type: object + x-kubernetes-map-type: atomic + clusterMapping: + description: ClusterMapping is the mapping of vCenter clusters to + PCD clusters + items: + description: |- + ClusterMapping defines the relationship between a VMware vCenter cluster and its corresponding + Platform9 Distributed Cloud (PCD) cluster for migration operations. This mapping ensures that + virtual machines are properly migrated to the appropriate target infrastructure. + properties: + pcdClusterName: + description: PCDClusterName is the name of the PCD cluster + type: string + vmwareClusterName: + description: VMwareClusterName is the name of the vCenter cluster + type: string + required: + - pcdClusterName + - vmwareClusterName + type: object + type: array + clusterSequence: + description: ClusterSequence is the sequence of vCenter clusters to + be migrated + items: + description: |- + ClusterMigrationInfo defines information about a VMware vCenter cluster migration, + including the cluster name and the sequence of virtual machines to be migrated. + This structure allows for coordinated migration of multiple related VMs within a cluster. + properties: + clusterName: + description: ClusterName is the name of the vCenter cluster + to be migrated + type: string + vmMigrationBatchSize: + default: 10 + description: |- + VMMigrationBatchSize is the number of VMs in one batch for migration + batches will be processed sequentially, but all VMs in a batch + will be migrated in parallel. Default is 10 + minimum: 1 + type: integer + vmSequence: + description: VMSequence is the sequence of virtual machines + to be migrated + items: + description: |- + VMSequenceInfo defines information about a virtual machine in the migration sequence, + including its name and the ESXi host where it is located. This information is used to + establish the proper order and grouping of VMs during the migration process. + properties: + esxiName: + description: ESXiName is the name of the ESXi host where + the virtual machine is located + type: string + vmName: + description: VMName is the name of the virtual machine + to be migrated + type: string + required: + - vmName + type: object + type: array + required: + - clusterName + - vmSequence + type: object + type: array + firstBootScript: + default: echo "Add your startup script here!" + type: string + migrationStrategy: + description: MigrationStrategy is the strategy to be used for the + migration + properties: + adminInitiatedCutOver: + default: false + type: boolean + dataCopyStart: + format: date-time + type: string + healthCheckPort: + default: "443" + type: string + performHealthChecks: + default: false + type: boolean + type: + enum: + - hot + - cold + type: string + vmCutoverEnd: + format: date-time + type: string + vmCutoverStart: + format: date-time + type: string + required: + - type + type: object + migrationTemplate: + description: MigrationTemplate is the template to be used for the + migration + type: string + postMigrationAction: + description: PostMigrationAction defines the post migration action + for the virtual machine + properties: + folderName: + type: string + moveToFolder: + type: boolean + renameVm: + type: boolean + suffix: + type: string + type: object + retry: + description: Retry the migration if it fails + type: boolean + vmMigrationPlans: + description: VMMigrationPlans is the reference to the VM migration + plan + items: + type: string + type: array + required: + - bmConfigRef + - clusterSequence + - migrationStrategy + - migrationTemplate + type: object + status: + description: RollingMigrationPlanStatus defines the observed state of + RollingMigrationPlan + properties: + currentCluster: + description: CurrentCluster is the name of the current vCenter cluster + being migrated + type: string + currentESXi: + description: CurrentESXi is the name of the current ESXi host being + migrated + type: string + currentVM: + description: CurrentVM is the name of the current virtual machine + being migrated + type: string + failedClusters: + description: FailedClusters is the list of vCenter clusters that have + failed to migrate + items: + type: string + type: array + failedESXi: + description: FailedESXi is the list of ESXi hosts that have failed + to migrate + items: + type: string + type: array + failedVMs: + description: FailedVMs is the list of virtual machines that have failed + to migrate + items: + type: string + type: array + message: + description: Message is the message associated with the current state + of the migration + type: string + migratedClusters: + description: MigratedClusters is the list of vCenter clusters that + have been migrated + items: + type: string + type: array + migratedESXi: + description: MigratedESXi is the list of ESXi hosts that have been + migrated + items: + type: string + type: array + migratedVMs: + description: MigratedVMs is the list of virtual machines that have + been migrated + items: + type: string + type: array + phase: + description: Phase is the current phase of the migration + type: string + vmMigrationPhase: + description: VMMigrationsPhase is the list of VM migration plans type: string type: object type: object @@ -601,10 +1598,15 @@ spec: - jsonPath: .status.storageMappingValidationStatus name: Status type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date name: v1alpha1 schema: openAPIV3Schema: - description: StorageMapping is the Schema for the storagemappings API + description: |- + StorageMapping is the Schema for the storagemappings API that defines + mappings between VMware and OpenStack storage types to be used during migration properties: apiVersion: description: |- @@ -624,15 +1626,24 @@ spec: metadata: type: object spec: - description: StorageMappingSpec defines the desired state of StorageMapping + description: |- + StorageMappingSpec defines the desired state of StorageMapping including + mappings between VMware and OpenStack storage types properties: storages: - description: Storages is a list of storage mappings + description: Storages is a list of storage mappings between source + (VMware) and target (OpenStack) environments items: + description: Storage represents a mapping between source and target + storage types properties: source: + description: Source is the name of the source storage type in + VMware type: string target: + description: Target is the name of the target storage type in + OpenStack type: string required: - source @@ -646,8 +1657,14 @@ spec: description: StorageMappingStatus defines the observed state of StorageMapping properties: storageMappingValidationMessage: + description: |- + StoragemappingValidationMessage provides detailed validation information including + information about available storage types and any validation errors type: string storageMappingValidationStatus: + description: |- + StoragemappingValidationStatus indicates the validation status of the storage mapping + Valid states include: "Valid", "Invalid", "Pending", "ValidationFailed" type: string type: object type: object @@ -681,7 +1698,10 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: VjailbreakNode is the Schema for the vjailbreaknodes API + description: |- + VjailbreakNode is the Schema for the vjailbreaknodes API that represents + a node in the migration infrastructure with configuration, resource limits, + and statistics for monitoring migration progress properties: apiVersion: description: |- @@ -704,10 +1724,13 @@ spec: description: Spec defines the desired state of VjailbreakNode properties: nodeRole: - description: NodeRole is the role assigned to the node + description: NodeRole is the role assigned to the node (e.g., "migration-worker", + "controller") type: string openstackCreds: - description: OpenstackCreds is the credentials for Openstack Environment + description: |- + OpenstackCreds is the reference to the credentials for the OpenStack environment + where the node will be provisioned properties: apiVersion: description: API version of the referent. @@ -765,8 +1788,9 @@ spec: description: Status defines the observed state of VjailbreakNode properties: activeMigrations: - description: ActiveMigrations is the list of active migrations happening - on the node + description: |- + ActiveMigrations is the list of active migrations currently being processed on this node, + containing references to MigrationPlan resources items: type: string type: array @@ -774,7 +1798,9 @@ spec: description: OpenstackUUID is the UUID of the VM in OpenStack type: string phase: - description: Phase is the current phase of the node + description: |- + Phase is the current lifecycle phase of the node + (e.g., Provisioning, Ready, Error, Decommissioning) type: string vmIP: description: VMIP is the IP address of the VM @@ -790,6 +1816,72 @@ spec: --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: vmwareclusters.vjailbreak.k8s.pf9.io +spec: + group: vjailbreak.k8s.pf9.io + names: + kind: VMwareCluster + listKind: VMwareClusterList + plural: vmwareclusters + singular: vmwarecluster + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + VMwareCluster is the Schema for the vmwareclusters API that represents a VMware vSphere cluster + in the source environment. It tracks cluster configuration, member hosts, and migration status + as part of the VMware to Platform9 Distributed Cloud migration process. VMwareCluster resources + serve as source components that are migrated to corresponding PCDCluster resources in the target environment. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: VMwareClusterSpec defines the desired state of VMwareCluster + properties: + hosts: + description: Hosts is the list of hosts in the VMware cluster + items: + type: string + type: array + name: + description: Name is the name of the VMware cluster + type: string + type: object + status: + description: VMwareClusterStatus defines the observed state of VMwareCluster + properties: + phase: + description: Phase is the current phase of the VMwareCluster + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.1 @@ -810,7 +1902,11 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: VMwareCreds is the Schema for the vmwarecreds API + description: |- + VMwareCreds is the Schema for the vmwarecreds API that defines authentication + and connection details for VMware vSphere environments. It provides a secure way to + store and validate vCenter credentials for use in migration operations, including + connection parameters, authentication information, and datacenter configuration. properties: apiVersion: description: |- @@ -833,10 +1929,11 @@ spec: description: VMwareCredsSpec defines the desired state of VMwareCreds properties: datacenter: + description: DataCenter is the datacenter for the virtual machine type: string secretRef: - description: ObjectReference contains enough information to let you - inspect or modify the referred object. + description: SecretRef is the reference to the Kubernetes secret holding + VMware credentials properties: apiVersion: description: API version of the referent. @@ -885,8 +1982,11 @@ spec: description: VMwareCredsStatus defines the observed state of VMwareCreds properties: vmwareValidationMessage: + description: VMwareValidationMessage is the message associated with + the VMware validation type: string vmwareValidationStatus: + description: VMwareValidationStatus is the status of the VMware validation type: string type: object type: object @@ -897,6 +1997,73 @@ spec: --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: vmwarehosts.vjailbreak.k8s.pf9.io +spec: + group: vjailbreak.k8s.pf9.io + names: + kind: VMwareHost + listKind: VMwareHostList + plural: vmwarehosts + singular: vmwarehost + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + VMwareHost is the Schema for the vmwarehosts API that represents a VMware ESXi host + in the source environment. It tracks host configuration, hardware identification, and cluster membership + as part of the VMware to Platform9 Distributed Cloud migration process. VMwareHost resources are + source components that are migrated to PCDHost resources in the target environment and are automatically + removed from vCenter inventory after all VMs have been migrated off and the host is in maintenance mode. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: VMwareHostSpec defines the desired state of VMwareHost + properties: + clusterName: + description: Cluster name of the host + type: string + hardwareUuid: + description: Hardware UUID of the host + type: string + hostConfigId: + description: Host config ID of the host + type: string + name: + description: Name of the host + type: string + type: object + status: + description: VMwareHostStatus defines the observed state of VMwareHost + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.1 @@ -913,7 +2080,13 @@ spec: - name: v1alpha1 schema: openAPIV3Schema: - description: VMwareMachine is the Schema for the vmwaremachines API + description: |- + VMwareMachine is the Schema for the vmwaremachines API that represents a virtual machine + in the VMware source environment targeted for migration. It tracks VM configuration, + resource allocation, migration status, and target environment specifications. + VMwareMachine resources are the primary workloads migrated from VMware to OpenStack + as part of the migration process and contain all necessary information to recreate + equivalent virtual machines in the target environment. properties: apiVersion: description: |- @@ -942,29 +2115,49 @@ spec: vms: description: VMInfo is the info of the VMs in the VMwareMachine properties: + assignedIp: + description: AssignedIp is the IP address assigned to the VM + type: string + clusterName: + description: ClusterName is the name of the cluster + type: string cpu: + description: CPU is the number of CPUs in the virtual machine type: integer datastores: + description: Datastores is the list of datastores for the virtual + machine items: type: string type: array disks: + description: Disks is the list of disks for the virtual machine items: type: string type: array + esxiName: + description: ESXiName is the name of the ESXi host + type: string ipAddress: + description: IPAddress is the IP address of the virtual machine type: string memory: + description: Memory is the amount of memory in the virtual machine type: integer name: + description: Name is the name of the virtual machine type: string networks: + description: Networks is the list of networks for the virtual + machine items: type: string type: array - osType: + osFamily: + description: OSFamily is the OS family of the virtual machine type: string vmState: + description: VMState is the state of the virtual machine type: string required: - name @@ -1041,6 +2234,156 @@ rules: --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-bmconfig-editor-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - bmconfigs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - bmconfigs/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-bmconfig-viewer-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - bmconfigs + verbs: + - get + - list + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - bmconfigs/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-clustermigration-editor-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - clustermigrations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - clustermigrations/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-clustermigration-viewer-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - clustermigrations + verbs: + - get + - list + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - clustermigrations/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-esximigration-editor-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - esximigrations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - esximigrations/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-esximigration-viewer-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - esximigrations + verbs: + - get + - list + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - esximigrations/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole metadata: name: migration-manager-role rules: @@ -1098,14 +2441,22 @@ rules: - apiGroups: - vjailbreak.k8s.pf9.io resources: + - bmconfigs + - clustermigrations + - esximigrations - migrationplans - migrations - migrationtemplates - networkmappings - openstackcreds + - pcdclusters + - pcdhosts + - rollingmigrationplans - storagemappings - vjailbreaknodes + - vmwareclusters - vmwarecreds + - vmwarehosts - vmwaremachines verbs: - create @@ -1118,10 +2469,16 @@ rules: - apiGroups: - vjailbreak.k8s.pf9.io resources: + - bmconfigs/finalizers + - clustermigrations/finalizers + - esximigrations/finalizers - migrationplans/finalizers - migrationtemplates/finalizers - networkmappings/finalizers - openstackcreds/finalizers + - pcdclusters/finalizers + - pcdhosts/finalizers + - rollingmigrationplans/finalizers - storagemappings/finalizers - vjailbreaknodes/finalizers - vmwarecreds/finalizers @@ -1130,11 +2487,17 @@ rules: - apiGroups: - vjailbreak.k8s.pf9.io resources: + - bmconfigs/status + - clustermigrations/status + - esximigrations/status - migrationplans/status - migrations/status - migrationtemplates/status - networkmappings/status - openstackcreds/status + - pcdclusters/status + - pcdhosts/status + - rollingmigrationplans/status - storagemappings/status - vjailbreaknodes/status - vmwarecreds/status @@ -1396,6 +2759,156 @@ rules: --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-pcdcluster-editor-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - pcdclusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - pcdclusters/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-pcdcluster-viewer-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - pcdclusters + verbs: + - get + - list + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - pcdclusters/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-pcdhost-editor-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - pcdhosts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - pcdhosts/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-pcdhost-viewer-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - pcdhosts + verbs: + - get + - list + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - pcdhosts/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-rollingmigrationplan-editor-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - rollingmigrationplans + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - rollingmigrationplans/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-rollingmigrationplan-viewer-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - rollingmigrationplans + verbs: + - get + - list + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - rollingmigrationplans/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole metadata: labels: app.kubernetes.io/managed-by: kustomize @@ -1496,6 +3009,56 @@ rules: --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-vmwarecluster-editor-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - vmwareclusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - vmwareclusters/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-vmwarecluster-viewer-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - vmwareclusters + verbs: + - get + - list + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - vmwareclusters/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole metadata: labels: app.kubernetes.io/managed-by: kustomize @@ -1546,6 +3109,56 @@ rules: --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-vmwarehost-editor-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - vmwarehosts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - vmwarehosts/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: migration + name: migration-vmwarehost-viewer-role +rules: +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - vmwarehosts + verbs: + - get + - list + - watch +- apiGroups: + - vjailbreak.k8s.pf9.io + resources: + - vmwarehosts/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole metadata: labels: app.kubernetes.io/managed-by: kustomize @@ -1627,6 +3240,20 @@ subjects: name: migration-controller-manager namespace: migration-system --- +apiVersion: v1 +kind: Service +metadata: + name: migration-vpwned-service + namespace: migration-system +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 3001 + selector: + app: vpwned-sdk + type: ClusterIP +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -1661,8 +3288,15 @@ spec: - --health-probe-bind-address=:8081 command: - /manager - image: quay.io/platform9/vjailbreak-controller:v0.1.12 + image: platform9/vjailbreak-controller:v0.1.13 imagePullPolicy: IfNotPresent + lifecycle: + preStop: + exec: + command: + - /bin/sh + - -c + - sleep 5 livenessProbe: httpGet: path: /healthz @@ -1690,7 +3324,7 @@ spec: runAsGroup: 0 runAsUser: 0 serviceAccountName: migration-controller-manager - terminationGracePeriodSeconds: 10 + terminationGracePeriodSeconds: 30 volumes: - hostPath: path: /var/lib/rancher/k3s/server @@ -1700,3 +3334,65 @@ spec: path: /home/ubuntu type: Directory name: vddk +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: vpwned-sdk + name: migration-vpwned-sdk + namespace: migration-system +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: vpwned-sdk + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: vpwned-sdk + spec: + containers: + - image: platform9/vjailbreak-vpwned:v0.1.13 + imagePullPolicy: IfNotPresent + name: vpwned + ports: + - containerPort: 3001 + protocol: TCP + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + nginx.ingress.kubernetes.io/backend-protocol: HTTP + nginx.ingress.kubernetes.io/rewrite-target: /$1 + nginx.ingress.kubernetes.io/use-regex: "true" + name: migration-vpwned-ingress + namespace: migration-system +spec: + ingressClassName: nginx + rules: + - http: + paths: + - backend: + service: + name: migration-vpwned-service + port: + number: 80 + path: /dev-api/sdk/(.*) + pathType: ImplementationSpecific diff --git a/deploy/04ui.yaml b/deploy/04ui.yaml index ef1f5be..54fc65d 100644 --- a/deploy/04ui.yaml +++ b/deploy/04ui.yaml @@ -17,7 +17,7 @@ spec: containers: - name: vjailbreak-ui-container image: platform9/vjailbreak-ui:v0.1 - imagePullPolicy: Always + imagePullPolicy: IfNotPresent ports: - containerPort: 80 --- diff --git a/image_builder/configs/daemonset.yaml b/image_builder/configs/daemonset.yaml index c58d6d7..99c352e 100644 --- a/image_builder/configs/daemonset.yaml +++ b/image_builder/configs/daemonset.yaml @@ -17,7 +17,7 @@ spec: hostNetwork: true initContainers: - name: fix-perms - image: alpine:latest + image: quay.io/platform9/vjailbreak:alpine securityContext: privileged: true runAsUser: 0 @@ -27,12 +27,17 @@ spec: echo "Fixing permissions on /home/ubuntu/vmware-vix-disklib-distrib..." chown -R 1000:1000 /home/ubuntu/vmware-vix-disklib-distrib chmod 755 /home/ubuntu/vmware-vix-disklib-distrib + echo "Fixing permissions on /home/ubuntu/virtio-win..." + chown -R 1000:1000 /home/ubuntu/virtio-win + chmod 755 /home/ubuntu/virtio-win volumeMounts: - name: vmwarelib mountPath: /home/ubuntu/vmware-vix-disklib-distrib + - name: virtio-win + mountPath: /home/ubuntu/virtio-win containers: - name: sync-container - image: alpine:latest + image: quay.io/platform9/vjailbreak:alpine securityContext: privileged: true runAsUser: 0 @@ -47,10 +52,11 @@ spec: mountPath: /home/ubuntu/vmware-vix-disklib-distrib - name: logs mountPath: /var/log/pf9 + - name: virtio-win + mountPath: /home/ubuntu/virtio-win command: ["/bin/sh", "-c"] args: - | - apk add --no-cache rsync coreutils grep IS_MASTER=$(grep -E '^export IS_MASTER=' /etc/pf9/k3s.env | cut -d'=' -f2) MASTER_IP=$(grep -E '^export MASTER_IP=' /etc/pf9/k3s.env | cut -d'=' -f2) if [ "$IS_MASTER" = "true" ]; then @@ -76,6 +82,9 @@ spec: # Also Sync logs from master to worker rsync -avz rsync://${MASTER_IP}/master-logs /var/log/pf9 + # Sync virtio-win drivers from master to worker + rsync -avz rsync://${MASTER_IP}/virtio-win /home/ubuntu/virtio-win + if [ $? -eq 0 ]; then echo "Sync completed successfully." else @@ -97,3 +106,7 @@ spec: hostPath: type: DirectoryOrCreate path: /var/log/pf9 + - name: virtio-win + hostPath: + type: DirectoryOrCreate + path: /home/ubuntu/virtio-win diff --git a/image_builder/configs/rsyncd.conf b/image_builder/configs/rsyncd.conf index 132f835..d59461f 100644 --- a/image_builder/configs/rsyncd.conf +++ b/image_builder/configs/rsyncd.conf @@ -26,4 +26,11 @@ timeout = 300 comment = Logs pushed by vjailbreak master to all the workers read only = no write only = no - list = yes \ No newline at end of file + list = yes + +[virtio-win] + path = /home/ubuntu/virtio-win + comment = virtio-win drivers + read only = no + write only = no + list = yes diff --git a/releases/v0.1.13.md b/releases/v0.1.13.md new file mode 100644 index 0000000..2cc47e6 --- /dev/null +++ b/releases/v0.1.13.md @@ -0,0 +1,54 @@ +# v0.1.13 + +- **Tag:** `v0.1.13` +- **Published:** 2025-06-18T14:06:38Z +- **Source release:** https://github.com/platform9/vjailbreak/releases/tag/v0.1.13 + +## Release Notes + +## What’s Changed +* vPwned: Rolling Conversion (release) by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/546 +* uncomment build-vpwned action by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/552 +* added the functionality to validate and assign/edit ips to/of the vms for rolling conversion by @patil-pratik-87 in https://github.com/platform9/vjailbreak/pull/567 +* added the target cluster selections for migrations by @patil-pratik-87 in https://github.com/platform9/vjailbreak/pull/573 +* convert PCD Cluster name to k8s compatible by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/576 +* fix issues when VM is attached to same network twice by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/579 +* Release v0.1.13 (release) by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/581 +* Add proxy for vjailbreak by @spai-p9 in https://github.com/platform9/vjailbreak/pull/562 +* add/update/edit os and flavors in vms list in rolling conversion by @patil-pratik-87 in https://github.com/platform9/vjailbreak/pull/586 +* Add alpine docker image with rsync,coreutils in quay by @spai-p9 in https://github.com/platform9/vjailbreak/pull/590 +* DOC: Add doc for virtio drivers injection by the user by @spai-p9 in https://github.com/platform9/vjailbreak/pull/589 +* change from cloud-ctl to pcdctl by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/599 +* Change the base ubuntu image for vJailbreak qcow by @spai-p9 in https://github.com/platform9/vjailbreak/pull/598 +* Fix scale up by @spai-p9 in https://github.com/platform9/vjailbreak/pull/601 +* Fix cluster name by @spai-p9 in https://github.com/platform9/vjailbreak/pull/602 +* fix openstack volume sizes being smaller than original disk size by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/558 +* improved guestfish logging by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/565 +* Rolling Conversion UI changes by @patil-pratik-87 in https://github.com/platform9/vjailbreak/pull/548 +* fix debug log file for migration re-runs by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/560 +* move os family selection to per VM basis by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/568 +* save disk space on vjb VM by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/571 +* Prebake components by @spai-p9 in https://github.com/platform9/vjailbreak/pull/574 +* Give users option to upload virtio drivers to a path in master and then propogate it down to agents by @spai-p9 in https://github.com/platform9/vjailbreak/pull/575 +* make delete migration-controller-manager pod work by @OmkarDeshpande7 in https://github.com/platform9/vjailbreak/pull/572 + +### Usability Enhancements and Stability Improvements + +- **Rolling Conversion (Beta Availability)** + The Rolling Conversion feature is now available as a beta release. + +- **Pre-Packaged vJailbreak Image** + A new vJailbreak image is now available, containing all required components pre-installed. This enhancement eliminates the need for internet access during installation, making it suitable for restricted network environments. + +- **Support for Custom VirtIO Drivers** + Users may now upload VirtIO drivers to a designated path. If present, these drivers will be utilized during the migration process. If absent, the system will default to downloading the necessary drivers from the internet, providing flexibility based on deployment conditions. https://github.com/platform9/vjailbreak/blob/main/docs/src/content/docs/guides/virtio_doc.md + +- **Resolution of Pod Eviction Due to Disk Pressure** + An issue causing pod eviction under disk pressure conditions has been resolved. This fix improves the reliability and stability of workloads during extended migration operations. + +- **Enhanced Debug Logging** + Debug logs have been improved to provide more comprehensive and structured output + + + +**Full Changelog**: https://github.com/platform9/vjailbreak/compare/v0.1.11...v0.1.13