Azure/azure-functions-core-tools

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

オープン

#3,215 opened on 2022/12/02

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)C# (491 件のフォーク)auto 404
area: kubernetesbuggood first issue

Repository metrics

Stars
 (1,456 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド