/init-c

Init Container for probing dependant services in Kubernetes

Primary LanguageShellMIT LicenseMIT

init-c

Init Container for probing dependant services in Kubernetes

Issues Docker Pulls Docker Image Version (latest by date) Docker Image Size (latest by date)

About

In certain use cases you would want to delay starting up your deployment by checking if dependent services are up either through http or tcp probing. This helps your services to boot up in the correct order, for reference check out this example. Particular use cases include service discovery and fetching startup configs for spring boot applications.

Features

  • HTTP probe
  • TCP Probe
  • DNS Probe

Usage

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
  namespace: default
  labels:
    app: frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: frontend
  template:
    metadata:
      labels:
        app: frontend
    spec:
      # Add your init container here            
      initContainers:
      - name: init-c
        image: jdube/init-c
        args: ['http', '-u', "http://backend.default"]
      containers:
      - name: frontend
        image: jdube/frontend
        ports:
        - containerPort: 8000

Local Testing

docker run --rm jdube/init-c http -u https://www.google.com

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.