The PathValue docs I linked above are not clear to me. Istio itself just links to StackOverflow with the [Istio] Tag, so I guess this is where I come for help.推荐答案这是覆盖的一部分,它将添加带有一些示例规格的另一个服务器条目.只需将其调整为您想要的方式即可.您还可以使用spec.servers [0]的路径覆盖第一个服务器条目,然后将该值设置为所需的值.This is a part of an overlay that will add another server entry with some example specs. Just tweak it to be the way you want it to be. You can also override your first server entry with a path of spec.servers[0] and then set the value to whatever you want it to be.ingressGateways: - enabled: true k8s: overlays: - apiVersion: networking.istio.io/v1alpha3 kind: Gateway name: ingressgateway patches: - path: spec.servers[1] value: hosts: - '*.example.com' port: name: https number: 443 protocol: HTTPS tls: credentialName: example-cert mode: SIMPLE privateKey: sds serverCertificate: sds更新:我还没有尝试过,但是您可以尝试仅将表达式定义为路径路径,我认为它只需在对象的其余部分内设置单个值即可:Update:I haven't tried it out, but you could try just defining that expression as the path path, i think it then just set that single value inside the rest of the object:- path: spec.servers[0].tls.httpsRedirect value: true尽管可能需要定义整个tls对象,但我现在不确定仅定义了httpsRedirect属性是否有效.It might be necessary to define the entire tls object though, i'm not sure right now if it'd be valid with just the httpsRedirect attribute defined.- path: spec.servers[0].tls value: httpsRedirect: true other required attributes defined here just like httpsRedirect 这篇关于Istio复杂的K8sObjectOverlay.PathValue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-18 15:51