Skip to content

Commit e054da2

Browse files
Merge pull request #1088 from rabi/interface
Drop EEJobInterface
2 parents e81d756 + ccf6020 commit e054da2

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pkg/dataplane/util/ansibleee.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,6 @@ type EEJob struct {
6565
Env []corev1.EnvVar `json:"env,omitempty"`
6666
}
6767

68-
// EEJobInterface defines the functions required to format AnsibleEE kubernetes jobs
69-
type EEJobInterface interface {
70-
JobForOpenStackAnsibleEE(h *helper.Helper) (*batchv1.Job, error)
71-
addEnvFrom(job *batchv1.Job)
72-
addMounts(job *batchv1.Job)
73-
}
74-
7568
// JobForOpenStackAnsibleEE returns a openstackansibleee Job object
7669
func (a *EEJob) JobForOpenStackAnsibleEE(h *helper.Helper) (*batchv1.Job, error) {
7770
const (
@@ -186,6 +179,7 @@ func (a *EEJob) JobForOpenStackAnsibleEE(h *helper.Helper) (*batchv1.Job, error)
186179
}
187180

188181
a.addMounts(job)
182+
a.addEnvFrom(job)
189183

190184
// if we have any extra vars for ansible to use set them in the RUNNER_EXTRA_VARS
191185
if len(a.ExtraVars) > 0 {
@@ -231,13 +225,12 @@ func labelsForOpenStackAnsibleEE(name string, labels map[string]string) map[stri
231225

232226
func (a *EEJob) addEnvFrom(job *batchv1.Job) {
233227
// Add optional config map
234-
235228
optional := true
236229
job.Spec.Template.Spec.Containers[0].EnvFrom = []corev1.EnvFromSource{
237230
{
238231
ConfigMapRef: &corev1.ConfigMapEnvSource{
239232
LocalObjectReference: corev1.LocalObjectReference{Name: a.EnvConfigMapName},
240-
Optional: &(optional),
233+
Optional: &optional,
241234
},
242235
},
243236
}

0 commit comments

Comments
 (0)