Created
July 26, 2017 21:25
-
-
Save grampelberg/f23a330ee5bccb48ac4f02b695d8ab05 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1beta1 | |
kind: StatefulSet | |
metadata: | |
name: bk | |
labels: | |
component: bk | |
spec: | |
serviceName: bk | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
component: bk | |
spec: | |
containers: | |
- name: bk | |
image: streamlio/pulsar:latest | |
resources: | |
requests: | |
cpu: 10m | |
command: ["sh", "-c"] | |
args: | |
- > | |
bin/apply-config-from-env.py conf/bookkeeper.conf; | |
bin/bookkeeper shell metaformat --nonInteractive || true; | |
bin/pulsar bookie | |
ports: | |
- containerPort: 3181 | |
envFrom: | |
- configMapRef: | |
name: bk-config | |
# TODO: add a readinessProbe | |
livenessProbe: | |
exec: | |
command: | |
- /bin/bash | |
- -c | |
- > | |
/pulsar/bin/bookkeeper shell listbookies -rw \ | |
| grep $(nslookup $HOSTNAME.bk \ | |
| tail -n 2 \ | |
| awk '{ print $2 }') | |
initialDelaySeconds: 5 | |
timeoutSeconds: 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment