Azure/azure-functions-core-tools

Kubernetes Deploy - Invalid URI exception when only hostname populated in LoadBalancer

開放

#3,215 建立於 2022年12月2日

 (1 則留言) (0 個反應) (0 位負責人)C# (491 個分叉)auto 404
area: kubernetesbuggood first issue

倉庫指標

星標
 (1,456 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

When deploying using the func kubernetes deploy command on local k8s (Docker Desktop), an Invalid URI: The hostname could not be parsed exception is thrown due to a null LoadBalancer Ingress IP address here: https://github.com/Azure/azure-functions-core-tools/blob/v4.x/src/Azure.Functions.Cli/Kubernetes/KubernetesHelpers.cs#L440 This occurs because only hostname is populated, and not the expected IP address.

 status:
  loadBalancer:
    ingress:
    - hostname: localhost

A fix to allow either IP address or hostname appears to have been made for the KNative platform, but was not ported to KubernetesHelpers. See https://github.com/Azure/azure-functions-core-tools/pull/1222

貢獻者指南