Skip to content

Commit

Permalink
fix(YAML): Update MinIO according to latest API (openebs#3130)
Browse files Browse the repository at this point in the history
Update standalone MinIO YAML spec for openebs Jiva default according to latest API version to work in K8s version >= 1.16

Signed-off-by: Ranjith R <ranjith.raveendran@mayadata.io>
  • Loading branch information
ranjithwingrider authored Sep 15, 2020
1 parent b162fca commit aa2df01
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 75 deletions.
32 changes: 18 additions & 14 deletions k8s/demo/minio/minio-standalone-cstor.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
apiVersion: extensions/v1beta1
# For k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio-deployment
spec:
selector:
matchLabels:
app: minio
strategy:
type: Recreate
template:
Expand All @@ -12,55 +16,55 @@ spec:
# Label is used as selector in the service.
app: minio
spec:
# Refer to the PVC created earlier
# Refer to the PVC
volumes:
- name: storage1
- name: storage
persistentVolumeClaim:
# Name of the PVC created earlier
claimName: minio-pv-claim1
claimName: minio-pv-claim
containers:
- name: minio
# Pulls the default Minio image from Docker Hub
image: minio/minio
image: minio/minio:latest
args:
- server
- /storage1
- /storage
env:
# Minio access key and secret key
- name: MINIO_ACCESS_KEY
value: "minio"
- name: MINIO_SECRET_KEY
value: "minio123"
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public"
value: "public"
ports:
- containerPort: 9000
hostPort: 9000
# Mount the volume into the pod
volumeMounts:
- name: storage1 # must match the volume name, above
mountPath: "/storage1"
- name: storage # must match the volume name, above
mountPath: "/storage"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-pv-claim1
name: minio-pv-claim
labels:
app: minio-storage-claim1
app: minio-storage-claim
spec:
storageClassName: openebs-sc-rep3
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
name: minio-service
labels:
app: minio
spec:
# type: LoadBalancer
ports:
- port: 9000
nodePort: 32701
Expand Down
34 changes: 18 additions & 16 deletions k8s/demo/minio/minio-standalone-jiva-default.yaml
Original file line number Diff line number Diff line change
@@ -1,68 +1,70 @@
apiVersion: extensions/v1beta1
# For k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio-deployment
spec:
selector:
matchLabels:
app: minio
strategy:
type: Recreate
template:
metadata:
labels:
# Label is used as selector in the service.
app: minio
openebs.io/target-affinity: minio
spec:
# Refer to the PVC created earlier
# Refer to the PVC
volumes:
- name: storage1
- name: storage
persistentVolumeClaim:
# Name of the PVC created earlier
claimName: minio-pv-claim1
claimName: minio-pv-claim
containers:
- name: minio
# Pulls the default Minio image from Docker Hub
image: minio/minio
image: minio/minio:latest
args:
- server
- /storage1
- /storage
env:
# Minio access key and secret key
- name: MINIO_ACCESS_KEY
value: "minio"
- name: MINIO_SECRET_KEY
value: "minio123"
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public"
value: "public"
ports:
- containerPort: 9000
hostPort: 9000
# Mount the volume into the pod
volumeMounts:
- name: storage1 # must match the volume name, above
mountPath: "/storage1"
- name: storage # must match the volume name, above
mountPath: "/storage"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-pv-claim1
name: minio-pv-claim
labels:
openebs.io/target-affinity: minio
app: minio-storage-claim1
app: minio-storage-claim
spec:
storageClassName: openebs-jiva-default
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
name: minio-service
labels:
app: minio
spec:
# type: LoadBalancer
ports:
- port: 9000
nodePort: 32701
Expand Down
34 changes: 18 additions & 16 deletions k8s/demo/minio/minio-standalone-jiva-storagepool.yaml
Original file line number Diff line number Diff line change
@@ -1,68 +1,70 @@
apiVersion: extensions/v1beta1
# For k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio-deployment
spec:
selector:
matchLabels:
app: minio
strategy:
type: Recreate
template:
metadata:
labels:
# Label is used as selector in the service.
app: minio
openebs.io/target-affinity: minio
spec:
# Refer to the PVC created earlier
# Refer to the PVC
volumes:
- name: storage1
- name: storage
persistentVolumeClaim:
# Name of the PVC created earlier
claimName: minio-pv-claim1
claimName: minio-pv-claim
containers:
- name: minio
# Pulls the default Minio image from Docker Hub
image: minio/minio
image: minio/minio:latest
args:
- server
- /storage1
- /storage
env:
# Minio access key and secret key
- name: MINIO_ACCESS_KEY
value: "minio"
- name: MINIO_SECRET_KEY
value: "minio123"
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public"
value: "public"
ports:
- containerPort: 9000
hostPort: 9000
# Mount the volume into the pod
volumeMounts:
- name: storage1 # must match the volume name, above
mountPath: "/storage1"
- name: storage # must match the volume name, above
mountPath: "/storage"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-pv-claim1
name: minio-pv-claim
labels:
openebs.io/target-affinity: minio
app: minio-storage-claim1
app: minio-storage-claim
spec:
storageClassName: openebs-jiva-3rep
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
name: minio-service
labels:
app: minio
spec:
# type: LoadBalancer
ports:
- port: 9000
nodePort: 32701
Expand Down
34 changes: 19 additions & 15 deletions k8s/demo/minio/minio-standalone-localpv-device.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
apiVersion: extensions/v1beta1
# For k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio-deployment
spec:
selector:
matchLabels:
app: minio
strategy:
type: Recreate
template:
Expand All @@ -12,55 +16,55 @@ spec:
# Label is used as selector in the service.
app: minio
spec:
# Refer to the PVC created earlier
# Refer to the PVC
volumes:
- name: storage1
- name: storage
persistentVolumeClaim:
# Name of the PVC created earlier
claimName: minio-pv-claim1
claimName: minio-pv-claim
containers:
- name: minio
# Pulls the default Minio image from Docker Hub
image: minio/minio
image: minio/minio:latest
args:
- server
- /storage1
- /storage
env:
# Minio access key and secret key
- name: MINIO_ACCESS_KEY
value: "minio"
- name: MINIO_SECRET_KEY
value: "minio123"
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public"
value: "public"
ports:
- containerPort: 9000
hostPort: 9000
# Mount the volume into the pod
volumeMounts:
- name: storage1 # must match the volume name, above
mountPath: "/storage1"
- name: storage # must match the volume name, above
mountPath: "/storage"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-pv-claim1
name: minio-pv-claim
labels:
app: minio-storage-claim1
app: minio-storage-claim
spec:
storageClassName: openebs-device
storageClassName: openebs-device
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
name: minio-service
labels:
app: minio
spec:
# type: LoadBalancer
ports:
- port: 9000
nodePort: 32701
Expand Down
Loading

0 comments on commit aa2df01

Please sign in to comment.