Hi Everyone,
Is there an alternative supported by replicated to get cluster version.
Like helm have .Capabilities bundle to get kubeversion.
semverCompare “>=1.19-0” .Capabilities.KubeVersion.GitVersion
The use case is that, we want to update our ingress manifest depending upon the kubernetes version they are running.
A vague idea of what I have currently done:
---
# repl{{ if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1
# repl{{ else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1beta1
# repl{{ else }}
apiVersion: extensions/v1beta1
# repl{{end }}
kind: Ingress
metadata:
name: ingress-name
annotations:
# repl{{ if semverCompare "<1.18-0" .Capabilities.KubeVersion.GitVersion }}
kubernetes.io/ingress.class: 'repl{{ ConfigOption "ingress_class_name" }}'
# repl{{ end }}
kots.io/placeholder: repl{{ printf "'true'" }}repl{{ ConfigOption "ingress_annotations" | nindent 4 }}
spec:
... incomplete example
---
Thanks in advance for any suggestion or help.