Skip to content

Commit

Permalink
Ensure a valid name for AEE
Browse files Browse the repository at this point in the history
"a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character "
ref:  openstack-k8s-operators/data-plane-adoption#176 (comment)

When Label wasn't provided it was breaking the AEE deploy

Signed-off-by: Fabricio Aguiar <[email protected]>
  • Loading branch information
fao89 authored and pinikomarov committed Nov 4, 2023
1 parent 758d82f commit feb1899
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/util/ansible_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit feb1899

Please sign in to comment.