@@ -24,7 +24,7 @@ type EEJob struct {
2424 Playbook string `json:"playbook,omitempty"`
2525 // Image is the container image that will execute the ansible command
2626 Image string `json:"image,omitempty"`
27- // Name is the name of the internal container inside the pod
27+ // Name is the name of the execution job
2828 Name string `json:"name,omitempty"`
2929 // Namespace - The kubernetes Namespace to create the job in
3030 Namespace string `json:"namespace,omitempty"`
@@ -67,14 +67,14 @@ type EEJob struct {
6767 NodeSelector map [string ]string `json:"nodeSelector,omitempty"`
6868}
6969
70- // JobForOpenStackAnsibleEE returns a openstackansibleee Job object
70+ // JobForOpenStackAnsibleEE returns a Job object
7171func (a * EEJob ) JobForOpenStackAnsibleEE (h * helper.Helper ) (* batchv1.Job , error ) {
7272 const (
7373 CustomPlaybook string = "playbook.yaml"
7474 CustomInventory string = "/runner/inventory/inventory.yaml"
7575 )
7676
77- ls := labelsForOpenStackAnsibleEE (a .Name , a . Labels )
77+ ls := labelsForOpenStackAnsibleEE (a .Labels )
7878
7979 args := a .Args
8080
@@ -212,16 +212,10 @@ func (a *EEJob) JobForOpenStackAnsibleEE(h *helper.Helper) (*batchv1.Job, error)
212212 return job , nil
213213}
214214
215- // labelsForOpenStackAnsibleEE returns the labels for selecting the resources
216- // belonging to the given openstackansibleee CR name.
217- func labelsForOpenStackAnsibleEE (name string , labels map [string ]string ) map [string ]string {
218- const ansibleEELabel string = "openstackansibleee"
219-
215+ // labelsForOpenStackAnsibleEE returns the labels for ansible execution job.
216+ func labelsForOpenStackAnsibleEE (labels map [string ]string ) map [string ]string {
220217 ls := map [string ]string {
221- "app" : ansibleEELabel ,
222- "job-name" : name ,
223- "openstackansibleee_cr" : name ,
224- "osaee" : "true" ,
218+ "app" : "openstackansibleee" ,
225219 }
226220 for key , val := range labels {
227221 ls [key ] = val
0 commit comments