package(default_visibility = ["//visibility:public"])

load("//build:files.bzl", "modify_file")

modify_file(
    name = "crds",
    src = "//deploy/crds:templates",
    out = "crds.yaml",
    prefix = """{{- if .Values.installCRDs }}""",
    suffix = """{{- end }}""",
    visibility = ["//visibility:private"],
)

filegroup(
    name = "chart-srcs",
    srcs = [
        ":crds",
    ] + glob(
        [
            "*.yaml",
            "*.txt",
        ],
    ),
    visibility = ["//visibility:public"],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [":package-srcs"],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)
