Skip to content

Commit

Permalink
ip-reconciler: fire up cronjob every 5 mins
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Jul 12, 2021
1 parent 4399f03 commit 1f6f75d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ RUN ./hack/build-go.sh
FROM alpine:latest
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/whereabouts
COPY --from=0 /go/src/github.com/dougbtv/whereabouts/bin/whereabouts .
COPY --from=0 /go/src/github.com/dougbtv/whereabouts/bin/ip-reconciler .
COPY script/install-cni.sh .
CMD ["/install-cni.sh"]
34 changes: 34 additions & 0 deletions doc/ip-reconciler-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: ip-reconciler
labels:
tier: node
app: whereabouts
spec:
schedule: "*/5 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: whereabouts
image: ghcr.io/k8snetworkplumbingwg/whereabouts:latest-amd64
resources:
requests:
cpu: "100m"
memory: "50Mi"
limits:
cpu: "100m"
memory: "50Mi"
command:
- /ip-reconciler
- -kubeconfig=/host/etc/cni/net.d/whereabouts.d/whereabouts.kubeconfig
volumeMounts:
- name: cni-net-dir
mountPath: /host/etc/cni/net.d
volumes:
- name: cni-net-dir
hostPath:
path: /etc/cni/net.d
restartPolicy: OnFailure

0 comments on commit 1f6f75d

Please sign in to comment.