Add support for host aliases #400
Closed
opened 2023-02-17 06:34:44 +00:00 by podain77
·
10 comments
No Branch/Tag Specified
No results found.
v10.6.0
v10.5.0
v10.4.1
v10.4.0
v10.3.0
v10.2.0
v10.1.4
v10.1.3
v10.1.2
v10.1.1
v10.1.0
v10.0.2
v10.0.1
v10.0.0
v9.6.1
v9.6.0
v9.5.1
v9.5.0
v9.4.0
v9.3.0
v9.2.1
v9.2.0
v9.1.0
v9.0.4
v9.0.3
v9.0.2
v9.0.1
v9.0.0
v8.3.0
v8.2.0
v8.1.0
v8.0.3
v8.0.2
v8.0.1
v8.0.0
v7.0.4
v7.0.3
v7.0.2
v7.0.1
v7.0.0
v6.0.5
v6.0.4
v6.0.3
v6.0.2
v6.0.1
v6.0.0
v5.0.9
v5.0.8
v5.0.7
v5.0.6
v5.0.5
v5.0.4
v5.0.3
v5.0.2
v5.0.1
v5.0.0
v4.1.1
v4.1.0
v4.0.3
v4.0.2
v4.0.1
v4.0.0
v3.1.4
v3.1.3
v3.1.2
v3.1.1
v3.1.0
v3.0.0
v2.2.5
v2.2.4
v2.2.3
v2.2.2
v2.2.1
v2.2.0
v2.1.11
v2.1.10
v2.1.9
v2.1.8
v2.1.7
v2.1.6
v2.1.5
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.0.7
v2.0.6
v2.0.5
v2.0.4
v2.0.3
v2.0.2
v2.0.0
v1.5.5
v1.5.4
v1.5.3
v1.5.2
v1.5.1
v1.5.0
v1.4.9
v1.4.8
v1.4.7
v1.4.6
v1.4.5
v1.4.4
v1.4.3
v1.4.2
Labels
Clear labels
has/backport
in progress
invalid
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/refactor
kind/security
kind/testing
kind/translation
kind/ui
need/backport
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/other
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: lunny/helm-chart#400
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
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?
Hi, I'm using gitea for my personal use.
I'm running keycloak in a private network which does not support DNS configuration.
The keycloak service is exposed behind nginx using my own host name.
In this situation, it is required to set host aliases to the gitea container so that it can use the keycloak as auth source.
It is also requried to call webhook servers with custom host names.
Here's my feature branch for this.
https://gitea.com/podain77/gitea-helm-chart/src/branch/support-host-aliases
Please consider merging the commit if it is acceptable.
Thank you.
I am also using NGINX+Keycloak in combination with Gitea and I haven't had this need.
I don't understand what you mean by "Keycloak does not support DNS configuration".
Can you elaborate?
And please open a PR against this repo so changes can be inspected.
I'm running nginx in a kubernetes cluster as a nodeport service.
Let's say ingress host for keycloak is set to "keycloak.example.com"
Then the auto discovery url will be https://keycloak.example.com/realms/my-ream/.well-known/openid-configuration.
But gitea cannot resolve host "keycloak.example.com".
Because the host is not a public one, either adding dns record or host aliases will work.
But, dns option is not always possible for me.
And I have no permission to create PR on this repo.
Let me know if any steps are required.
Everyone can create a PR using a fork. See the other open PRs. (unless something changed I am not aware of)
Can't you use an internal address for
autoDiscoverUrl
that routes to your keycloak instance? If both Keycloak and Gitea are in the same network, this should work. In the ends it's "just an address", as long as it can be resolved it does not matter whether it's a FQDN or an internal IP routing.Keycloak should be able to expose the
openid-configuration
endpoint at some internal address if the ingress host is set correctly. If the ingress is set to a public address but keycloak is not publicly reachable, this won't of course. But then I don't understand how you would be able to reach Keycloak at all.But maybe I understand the case better once I see the diff of your PR :)
Now i can create PR using fork as you mentioned. I was trying to create PR from mirror repo.
I'm using nginx as reserve proxy for multiple hosts with one IP address.
Users access services by adding entries to their /etc/hosts pointing to the nginx IP.
But gitea container can't resolve the host, because it is not an IP address and the host is not registered in the DNS. hostAliases is just there for this kind of purpose.
Here's the PR for this feature.
https://gitea.com/gitea/helm-chart/pulls/401
Hmm, I've never heard of such an approach. Usually the services that nginx serves are mapped into it's config. Then in Gitea you define the ingress and your ingress controller takes care of the routing. Am I misunderstanding the case?
So you don't have a DNS resolution in your network and just use plain mappings in
/etc/hosts
for all users to be able to resolve DNS names?Isn't it common to have a self-hosted DNS server running if a public one can't be used? ?
Not necessarily against the PR (from a technical POV) but I wonder if we should add this as I haven't seen this in any other helm chart yet.
@justusbunsi What are your thoughts on this?
Yes, DNS can solve my problem, but that is not an option this time.
Our network is managed securely by dedicated team.
Any records in the DNS server should take steps to be granted permissions.
With host aliases, I can control name resolution completely myself.
And there might be still more cases that can benefit from host aliases.
I don't know about other charts but all charts I'm currently using support host aliases.
Please check out links below.
abf9719f38/charts/jenkins/values.yaml (L515)
99932a96c2/charts/argo-cd/values.yaml (L90)
96b18873ff/bitnami/keycloak/values.yaml (L344)
If I would be a member of the "dedicated security team", I am not sure I would like this ?️
Thanks, that helps! In that case, I am fine with the proposed changes! Thanks for the detailed replies and patience!
@pat-s Thank you for the review and approval. ?
I am fine with it. ?