Skip to content

Commit

Permalink
First documentation iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
tomp21 committed Dec 24, 2024
1 parent 3274ea9 commit 8ba72d8
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ This repository holds the code for an operator responsible of managing a Redis s

Knowing our kubectl context is pointing to the cluster we want to deploy the operator to:

## Deployment using installer without cloning the repository
```
kubectl apply -f https://raw.githubusercontent.com/tomp21/yazio-challenge/main/dist/install.yaml
```

## Deployment manually creating operator components

**Install the CRDs into the cluster:**

Expand All @@ -35,10 +41,24 @@ make install
make deploy IMG=ghcr.io/tomp21/yazio-challenge:main
```

And you will be ready to go!

> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin
privileges or be logged in as admin.

**Create redis instances**
**Delete the APIs(CRDs) from the cluster:**

```sh
make uninstall
```

**UnDeploy the controller from the cluster:**

```sh
make undeploy
```

### Creating a sample Redis instance
You can apply the sample the config/sample:

```sh
Expand All @@ -56,41 +76,21 @@ If you renamed the resource after creation, you will need to delete it referncin
kubectl delete redis <whichever name you set to it>
```

**Delete the APIs(CRDs) from the cluster:**

```sh
make uninstall
```

**UnDeploy the controller from the cluster:**

```sh
make undeploy
```

## Project Distribution

Following are the steps to build the installer and distribute this project to users.

1. Build the installer for the image built and published in the registry:

```sh
make build-installer IMG=<some-registry>/yazio-challenge:tag
make build-installer IMG=ghcr.io/tomp21/yazio-challenge:main
```

NOTE: The makefile target mentioned above generates an 'install.yaml'
file in the dist directory. This file contains all the resources built
with Kustomize, which are necessary to install this project without
its dependencies.

2. Using the installer

Users can just run kubectl apply -f <URL for YAML BUNDLE> to install the project, i.e.:

```sh
kubectl apply -f https://raw.githubusercontent.com/<org>/yazio-challenge/<tag or branch>/dist/install.yaml
```

## License

Copyright 2024.
Expand Down

0 comments on commit 8ba72d8

Please sign in to comment.