From 0ca90a8dfded250c9cda3cedba00a5bb696baccc Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Mon, 24 Apr 2023 14:50:34 +0200 Subject: [PATCH] chore: updated readme Signed-off-by: Alex Jones --- Makefile | 2 +- README.md | 61 ++++++++++++++++++++++++------------------------------- 2 files changed, 27 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 76a36cab..17ec139c 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/README.md b/README.md index 9dd8413b..def1cf04 100644 --- a/README.md +++ b/README.md @@ -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 - - +## 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=/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=/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 -
- Contributing + ## Contributing // TODO(user): Add detailed information on how you would like others to contribute to this project @@ -93,4 +84,4 @@ make manifests More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html) -
+