@@ -666,9 +666,11 @@ func CustomizeLTPAJob(job *v1.Job, la *wlv1.WebSphereLibertyApplication, ltpaSec
666666 job .Spec .Template .ObjectMeta .Name = "liberty"
667667 job .Spec .Template .Spec .Containers = []corev1.Container {
668668 {
669- Name : job .Spec .Template .ObjectMeta .Name ,
670- Image : la .GetApplicationImage (),
671- Command : []string {"/bin/bash" , "-c" },
669+ Name : job .Spec .Template .ObjectMeta .Name ,
670+ Image : la .GetApplicationImage (),
671+ ImagePullPolicy : * la .GetPullPolicy (),
672+ SecurityContext : rcoutils .GetSecurityContext (la ),
673+ Command : []string {"/bin/bash" , "-c" },
672674 // Usage: /bin/create_ltpa_keys.sh <namespace> <ltpa-secret-name> <securityUtility-encoding>
673675 Args : []string {ltpaKeysMountPath + "/bin/create_ltpa_keys.sh " + la .GetNamespace () + " " + ltpaSecretName + " " + ltpaKeysFileName + " " + encodingType },
674676 VolumeMounts : []corev1.VolumeMount {
@@ -679,6 +681,11 @@ func CustomizeLTPAJob(job *v1.Job, la *wlv1.WebSphereLibertyApplication, ltpaSec
679681 },
680682 },
681683 }
684+ if la .GetPullSecret () != nil && * la .GetPullSecret () != "" {
685+ job .Spec .Template .Spec .ImagePullSecrets = append (job .Spec .Template .Spec .ImagePullSecrets , corev1.LocalObjectReference {
686+ Name : * la .GetPullSecret (),
687+ })
688+ }
682689 job .Spec .Template .Spec .ServiceAccountName = serviceAccountName
683690 job .Spec .Template .Spec .RestartPolicy = corev1 .RestartPolicyOnFailure
684691 var number int32
0 commit comments