From 777fe8a0f7ec71f8d0392b34ff3f27ffcd9be66a Mon Sep 17 00:00:00 2001 From: oliashish Date: Fri, 16 Jan 2026 08:08:22 -0500 Subject: [PATCH 1/6] Fix: Trigger nodeSet reconciler with ansibleVarsFrom changes The NodeSet reconciler would not triggered on changes to ConfigMaps and Secrets from ansibleVarsFrom as we never check than and it won't update the nodeset status and message to mark it ready to changes Jira: OSPRH-17961 --- .../openstackdataplanenodeset_controller.go | 51 +++++++++++++++++ internal/dataplane/hashes.go | 57 +++++++++++++++++++ 2 files changed, 108 insertions(+) diff --git a/internal/controller/dataplane/openstackdataplanenodeset_controller.go b/internal/controller/dataplane/openstackdataplanenodeset_controller.go index 648905033..bf5758e3c 100644 --- a/internal/controller/dataplane/openstackdataplanenodeset_controller.go +++ b/internal/controller/dataplane/openstackdataplanenodeset_controller.go @@ -576,6 +576,17 @@ func checkDeployment(ctx context.Context, helper *helper.Helper, deployment.Status.BmhRefHashes[instance.Name] != instance.Status.BmhRefHash) { continue } + + hasAnsibleVarsFromChanged, err := checkAnsibleVarsFromChanged(ctx, helper, instance, deployment.Status.ConfigMapHashes, deployment.Status.SecretHashes) + + if err != nil { + return isNodeSetDeploymentReady, isNodeSetDeploymentRunning, isNodeSetDeploymentFailed, failedDeploymentName, err + } + + if hasAnsibleVarsFromChanged { + continue + } + isNodeSetDeploymentReady = true for k, v := range deployment.Status.ConfigMapHashes { instance.Status.ConfigMapHashes[k] = v @@ -911,3 +922,43 @@ func (r *OpenStackDataPlaneNodeSetReconciler) GetSpecConfigHash(instance *datapl } return configHash, nil } + +// checkAnsibleVarsFromChanged computes current hashes for ConfigMaps/Secrets +// referenced in AnsibleVarsFrom and compares them with deployed hashes. +// Returns true if any content has changed, false otherwise. +func checkAnsibleVarsFromChanged( + ctx context.Context, + helper *helper.Helper, + instance *dataplanev1.OpenStackDataPlaneNodeSet, + deployedConfigMapHashes map[string]string, + deployedSecretHashes map[string]string, +) (bool, error) { + // Compute current hashes for AnsibleVarsFrom ConfigMaps/Secrets + currentConfigMapHashes := make(map[string]string) + currentSecretHashes := make(map[string]string) + + err := deployment.GetNodeSetAnsibleVarsFromHashes( + ctx, helper, instance, currentConfigMapHashes, currentSecretHashes) + if err != nil { + helper.GetLogger().Error(err, "Unable to compute AnsibleVarsFrom hashes") + return false, err + } + + // Compare current ConfigMap hashes with deployed hashes + for name, currentHash := range currentConfigMapHashes { + if deployedHash, exists := deployedConfigMapHashes[name]; !exists || deployedHash != currentHash { + helper.GetLogger().Info("ConfigMap content changed", "configMap", name) + return true, nil + } + } + + // Compare current Secret hashes with deployed hashes + for name, currentHash := range currentSecretHashes { + if deployedHash, exists := deployedSecretHashes[name]; !exists || deployedHash != currentHash { + helper.GetLogger().Info("Secret content changed", "secret", name) + return true, nil + } + } + + return false, nil +} diff --git a/internal/dataplane/hashes.go b/internal/dataplane/hashes.go index 33d7653f2..3f4f78a0a 100644 --- a/internal/dataplane/hashes.go +++ b/internal/dataplane/hashes.go @@ -100,3 +100,60 @@ func GetDeploymentHashesForService( return nil } + +// GetNodeSetAnsibleVarsFromHashes computes hashes for ConfigMaps and Secrets +// referenced in the NModeSet's AnsibleVarsFrom field (both NodeTemplate and +// individual Nodes) +func GetNodeSetAnsibleVarsFromHashes( + ctx context.Context, + helper *helper.Helper, + instance *dataplanev1.OpenStackDataPlaneNodeSet, + configMapHashes map[string]string, + secretHashes map[string]string, +) error { + namespace := instance.Namespace + + // helper function to process AnsibleVarsFrom data source + processAnsibleVarsFrom := func(varsFrom []dataplanev1.DataSource) error { + for _, dataSource := range varsFrom { + cm, sec, err := dataplaneutil.GetDataSourceCmSecret(ctx, helper, namespace, dataSource) + + if err != nil { + return err + } + + if cm != nil { + hash, err := configmap.Hash(cm) + if err != nil { + helper.GetLogger().Error(err, "Unable to hash ConfigMap", "configMap", cm.Name) + return err + } + configMapHashes[cm.Name] = hash + } + + if sec != nil { + hash, err := secret.Hash(sec) + if err != nil { + helper.GetLogger().Error(err, "Unable to hash Secret", "secret", sec.Name) + return err + } + secretHashes[sec.Name] = hash + } + } + return nil + } + + // Process NodeTemplate level AnsibleVarsFrom + if err := processAnsibleVarsFrom(instance.Spec.NodeTemplate.Ansible.AnsibleVarsFrom); err != nil { + return err + } + + // Process individual Node leve AnsibleVarsFrom + for _, node := range instance.Spec.Nodes { + if err := processAnsibleVarsFrom(node.Ansible.AnsibleVarsFrom); err != nil { + return nil + } + } + + return nil +} From 041c79f1fb9a1d6e29bd9d4520878a66a193ef67 Mon Sep 17 00:00:00 2001 From: oliashish Date: Fri, 16 Jan 2026 08:24:55 -0500 Subject: [PATCH 2/6] fix: return value from per node level processing function --- internal/dataplane/hashes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/dataplane/hashes.go b/internal/dataplane/hashes.go index 3f4f78a0a..84684fc75 100644 --- a/internal/dataplane/hashes.go +++ b/internal/dataplane/hashes.go @@ -148,7 +148,7 @@ func GetNodeSetAnsibleVarsFromHashes( return err } - // Process individual Node leve AnsibleVarsFrom + // Process individual Node level AnsibleVarsFrom for _, node := range instance.Spec.Nodes { if err := processAnsibleVarsFrom(node.Ansible.AnsibleVarsFrom); err != nil { return nil From aed228cd74e4d78692ffad2d03713a68f8162a6e Mon Sep 17 00:00:00 2001 From: oliashish Date: Tue, 20 Jan 2026 12:58:46 -0500 Subject: [PATCH 3/6] fix: refactored for deployment controller and optimization --- ...openstackdataplanedeployment_controller.go | 29 +++++++++ .../openstackdataplanenodeset_controller.go | 16 +++-- internal/dataplane/hashes.go | 61 +++++++------------ 3 files changed, 62 insertions(+), 44 deletions(-) diff --git a/internal/controller/dataplane/openstackdataplanedeployment_controller.go b/internal/controller/dataplane/openstackdataplanedeployment_controller.go index c690ae6b7..9ee3d35a9 100644 --- a/internal/controller/dataplane/openstackdataplanedeployment_controller.go +++ b/internal/controller/dataplane/openstackdataplanedeployment_controller.go @@ -451,6 +451,11 @@ func (r *OpenStackDataPlaneDeploymentReconciler) setHashes( for _, nodeSet := range nodeSets.Items { instance.Status.NodeSetHashes[nodeSet.Name] = nodeSet.Status.ConfigHash + + err = setNodeSetAnsibleVarsFromHashes(ctx, helper, &nodeSet, instance.Status.ConfigMapHashes, instance.Status.SecretHashes) + if err != nil { + return err + } } return nil @@ -547,3 +552,27 @@ func (r *OpenStackDataPlaneDeploymentReconciler) listNodeSets(ctx context.Contex } return &nodeSets, err } + +func setNodeSetAnsibleVarsFromHashes( + ctx context.Context, + helper *helper.Helper, + nodeSetInstance *dataplanev1.OpenStackDataPlaneNodeSet, + configMapHashes map[string]string, // configMapHashes from deployment.instance.configMapHashes + secretHashes map[string]string, // secretHashes from deployment.instance.secretHashes +) error { + namespace := nodeSetInstance.Namespace + + // Process NodeTemplate level AnsibleVarsFrom + if err := deployment.ProcessAnsibleVarsFrom(ctx, helper, namespace, configMapHashes, secretHashes, nodeSetInstance.Spec.NodeTemplate.Ansible.AnsibleVarsFrom); err != nil { + return err + } + + // Process individual Node level AnsibleVarsFrom + for _, node := range nodeSetInstance.Spec.Nodes { + if err := deployment.ProcessAnsibleVarsFrom(ctx, helper, namespace, configMapHashes, secretHashes, node.Ansible.AnsibleVarsFrom); err != nil { + return err + } + } + + return nil +} diff --git a/internal/controller/dataplane/openstackdataplanenodeset_controller.go b/internal/controller/dataplane/openstackdataplanenodeset_controller.go index bf5758e3c..ea529dc05 100644 --- a/internal/controller/dataplane/openstackdataplanenodeset_controller.go +++ b/internal/controller/dataplane/openstackdataplanenodeset_controller.go @@ -933,17 +933,23 @@ func checkAnsibleVarsFromChanged( deployedConfigMapHashes map[string]string, deployedSecretHashes map[string]string, ) (bool, error) { - // Compute current hashes for AnsibleVarsFrom ConfigMaps/Secrets currentConfigMapHashes := make(map[string]string) currentSecretHashes := make(map[string]string) - err := deployment.GetNodeSetAnsibleVarsFromHashes( - ctx, helper, instance, currentConfigMapHashes, currentSecretHashes) - if err != nil { - helper.GetLogger().Error(err, "Unable to compute AnsibleVarsFrom hashes") + namespace := instance.Namespace + + // Process NodeTemplate level AnsibleVarsFrom + if err := deployment.ProcessAnsibleVarsFrom(ctx, helper, namespace, currentConfigMapHashes, currentSecretHashes, instance.Spec.NodeTemplate.Ansible.AnsibleVarsFrom); err != nil { return false, err } + // Process individual Node level AnsibleVarsFrom + for _, node := range instance.Spec.Nodes { + if err := deployment.ProcessAnsibleVarsFrom(ctx, helper, namespace, currentConfigMapHashes, currentSecretHashes, node.Ansible.AnsibleVarsFrom); err != nil { + return false, err + } + } + // Compare current ConfigMap hashes with deployed hashes for name, currentHash := range currentConfigMapHashes { if deployedHash, exists := deployedConfigMapHashes[name]; !exists || deployedHash != currentHash { diff --git a/internal/dataplane/hashes.go b/internal/dataplane/hashes.go index 84684fc75..0169e1ebc 100644 --- a/internal/dataplane/hashes.go +++ b/internal/dataplane/hashes.go @@ -101,59 +101,42 @@ func GetDeploymentHashesForService( return nil } -// GetNodeSetAnsibleVarsFromHashes computes hashes for ConfigMaps and Secrets -// referenced in the NModeSet's AnsibleVarsFrom field (both NodeTemplate and +// ProcessAnsibleVarsFrom computes hashes for ConfigMaps and Secrets +// referenced in the NodeSet's AnsibleVarsFrom field (both NodeTemplate and // individual Nodes) -func GetNodeSetAnsibleVarsFromHashes( + +func ProcessAnsibleVarsFrom( ctx context.Context, helper *helper.Helper, - instance *dataplanev1.OpenStackDataPlaneNodeSet, + namespace string, configMapHashes map[string]string, secretHashes map[string]string, + varsFrom []dataplanev1.DataSource, ) error { - namespace := instance.Namespace + for _, dataSource := range varsFrom { + cm, sec, err := dataplaneutil.GetDataSourceCmSecret(ctx, helper, namespace, dataSource) - // helper function to process AnsibleVarsFrom data source - processAnsibleVarsFrom := func(varsFrom []dataplanev1.DataSource) error { - for _, dataSource := range varsFrom { - cm, sec, err := dataplaneutil.GetDataSourceCmSecret(ctx, helper, namespace, dataSource) + if err != nil { + return err + } + if cm != nil { + hash, err := configmap.Hash(cm) if err != nil { + helper.GetLogger().Error(err, "Unable to hash ConfigMap", "configMap", cm.Name) return err } - - if cm != nil { - hash, err := configmap.Hash(cm) - if err != nil { - helper.GetLogger().Error(err, "Unable to hash ConfigMap", "configMap", cm.Name) - return err - } - configMapHashes[cm.Name] = hash - } - - if sec != nil { - hash, err := secret.Hash(sec) - if err != nil { - helper.GetLogger().Error(err, "Unable to hash Secret", "secret", sec.Name) - return err - } - secretHashes[sec.Name] = hash - } + configMapHashes[cm.Name] = hash } - return nil - } - // Process NodeTemplate level AnsibleVarsFrom - if err := processAnsibleVarsFrom(instance.Spec.NodeTemplate.Ansible.AnsibleVarsFrom); err != nil { - return err - } - - // Process individual Node level AnsibleVarsFrom - for _, node := range instance.Spec.Nodes { - if err := processAnsibleVarsFrom(node.Ansible.AnsibleVarsFrom); err != nil { - return nil + if sec != nil { + hash, err := secret.Hash(sec) + if err != nil { + helper.GetLogger().Error(err, "Unable to hash Secret", "secret", sec.Name) + return err + } + secretHashes[sec.Name] = hash } } - return nil } From ddd51dda18b7a7dc750b8f15dd3644a079d0f42a Mon Sep 17 00:00:00 2001 From: oliashish Date: Wed, 21 Jan 2026 08:10:02 -0500 Subject: [PATCH 4/6] fix: added test cases for ansibleVarsFrom changes --- .../08-ansiblevars-deploy.yaml | 40 +++++++++++++++++++ .../08-assert.yaml | 37 +++++++++++++++++ .../09-ansiblevars-update.yaml | 14 +++++++ .../09-assert.yaml | 19 +++++++++ 4 files changed, 110 insertions(+) create mode 100644 test/kuttl/tests/dataplane-deploy-no-nodes-test/08-ansiblevars-deploy.yaml create mode 100644 test/kuttl/tests/dataplane-deploy-no-nodes-test/08-assert.yaml create mode 100644 test/kuttl/tests/dataplane-deploy-no-nodes-test/09-ansiblevars-update.yaml create mode 100644 test/kuttl/tests/dataplane-deploy-no-nodes-test/09-assert.yaml diff --git a/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-ansiblevars-deploy.yaml b/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-ansiblevars-deploy.yaml new file mode 100644 index 000000000..1279cbd45 --- /dev/null +++ b/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-ansiblevars-deploy.yaml @@ -0,0 +1,40 @@ +# Test ansibleVarsFrom ConfigMap/Secret change detection +# Create ConfigMap and Secret for ansibleVarsFrom +apiVersion: v1 +kind: ConfigMap +metadata: + name: ansiblevars-test-cm +data: + test_var: original-value +--- +apiVersion: v1 +kind: Secret +metadata: + name: ansiblevars-test-secret +stringData: + secret_var: original-secret-value +--- +# Patch existing NodeSet to add ansibleVarsFrom +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneNodeSet +metadata: + name: edpm-compute-no-nodes +spec: + nodeTemplate: + ansible: + ansibleVarsFrom: + - configMapRef: + name: ansiblevars-test-cm + - secretRef: + name: ansiblevars-test-secret +--- +# Create deployment to capture the hashes +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneDeployment +metadata: + name: edpm-ansiblevars-deploy +spec: + nodeSets: + - edpm-compute-no-nodes + servicesOverride: + - configure-os diff --git a/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-assert.yaml b/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-assert.yaml new file mode 100644 index 000000000..c7c448c8d --- /dev/null +++ b/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-assert.yaml @@ -0,0 +1,37 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 600 +collectors: +- type: command + command: oc logs -n openstack-operators -l openstack.org/operator-name=openstack + name: operator-logs +--- +# Assert NodeSet is Ready with configMapHashes populated +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneNodeSet +metadata: + name: edpm-compute-no-nodes + namespace: openstack-kuttl-tests +status: + conditions: + - message: NodeSet Ready + reason: Ready + status: "True" + type: Ready + configMapHashes: + ansiblevars-test-cm: {} + secretHashes: + ansiblevars-test-secret: {} +--- +# Assert deployment completed with hashes +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneDeployment +metadata: + name: edpm-ansiblevars-deploy + namespace: openstack-kuttl-tests +status: + deployed: true + configMapHashes: + ansiblevars-test-cm: {} + secretHashes: + ansiblevars-test-secret: {} diff --git a/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-ansiblevars-update.yaml b/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-ansiblevars-update.yaml new file mode 100644 index 000000000..e6361a45e --- /dev/null +++ b/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-ansiblevars-update.yaml @@ -0,0 +1,14 @@ +# Update ConfigMap and Secret content to trigger change detection +apiVersion: v1 +kind: ConfigMap +metadata: + name: ansiblevars-test-cm +data: + test_var: updated-value +--- +apiVersion: v1 +kind: Secret +metadata: + name: ansiblevars-test-secret +stringData: + secret_var: updated-secret-value diff --git a/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-assert.yaml b/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-assert.yaml new file mode 100644 index 000000000..af867834e --- /dev/null +++ b/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-assert.yaml @@ -0,0 +1,19 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 600 +collectors: +- type: command + command: oc logs -n openstack-operators -l openstack.org/operator-name=openstack + name: operator-logs +--- +# Assert NodeSet is NOT Ready after ConfigMap/Secret content changed +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneNodeSet +metadata: + name: edpm-compute-no-nodes + namespace: openstack-kuttl-tests +status: + conditions: + - reason: Requested + status: "False" + type: Ready From 35d6f7158fa7da1d5cc85253a3ba1bf6ad4698a6 Mon Sep 17 00:00:00 2001 From: oliashish Date: Wed, 21 Jan 2026 08:11:29 -0500 Subject: [PATCH 5/6] removed extra line after comment --- internal/dataplane/hashes.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/dataplane/hashes.go b/internal/dataplane/hashes.go index 0169e1ebc..7374ee56d 100644 --- a/internal/dataplane/hashes.go +++ b/internal/dataplane/hashes.go @@ -104,7 +104,6 @@ func GetDeploymentHashesForService( // ProcessAnsibleVarsFrom computes hashes for ConfigMaps and Secrets // referenced in the NodeSet's AnsibleVarsFrom field (both NodeTemplate and // individual Nodes) - func ProcessAnsibleVarsFrom( ctx context.Context, helper *helper.Helper, From e662eecad867a955904168855b2b4cda14bedc2a Mon Sep 17 00:00:00 2001 From: oliashish Date: Wed, 21 Jan 2026 16:53:37 -0500 Subject: [PATCH 6/6] fix: test cases and verified them --- .../08-ansiblevars-deploy.yaml | 8 +++ .../08-assert.yaml | 32 ++++++++++-- .../09-ansiblevars-update.yaml | 11 ++++ .../09-assert.yaml | 50 +++++++++++++++++-- 4 files changed, 94 insertions(+), 7 deletions(-) diff --git a/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-ansiblevars-deploy.yaml b/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-ansiblevars-deploy.yaml index 1279cbd45..d1651e982 100644 --- a/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-ansiblevars-deploy.yaml +++ b/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-ansiblevars-deploy.yaml @@ -1,4 +1,12 @@ # Test ansibleVarsFrom ConfigMap/Secret change detection +# First, delete the failed deployment from step 05 to clear the NodeSet error state +# This step can be ignored if we did not want to check the status of the nodeSet +# and verify if that is waiting for deployment. +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: oc delete openstackdataplanedeployment edpm-compute-no-nodes-non-existent-service -n openstack-kuttl-tests --ignore-not-found=true +--- # Create ConfigMap and Secret for ansibleVarsFrom apiVersion: v1 kind: ConfigMap diff --git a/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-assert.yaml b/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-assert.yaml index c7c448c8d..19c952c20 100644 --- a/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-assert.yaml +++ b/test/kuttl/tests/dataplane-deploy-no-nodes-test/08-assert.yaml @@ -18,10 +18,34 @@ status: reason: Ready status: "True" type: Ready + - message: Deployment completed + reason: Ready + status: "True" + type: DeploymentReady + - message: Input data complete + reason: Ready + status: "True" + type: InputReady + - message: NodeSetDNSDataReady ready + reason: Ready + status: "True" + type: NodeSetDNSDataReady + - message: NodeSetIPReservationReady ready + reason: Ready + status: "True" + type: NodeSetIPReservationReady + - message: ServiceAccount created + reason: Ready + status: "True" + type: ServiceAccountReady + - message: Setup complete + reason: Ready + status: "True" + type: SetupReady configMapHashes: - ansiblevars-test-cm: {} + ansiblevars-test-cm: n5bbhc6h5fdhf8h57bh665h5b9h576h598h7dh5fdh667hch5b5h89h9dh668hc4hc6h669h74h575hf4h596h66dhd5h5f7hb7h689hf9hddh64q secretHashes: - ansiblevars-test-secret: {} + ansiblevars-test-secret: n5d8h67h5b8hc9h5cfh54bh76h544h66chf7h8bh5fbh59chdch76h96h54bh74h9bh5bh5cdh94h566h699h99hdch65fh5d6h5fbh5bfh586hfcq --- # Assert deployment completed with hashes apiVersion: dataplane.openstack.org/v1beta1 @@ -32,6 +56,6 @@ metadata: status: deployed: true configMapHashes: - ansiblevars-test-cm: {} + ansiblevars-test-cm: n5bbhc6h5fdhf8h57bh665h5b9h576h598h7dh5fdh667hch5b5h89h9dh668hc4hc6h669h74h575hf4h596h66dhd5h5f7hb7h689hf9hddh64q secretHashes: - ansiblevars-test-secret: {} + ansiblevars-test-secret: n5d8h67h5b8hc9h5cfh54bh76h544h66chf7h8bh5fbh59chdch76h96h54bh74h9bh5bh5cdh94h566h699h99hdch65fh5d6h5fbh5bfh586hfcq diff --git a/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-ansiblevars-update.yaml b/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-ansiblevars-update.yaml index e6361a45e..05e6dc1ab 100644 --- a/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-ansiblevars-update.yaml +++ b/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-ansiblevars-update.yaml @@ -12,3 +12,14 @@ metadata: name: ansiblevars-test-secret stringData: secret_var: updated-secret-value +--- +# Create deployment to capture the new hashes after content update +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneDeployment +metadata: + name: edpm-ansiblevars-deploy-update +spec: + nodeSets: + - edpm-compute-no-nodes + servicesOverride: + - configure-os diff --git a/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-assert.yaml b/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-assert.yaml index af867834e..8e807b4d1 100644 --- a/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-assert.yaml +++ b/test/kuttl/tests/dataplane-deploy-no-nodes-test/09-assert.yaml @@ -6,7 +6,8 @@ collectors: command: oc logs -n openstack-operators -l openstack.org/operator-name=openstack name: operator-logs --- -# Assert NodeSet is NOT Ready after ConfigMap/Secret content changed +# Assert NodeSet is Ready after deployment with updated ConfigMap/Secret completes +# The hash values will differ from step 08 due to content change apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneNodeSet metadata: @@ -14,6 +15,49 @@ metadata: namespace: openstack-kuttl-tests status: conditions: - - reason: Requested - status: "False" + - message: NodeSet Ready + reason: Ready + status: "True" type: Ready + - message: Deployment completed + reason: Ready + status: "True" + type: DeploymentReady + - message: Input data complete + reason: Ready + status: "True" + type: InputReady + - message: NodeSetDNSDataReady ready + reason: Ready + status: "True" + type: NodeSetDNSDataReady + - message: NodeSetIPReservationReady ready + reason: Ready + status: "True" + type: NodeSetIPReservationReady + - message: ServiceAccount created + reason: Ready + status: "True" + type: ServiceAccountReady + - message: Setup complete + reason: Ready + status: "True" + type: SetupReady + configMapHashes: + ansiblevars-test-cm: nd7h5fdh54bh8chb7h5hc8h654hf8h5d5h66bh54dh56fh7bhf5h98h66fh59ch87h9ch5d6h664h668hb7h66fh7fh598h9fh57dhfh5fch655q + secretHashes: + ansiblevars-test-secret: n56hffh656h98hc9h4h79h86h5bfh695hd7h5f9h5d4h87h85h546h7dhc5h98h676h5fh66bh66bhb5h679h77hf8hdbh569h66dhb5h59dq +--- +# Assert deployment completed with new hashes +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneDeployment +metadata: + name: edpm-ansiblevars-deploy-update + namespace: openstack-kuttl-tests +status: + deployed: true + configMapHashes: + ansiblevars-test-cm: nd7h5fdh54bh8chb7h5hc8h654hf8h5d5h66bh54dh56fh7bhf5h98h66fh59ch87h9ch5d6h664h668hb7h66fh7fh598h9fh57dhfh5fch655q + secretHashes: + ansiblevars-test-secret: n56hffh656h98hc9h4h79h86h5bfh695hd7h5f9h5d4h87h85h546h7dhc5h98h676h5fh66bh66bhb5h679h77hf8hdbh569h66dhb5h59dq +