apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: clock-deployment
  labels:
    app: clock
spec:
  serviceName: clock
  replicas: 3
  selector:
    matchLabels:
      app: clock
  template:
    metadata:
      labels: 
        app: clock
    spec:
      containers:
      - image: mexator/clock
        name: clock
        imagePullPolicy: Always
        ports:
          - containerPort: 5000
        volumeMounts:
          - name: access-logs
            mountPath: /logs/
        resources:
          limits:
            memory: 64M
            cpu: 100m
  volumeClaimTemplates:
    - metadata:
        name: access-logs
      spec:
        accessModes: [ "ReadWriteOnce" ]
        resources:
          requests:
            storage: 1Gi

