Skip to content

mutation webhook fail to inject sidecar when installed by helm #206

Open
@jayl1e

Description

@jayl1e

Describe the bug
I install controller with helm charts, the mutation webhook failed to modify pod, it report error:

{"kind":"AdmissionReview","apiVersion":"admission.k8s.io/v1","response":{"allowed":false,"status":{"metadata":{},"message":"failed parsing injected YAML (check sidecar injector configuration): error converting YAML to JSON: yaml: line 57: did not find expected key"}}}

To Reproduce
just helm install

Expected behavior
mutate pod successfully

Environment

  • Version: k8s 1.32
  • OS: debian 12

Additional context
the template is wrong
helm verison template is bad, however k8s yaml version is correnct

value: "{{ "{{" }} index .ObjectMeta.Annotations `sidecar.polarismesh.cn/envoyMetadata` {{ "}}" }}"

value: {{index .ObjectMeta.Annotations `sidecar.polarismesh.cn/envoyMetadata`}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions