Last active
May 8, 2022 20:05
-
-
Save jwillker/a3d81d249b2d719ae988aca68f0335c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{/* | |
| Return the appropriate apiVersion for ingress. | |
| */}} | |
| {{- define "ingress.apiVersion" -}} | |
| {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19.x" (include "chart.kubeVersion" .)) -}} | |
| {{- print "networking.k8s.io/v1" -}} | |
| {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} | |
| {{- print "networking.k8s.io/v1beta1" -}} | |
| {{- else -}} | |
| {{- print "extensions/v1beta1" -}} | |
| {{- end -}} | |
| {{- end -}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment