Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Helm] Cannot deploy on Kubernetes 1.19 because of internalTrafficPolicy #1212

Closed
petewall opened this issue Jul 5, 2024 · 0 comments · Fixed by #1213
Closed

[Helm] Cannot deploy on Kubernetes 1.19 because of internalTrafficPolicy #1212

petewall opened this issue Jul 5, 2024 · 0 comments · Fixed by #1213
Labels
enhancement New feature or request frozen-due-to-age

Comments

@petewall
Copy link
Contributor

petewall commented Jul 5, 2024

Request

Kubernetes Service
spec.internalTrafficPolicy was made stable in Kubernetes 1.26. This setting prevents installs on earlier cluster versions:

Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Service.spec): unknown field "internalTrafficPolicy" in io.k8s.api.core.v1.ServiceSpec
make: *** [deploy] Error 1

This can be fixed by adding this into the service template:

apiVersion: v1
kind: Service
...
spec:
...
  {{- if semverCompare ">=1.26-0" .Capabilities.KubeVersion.Version }}
  internalTrafficPolicy: {{.Values.alloy.service.internalTrafficPolicy}}
  {{- end }}
...

Use case

With this simple change, we could deploy on earlier cluster versions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request frozen-due-to-age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant