mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-05-05 06:36:48 +00:00
feat: wip blocked until we have envs
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
This commit is contained in:
parent
51b1b352ac
commit
fe2c08cf72
35
container/manifests/deployment.yaml
Normal file
35
container/manifests/deployment.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: k8sgpt-deployment
|
||||||
|
labels:
|
||||||
|
app: k8sgpt
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: k8sgpt
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: k8sgpt
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: k8sgpt-container
|
||||||
|
image: ghcr.io/k8sgpt-ai/k8sgpt:v0.2.2
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
args: ["serve"]
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: "512Mi"
|
||||||
|
requests:
|
||||||
|
cpu: "0.5"
|
||||||
|
memory: "256Mi"
|
||||||
|
env:
|
||||||
|
- name: AI_BACKEND_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: ai-backend-secret
|
||||||
|
key: secret-key
|
78
container/manifests/role.yaml
Normal file
78
container/manifests/role.yaml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: k8sgpt-cluster-role
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
- nodes
|
||||||
|
- persistentvolumeclaims
|
||||||
|
- namespaces
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- extensions
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
- replicasets
|
||||||
|
- statefulsets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- autoscaling
|
||||||
|
resources:
|
||||||
|
- horizontalpodautoscalers
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- networking.k8s.io
|
||||||
|
resources:
|
||||||
|
- networkpolicies
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services
|
||||||
|
- endpoints
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- batch
|
||||||
|
resources:
|
||||||
|
- jobs
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- batch
|
||||||
|
- extensions
|
||||||
|
- batch.openshift.io
|
||||||
|
resources:
|
||||||
|
- cronjobs
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
7
container/manifests/secret.yaml
Normal file
7
container/manifests/secret.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: ai-backend-secret
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
secret-key: <base64-encoded value of the secret>
|
24
container/manifests/service.yaml
Normal file
24
container/manifests/service.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: k8sgpt-service
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: k8sgpt
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
type: ClusterIP
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: k8sgpt-rolebinding
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: k8sgpt
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: k8sgpt-cluster-role
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
11
demo
Executable file
11
demo
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
. demo-magic.sh
|
||||||
|
clear
|
||||||
|
|
||||||
|
pe "k8sgpt filter list"
|
||||||
|
pe "k8sgpt analyze --filter=Pod --explain -o json | jq ."
|
||||||
|
pe "k8sgpt integration list"
|
||||||
|
pe "k8sgpt integration activate trivy"
|
||||||
|
pe "k8sgpt filter list"
|
||||||
|
pe "k8sgpt analyze --filter=VulnerabilityReport"
|
||||||
|
pe "./k8sgpt analyze --filter=Node --explain"
|
||||||
|
|
BIN
images/demo5.gif
Normal file
BIN
images/demo5.gif
Normal file
Binary file not shown.
After ![]() (image error) Size: 1.4 MiB |
BIN
images/nodes.gif
Normal file
BIN
images/nodes.gif
Normal file
Binary file not shown.
After ![]() (image error) Size: 120 KiB |
Loading…
Reference in New Issue
Block a user