Install gitea on OKD/openshift #567
Open
opened 2023-11-16 08:40:42 +00:00 by ffppmm
·
12 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
kind/question
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#567
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?
Hello,
I like gitea a lot and used it private. Now I wan't to use it in my company and tried to deploy it to an okd cluster. I think the Security Constraints are somehow missing.
Is there a step by step "explanation" how to install gitea on okd/openshift?
Regards Philipp
There is not, otherwise it would exist in the documentation :)
You need to tell us what is missing/doesn't work. There are actually quite a few security-related options in the chart like
containerSecurityContext
and others.Hello,
Just asking if I missed something.
Than I will bring gitea to "live" on OKD/Openshift and let you know how I did it. Maybe I can contribute to the Documentation 😄
I will start with "AllInOnePod", thank you,
Regards Philipp
Awesome. Thanks in advance for sharing.
Hi,
I the following is the "problem" with openshift/OKD:
For openshift/OKD deployment we don't need a default user so I removed the
{{- if not (hasKey $csc "runAsUser") -}} ... {{- end -}}
block and it works find, because the POD gets a random user assigned.My first thought was to create something like this:
ofc with the corresponding value set to true in values.yaml, so no default behavior is touched.
Any thoughts on this?
regards Philipp
Hi,
some News, I made a mistake :( I used:
So Everything works correct with the fsGroup of the container. I will dig into the matter Security Constraints,
Regards Philipp
So, everything works? If so, this would be great news. Maybe you could post any modifications to values.yml which you needed to make to get this working? Could also be a PR to the README to make it easier for others to find.
Hi,
sry for not replying, I will dive into it next week, currently no time 😄
I have not forgotten gitea 😉
Regards Philipp
So hi again 😄
I had to make the following changes to the original helm chart:
These changes are primary to eliminate any "user context". Found an interessting article how to do it with id 1000 😉
https://cookbook.openshift.org/users-and-role-based-access-control/how-can-i-enable-an-image-to-run-as-a-set-user-id.html
This I will check out next week because it sounds better than modifying the gitea helm chart. Also because the user git has id 1000, much nicer 😄
regards Philipp
Thanks Phillpp, your investigations into this has been helpful. I've only had access to a more relaxed openshift environment in terms of security (likely more relaxed than defaults), so this will for sure be beneficial for others too :)
I'll have to work in an openshift env soon and also planning to play around with OKD. WRT to "user context": I think there should be a "better" way than to remove the part from the chart. From what I know, Openshift is actually very "user context" focused (i.e. using non-root execution) so maybe it only needs some config adaptions instead of removing the context.
Hi,
didn't find time to create my own SCC, but ...
I added the "gitea" service User to the nonroot-v2 SCC, that's OK for us:
and everything works,
regards
Hi,
you could also do this by template:
Works perfect 😄
Regards Philipp