apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: akka-bootstrap-demo
  name: akka-bootstrap-demo
spec:
  replicas: 3
  selector:
    matchLabels:
      app: akka-bootstrap-demo
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate

  template:
    metadata:
      labels:
        app: akka-bootstrap-demo
        actorSystemName: akka-bootstrap-demo
    spec:
      containers:
        - name: akka-bootstrap-demo
          image: example:0.0.1-0-175f7bfc-20210628-1556
          # Remove for a real project, the image is picked up locally for the integration test
          imagePullPolicy: Never
          livenessProbe:
            httpGet:
              path: /alive
              port: management
          readinessProbe:
            httpGet:
              path: /ready
              port: management
          ports:
            # akka-management bootstrap
            - containerPort: 8558
              protocol: TCP
              # when contact-point-discovery.port-name is set for cluster bootstrap,
              # the management port must be named accordingly:
              name: management
          env:
            # The Kubernetes API discovery will use this service name to look for
            # nodes with this value in the 'app' label.
            # This can be customized with the 'pod-label-selector' setting.
            - name: AKKA_CLUSTER_BOOTSTRAP_SERVICE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: "metadata.labels['app']"