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

Add Development notes #2195

Merged
merged 2 commits into from
Jul 4, 2024
Merged
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
61 changes: 61 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Development

## Deploy operator in K8s
With a Kubernetes cluster (local you can use Kind) in `./` run:
```
kubectl apply -k resources/
kubectl apply -k resources/base/
```
That will deploy an operator with a defined image.

To access the UI get the operator token from:
```
kubectl describe secrets -n minio-operator console-sa-secret | grep 'token:' | awk '{print $2}' | pbcopy
```

Once the server is running you can see the UI either by port forwarding or using kubefwd for the operator pod.

For development you can also run locally yarn in the web-app/ folder just make sure the port in `package.json` is the same as the operator console service.
```
"proxy": "http://localhost:9090/"
```

And in the web-app run:
```
yarn install
yarn start
```

## Deploy operator in K8s with custom image using Kind:

Build an image like:
```
make build TAG="minio/operator:<YOUR_TAG>" && kind load docker-image minio/operator:<YOUR_TAG>
```

And update the image from resources/base/ for `console-ui.yaml` and `deployment.yaml`
```
spec:
replicas: 1
selector:
matchLabels:
app: console
template:
metadata:
labels:
app: console
app.kubernetes.io/instance: minio-operator-console
app.kubernetes.io/name: operator
spec:
containers:
- args:
- ui
- --certs-dir=/tmp/certs
image: minio/operator:cesnietor

```

Apply resources again to see this:
```
kubectl apply -k resources/base/
```
Loading