apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: grean-seminar
spec:
  serviceName: workshop3
  replicas: 1
  selector:
    matchLabels:
      app: workshop3
  template:
    metadata:
      labels:
        app: workshop3
    spec:
      containers:
      - name: workshop3
        image: tomcat
        ports:
        - containerPort: 8080
          name: workshop3-app
        volumeMounts:
        - name: persistent-data
          mountPath: /usr/local/tomcat/webapps/persistent-data
  volumeClaimTemplates:
  - metadata:
      name: persistent-data
    spec:
      accessModes: [ "ReadWriteOnce" ]
      resources:
        requests:
          storage: 1Gi
