Created
October 29, 2020 18:32
-
-
Save slotlocker2/a7b2fb6cddda27738a9140476cda076f to your computer and use it in GitHub Desktop.
config.yaml
This file contains 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/v1 | |
kind: StatefulSet | |
metadata: | |
name: dgraph | |
spec: | |
serviceName: "dgraph" | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: dgraph | |
template: | |
metadata: | |
labels: | |
app: dgraph | |
spec: | |
containers: | |
- name: ratel | |
image: dgraph/dgraph:latest | |
imagePullPolicy: IfNotPresent | |
ports: | |
- containerPort: 8000 | |
name: http-ratel | |
command: | |
- dgraph-ratel | |
- name: zero | |
image: dgraph/dgraph:latest | |
imagePullPolicy: IfNotPresent | |
ports: | |
- containerPort: 5080 | |
name: grpc-zero | |
- containerPort: 6080 | |
name: http-zero | |
volumeMounts: | |
- name: zerodir | |
mountPath: /dgraph | |
command: | |
- bash | |
- "-c" | |
- | | |
set -ex | |
dgraph zero --my=$(hostname -f):5080 | |
- name: alpha | |
image: dgraph/dgraph:latest | |
imagePullPolicy: IfNotPresent | |
ports: | |
- containerPort: 8080 | |
name: http-alpha | |
- containerPort: 9080 | |
name: grpc-alpha | |
volumeMounts: | |
- name: alphadir | |
mountPath: /dgraph | |
env: | |
- name: POD_NAMESPACE | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace | |
command: | |
- bash | |
- "-c" | |
- | | |
set -ex | |
dgraph alpha --my=$(hostname -f):7080 --zero dgraph-0.dgraph.${POD_NAMESPACE}.svc.cluster.local:5080 | |
terminationGracePeriodSeconds: 60 | |
volumes: | |
- name: alphadir | |
hostPath: | |
path: /dgraph-host-mount/alpha | |
type: Directory | |
- name: zerodir | |
hostPath: | |
path: /dgraph-host-mount/zero | |
type: Directory |
This file contains 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
kind: Cluster | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
nodes: | |
- role: control-plane | |
- role: worker | |
extraMounts: | |
- hostPath: /home/slotlocker/dgraph-host-mount | |
containerPath: /dgraph-host-mount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment