inheritJobMetadata propagates the cluster's inherited annotations and labels onto an instance Job and its pod template.
(cluster *apiv1.Cluster, job *batchv1.Job)
| 1302 | // inheritJobMetadata propagates the cluster's inherited annotations and labels |
| 1303 | // onto an instance Job and its pod template. |
| 1304 | func inheritJobMetadata(cluster *apiv1.Cluster, job *batchv1.Job) { |
| 1305 | utils.InheritAnnotations(&job.ObjectMeta, cluster.Annotations, |
| 1306 | cluster.GetFixedInheritedAnnotations(), configuration.Current) |
| 1307 | utils.InheritAnnotations(&job.Spec.Template.ObjectMeta, cluster.Annotations, |
| 1308 | cluster.GetFixedInheritedAnnotations(), configuration.Current) |
| 1309 | utils.InheritLabels(&job.ObjectMeta, cluster.Labels, |
| 1310 | cluster.GetFixedInheritedLabels(), configuration.Current) |
| 1311 | utils.InheritLabels(&job.Spec.Template.ObjectMeta, cluster.Labels, |
| 1312 | cluster.GetFixedInheritedLabels(), configuration.Current) |
| 1313 | } |
| 1314 | |
| 1315 | // getOriginBackup gets the backup that is used to bootstrap a new PostgreSQL cluster |
| 1316 | func (r *ClusterReconciler) getOriginBackup(ctx context.Context, cluster *apiv1.Cluster) (*apiv1.Backup, error) { |
no test coverage detected