[Bug] failed to apply javaagent with invalid resource name #12803
Unanswered
tanganyu1114
asked this question in
Q&A
Replies: 1 comment
-
the swck version is skywalking-helm-4.7.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Search before asking
Apache SkyWalking Component
SWCK (apache/skywalking-swck)
What happened
when i use swck inject the agent to tomcat 8 ,but it failed ,the error info list
`2024-11-27T16:40:05.650452135+08:00 2024-11-27T08:40:05Z INFO injector =============== GetStrategy ================
2024-11-27T16:40:05.650520838+08:00 2024-11-27T08:40:05Z INFO injector =============== OverlaySwAgentCR(0) ================
2024-11-27T16:40:05.650551169+08:00 2024-11-27T08:40:05Z INFO injector =============== OverlaySidecar ================
2024-11-27T16:40:05.650554785+08:00 2024-11-27T08:40:05Z INFO injector =============== OverlayAgent ================
2024-11-27T16:40:05.650558156+08:00 2024-11-27T08:40:05Z INFO injector =============== OverlayPlugins ================
2024-11-27T16:40:05.650561193+08:00 2024-11-27T08:40:05Z INFO injector =============== PodInject ================
2024-11-27T16:40:05.650564350+08:00 2024-11-27T08:40:05Z INFO injector inject pod : uat-alert-747cb4cf6d-
2024-11-27T16:40:05.650572333+08:00 2024-11-27T08:40:05Z INFO injector inject container : uat-alert
2024-11-27T16:40:05.650575329+08:00 2024-11-27T08:40:05Z INFO injector inject successfully!
2024-11-27T16:40:05.670766228+08:00 2024-11-27T08:40:05Z INFO =====================javaagent reconcile started================================ {"controller": "pod", "controllerGroup": "", "controllerKind": "Pod", "Pod": {"name":"uat-alert-747cb4cf6d-kg5l6","namespace":"uat-bs"}, "namespace": "uat-bs", "name": "uat-alert-747cb4cf6d-kg5l6", "reconcileID": "c900c4f0-aeb6-443c-9931-41fb10916bd4"}
2024-11-27T16:40:05.671407148+08:00 2024-11-27T08:40:05Z ERROR failed to apply javaagent {"controller": "pod", "controllerGroup": "", "controllerKind": "Pod", "Pod": {"name":"uat-alert-747cb4cf6d-kg5l6","namespace":"uat-bs"}, "namespace": "uat-bs", "name": "uat-alert-747cb4cf6d-kg5l6", "reconcileID": "c900c4f0-aeb6-443c-9931-41fb10916bd4", "error": "failed to get uat-bs/app.kubernetes.io/instance-uat-alert-javaagent : invalid resource name "app.kubernetes.io/instance-uat-alert-javaagent": [may not contain '/']"}
2024-11-27T16:40:05.671424881+08:00 github.com/apache/skywalking-swck/operator/controllers/operator.(*JavaAgentReconciler).Reconcile
2024-11-27T16:40:05.671429803+08:00 /Users/caoye/Desktop/skywalking-swck/operator/controllers/operator/javaagent_controller.go:158
2024-11-27T16:40:05.671433954+08:00 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
2024-11-27T16:40:05.671438684+08:00 /Users/caoye/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:119
2024-11-27T16:40:05.671442162+08:00 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
2024-11-27T16:40:05.671445694+08:00 /Users/caoye/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:316
2024-11-27T16:40:05.671449074+08:00 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
2024-11-27T16:40:05.671452864+08:00 /Users/caoye/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266
2024-11-27T16:40:05.671456219+08:00 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
2024-11-27T16:40:05.671459472+08:00 /Users/caoye/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227
2024-11-27T16:40:05.671500428+08:00 2024-11-27T08:40:05Z ERROR Reconciler error {"controller": "pod", "controllerGroup": "", "controllerKind": "Pod", "Pod": {"name":"uat-alert-747cb4cf6d-kg5l6","namespace":"uat-bs"}, "namespace": "uat-bs", "name": "uat-alert-747cb4cf6d-kg5l6", "reconcileID": "c900c4f0-aeb6-443c-9931-41fb10916bd4", "error": "failed to get uat-bs/app.kubernetes.io/instance-uat-alert-javaagent : invalid resource name "app.kubernetes.io/instance-uat-alert-javaagent": [may not contain '/']"}
2024-11-27T16:40:05.671522214+08:00 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
2024-11-27T16:40:05.671527389+08:00 /Users/caoye/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329
2024-11-27T16:40:05.671530725+08:00 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
2024-11-27T16:40:05.671551615+08:00 /Users/caoye/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266
2024-11-27T16:40:05.671555259+08:00 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
2024-11-27T16:40:05.671558659+08:00 /Users/caoye/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227`
What you expected to happen
skywalking-swck/operator/pkg/kubernetes/apply.go line 105
err := a.Client.Get(ctx, key, current) is not work in the correct way
How to reproduce
inject javaagent to tomcat8
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions