Skip to content

Commit

Permalink
Fix default namespace for install and add kustomize (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvaldivia committed May 20, 2020
1 parent 8d17569 commit 10400d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ kubectl apply -f https://raw.githubusercontent.com/minio/minio-operator/master/m

This will create all relevant resources required for the Operator to work.

You could install the MinIO Operator a custom namespace by passing the `-n` flag
You could install the MinIO Operator a custom namespace by customizing the `minio-operator.yaml` file or using [kustomize](https://github.com/kubernetes-sigs/kustomize)

```bash
kubectl create namespace minio-operator-ns
kubectl apply -n minio-operator-ns -f https://raw.githubusercontent.com/minio/minio-operator/master/minio-operator.yaml
kustomize build | kubectl apply -f -
```

### Create a MinIO instance
Expand Down
4 changes: 4 additions & 0 deletions kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
namespace: minio-operator-ns

resources:
- minio-operator.yaml
3 changes: 3 additions & 0 deletions minio-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: minio-operator-sa
namespace: default
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
Expand All @@ -145,11 +146,13 @@ roleRef:
subjects:
- kind: ServiceAccount
name: minio-operator-sa
namespace: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: minio-operator
namespace: default
spec:
replicas: 1
selector:
Expand Down

0 comments on commit 10400d8

Please sign in to comment.