-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Adapt Hubble ingress template to the new Ingress API #13682
Conversation
533d849
to
694045d
Compare
Hey guys, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments I have right now. I haven't tested it out yet, will do later the day.
@@ -9,9 +9,9 @@ Create chart name and version as used by the chart label. | |||
Return the appropriate apiVersion for ingress. | |||
*/}} | |||
{{- define "ingress.apiVersion" -}} | |||
{{- if semverCompare ">=1.4-0, <1.14-0" .Capabilities.KubeVersion.GitVersion -}} | |||
{{- if semverCompare ">=1.4-0, <1.19-0" .Capabilities.KubeVersion.Version -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good pick on version 1.14 here 💯 . For other reviewer, Ingress in networking.k8s.io/v1beta1 is available from from 1.14, but Ingress is available in networking.k8s.io/v1 from 1.19+ only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So where is the networking.k8s.io/v1beta1
? I see extensions/v1beta1
and networking.k8s.io/v1
but not networking.k8s.io/v1beta1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aanm if I understand correctly you want to use latest api version in relation to each Kubernetes version?
Right now this works fine, but if needed we can have better versioning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm trying to says is that extensions/v1beta1
will be used for up until k8s 1.19 for non-ingress resources, why is that? Non-ingress resources can use networking.k8s.io/v1
since 1.14.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aanm I've introduced networking.k8s.io/v1beta1
starting from 1.14 as documented here. I didn't change the field for the ingress as they only changed from networking.k8s.io/v1
.
Let me know if there is anything else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nothing else besides what Tam pointed out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modulo @sayboras' comments, LGTM.
For other reviewers/reference: helm/charts#19242
b20ff21
to
8df6073
Compare
@@ -9,9 +9,9 @@ Create chart name and version as used by the chart label. | |||
Return the appropriate apiVersion for ingress. | |||
*/}} | |||
{{- define "ingress.apiVersion" -}} | |||
{{- if semverCompare ">=1.4-0, <1.14-0" .Capabilities.KubeVersion.GitVersion -}} | |||
{{- if semverCompare ">=1.4-0, <1.19-0" .Capabilities.KubeVersion.Version -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So where is the networking.k8s.io/v1beta1
? I see extensions/v1beta1
and networking.k8s.io/v1
but not networking.k8s.io/v1beta1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
Ingress and IngressClass resources have graduated to networking.k8s.io/v1 in Kubernetes v1.19. This also introduced changes to the objects. Using Helm `.Capabilities`, the correct fields are chosen. Also in Helm, `GitVersion` is being deprecated and has thus been replaced with `Version`. See Cilium issue cilium#13611 See Kubernetes issue #89778 Signed-off-by: Youssef Azrak <yazrak.tech@gmail.com>
8df6073
to
fc8a029
Compare
Ingress and IngressClass resources have graduated to networking.k8s.io/v1 in Kubernetes v1.19. This also introduced changes to the objects.
Also in Helm,
GitVersion
is being deprecated and has thus been replaced withVersion
.Signed-off-by: Youssef Azrak yazrak.tech@gmail.com
Fixes: #13611