jarnfast / envoy-job-curl

Small image wired with envoy-preflight and curl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

envoy-job-curl

Small docker image wired with monzo/envoy-preflight and curl that are really usefull when running Kubernetes Jobs/CronJobs inside an Istio service mesh (or similar that injects envoy sidecars for jobs).

Envoy-preflight will handle terminating the envoy sidecar when the main container finishes.

Usage example

apiVersion: batch/v1
kind: CronJob
metadata:
  name: recurring-curl-poke
spec:
  schedule: "*/5 * * * *"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: curl-poker
              image: ghcr.io/jarnfast/envoy-job-curl:latest
              env:
                - name: ENVOY_ADMIN_API
                  value: http://localhost:15000
                - name: ENVOY_KILL_API
                  value: http://localhost:15020/quitquitquit
                - name: ALWAYS_KILL_ENVOY
                  value: "true"
              command: ["/usr/bin/envoy-preflight"]
              args:
              - "sh"
              - "-c"
              - curl -XPOST http://other.svc:80/do-something
          restartPolicy: Never

About

Small image wired with envoy-preflight and curl

License:MIT License


Languages

Language:Dockerfile 100.0%