apiVersion: apps/v1
kind: Deployment
metadata:
  name: janusgraph
  labels:
    app: janusgraph
spec:
  replicas: 3
  selector:
    matchLabels:
      app: janusgraph
  strategy:
    rollingUpdate:
      maxSurge: 0
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: janusgraph
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - janusgraph
            topologyKey: kubernetes.io/hostname
      containers:
      - name: janusgraph
        env:
        - name: JANUS_PROPS_TEMPLATE
          value: cql-es
        - name: gremlinserver.channelizer
          value: org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer
        - name: gremlinserver.gremlinPool
          value: "16"
        - name: janusgraph.index.search.hostname
          value: elasticsearch
        - name: janusgraph.query.force-index
          value: "true"
        - name: janusgraph.schema.default
          value: none
        - name: janusgraph.storage.hostname
          value: scylla
        image: janusgraph/janusgraph:0.5.2
        livenessProbe:
          httpGet:
            path: /?gremlin=100-1
            port: 8182
          initialDelaySeconds: 5
          periodSeconds: 30
        ports:
        - containerPort: 8182
