bgpwtf/cccampix: cronjobify ripe-sync

Change-Id: I185c2702384941b6537a6a4048bdb2e1c4e183ba
diff --git a/bgpwtf/cccampix/kube/ix.libsonnet b/bgpwtf/cccampix/kube/ix.libsonnet
index 1503a47..597252d 100644
--- a/bgpwtf/cccampix/kube/ix.libsonnet
+++ b/bgpwtf/cccampix/kube/ix.libsonnet
@@ -5,7 +5,7 @@
         local ix = self,
         local cfg = ix.cfg,
         cfg:: {
-            image: "registry.k0.hswaw.net/bgpwtf/cccampix:1565559239-95928eecd7e35e8582fa011d1457643ca398c310",
+            image: "registry.k0.hswaw.net/bgpwtf/cccampix:1565566961-49bf87f8e1ff80e35acd8eb9fc699c4ae0bf250e",
 
             domain: "ix-status.bgp.wtf",
             octorpki: {
@@ -213,6 +213,40 @@
             ],
         },
 
+        ripeSync: kube.CronJob(ix.name("ripe-sync")) {
+            metadata+: ix.metadata("ripe-sync"),
+            spec+: {
+                schedule: "*/5 * * * *",
+                jobTemplate+: {
+                    spec+: {
+                        selector:: null,
+                        template+: {
+                            spec+: {
+                                containers_: {
+                                    "ripe-sync": kube.Container(ix.name("ripe-sync")) {
+                                        image: cfg.image,
+                                        args: [
+                                            "/ix/ripe-sync.par",
+                                            "$(PASSWORD)",
+                                            ix.verifier.address,
+                                        ],
+                                        env_: {
+                                            PASSWORD: {
+                                                secretKeyRef: {
+                                                    name: ix.name("ripe-sync"),
+                                                    key: "password",
+                                                },
+                                            },
+                                        },
+                                    },
+                                },
+                            },
+                        },
+                    },
+                },
+            },
+        },
+
         ingress: kube.Ingress("ingress") {
             metadata+: ix.metadata("public") {
                 annotations+: {