Skip to content

Commit

Permalink
Merge pull request #105 from cschwede/run-swift-recon-cron
Browse files Browse the repository at this point in the history
Run swift-recon-cron
  • Loading branch information
cschwede authored Feb 1, 2024
2 parents 010c730 + ac5ba65 commit 8f95fe2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/swiftstorage/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ func getStorageContainers(swiftstorage *swiftv1beta1.SwiftStorage) []corev1.Cont
VolumeMounts: getStorageVolumeMounts(),
Command: []string{"/usr/bin/rsync", "--daemon", "--no-detach", "--config=/etc/swift/rsyncd.conf", "--log-file=/dev/stdout"},
},
{
Name: "swift-recon-cron",
Image: swiftstorage.Spec.ContainerImageObject,
ImagePullPolicy: corev1.PullIfNotPresent,
SecurityContext: &securityContext,
VolumeMounts: getStorageVolumeMounts(),
Command: []string{"sh", "-c", "while true; do /usr/bin/swift-recon-cron /etc/swift/object-server.conf -v; sleep 300; done"},
},
}
}

Expand Down
11 changes: 11 additions & 0 deletions pkg/swiftstorage/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ func getStorageVolumes(instance *swiftv1beta1.SwiftStorage) []corev1.Volume {
},
},
},
{
Name: "lock",
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{Medium: ""},
},
},
}
}

Expand Down Expand Up @@ -125,5 +131,10 @@ func getStorageVolumeMounts() []corev1.VolumeMount {
MountPath: "/usr/local/bin/container-scripts",
ReadOnly: true,
},
{
Name: "lock",
MountPath: "/var/lock",
ReadOnly: false,
},
}
}

0 comments on commit 8f95fe2

Please sign in to comment.