Skip to content

Commit

Permalink
Pass network attachments to dbsync job
Browse files Browse the repository at this point in the history
This was probably missed during some refactor as the network attachments
was gathered but then it was unused.
  • Loading branch information
gibizer committed Apr 29, 2024
1 parent 9dba2cc commit 44030f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/designate_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func (r *DesignateReconciler) reconcileInit(
// run Designate db sync
//
dbSyncHash := instance.Status.Hash[designatev1beta1.DbSyncHash]
jobDef := designate.DbSyncJob(instance, serviceLabels)
jobDef := designate.DbSyncJob(instance, serviceLabels, serviceAnnotations)

dbSyncjob := job.NewJob(
jobDef,
Expand Down
4 changes: 4 additions & 0 deletions pkg/designate/dbsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const (
func DbSyncJob(
instance *designatev1beta1.Designate,
labels map[string]string,
annotations map[string]string,
) *batchv1.Job {
runAsUser := int64(0)
initVolumeMounts := getInitVolumeMounts()
Expand All @@ -51,6 +52,9 @@ func DbSyncJob(
},
Spec: batchv1.JobSpec{
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Annotations: annotations,
},
Spec: corev1.PodSpec{
RestartPolicy: corev1.RestartPolicyOnFailure,
ServiceAccountName: instance.RbacResourceName(),
Expand Down

0 comments on commit 44030f3

Please sign in to comment.