apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: server
  namespace: wago
  labels:
    app:
      server
spec:
  replicas: 5
  serviceName: cluster
  selector:
    matchLabels:
      app: server
  template:
    metadata:
      labels:
        app: server
    spec:
      containers:
        - name: server
          args:
            - --grpc-port=8080
            - --cluster=http://server-0.cluster:9020,http://server-1.cluster:9020,http://server-2.cluster:9020,http://server-3.cluster:9020,http://server-4.cluster:9020
            - --hostname-suffix=.cluster
            - --join
          image: index.docker.io/arlyon/wago:latest
          ports:
            - containerPort: 8080