Install gitea on OKD/openshift #567
Reference in New Issue
Block 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