diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000..1236ba8417 Binary files /dev/null and b/.DS_Store differ diff --git a/container/manifests/deployment.yaml b/container/manifests/deployment.yaml new file mode 100644 index 0000000000..aadc12e9bc --- /dev/null +++ b/container/manifests/deployment.yaml @@ -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 diff --git a/container/manifests/role.yaml b/container/manifests/role.yaml new file mode 100644 index 0000000000..82260364c5 --- /dev/null +++ b/container/manifests/role.yaml @@ -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 \ No newline at end of file diff --git a/container/manifests/secret.yaml b/container/manifests/secret.yaml new file mode 100644 index 0000000000..a753b37872 --- /dev/null +++ b/container/manifests/secret.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: ai-backend-secret +type: Opaque +data: + secret-key: diff --git a/container/manifests/service.yaml b/container/manifests/service.yaml new file mode 100644 index 0000000000..cfd9c04fd3 --- /dev/null +++ b/container/manifests/service.yaml @@ -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 \ No newline at end of file diff --git a/demo b/demo new file mode 100755 index 0000000000..4a251d75e4 --- /dev/null +++ b/demo @@ -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" + diff --git a/images/demo5.gif b/images/demo5.gif new file mode 100644 index 0000000000..065afa7099 Binary files /dev/null and b/images/demo5.gif differ diff --git a/images/nodes.gif b/images/nodes.gif new file mode 100644 index 0000000000..ade25289e2 Binary files /dev/null and b/images/nodes.gif differ