我有一个包含 TargetGroupBinding 的 Helm Chart
{{- range $v := .Values.targetBindings }}
apiVersion: elbv2.k8s.aws/v1beta1
kind: TargetGroupBinding
metadata:
name: {{ include "fullname" $ }}-{{ $v.name }}
labels:
{{- include "labels" $ | nindent 4 }}
spec:
targetGroupARN: {{ $v.target }}
serviceRef:
name: {{ include "fullname" $ }}
port: {{ $v.port }}
---
{{- end }}
安装新的 helm chart 时一切正常,但是当我们尝试运行 helm upgrade 时,我们收到以下错误
Error: UPGRADE FAILED: failed to replace object: admission webhook "vtargetgroupbinding.elbv2.k8s.aws" denied the request: TargetGroupBinding must specify these fields: spec.targetType
正如错误所述,我尝试添加spec.targetType(在本例中为“ip”),但在执行此操作时我收到错误:
Error: UPGRADE FAILED: failed to replace object: admission webhook "vtargetgroupbinding.elbv2.k8s.aws" denied the request: TargetGroupBinding update may not change these fields: spec.ipAddressType
根据 AWS 的文档,spec.targetType 是可选的(https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.8/guide/targetgroupbinding/spec/#elbv2.k8s.aws/v1beta1.TargetType)
有没有人曾经遇到过这个问题/知道如何解决它?