Skip to content

Commit

Permalink
Merge pull request #2 from gobackup/dev
Browse files Browse the repository at this point in the history
Add image pull policy to job
  • Loading branch information
payamQorbanpour authored Mar 1, 2024
2 parents 8887c8c + 4c7cb67 commit cc8417c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions internal/controller/cronbackup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ func (r *CronBackupReconciler) createBackupJob(ctx context.Context) (*batchv1.Jo
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "gobackup",
Image: "huacnlee/gobackup",
Command: []string{"/bin/sh", "-c", "gobackup perform"},
Name: "gobackup",
Image: "huacnlee/gobackup",
ImagePullPolicy: corev1.PullIfNotPresent,
Command: []string{"/bin/sh", "-c", "gobackup perform"},
VolumeMounts: []corev1.VolumeMount{
{
Name: "gobackup-secret-volume",
Expand Down Expand Up @@ -166,9 +167,10 @@ func (r *CronBackupReconciler) createBackupCronJob(ctx context.Context) (*batchv
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "gobackup",
Image: "huacnlee/gobackup",
Command: []string{"/bin/sh", "-c", "gobackup perform"},
Name: "gobackup",
Image: "huacnlee/gobackup",
ImagePullPolicy: corev1.PullIfNotPresent,
Command: []string{"/bin/sh", "-c", "gobackup perform"},
VolumeMounts: []corev1.VolumeMount{
{
Name: "gobackup-secret-volume",
Expand Down

0 comments on commit cc8417c

Please sign in to comment.