Skip to content

Commit

Permalink
Add Validation for minioinstance CRD (minio#31)
Browse files Browse the repository at this point in the history
Fixes minio#28
  • Loading branch information
nitisht authored Jul 23, 2019
1 parent 493bf3e commit 816a619
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ MinIO is a high performance distributed object storage server, designed for larg

### Prerequisites

- Kubernetes cluster 1.10.0+.
- Kubernetes API v1.15 and above.
- `kubectl` configured to refer to relevant Kubernetes cluster.

### Create Operator and related resources
Expand Down
4 changes: 2 additions & 2 deletions docs/minio-examples/minioinstance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ spec:
env:
- name: MINIO_BROWSER
value: "on"
- name: MINIO_STORAGE_CLASS_RRS
value: "EC:2"
# - name: MINIO_STORAGE_CLASS_RRS
# value: "EC:2"
## Configure resource requests and limits for MinIO containers
resources:
requests:
Expand Down
24 changes: 23 additions & 1 deletion docs/minio-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,32 @@ metadata:
spec:
group: miniocontroller.min.io
version: v1beta1
scope: Namespaced
names:
kind: MinIOInstance
singular: minioinstance
plural: minioinstances
scope: Namespaced
preserveUnknownFields: true
validation:
# openAPIV3Schema is the schema for validating custom objects.
# Refer https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#specifying-a-structural-schema
# for more details
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
replicas:
type: integer
minimum: 1
maximum: 32
version:
type: string
mountpath:
type: string
subpath:
type: string
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
Expand Down

0 comments on commit 816a619

Please sign in to comment.