apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: ha-flink-ha-data
  namespace: freeleaps-data-platform
  labels:
    app: flink
    component: ha-storage
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: azure-disk-std-ssd-lrs
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: ha-flink-checkpoints
  namespace: freeleaps-data-platform
  labels:
    app: flink
    component: checkpoint-storage
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi
  storageClassName: azure-disk-std-ssd-lrs
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: ha-flink-savepoints
  namespace: freeleaps-data-platform
  labels:
    app: flink
    component: savepoint-storage
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi
  storageClassName: azure-disk-std-ssd-lrs
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: flink
  namespace: freeleaps-data-platform
  labels:
    app: flink
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: flink-role
  namespace: freeleaps-data-platform
rules:
- apiGroups: [""]
  resources: ["configmaps", "secrets", "services", "pods"]
  verbs: ["get", "list", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
  resources: ["deployments"]
  verbs: ["get", "list", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: flink-role-binding
  namespace: freeleaps-data-platform
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: flink-role
subjects:
- kind: ServiceAccount
  name: flink
  namespace: freeleaps-data-platform
