-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: results are labeled #264
Conversation
Tested locally, and this is an example output. apiVersion: core.k8sgpt.ai/v1alpha1
kind: Result
metadata:
creationTimestamp: "2023-11-15T16:34:09Z"
generation: 2
labels:
k8sgpts.k8sgpt.ai/backend: openai
k8sgpts.k8sgpt.ai/name: k8sgpt-sample
k8sgpts.k8sgpt.ai/namespace: k8sgpt-operator-system
name: defaultnginx
namespace: k8sgpt-operator-system
resourceVersion: "301482"
uid: ce9f370f-38e6-4c65-833b-355bda35783b
spec:
backend: openai
details: "Error: The deployment \"default/nginx\" only has 1 replica available,
but there are 2 replicas available.\n\nSolution: \n1. Determine the current state
of the deployment by running the command: \"kubectl get deployments\"\n2. Scale
up the deployment by running the command: \"kubectl scale deployment default/nginx
--replicas=2\"\n3. Verify the deployment has been scaled up by running the command:
\"kubectl get deployments\"\n4. Check the status of the pods by running the command:
\"kubectl get pods\"\n5. If the pods are still not available, troubleshoot the
issue further by checking the logs of the pods using the command: \"kubectl logs
<pod_name>\"\n6. Repeat steps 4 and 5 until the desired state is achieved."
error:
- sensitive:
- masked: W1Q3UEhYWw==
unmasked: default
- masked: YlspM0o=
unmasked: nginx
text: Deployment default/nginx has 1 replicas but 2 are available
kind: Deployment
name: default/nginx
parentObject: ""
status:
lifecycle: historical |
Hey @prometherion many thanks for the PR and your interest in the project, a few comments
extraOptions:
backstage:
enabled: true |
Well, I was planning to introduce changes gradually, but since you're asking, I'll go for it. I'm working on a platform that is managing Kubernetes clusters at scale thanks to Cluster API. Before jumping in, just a small appendix on the jargon used by Cluster API: the management cluster is the one collecting all the CAPI manifests, and the workload clusters are the deployed ones on different providers, made of their own Control Planes, and worker nodes. As you pointed out correctly, the current Operator will create a Deployment and watch for the events from the current cluster: so it means that having multiple instances of the I was planning to introduce a new set of changes where the The The user would like to see if the reported issue is affecting all the clusters, or just a small subset of them, so using a selection such as I was planning to discuss about it, as well as a proof of concept already running in our test environment to showcase how the troubleshooting is performed without installing the |
c8e7195
to
9fc6c3b
Compare
Thanks for contributing @prometherion and sharing your ideas. I dont see anything here that worries me. |
f137b5b
to
68a0d1f
Compare
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
68a0d1f
to
7a4f4c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #263
📑 Description
The following PR labels the
Result
objects with some additional labels, such as:k8sgpts.k8sgpt.ai/name
, referring to thek8sgpt
resource's Namek8sgpts.k8sgpt.ai/namespace
, referring to thek8sgpt
resource's namespacek8sgpts.k8sgpt.ai/backend
, referring to thek8sgpt
used AI driver✅ Checks
ℹ Additional Information
N.R.