Overhaul ingress configuration #679
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix-674"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description of the change
Redesigned ingress configuration to align better with implicit best practices.
Benefits
extensions/v1beta1
) and always usenetworking.k8s.io/v1
Possible drawbacks
Hopefully 🙃 none
Applicable issues
fix #674
Additional information
ingress.annotations
via helperstests/deployment
totests/ingress
path
andpathType
are always renderedingress. pathType
ingress.hosts[0].paths
to[]
to ensure proper rendering via template⚠ BREAKING
I think all of these changes should be backward comp with existing ingress definitions, but surely worth highlighting in the changelog of the release.
Checklist
values.yaml
and added to theREADME.md
using readme-generator-for-helmREADME.md
Looks like the ability to customize is now gone. We either have to restore this, or drop the unused values key.
Well spotted!
The doc says:
Maybe this was needed in the past but I don't see how/why argocd specifically would need this option. Having
ingress.apiVersion
as an option is also quite uncommon, looking at other charts.I'll remove it from the docs. Let me know if this is ok for you.
EDIT: Ah, found the initial reason: https://gitea.com/gitea/helm-chart/issues/251
3 years ago, meanwhile the networking resource is out of beta anyway, and I think argocd is also fine with it. At least I haven't found any issues in my argocd install.
@justusbunsi I also added a deprecation for
ingress.className
in favor ofingress.ingressClassName
.I had some issues with the
deprecation.yaml
template and getting the unittests to work.Specifically, the
fail
call wasn't honored as the unittest only renders theingress.yaml
test file and notdeprecations.yaml
. When including the latter, other testing issues arise.We might want to think about moving everything inside
deprecation.yaml
intohelpers.tpl
and include the specific tasks with adefine
into the respective templates. This might ease compatibility withhelm-unittests
. Let me know what you think about the current structure here and the general topic. This is of course it's own topic then.The old apiVersion is outdated since Kubernetes 1.22. Quite some time. Works for me to remove this option. 👍
What is the intention for doing so? IMO,
ingress.ingressClassName
is duplicated information. You are already iningress
object.Good idea to move the deprecations into
helpers.tpl
. Should be done in a separate PR.ingressClassName
is the canonical naming across most charts and from k8s itself. While on it to revamp the ingress definition, I wanted to align with naming conventions.If you're ok with this PR in general, we could include it in the release together with the 1.22.1 upstream release (which we should get out soonish, as it contains many bug fixes).
Feel free to merge and create a release if everything looks ok to you.
I obviously made changes 😉. But somehow I am still not completely happy with the current changes. I can see similarities to the Hashicorp Vault Helm Chart1 which I consider not the easiest approach from a user perspective. Right now it is very hidden that the ingress
path
can be changed. The emptyingress.hosts[0].paths
is misleading with the newly extracted values. What would take precedence: Extracted values or explicitly defining an entry of thatpaths
array? You'd have to mix'n'mesh them all to get the same rendered resource as right now. ThepathType
change is even breaking right now.I am not against a breaking change, not at all. Especially not for our ingress definition. I suggest we completely eliminate the
ingress.hosts
array and define the main ingress resource settings at root level of theingress
object. Like the ones you introduced. That way, the main ingress settings become easier to define (and to handle during templating). If we want to keep the ability to add additional hosts/paths/..., I suggest adding anextraHosts
array that is capable of the currentingress.hosts
. I took inspiration from the Bitnami MinIO Helm Chart2.I suggest we improve this PR and release it as a dedicated major change version (we don't have to wait for the next Gitea release to do so). I didn't liked the idea to completely rewrite the PR without discussing this.
636f8da6a6/templates/server-ingress.yaml (L56)
and636f8da6a6/values.yaml (L423-L434)
↩︎8cf3a792d4/bitnami/minio/values.yaml (L796-L854)
↩︎Just FYI I am still on it and hope to get to it again in the coming days/weeks.
Checkout
From your project repository, check out a new branch and test the changes.