kind: Deployment
apiVersion: apps/v1
metadata:
  labels:
    app.kubernetes.io/name: gomodstore
  name: gomodstore
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: gomodstore
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
  template:
    metadata:
      labels:
        app.kubernetes.io/name: gomodstore
    spec:
      securityContext:
        fsGroup: 65534
        runAsGroup: 65534
        runAsNonRoot: true
        runAsUser: 65534
      terminationGracePeriodSeconds: 10
      imagePullSecrets:
        - name: regcred
      containers:
        - name: gomodstore
          image: us.gcr.io/com-seankhliao/gomodstore:latest
          volumeMounts:
            - name: storage
              mountPath: /data
      volumes:
        - name: storage
          persistentVolumeClaim:
            claimName: gomodstore
