xarg / kuku

Kubernetes templating tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ClusterIP not converted correctly on services

xarg opened this issue · comments

In the following example:

    return client.V1Service(
        api_version="v1",
        kind="Service",
        metadata=client.V1ObjectMeta(name=context["name"]),
        spec=client.V1ServiceSpec(
            client_ip="None",
            ports=[{"port": 5432}],
            selector={"app": context["name"]}
        ),
    )

client_ip converts into clientIp as the camelization rule. However the correct form is ClientIP, there are a few other exceptions as well: NodePort, LoadBalancer, etc..

Should use attribute_map to convert the props.