Closed antonioberben closed 4 months ago
@antonioberben This would fail if the K8s version doesn't support it. To ensure backwards compatibility, please, check if the property is supported using a conditional block. Error:
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [ValidationError(Service.spec.ports[0]): unknown field "appProcotol" in io.k8s.api.core.v1.ServicePort, ValidationError(Service.spec.ports[1]): unknown field "appProcotol" in io.k8s.api.core.v1.ServicePort]
hi @pavelnikolov , the code now makes appProtocol
as conditional when:
{{- if and (ge .Capabilities.KubeVersion.Major "1") (ge .Capabilities.KubeVersion.Minor "20") }}
As you can see here the stable version is kubernetes 1.120
. Any idea why the lint/tests are failing?
@antonioberben I believe that you need to check not the Kubernetes version but rather the available API versions. I haven't checked particularly for the appProtocol
but I usually check for some API version instead of K8s version. Was this feature included by default in 1.20? Did you have to enable it with some flag maybe?
Reading the docs here to me it seems that your check is correct.
Hi @pavelnikolov , It was a typo 😞 . Now it should work. Please, can you review it? thanks!
@antonioberben I just did a little research and I'd like you to use the semver
function that helm provides. This feels future-proof:
https://helm.sh/docs/chart_template_guide/function_list/#semantic-version-functions
@pavelnikolov done! nice catch
Everything ready now. Thanks @pavelnikolov
Thank you for your contribution!
What this PR does
Which issue this PR fixes
Checklist
[jaeger]
or[jaeger-operator]
)