83 lines
1.8 KiB
YAML
83 lines
1.8 KiB
YAML
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: minio-provisioner
|
|
namespace: minio
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: secret-writer
|
|
namespace: minio
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["secrets"]
|
|
verbs: ["create", "get", "update", "patch"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: minio-provisioner-secret-writer
|
|
namespace: minio
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: minio-provisioner
|
|
namespace: minio
|
|
roleRef:
|
|
kind: Role
|
|
name: secret-writer
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: minio
|
|
namespace: minio
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels: {app: minio}
|
|
template:
|
|
metadata:
|
|
labels: {app: minio}
|
|
spec:
|
|
containers:
|
|
- name: minio
|
|
image: quay.io/minio/minio:latest
|
|
args: ["server", "/data", "--console-address", ":9001"]
|
|
env:
|
|
- name: MINIO_ROOT_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: minio-admin-credentials
|
|
key: MINIO_ROOT_USER
|
|
- name: MINIO_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: minio-admin-credentials
|
|
key: MINIO_ROOT_PASSWORD
|
|
ports:
|
|
- containerPort: 9000
|
|
- containerPort: 9001
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
volumes:
|
|
- name: data
|
|
emptyDir: {} # TODO: Make it persistant
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: minio
|
|
namespace: minio
|
|
spec:
|
|
selector: {app: minio}
|
|
ports:
|
|
- name: api
|
|
port: 9000
|
|
targetPort: 9000
|
|
- name: console
|
|
port: 9001
|
|
targetPort: 9001
|