Skip to content

Instantly share code, notes, and snippets.

@DazWilkin
Last active July 3, 2018 17:23
Show Gist options
  • Save DazWilkin/75e3f2a1a9419db476a91499b55b1086 to your computer and use it in GitHub Desktop.
Save DazWilkin/75e3f2a1a9419db476a91499b55b1086 to your computer and use it in GitHub Desktop.
Kubernetes Deployment Dependencies
---
apiVersion: v1
kind: Pod
metadata:
name: second-second
labels:
app: simple-config
component: second
spec:
restartPolicy: Never
initContainers:
- name: wait
image: dazwilkin/simple-config-client:v1
imagePullPolicy: Always
args:
- exists
- $(VARIABLE)"
env:
- name: SIMPLE_CONFIG_HOST
value: simple-config
- name: SIMPLE_CONFIG_PORT
value: "9999"
- name: SIMPLE_CONFIG_TIME
value: "120"
- name: VARIABLE
# Matches the metadata.name of the test Pod
value: plus/container
containers:
- name: container
image: dazwilkin/simple-config-client:v1
imagePullPolicy: Always
args:
- create
- $(VARIABLE)
env:
- name: SIMPLE_CONFIG_HOST
value: simple-config
- name: SIMPLE_CONFIG_PORT
value: "9999"
- name: SIMPLE_CONFIG_TIME
value: "120s"
- name: VARIABLE
value: plus/second
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment