We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I discovered a bug when trying to list or delete InstanaAgent objects using kubectl. The following commands return no objects:
InstanaAgent
kubectl
kubectl get InstanaAgent -A kubectl get InstanaAgents -A kubectl get agent -A kubectl get agents -A
The only commands that work are using the full API group or the short name.
kubectl get instanaagent.instana.io kubectl get ia -A
After inspecting the CRD, I found that there is a mismatch between the singular, plural, and kind names in the CRD definition:
singular
plural
kind
spec: conversion: strategy: None group: instana.io names: categories: - monitoring - openshift-optional kind: InstanaAgent listKind: InstanaAgentList plural: agents shortNames: - ia singular: agent
This mismatch is likely causing kubectl to fail when using commands like kubectl get instanaagent.
kubectl get instanaagent
I updated the CRD to ensure the singular and plural names match the kind. The corrected names section is:
names
spec: conversion: strategy: None group: instana.io names: categories: - monitoring - openshift-optional kind: InstanaAgent listKind: InstanaAgentList plural: instanaagents shortNames: - ia singular: instanaagent
With this change, the commands now work as expected.
kubectl get instanaagent -A NAMESPACE NAME AGE instana-agent instana-agent 48m
Please update the code in the following file:
https://github.com/instana/instana-agent-operator/blob/main/api/v1/instanaagent_types.go#L147
To:
+kubebuilder:resource:path=instanaagents,singular=instanaagent,shortName=ia,scope=Namespaced,categories=monitoring;openshift-optional
The text was updated successfully, but these errors were encountered:
Fixes instana#227
1bd3c99
No branches or pull requests
Hello,
I discovered a bug when trying to list or delete
InstanaAgent
objects usingkubectl
. The following commands return no objects:The only commands that work are using the full API group or the short name.
Investigation and Findings
After inspecting the CRD, I found that there is a mismatch between the
singular
,plural
, andkind
names in the CRD definition:This mismatch is likely causing
kubectl
to fail when using commands likekubectl get instanaagent
.Resolution
I updated the CRD to ensure the
singular
andplural
names match thekind
. The correctednames
section is:With this change, the commands now work as expected.
Suggestion
Please update the code in the following file:
https://github.com/instana/instana-agent-operator/blob/main/api/v1/instanaagent_types.go#L147
To:
+kubebuilder:resource:path=instanaagents,singular=instanaagent,shortName=ia,scope=Namespaced,categories=monitoring;openshift-optional
The text was updated successfully, but these errors were encountered: