我使用舵机图表通过Azure Devops在AKS集群上部署。一切正常,但在部署步骤结束时我看到了一个警告:
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
我怎么才能修好它?
发布于 2022-11-04 15:29:10
好像我也有同样的问题。问题是,您的舵机模板之一没有正确加载。假设模板是有条件的,在条件之前有一个注释
# enables PodDisruptionBudget
{{- if .Values.pdb }}{{ if .Values.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
...
{{- end }}{{ end }}
在某些情况下,当if
是true
时,它将在没有警告的情况下工作。然而,如果它是一个false
,你的模板是“空”的,Azure应该跳过它。不幸的是,它不能,因为有一个评论,Azure打印在管道日志。由于模板没有被跳过,Azure搜索该模板的kind
,但是什么都没有,这就是出现警告的原因。要解决这个问题,需要在条件内移动注释。
https://stackoverflow.com/questions/73309521
复制相似问题