Skip to content

Commit

Permalink
Enable K8sGPT deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed May 15, 2024
1 parent dfc7bf5 commit 4d39e3e
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ different scenarios. There are different setups located in the
| kube-monkey | Netflix's Chaos Monkey for Kubernetes clusters | | Implemented |
| Nephio | Management platform to on-board NFs at scale | | Implemented |
| LocalAI | Allows to run LLMs locally | | Implemented |
| K8SGPT | Scans K8s clusters for diagnosing issues | | Implemented |

## Quick Deployment

Expand Down
6 changes: 6 additions & 0 deletions _chart_installers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,9 @@ function install_local-ai {
_add_helm_repo go-skynet https://go-skynet.github.io/helm-charts/
KRD_CHART_FILE="helm/local-ai/values.yaml" _install_chart local-ai go-skynet/local-ai
}

# install_k8sgpt() - Install K8sGPT operator
function install_k8sgpt {
_add_helm_repo k8sgpt https://charts.k8sgpt.ai/
_install_chart k8sgpt-operator k8sgpt/k8sgpt-operator
}
6 changes: 6 additions & 0 deletions _uninstallers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,9 @@ function uninstall_local-ai {
_uninstall_helm local-ai
_delete_namespace local-ai-system
}

# uninstall_k8sgpt() - Uninstall K8sGPT operator
function uninstall_k8sgpt {
_uninstall_helm k8sgpt-operator
_delete_namespace k8sgpt-operator-system
}
3 changes: 3 additions & 0 deletions ci/update_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,6 @@ sed -i "s|image.tag=.*|image.tag=v$(get_version docker_tag rancher/metrics-serve
# Update Rook test resources
wget -q -O ./tests/resources/rook/toolbox.yaml https://raw.githubusercontent.com/rook/rook/master/deploy/examples/toolbox.yaml
wget -q -O ./tests/resources/rook/cluster-test.yaml https://raw.githubusercontent.com/rook/rook/master/deploy/examples/cluster-test.yaml

# Update K8sGPT resources
sed -i "s/version: .*/version: v$(get_version github_release k8sgpt-ai/k8sgpt)/g" resources/k8sgpt-local.yml
23 changes: 23 additions & 0 deletions resources/k8sgpt-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2024
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
apiVersion: core.k8sgpt.ai/v1alpha1
kind: K8sGPT
metadata:
name: k8sgpt-local
namespace: k8sgpt-operator-system
spec:
ai:
model: gpt-4
backend: localai
baseUrl: http://local-ai.local-ai-system.svc.cluster.local:8080/v1
enabled: true
version: v0.3.30
noCache: false
targetNamespace: default
24 changes: 24 additions & 0 deletions tests/resources/broken-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2024
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
apiVersion: v1
kind: Pod
metadata:
name: broken-pod
namespace: default
spec:
containers:
- name: broken-pod
image: nginx:1.a.b.c
livenessProbe:
httpGet:
path: /
port: 90
initialDelaySeconds: 3
periodSeconds: 3

0 comments on commit 4d39e3e

Please sign in to comment.