Hey guys. Is there any way to skip an installation...
# kubernetes
b
Hey guys. Is there any way to skip an installation of some object in a helm chart using transformations? For instance, I want to avoid installing everything that includes the substring "test". I tried
del obj
but it doesn't work.
Copy code
def remove_test_objects(obj):
    # if obj["kind"] == "Pod" and 'test' in obj["metadata"]["name"]:
    if 'test' in obj["metadata"]["name"]:
        del obj
g
b
@gorgeous-egg-16927, thanks a lot, gonna test it now
Copy code
# Omit a resource from the Chart by transforming the specified resource definition to an empty List.
def omit_resource(obj, opts):
    if obj["kind"] == "Pod" and obj["metadata"]["name"] == "test":
        obj["apiVersion"] = "v1"
        obj["kind"] = "List"