首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Azure + helm图表=##[警告]捕获部署元数据失败,错误: TypeError:无法读取属性“类别”为null

Azure + helm图表=##[警告]捕获部署元数据失败,错误: TypeError:无法读取属性“类别”为null
EN

Stack Overflow用户
提问于 2022-08-10 16:10:56
回答 1查看 215关注 0票数 0

我使用舵机图表通过Azure Devops在AKS集群上部署。一切正常,但在部署步骤结束时我看到了一个警告:

代码语言:javascript
运行
复制
Starting: Deploy Helm chart to qa3 environment
==============================================================================
Task         : Package and deploy Helm charts
Description  : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands
Version      : 0.201.0
Author       : Microsoft Corporation
Help         : https://aka.ms/azpipes-helm-tsg
==============================================================================
/usr/local/bin/helm upgrade --namespace qa3 --install --values /home/vsts/work/1/s/invitation/values.yaml --set deployment.image.tag=***,deployment.environment=qa3,cluster.name=dev,azure.region=westus2,azure.appInsightsKey=***,deployment.deployedBy='cd',application.publicJwtValidationCertPemBase64=***,application.endpointPath=invitational,application.sendGridTemplateId=***,application.twillioFromPhoneNumber=***,secret.AuthToken=***,secret.AccountSid=***,secret.SendGridApiKey=*** --wait --install --reuse-values q5id-app-invitation /home/vsts/work/1/s/invitation
Release "q5id-app-invitation" has been upgraded. Happy Helming!
NAME: q5id-app-invitation
LAST DEPLOYED: Wed Aug 10 14:53:19 2022
NAMESPACE: qa3
STATUS: deployed
REVISION: 3
TEST SUITE: None
/usr/local/bin/kubectl cluster-info
Kubernetes control plane is running at https://***:443
CoreDNS is running at https://***:443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://***:443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
##[warning]Capturing deployment metadata failed with error: TypeError: Cannot read property 'kind' of null
Finishing: Deploy Helm chart to qa3 environment

看起来模板已经成功部署,然后运行了kubectl cluster-info,然后运行了其他东西。我不明白是什么引起了这一警告:

##warningCapturing部署元数据失败,错误: TypeError:无法读取属性“类别”为null

我怎么才能修好它?

EN

回答 1

Stack Overflow用户

发布于 2022-11-04 15:29:10

好像我也有同样的问题。问题是,您的舵机模板之一没有正确加载。假设模板是有条件的,在条件之前有一个注释

代码语言:javascript
运行
复制
# enables PodDisruptionBudget
{{- if .Values.pdb }}{{ if .Values.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
...
{{- end }}{{ end }}

在某些情况下,当iftrue时,它将在没有警告的情况下工作。然而,如果它是一个false,你的模板是“空”的,Azure应该跳过它。不幸的是,它不能,因为有一个评论,Azure打印在管道日志。由于模板没有被跳过,Azure搜索该模板的kind,但是什么都没有,这就是出现警告的原因。要解决这个问题,需要在条件内移动注释。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73309521

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档