我正在尝试使用CI / CD管道(谷歌容器构建器)在我的k8s群集(GKE)上部署升级到掌舵图,但是我收到了错误。
Google Cloud SDK 195.0.0
GKE群集版本:v1.9.6-gke.0
kubectl v1.8.6
我正在使用此构建器:https://github.com/GoogleCloudPlatform/cloud-builders-community/tree/master/helm
我正在触发这样的构建:
gcloud container builds submit . --config=cloudbuild.yaml --substitutions=TAG_NAME=v0.1.8
这是导致此错误的cloudbuild.yaml部分:
- name: 'gcr.io/$PROJECT_ID/helm'
args:
- upgrade
- mmh-user
- ./mmh-users-0.1.7.tgz
- --reuse-values
- --set
- image.tag=${TAG_NAME}
env:
- 'CLOUDSDK_COMPUTE_ZONE=northamerica-northeast1-a'
- 'CLOUDSDK_CONTAINER_CLUSTER=mycluster'
Starting Step #17
Step #17: Already have image (with digest): gcr.io/myproject-2018/helm
Step #17: Running: helm init --client-only
Step #17: $HELM_HOME has been configured at /builder/home/.helm.
Step #17: Not installing Tiller due to 'client-only' flag having been set
Step #17: Happy Helming!
Step #17: Running: helm repo update
Step #17: Hang tight while we grab the latest from your chart repositories...
Step #17: ...Skip local chart repository
Step #17: ...Successfully got an update from the "stable" chart repository
Step #17: Update Complete. ⎈ Happy Helming!⎈
Step #17: Running: helm upgrade mmh-user ./mmh-users-0.1.7.tgz --reuse-values --set image.tag=v0.1.8
Step #17: Error: UPGRADE FAILED: failed to create patch: failed to get versionedObject: unable to convert unstructured object to extensions/v1beta1, Kind=Ingress: unrecognized type: string
Finished Step #17
helm upgrade mmh-user ./mmh-users-0.1.7.tgz --reuse-values --set image.tag=v0.1.8
)时,没有问题。关于我还能做些什么来找到原因/解决方案的任何线索?
答案 0 :(得分:0)
感谢来自Kubernetes#helm-users松弛频道的juanchimienti,我能够解决这个问题。 Juanchimienti建议它可能与tls-acme注释的值有关,该值显示为:
kubernetes.io/tls-acme: true
但应该显示为"true"
。
我更改了构建步骤以包含这样的注释:
- --set
- 'ingress.annotations.kubernetes\.io/tls-acme="true"'
现在正在工作。
我认为这与helm构建器(https://github.com/GoogleCloudPlatform/cloud-builders-community/tree/master/helm)中的kubectl版本有关,因为在我的笔记本电脑上运行没有注释的相同命令工作得很好。我的笔记本电脑有一个更新版本的kubectl。我没有证实这一点。