I managed to patch the deployed service and set `s...
# kubernetes
r
I managed to patch the deployed service and set
spec.loadBalancerIP
after the deployment, but I am trying to do this in the helm chart.
b
Try something like this
Copy code
def fix_service_namespace_rapid(obj):
    if obj["kind"] == "Service" and obj["apiVersion"] == "v1":
        try:
            obj["metadata"]["namespace"] = traefik_namespace_name_rapid
        except KeyError:
            pass
r
So you are suggesting that I run this on the service after it has been deployed
b
I suggest using something that is called "transformations"
Copy code
traefik_chart_options_rapid = helm_v3.ChartOpts(
    chart='traefik',
    namespace=traefik_namespace_name_rapid,
    values=parse_yaml_file(traefik_values_file_rapid),
    fetch_opts=traefik_chart_fetch_options_rapid,
    transformations=[
        fix_service_namespace_rapid,
    ],
)
r
ah so still in the helm chart. yeah, I will give it a try