Closed jjo closed 3 years ago
It seems this PR is going to cause some issues. I've tested some new Ingresses in a 1.19 kops-based Kubernetes cluster and found-out the following:
....
[spec.rules[0].http.paths[0].backend: Invalid value: "": cannot set both port name & port number
And the Ingress resource I'm testing is:
...
- host: <omitted>
http:
paths:
- backend:
service:
name: <omitted>
port:
name: http
number: 8080
path: /
pathType: ImplementationSpecific
Checking-out the official docs, it seems they also stopped adding the port number and name:
spec:
rules:
- http:
paths:
- path: /testpath
pathType: Prefix
backend:
service:
name: test
port:
number: 80
Given this is nowadays breaking some of our Continuous Deployment pipelines that are sticking to the latest kube-libsonnet, I would rather revert this PR until some changes are made (code / tests) so we stop setting the port name (I don't see the point on having a custom name there).
What do you think @jjo, @jbianquetti-nami ?
Given this is nowadays breaking some of our Continuous Deployment pipelines that are sticking to the latest kube-libsonnet, I would rather revert this PR until some changes are made (code / tests) so we stop setting the port name (I don't see the point on having a custom name there).
What do you think @jjo, @jbianquetti-nami ?
Gah sorry for that ! :( Will redo the PR, reproducing those errors using the e2e tests we already have setup there, thanks for the quick turnaround
Fixes #60.
Support Kubernetes v1.22+ apiVersions deprecations, notably:
Ingress
:apiVersion: networking.k8s.io/v1
service
field to eachpath
(previouslyserviceName
andservicePort
)bitnami.libsonnet
: usepathType: ImplementationSpecific
, which seems to be the most generic oneCustomResourceDefinition
:apiVersion: apiextensions.k8s.io/v1
versions
map with sensible defaults, includingspec
field, as commonly used fro CRsOther changes:
tests/Makefile
: support (only) v1.19+tests/init-kube.jsonnet
: CRD tweaksFYI this is on top of #59.
NOTE: once merged upstream, would strongly recommend tagging it as
v1.19.0
, following the convention that tags'<major>.<minor>
should express minimum required Kubernetes release.