Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default namespace for install and add kustomize #113

Merged
merged 1 commit into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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