-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tyler Gillson <[email protected]>
- Loading branch information
1 parent
cf797a6
commit a4bf7cc
Showing
18 changed files
with
220 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
k8sgpt* | ||
!charts/k8sgpt | ||
*.vscode | ||
dist/ | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
appVersion: 0.1.0 | ||
description: A Helm chart for K8SGPT | ||
name: k8sgpt | ||
type: application | ||
version: 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "k8sgpt.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "k8sgpt.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "k8sgpt.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "k8sgpt.labels" -}} | ||
helm.sh/chart: {{ include "k8sgpt.chart" . }} | ||
app.kubernetes.io/name: {{ include "k8sgpt.name" . }} | ||
app.kubernetes.io/instance: "{{ .Release.Name }}" | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "k8sgpt.fullname" . }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
{{- include "k8sgpt.labels" . | nindent 4 }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "k8sgpt.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ include "k8sgpt.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
serviceAccountName: k8sgpt | ||
containers: | ||
- name: k8sgpt-container | ||
imagePullPolicy: {{ .Values.deployment.imagePullPolicy }} | ||
image: {{ .Values.deployment.image }} | ||
ports: | ||
- containerPort: 8080 | ||
args: ["serve"] | ||
{{- if .Values.deployment.resources }} | ||
resources: | ||
{{- toYaml .Values.deployment.resources | nindent 10 }} | ||
{{- end }} | ||
env: | ||
- name: K8SGPT_MODEL | ||
value: {{ .Values.deployment.env.model }} | ||
- name: K8SGPT_BACKEND | ||
value: {{ .Values.deployment.env.backend }} | ||
- name: K8SGPT_BASEURL | ||
value: {{ .Values.deployment.env.baseUrl }} | ||
{{- if .Values.secret.enabled }} | ||
- name: K8SGPT_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: ai-backend-secret | ||
key: secret-key | ||
{{- end }} |
5 changes: 4 additions & 1 deletion
5
container/manifests/role.yaml → charts/k8sgpt/templates/role.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ template "k8sgpt.fullname" . }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
{{- include "k8sgpt.labels" . | nindent 4 }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ template "k8sgpt.fullname" . }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: k8sgpt-cluster-role-all | ||
apiGroup: rbac.authorization.k8s.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ template "k8sgpt.fullname" . }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
{{- include "k8sgpt.labels" . | nindent 4 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.secret.enabled }} | ||
apiVersion: v1 | ||
data: | ||
secret-key: {{ .Values.secret.secretKey }} | ||
kind: Secret | ||
metadata: | ||
name: ai-backend-secret | ||
namespace: {{ .Release.Namespace | quote }} | ||
type: Opaque | ||
{{- end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "k8sgpt.fullname" . }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
{{- include "k8sgpt.labels" . | nindent 4 }} | ||
{{- if .Values.service.annotations }} | ||
annotations: | ||
{{- toYaml .Values.service.annotations | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: {{ include "k8sgpt.name" . }} | ||
ports: | ||
- name: http | ||
port: 8080 | ||
targetPort: 8080 | ||
type: {{ .Values.service.type }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if .Values.serviceMonitor.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ template "k8sgpt.fullname" . }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
{{- include "k8sgpt.labels" . | nindent 4 }} | ||
spec: | ||
endpoints: | ||
- honorLabels: true | ||
path: /metrics | ||
port: http | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "k8sgpt.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
deployment: | ||
image: ghcr.io/k8sgpt-ai/k8sgpt:v0.2.4 | ||
imagePullPolicy: Always | ||
env: | ||
model: "" | ||
backend: "openai" # one of: [ openai | llama ] | ||
baseUrl: "" | ||
resources: | ||
limits: | ||
cpu: "1" | ||
memory: "512Mi" | ||
requests: | ||
cpu: "0.2" | ||
memory: "156Mi" | ||
|
||
secret: | ||
enabled: false | ||
secretKey: "" # base64 encoded OpenAI token | ||
|
||
service: | ||
type: ClusterIP | ||
annotations: {} | ||
|
||
serviceMonitor: | ||
enabled: false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.