Skip to content

Commit

Permalink
chore: updated readme
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
  • Loading branch information
AlexsJones committed Apr 24, 2023
1 parent 3df4820 commit 0ca90a8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
.PHONY: docker-build
docker-build: test ## Build docker image with the manager.
@echo "===========> Building docker image"
docker buildx build --build-arg=VERSION="$$(git describe --tags --abbrev=0)" --build-arg=COMMIT="$$(git rev-parse --short HEAD)" --build-arg DATE="$$(date +%FT%TZ)" --platform="linux/amd64,linux/arm64" -t ${IMG} -f container/Dockerfile . --push
docker buildx build --build-arg=VERSION="$$(git rev-parse --short HEAD)" --build-arg=COMMIT="$$(git rev-parse --short HEAD)" --build-arg DATE="$$(date +%FT%TZ)" --platform="linux/amd64,linux/arm64" -t ${IMG} -f container/Dockerfile . --push

# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
Expand Down
61 changes: 26 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,45 @@ This Operator is designed to enable K8sGPT within a Kubernetes cluster.
It will allow you to create a custom resource that defines the behaviour and scope of a managed K8sGPT workload. Analysis and outputs will also be configurable to enable integration into existing workflows.


## Architecture

<img src="images/1.png" width="600px;" />
## Installation

## Run the example
1. Install custom resources:

```sh
make install
```

2. Build and push your image to the location specified by `IMG`:

```sh
make docker-build docker-push IMG=<some-registry>/k8sgpt-operator:tag
helm repo add k8sgpt https://charts.k8sgpt.ai/
helm install release k8sgpt/k8sgpt-operator
```

3. Deploy the controller to the cluster with the image specified by `IMG`:
## Run the example

```sh
make deploy IMG=<some-registry>/k8sgpt-operator:tag
```
1. Install the operator from the [Installation](#installation) section.

4. Create secret:
2. Create secret:
```sh
kubectl create secret generic k8sgpt-sample-secret --from-literal=openai-api-key=$OPENAI_TOKEN -n default
```

5. Apply the K8sGPT configuration object:
```sh
kubectl apply -f config/samples/core_v1alpha1_k8sgpt.yaml
```
### Uninstall CRDs
To delete the CRDs from the cluster:

1. Apply the K8sGPT configuration object:
```sh
make uninstall
kubectl apply -f - << EOF
apiVersion: core.k8sgpt.ai/v1alpha1
kind: K8sGPT
metadata:
name: k8sgpt-sample
spec:
namespace: default
model: gpt-3.5-turbo
backend: openai
noCache: false
version: v0.2.4
enableAI: true
secret:
name: k8sgpt-sample-secret
key: openai-api-key
EOF
```

### Undeploy controller
UnDeploy the controller from the cluster:

```sh
make undeploy
```
## Architecture

<details>
<summary>Contributing</summary>
<img src="images/1.png" width="600px;" />

## Contributing
// TODO(user): Add detailed information on how you would like others to contribute to this project
Expand Down Expand Up @@ -93,4 +84,4 @@ make manifests

More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)

</details>

0 comments on commit 0ca90a8

Please sign in to comment.