{%- if release.title != "master" -%}
{%- case include.component -%}
{%- comment -%}
note that all 'or's in the below case statement are there to maintain backwards compatability 
with how image names used to be referenced in config.yml
{%- endcomment -%}

{%- when 'node' or 'calico/node' -%}
https://github.com/projectcalico/node/releases/tag/{{ release.components[include.component].version }}

{%- when 'calicoctl' -%}
https://github.com/projectcalico/calicoctl/releases/tag/{{ release.components[include.component].version }}

{%- when 'cni' or 'calico/cni' -%}
https://github.com/projectcalico/cni-plugin/releases/tag/{{ release.components[include.component].version }}

{%- when 'kubeControllers' or 'calico/kube-controllers' -%}
https://github.com/projectcalico/k8s-policy/releases/tag/{{ release.components[include.component].version }}

{%- when 'networking-calico' -%}
https://opendev.org/openstack/networking-calico/src/tag/{{ release.components[include.component].version }}

{%- when 'typha' -%}
https://github.com/projectcalico/typha/releases/tag/{{ release.components[include.component].version }}

{%- when 'flannel' -%}
https://github.com/coreos/flannel/releases/tag/{{ release.components[include.component].version }}

{%- when 'dikastes' or 'calico/dikastes' -%}
https://github.com/projectcalico/app-policy/releases/tag/{{ release.components[include.component].version }}

{%- when 'flexvol' -%}
https://github.com/projectcalico/pod2daemon/releases/tag/{{ release.components[include.component].version }}

{%- endcase -%}

{%- else -%}
{% comment %}
For the master docs, there are no releases to link to. So this page will just return an empty string.
Except for 'calicoctl', as we do host direct downloads to a binary of calicoctl.
{% endcomment %}
{%- if include.component == "calicoctl" -%}
https://www.projectcalico.org/builds/calicoctl
{%- endif -%}

{%- endif -%}