From feb1899b8afc380098ebd83f55e8654788e251a4 Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Fri, 27 Oct 2023 17:28:29 +0100 Subject: [PATCH] Ensure a valid name for AEE "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character " ref: https://github.com/openstack-k8s-operators/data-plane-adoption/pull/176#issuecomment-1782941506 When Label wasn't provided it was breaking the AEE deploy Signed-off-by: Fabricio Aguiar --- pkg/util/ansible_execution.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/util/ansible_execution.go b/pkg/util/ansible_execution.go index 213cae427..5598d57e3 100644 --- a/pkg/util/ansible_execution.go +++ b/pkg/util/ansible_execution.go @@ -56,7 +56,12 @@ func AnsibleExecution( return err } if ansibleEE == nil { - executionName := fmt.Sprintf("%s-%s", label, obj.GetName()) + var executionName string + if len(label) > 0 { + executionName = fmt.Sprintf("%s-%s", label, obj.GetName()) + } else { + executionName = obj.GetName() + } ansibleEE = &ansibleeev1.OpenStackAnsibleEE{ ObjectMeta: metav1.ObjectMeta{ Name: executionName,