Skip to content

Support for protobuf Content-Type for incoming requests in proxy #144

@debardev

Description

@debardev

Feature Request

Describe the problem you need a feature to resolve.

In our ansible playbooks/tasks we make use of the helm binary to deploy charts

Ansible operator is running with –inject-owner-ref=true, and the injecting was working with helm versions lesser than 3.17.0.

After a longer debugging session we could find out, that the Content-Type of K8S-API requests was changed in helm by using the most recent go k8s libraries.

Previously Content-Type: application/json was used and the current ansible-operator proxy still expects this type.

Image

Currently application/vdn.kubernetes,protobuf is used by helm by default, but this is not supported by the ansible-operator proxy and the proxy can’t parse it properly:

2025-04-24T13:25:33Z    ERROR   proxy   Could not deserialize request body      {"error": "invalid character 'k' looking for beginning of value"}
github.com/operator-framework/ansible-operator-plugins/internal/ansible/proxy.(*injectOwnerReferenceHandler).ServeHTTP
        ansible-operator-plugins/internal/ansible/proxy/inject_owner.go:123
github.com/operator-framework/ansible-operator-plugins/internal/ansible/proxy.(*cacheResponseHandler).ServeHTTP
        ansible-operator-plugins/internal/ansible/proxy/cache_response.go:150
net/http.serverHandler.ServeHTTP
        /opt/hostedtoolcache/go/1.23.4/x64/src/net/http/server.go:3210
net/http.(*conn).serve
        /opt/hostedtoolcache/go/1.23.4/x64/src/net/http/server.go:2092

Describe the solution you'd like.

Probably support for both Content-Types application/json and application/vdn.kubernetes.protobuf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions