"""fetches emissary"""

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
load(":version.bzl", "VERSION")

def fetch_emissary_manifests():
    """Returns all http_* targets for emissary manifest bundles we rely on"""
    formatted_version = VERSION.lstrip("v")
    http_file(
        name = "emissary_crds",
        sha256 = "4ee02280402b80a3de31c7c5ea968f3389752719daf276c73aa211916f2afea4",
        urls = ["https://app.getambassador.io/yaml/emissary/{version}/emissary-crds.yaml".format(
            version = formatted_version,
        )],
    )

    http_file(
        name = "emissary_ns",
        sha256 = "a3e3ab6cf7c0ed1e13cc135ee1b7d259927973fb2fd012730820e2ca92ec1082",
        urls = ["https://app.getambassador.io/yaml/emissary/{version}/emissary-emissaryns.yaml".format(
            version = formatted_version,
        )],
    )