Skip to main content
PyCon US is happening May 14th-22nd in Pittsburgh, PA USA.  Learn more

Pause container init until required kube services are ready,

Project description

Maintainer: Joe Black <joeblack949@gmail.com>

Repository: https://www.github.com/joeblackwaslike/kubewait

Description

This project is designed to be used to pause init as an init container until required Kubernetes apps/services are up and ready.

Names passed to kubewait can be the names of Deployments or StatefulSets.

Usage

apiVersion: v1
kind: Pod
metadata:
  name: kubewait
  annotations:
    pod.beta.kubernetes.io/init-containers: |-
        [
            {
                "name": "kubewait",
                "image": "callforamerica/kubewait",
                "imagePullPolicy": "IfNotPresent",
                "args": ["app1", "app2"],
                "env": [
                    {
                        "name": "NAMESPACE",
                        "valueFrom": {
                            "fieldRef": {
                                "apiVersion": "v1",
                                "fieldPath": "metadata.namespace"
                            }
                        }
                    }
                ]
            }
        ]
spec:
  containers:
  - name: nginx
    image: nginx
    ports:
    - containerPort: 80

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page