---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: topology-aware-0
provisioner: cinder.csi.openstack.org
parameters:
  availability: nova
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: "pvc-0"
  namespace: "cinder-test"
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  storageClassName: topology-aware-0
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: demo-0
  namespace: "cinder-test"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: demo-0
      cinder-az: nova
      nova-az: nova
  template:
    metadata:
      labels:
        app: demo-0
        cinder-az: nova
        nova-az: nova
    spec:
      securityContext:
        runAsNonRoot: true
        seccompProfile:
          type: RuntimeDefault
      containers:
      - name: demo
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
        image: quay.io/kuryr/demo
        ports:
        - containerPort: 80
          protocol: TCP
        volumeMounts:
          - mountPath: /var/lib/www/data
            name: mydata
      nodeSelector:
        topology.cinder.csi.openstack.org/zone: nova
      volumes:
        - name: mydata
          persistentVolumeClaim:
            claimName: pvc-0
            readOnly: false
