---
- name: Sync hybridnet helm chart to remote
  copy:
    src: |
      {{ .work_dir }}/kubekey/cni/hybridnet-{{ .hybridnet_version }}.tgz
    dest: |
      /etc/kubernetes/cni/hybridnet-{{ .hybridnet_version }}.tgz

# https://artifacthub.io/packages/helm/hybridnet/hybridnet
- name: Install hybridnet
  command: |
    helm install hybridnet /etc/kubernetes/cni/hybridnet-{{ .hybridnet_version }}.tgz --namespace kube-system \
    {{- if ne .cni.hybridnet.hybridnet_image "" }}
      --set images.hybridnet.image={{ .cni.hybridnet.hybridnet_image }} \
    {{- end }}
    {{- if ne .cni.hybridnet.hybridnet_tag "" }}
      --set images.hybridnet.tag={{ .cni.hybridnet.hybridnet_tag }}  \
    {{- end }}
      --set image.registryURL={{ .cni.hybridnet.registry }} \
