| 60 | |
| 61 | |
| 62 | class SyncSampleJob(SampleJob): |
| 63 | |
| 64 | def get_spec(self, spec): |
| 65 | return { |
| 66 | "apiVersion": "%s/%s" % (self.group, self.version), |
| 67 | "kind": "SampleJob", |
| 68 | "metadata": { |
| 69 | "name": f"{spec.get('name')}-sync", |
| 70 | "namespace": spec.get("namespace"), |
| 71 | }, |
| 72 | "spec": { |
| 73 | "type": "sync", |
| 74 | "sampleSetRef": { |
| 75 | "name": "data-center" |
| 76 | }, |
| 77 | "secretRef": { |
| 78 | "name": spec.get("source_secret") |
| 79 | }, |
| 80 | "syncOptions": { |
| 81 | "source": spec.get("source_uri"), |
| 82 | "destination": spec.get("name"), |
| 83 | } |
| 84 | }, |
| 85 | } |
| 86 | |
| 87 | |
| 88 | class WarmupSampleJob(SampleJob): |