feat: add helm chart (#318)

* feat: add helm chart

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* Address PR feedback (#1)

* remove K8SGPT_BASEURL

* add default model

* add user-specified Deployment annotations

* remove Values.secret.enabled

---------

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* update chart.appVersion, default labels

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* default image tag to Chart.appVersion

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* release-please annotation for k8sgpt image

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* revert improperly relocated Dockerfile

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* revert changes to docker-build target and actually re-locate Dockerfile

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* Update charts/k8sgpt/Chart.yaml

Co-authored-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* Update charts/k8sgpt/templates/deployment.yaml

Co-authored-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

---------

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Co-authored-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
This commit is contained in:
Tyler Gillson
2023-04-27 11:47:08 -07:00
committed by GitHub
parent 363294c310
commit 5af8178802
17 changed files with 222 additions and 106 deletions

View File

@@ -1,42 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8sgpt-deployment
namespace: k8sgpt
labels:
app: k8sgpt
spec:
replicas: 1
selector:
matchLabels:
app: k8sgpt
template:
metadata:
labels:
app: k8sgpt
spec:
serviceAccountName: k8sgpt
containers:
- name: k8sgpt-container
imagePullPolicy: Always
image: ghcr.io/k8sgpt-ai/k8sgpt:v0.2.8 #x-release-please-version
ports:
- containerPort: 8080
args: ["serve"]
resources:
limits:
cpu: "1"
memory: "512Mi"
requests:
cpu: "0.2"
memory: "156Mi"
env:
- name: K8SGPT_MODEL
value: "gpt-3.5-turbo"
- name: K8SGPT_BACKEND
value: "openai"
- name: K8SGPT_PASSWORD
valueFrom:
secretKeyRef:
name: ai-backend-secret
key: secret-key

View File

@@ -1,13 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: k8sgpt-cluster-role-all
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- get
- list
- watch

View File

@@ -1,13 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: k8sgpt-rolebinding
namespace: k8sgpt
subjects:
- kind: ServiceAccount
name: k8sgpt
namespace: k8sgpt
roleRef:
kind: ClusterRole
name: k8sgpt-cluster-role-all
apiGroup: rbac.authorization.k8s.io

View File

@@ -1,5 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8sgpt
namespace: k8sgpt

View File

@@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: k8sgpt-service
namespace: k8sgpt
labels:
app: k8sgpt
spec:
selector:
app: k8sgpt
ports:
- name: http
port: 8080
targetPort: 8080
type: ClusterIP

View File

@@ -1,15 +0,0 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: k8sgpt
name: k8sgpt-service-monitor
namespace: k8sgpt
spec:
endpoints:
- honorLabels: true
path: /metrics
port: http
selector:
matchLabels:
app: k8sgpt