diff --git a/apis/bases/dataplane.openstack.org_openstackdataplaneservices.yaml b/apis/bases/dataplane.openstack.org_openstackdataplaneservices.yaml index f4eb7e6ca..98d360248 100644 --- a/apis/bases/dataplane.openstack.org_openstackdataplaneservices.yaml +++ b/apis/bases/dataplane.openstack.org_openstackdataplaneservices.yaml @@ -126,8 +126,11 @@ spec: type: array required: - contents + - edpmRoleServiceName type: object type: object + required: + - edpmServiceType type: object status: properties: diff --git a/apis/dataplane/v1beta1/openstackdataplaneservice_types.go b/apis/dataplane/v1beta1/openstackdataplaneservice_types.go index 475446b37..30fdca580 100644 --- a/apis/dataplane/v1beta1/openstackdataplaneservice_types.go +++ b/apis/dataplane/v1beta1/openstackdataplaneservice_types.go @@ -53,7 +53,7 @@ type OpenstackDataPlaneServiceCert struct { // not set, OpenStackDataPlaneService.Spec.EDPMServiceType is used. If // OpenStackDataPlaneService.Spec.EDPMServiceType is not set, then // OpenStackDataPlaneService.Name is used. - EDPMRoleServiceName string `json:"edpmRoleServiceName,omitempty"` + EDPMRoleServiceName string `json:"edpmRoleServiceName"` } // OpenStackDataPlaneServiceSpec defines the desired state of OpenStackDataPlaneService @@ -111,7 +111,8 @@ type OpenStackDataPlaneServiceSpec struct { // corresponds to the ansible role name (without the "edpm_" prefix) used // to manage the service. If not set, will default to the // OpenStackDataPlaneService name. - EDPMServiceType string `json:"edpmServiceType,omitempty" yaml:"edpmServiceType,omitempty"` + // +kubebuilder:validation:Required + EDPMServiceType string `json:"edpmServiceType" yaml:"edpmServiceType"` } // OpenStackDataPlaneServiceStatus defines the observed state of OpenStackDataPlaneService diff --git a/apis/dataplane/v1beta1/openstackdataplaneservice_webhook.go b/apis/dataplane/v1beta1/openstackdataplaneservice_webhook.go index 7088a12c3..72ca22635 100644 --- a/apis/dataplane/v1beta1/openstackdataplaneservice_webhook.go +++ b/apis/dataplane/v1beta1/openstackdataplaneservice_webhook.go @@ -44,17 +44,9 @@ var _ webhook.Defaulter = &OpenStackDataPlaneService{} func (r *OpenStackDataPlaneService) Default() { openstackdataplaneservicelog.Info("default", "name", r.Name) - r.Spec.Default(r.Name) r.DefaultLabels() } -// Default - set defaults for this OpenStackDataPlaneService -func (spec *OpenStackDataPlaneServiceSpec) Default(name string) { - if spec.EDPMServiceType == "" { - spec.EDPMServiceType = name - } -} - // TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation. // +kubebuilder:webhook:path=/validate-dataplane-openstack-org-v1beta1-openstackdataplaneservice,mutating=false,failurePolicy=fail,sideEffects=None,groups=dataplane.openstack.org,resources=openstackdataplaneservices,verbs=create;update,versions=v1beta1,name=vopenstackdataplaneservice.kb.io,admissionReviewVersions=v1 diff --git a/config/crd/bases/dataplane.openstack.org_openstackdataplaneservices.yaml b/config/crd/bases/dataplane.openstack.org_openstackdataplaneservices.yaml index f4eb7e6ca..98d360248 100644 --- a/config/crd/bases/dataplane.openstack.org_openstackdataplaneservices.yaml +++ b/config/crd/bases/dataplane.openstack.org_openstackdataplaneservices.yaml @@ -126,8 +126,11 @@ spec: type: array required: - contents + - edpmRoleServiceName type: object type: object + required: + - edpmServiceType type: object status: properties: diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_bootstrap.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_bootstrap.yaml index fc5734c04..d1cbfe063 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_bootstrap.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_bootstrap.yaml @@ -4,3 +4,4 @@ metadata: name: bootstrap spec: playbook: osp.edpm.bootstrap + edpmServiceType: bootstrap diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_ceph_client.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_ceph_client.yaml index f79704a36..fcd16e287 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_ceph_client.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_ceph_client.yaml @@ -4,3 +4,4 @@ metadata: name: ceph-client spec: playbook: osp.edpm.ceph_client + edpmServiceType: ceph-client diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_ceph_hci_pre.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_ceph_hci_pre.yaml index 0d83e88e6..6fcb4e6bd 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_ceph_hci_pre.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_ceph_hci_pre.yaml @@ -4,3 +4,4 @@ metadata: name: ceph-hci-pre spec: playbook: osp.edpm.ceph_hci_pre + edpmServiceType: ceph-hci-pre diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_network.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_network.yaml index 3b83b5660..11bfe1e86 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_network.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_network.yaml @@ -4,3 +4,4 @@ metadata: name: configure-network spec: playbook: osp.edpm.configure_network + edpmServiceType: configure-network diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_os.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_os.yaml index 2e475ddcc..6e05c430c 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_os.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_os.yaml @@ -4,3 +4,4 @@ metadata: name: configure-os spec: playbook: osp.edpm.configure_os + edpmServiceType: configure-os diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_ovs_dpdk.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_ovs_dpdk.yaml index 07570f477..3257470be 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_ovs_dpdk.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_ovs_dpdk.yaml @@ -4,3 +4,4 @@ metadata: name: configure-ovs-dpdk spec: playbook: osp.edpm.configure_ovs_dpdk + edpmServiceType: configure-ovs-dpdk diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_ddp_package_option.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_ddp_package_option.yaml index 9ca47eb83..5dc4f3d06 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_ddp_package_option.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_ddp_package_option.yaml @@ -4,3 +4,4 @@ metadata: name: ddp-package-option spec: playbook: osp.edpm.select_kernel_ddp_package + edpmServiceType: ddp-package-option diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_derive_pci_devicespec.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_derive_pci_devicespec.yaml index 9dfc80b79..f550810aa 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_derive_pci_devicespec.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_derive_pci_devicespec.yaml @@ -4,3 +4,4 @@ metadata: name: derive-pci-devicespec spec: playbook: osp.edpm.sriov_derive_device_spec + edpmServiceType: derive-pci-devicespec diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_download_cache.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_download_cache.yaml index a9d429c80..14c0bb630 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_download_cache.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_download_cache.yaml @@ -4,3 +4,4 @@ metadata: name: download-cache spec: playbook: osp.edpm.download_cache + edpmServiceType: download-cache diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_fips_status.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_fips_status.yaml index b98890661..dd4a0cd96 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_fips_status.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_fips_status.yaml @@ -5,3 +5,4 @@ metadata: spec: label: fips-status playbook: osp.edpm.fips_status + edpmServiceType: fips-status diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_frr.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_frr.yaml index 0561424fd..c6ac1a503 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_frr.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_frr.yaml @@ -6,3 +6,4 @@ spec: playbook: osp.edpm.frr containerImageFields: - EdpmFrrImage + edpmServiceType: frr diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_install_certs.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_install_certs.yaml index feeb111b7..e9efab000 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_install_certs.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_install_certs.yaml @@ -5,3 +5,4 @@ metadata: spec: playbook: osp.edpm.install_certs addCertMounts: True + edpmServiceType: install-certs diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_install_os.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_install_os.yaml index ff9bb9072..e7f92632f 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_install_os.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_install_os.yaml @@ -4,3 +4,4 @@ metadata: name: install-os spec: playbook: osp.edpm.install_os + edpmServiceType: install-os diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_libvirt.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_libvirt.yaml index 04cb6d962..1878e0e08 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_libvirt.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_libvirt.yaml @@ -23,3 +23,4 @@ spec: - client auth issuer: osp-rootca-issuer-libvirt caCerts: combined-ca-bundle + edpmServiceType: libvirt diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_logging.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_logging.yaml index 449eeeed2..9f6f23aac 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_logging.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_logging.yaml @@ -7,3 +7,4 @@ spec: - secretRef: name: logging-compute-config-data playbook: osp.edpm.telemetry_logging + edpmServiceType: logging diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_dhcp.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_dhcp.yaml index 52a171ff4..817f9a096 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_dhcp.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_dhcp.yaml @@ -10,3 +10,4 @@ spec: caCerts: combined-ca-bundle containerImageFields: - EdpmNeutronDhcpAgentImage + edpmServiceType: neutron-dhcp diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_metadata.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_metadata.yaml index 8d2b96e59..186ae40da 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_metadata.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_metadata.yaml @@ -24,3 +24,4 @@ spec: caCerts: combined-ca-bundle containerImageFields: - EdpmNeutronMetadataAgentImage + edpmServiceType: neutron-metadata diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_ovn.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_ovn.yaml index 3634e112c..8e7eb486b 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_ovn.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_ovn.yaml @@ -22,3 +22,4 @@ spec: caCerts: combined-ca-bundle containerImageFields: - EdpmNeutronOvnAgentImage + edpmServiceType: neutron-ovn diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_sriov.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_sriov.yaml index 12980afb3..61d831fc8 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_sriov.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_neutron_sriov.yaml @@ -10,3 +10,4 @@ spec: caCerts: combined-ca-bundle containerImageFields: - EdpmNeutronSriovAgentImage + edpmServiceType: neutron-sriov diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_os_reboot.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_os_reboot.yaml index fa64fe152..37abb6c90 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_os_reboot.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_os_reboot.yaml @@ -4,3 +4,4 @@ metadata: name: reboot-os spec: playbook: osp.edpm.reboot + edpmServiceType: reboot-os diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_ovn.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_ovn.yaml index eacde16b4..7dbad97a9 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_ovn.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_ovn.yaml @@ -23,3 +23,4 @@ spec: caCerts: combined-ca-bundle containerImageFields: - OvnControllerImage + edpmServiceType: ovn diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_ovn_bgp_agent.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_ovn_bgp_agent.yaml index f4e9790a4..287106cc5 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_ovn_bgp_agent.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_ovn_bgp_agent.yaml @@ -23,3 +23,4 @@ spec: caCerts: combined-ca-bundle containerImageFields: - EdpmOvnBgpAgentImage + edpmServiceType: ovn-bgp-agent diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_run_os.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_run_os.yaml index 1a8362fe3..26698cd2c 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_run_os.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_run_os.yaml @@ -7,3 +7,4 @@ spec: containerImageFields: - EdpmLogrotateCrondImage - EdpmIscsidImage + edpmServiceType: run-os diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_ssh_known_hosts.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_ssh_known_hosts.yaml index 7181a98ad..1b38aac68 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_ssh_known_hosts.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_ssh_known_hosts.yaml @@ -5,3 +5,4 @@ metadata: spec: playbook: osp.edpm.ssh_known_hosts deployOnAllNodeSets: true + edpmServiceType: ssh-known-hosts diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_swift.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_swift.yaml index 04d7ac02b..31a0bb148 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_swift.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_swift.yaml @@ -11,3 +11,4 @@ spec: name: swift-storage-config-data - configMapRef: name: swift-ring-files + edpmServiceType: swift diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_telemetry.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_telemetry.yaml index ad1135c88..809fe3730 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_telemetry.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_telemetry.yaml @@ -15,3 +15,4 @@ spec: containerImageFields: - CeilometerComputeImage - EdpmNodeExporterImage + edpmServiceType: telemetry diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_telemetry_power_monitoring.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_telemetry_power_monitoring.yaml index 776604ebf..44ece39a3 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_telemetry_power_monitoring.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_telemetry_power_monitoring.yaml @@ -15,3 +15,4 @@ spec: containerImageFields: - CeilometerIpmiImage - EdpmKeplerImage + edpmServiceType: telemetry-power-monitoring diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_update.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_update.yaml index 18ec4a4c9..d1626dd73 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_update.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_update.yaml @@ -4,3 +4,4 @@ metadata: name: update spec: playbook: osp.edpm.update + edpmServiceType: update diff --git a/config/services/dataplane_v1beta1_openstackdataplaneservice_validate_network.yaml b/config/services/dataplane_v1beta1_openstackdataplaneservice_validate_network.yaml index 66ae6cc9a..ef8c48cb6 100644 --- a/config/services/dataplane_v1beta1_openstackdataplaneservice_validate_network.yaml +++ b/config/services/dataplane_v1beta1_openstackdataplaneservice_validate_network.yaml @@ -4,3 +4,4 @@ metadata: name: validate-network spec: playbook: osp.edpm.validate_network + edpmServiceType: validate-network diff --git a/docs/assemblies/proc_creating-a-custom-service.adoc b/docs/assemblies/proc_creating-a-custom-service.adoc index 7ef608632..95a3c8bb6 100644 --- a/docs/assemblies/proc_creating-a-custom-service.adoc +++ b/docs/assemblies/proc_creating-a-custom-service.adoc @@ -112,7 +112,7 @@ spec: deployOnAllNodeSets: true ---- -. Optional: Specify the `edpmServiceType` field for the service. Different custom services may use the same ansible content to manage the same EDPM service (such as `ovn` or `nova`). The `DataSources`, TLS certificates, and CA certificates need to be mounted at the same locations so they can be found by the ansible content even when using a custom service. `edpmServiceType` is used to create this association. The value is the name of the default service that uses the same ansible content as the custom service. If there are multiple services with the same `edpmServiceType` listed in a nodeset or deployment spec, latter ones would be ignored. +. Required: Specify the `edpmServiceType` field for the service. Different custom services may use the same ansible content to manage the same EDPM service (such as `ovn` or `nova`). If you're reusing existing edpm-ansible content in your custom service, then the `edpmServiceType` should be the same as the original service. This will ensure that your custom service has access to the TLS certificates for the service. If you create a custom `nova` service based on the edpm-ansible `nova` content, then the `edpmServiceType` should be set to `nova`. The `DataSources`, TLS certificates, and CA certificates need to be mounted at the same locations so they can be found by the ansible content even when using a custom service. `edpmServiceType` is used to create this association. The value is the name of the default service that uses the same ansible content as the custom service. If there are multiple services with the same `edpmServiceType` listed in a nodeset or deployment spec, latter ones would be ignored. If your service is entirely unique and does not re-use existing edpm-ansible content, then the `edpmServiceType` should be set to the name of your custom service. + For example, a custom service that uses the `edpm_ovn` ansible content from `edpm-ansible` would set `edpmServiceType` to `ovn`, which matches the default `ovn` service name provided by `openstack-operator`. + diff --git a/tests/functional/dataplane/base_test.go b/tests/functional/dataplane/base_test.go index 3f6f098c0..5d706e2cb 100644 --- a/tests/functional/dataplane/base_test.go +++ b/tests/functional/dataplane/base_test.go @@ -514,7 +514,11 @@ func DefaultDataplaneService(name types.NamespacedName) map[string]interface{} { "metadata": map[string]interface{}{ "name": name.Name, "namespace": name.Namespace, - }} + }, + "spec": map[string]interface{}{ + "edpmServiceType": "notGlobal", + }, + } } // Create an empty OpenStackDataPlaneService struct @@ -531,6 +535,7 @@ func DefaultDataplaneGlobalService(name types.NamespacedName) map[string]interfa }, "spec": map[string]interface{}{ "deployOnAllNodeSets": true, + "edpmServiceType": "global", }, } } diff --git a/tests/functional/dataplane/openstackdataplanedeployment_controller_test.go b/tests/functional/dataplane/openstackdataplanedeployment_controller_test.go index 29abd907d..89be214e6 100644 --- a/tests/functional/dataplane/openstackdataplanedeployment_controller_test.go +++ b/tests/functional/dataplane/openstackdataplanedeployment_controller_test.go @@ -279,7 +279,7 @@ var _ = Describe("Dataplane Deployment Test", func() { CreateDataplaneService(dataplaneServiceName, false) CreateDataplaneService(dataplaneGlobalServiceName, true) CreateDataPlaneServiceFromSpec(dataplaneUpdateServiceName, map[string]interface{}{ - "edpmServiceType": "foo-update-service", + "edpmServiceType": "update", "openStackAnsibleEERunnerImage": "foo-image:latest"}) DeferCleanup(th.DeleteService, dataplaneServiceName) @@ -750,7 +750,7 @@ var _ = Describe("Dataplane Deployment Test", func() { CreateDataplaneService(dataplaneServiceName, false) CreateDataplaneService(dataplaneGlobalServiceName, true) CreateDataPlaneServiceFromSpec(dataplaneUpdateServiceName, map[string]interface{}{ - "EDPMServiceType": "foo-update-service"}) + "edpmServiceType": "foo-update-service"}) DeferCleanup(th.DeleteService, dataplaneServiceName) DeferCleanup(th.DeleteService, dataplaneGlobalServiceName) @@ -1081,7 +1081,7 @@ var _ = Describe("Dataplane Deployment Test", func() { CreateDataplaneService(dataplaneServiceName, false) CreateDataplaneService(dataplaneGlobalServiceName, true) CreateDataPlaneServiceFromSpec(dataplaneUpdateServiceName, map[string]interface{}{ - "EDPMServiceType": "foo-update-service"}) + "edpmServiceType": "foo-update-service"}) DeferCleanup(th.DeleteService, dataplaneServiceName) DeferCleanup(th.DeleteService, dataplaneGlobalServiceName) @@ -1288,7 +1288,7 @@ var _ = Describe("Dataplane Deployment Test", func() { CreateDataplaneService(dataplaneServiceName, false) CreateDataplaneService(dataplaneGlobalServiceName, true) CreateDataPlaneServiceFromSpec(dataplaneUpdateServiceName, map[string]interface{}{ - "EDPMServiceType": "foo-update-service"}) + "edpmServiceType": "foo-update-service"}) DeferCleanup(th.DeleteService, dataplaneServiceName) DeferCleanup(th.DeleteService, dataplaneGlobalServiceName) diff --git a/tests/functional/dataplane/openstackdataplanenodeset_controller_test.go b/tests/functional/dataplane/openstackdataplanenodeset_controller_test.go index 1780e5805..5f39500cf 100644 --- a/tests/functional/dataplane/openstackdataplanenodeset_controller_test.go +++ b/tests/functional/dataplane/openstackdataplanenodeset_controller_test.go @@ -1358,7 +1358,8 @@ var _ = Describe("Dataplane NodeSet Test", func() { dataplanev1.SetupDefaults() updateServiceSpec := map[string]interface{}{ - "playbook": "osp.edpm.update", + "playbook": "osp.edpm.update", + "edpmServiceType": "update", } CreateDataPlaneServiceFromSpec(dataplaneUpdateServiceName, updateServiceSpec) DeferCleanup(th.DeleteService, dataplaneUpdateServiceName) diff --git a/tests/kuttl/tests/dataplane-deploy-global-service-test/00-dataplane-create.yaml b/tests/kuttl/tests/dataplane-deploy-global-service-test/00-dataplane-create.yaml index c998299e4..9b4e04ef5 100644 --- a/tests/kuttl/tests/dataplane-deploy-global-service-test/00-dataplane-create.yaml +++ b/tests/kuttl/tests/dataplane-deploy-global-service-test/00-dataplane-create.yaml @@ -80,6 +80,7 @@ kind: OpenStackDataPlaneService metadata: name: custom-global-service spec: + edpmServiceType: sleep label: custom-global-service playbookContents: | - hosts: localhost diff --git a/tests/kuttl/tests/dataplane-deploy-multiple-secrets/00-assert.yaml b/tests/kuttl/tests/dataplane-deploy-multiple-secrets/00-assert.yaml index 4c0aee626..0c784c474 100644 --- a/tests/kuttl/tests/dataplane-deploy-multiple-secrets/00-assert.yaml +++ b/tests/kuttl/tests/dataplane-deploy-multiple-secrets/00-assert.yaml @@ -11,6 +11,7 @@ kind: OpenStackDataPlaneService metadata: name: generic-service1 spec: + edpmServiceType: sleep caCerts: combined-ca-bundle tlsCerts: default: @@ -30,6 +31,7 @@ kind: OpenStackDataPlaneService metadata: name: install-certs-ovr spec: + edpmServiceType: sleep addCertMounts: True playbookContents: | - hosts: localhost diff --git a/tests/kuttl/tests/dataplane-deploy-multiple-secrets/00-dataplane-create.yaml b/tests/kuttl/tests/dataplane-deploy-multiple-secrets/00-dataplane-create.yaml index bbafdeeee..f4d6d9f4b 100644 --- a/tests/kuttl/tests/dataplane-deploy-multiple-secrets/00-dataplane-create.yaml +++ b/tests/kuttl/tests/dataplane-deploy-multiple-secrets/00-dataplane-create.yaml @@ -3,6 +3,7 @@ kind: OpenStackDataPlaneService metadata: name: generic-service1 spec: + edpmServiceType: sleep caCerts: combined-ca-bundle tlsCerts: default: @@ -22,6 +23,7 @@ kind: OpenStackDataPlaneService metadata: name: install-certs-ovr spec: + edpmServiceType: sleep addCertMounts: True playbookContents: | - hosts: localhost diff --git a/tests/kuttl/tests/dataplane-deploy-no-nodes-test/02-dataplane-deploy-services-override.yaml b/tests/kuttl/tests/dataplane-deploy-no-nodes-test/02-dataplane-deploy-services-override.yaml index 5786dd903..8743b21db 100644 --- a/tests/kuttl/tests/dataplane-deploy-no-nodes-test/02-dataplane-deploy-services-override.yaml +++ b/tests/kuttl/tests/dataplane-deploy-no-nodes-test/02-dataplane-deploy-services-override.yaml @@ -4,6 +4,7 @@ kind: OpenStackDataPlaneService metadata: name: custom-svc spec: + edpmServiceType: sleep label: custom-svc playbookContents: | - hosts: localhost diff --git a/tests/kuttl/tests/dataplane-deploy-tls-test/00-assert.yaml b/tests/kuttl/tests/dataplane-deploy-tls-test/00-assert.yaml index f7c4bd0e5..7e4f9ed1b 100644 --- a/tests/kuttl/tests/dataplane-deploy-tls-test/00-assert.yaml +++ b/tests/kuttl/tests/dataplane-deploy-tls-test/00-assert.yaml @@ -11,6 +11,7 @@ kind: OpenStackDataPlaneService metadata: name: tls-dnsnames spec: + edpmServiceType: sleep caCerts: combined-ca-bundle tlsCerts: default: @@ -33,6 +34,7 @@ kind: OpenStackDataPlaneService metadata: name: install-certs-ovrd spec: + edpmServiceType: sleep addCertMounts: True playbookContents: | - hosts: localhost diff --git a/tests/kuttl/tests/dataplane-deploy-tls-test/00-dataplane-create.yaml b/tests/kuttl/tests/dataplane-deploy-tls-test/00-dataplane-create.yaml index c84c2fd34..526ae7da7 100644 --- a/tests/kuttl/tests/dataplane-deploy-tls-test/00-dataplane-create.yaml +++ b/tests/kuttl/tests/dataplane-deploy-tls-test/00-dataplane-create.yaml @@ -3,6 +3,7 @@ kind: OpenStackDataPlaneService metadata: name: tls-dnsnames spec: + edpmServiceType: sleep caCerts: combined-ca-bundle tlsCerts: default: @@ -25,6 +26,7 @@ kind: OpenStackDataPlaneService metadata: name: install-certs-ovrd spec: + edpmServiceType: sleep addCertMounts: True playbookContents: | - hosts: localhost diff --git a/tests/kuttl/tests/dataplane-deploy-tls-test/03-dataplane-deploy-services-override.yaml b/tests/kuttl/tests/dataplane-deploy-tls-test/03-dataplane-deploy-services-override.yaml index 921a1adb3..39f7468bd 100644 --- a/tests/kuttl/tests/dataplane-deploy-tls-test/03-dataplane-deploy-services-override.yaml +++ b/tests/kuttl/tests/dataplane-deploy-tls-test/03-dataplane-deploy-services-override.yaml @@ -4,6 +4,7 @@ kind: OpenStackDataPlaneService metadata: name: tls-dns-ips spec: + edpmServiceType: sleep caCerts: combined-ca-bundle tlsCerts: default: @@ -27,6 +28,7 @@ kind: OpenStackDataPlaneService metadata: name: custom-tls-dns spec: + edpmServiceType: sleep caCerts: combined-ca-bundle tlsCerts: default: @@ -51,6 +53,7 @@ kind: OpenStackDataPlaneService metadata: name: install-certs-ovrd spec: + edpmServiceType: sleep addCertMounts: True playbookContents: | - hosts: localhost diff --git a/tests/kuttl/tests/dataplane-service-config/00-create.yaml b/tests/kuttl/tests/dataplane-service-config/00-create.yaml index 41884f8ad..27d68bc6f 100644 --- a/tests/kuttl/tests/dataplane-service-config/00-create.yaml +++ b/tests/kuttl/tests/dataplane-service-config/00-create.yaml @@ -39,6 +39,7 @@ kind: OpenStackDataPlaneService metadata: name: kuttl-service spec: + edpmServiceType: sleep playbookContents: | - hosts: localhost gather_facts: no diff --git a/tests/kuttl/tests/dataplane-service-custom-image/00-dataplane-create.yaml b/tests/kuttl/tests/dataplane-service-custom-image/00-dataplane-create.yaml index 358f0c4c9..3f9c222dd 100644 --- a/tests/kuttl/tests/dataplane-service-custom-image/00-dataplane-create.yaml +++ b/tests/kuttl/tests/dataplane-service-custom-image/00-dataplane-create.yaml @@ -3,8 +3,9 @@ kind: OpenStackDataPlaneService metadata: name: custom-img-svc spec: + edpmServiceType: custom-image openStackAnsibleEERunnerImage: example.com/repo/runner-image:latest - role: + playbookContents: name: "test role" hosts: "all" strategy: "linear"