No-one can get that right from the first time.
Is there a better way to do this? Seems like transparent-proxy already uses pkg/config.Config which enables env var and json config. Should the annotation maybe just: traffic.kuma.io/transparent-proxy-config-json ?
Description
At the moment adding transparent proxy config is very cumborsome and error prone.
You have to:
Add to https://github.com/kumahq/kuma/blob/07fcbed400fad5113c3d2140b337bb657a88e091/pkg/transparentproxy/config/config.go#L11-L43
Add to https://github.com/kumahq/kuma/blob/07fcbed400fad5113c3d2140b337bb657a88e091/pkg/transparentproxy/config/config.go#L129-L169
Add to config in kumactl install: https://github.com/kumahq/kuma/blob/07fcbed400fad5113c3d2140b337bb657a88e091/app/kumactl/cmd/install/install_transparent_proxy.go#L20-L51
Add to args: https://github.com/kumahq/kuma/blob/07fcbed400fad5113c3d2140b337bb657a88e091/app/kumactl/cmd/install/install_transparent_proxy.go#L190-L222
Add to annotations for CNI: https://github.com/kumahq/kuma/blob/07fcbed400fad5113c3d2140b337bb657a88e091/app/cni/pkg/cni/annotations.go#L20-L31
Map correctly: https://github.com/kumahq/kuma/blob/07fcbed400fad5113c3d2140b337bb657a88e091/app/cni/pkg/cni/injector_linux.go#L70-L142
Map transparent proxy annotations too: https://github.com/kumahq/kuma/blob/07fcbed400fad5113c3d2140b337bb657a88e091/pkg/transparentproxy/kubernetes/kubernetes.go#L48-L137
No-one can get that right from the first time. Is there a better way to do this? Seems like transparent-proxy already uses
pkg/config.Config
which enables env var and json config. Should the annotation maybe just:traffic.kuma.io/transparent-proxy-config-json
?