Add image.fullOverride #550
Reference in New Issue
Block a user
No description provided.
Delete Branch "TristanHoladay/helm-chart:feature-decouple-rootless"
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
This PR is a continuation of the work done by @dgershman in 534, to allow users to override the image from the default rootless behavior of appending
-rootlessto the end of the image tag.Benefits
Allows more flexibility to use externally maintained images that are rootless but don't follow the
-rootlesstag convention.Applicable issues
Additional information
No breaking changes. This does not affect the
image.rootlessconditional checks or the current behavior if someone still wants to rely on the chart to append-rootless.Checklist
values.yamland added to theREADME.mdusing readme-generator-for-helmREADME.mdThanks! Also for adding tests. I think one important thing to add would be an entry to README which lists the adaptions users need to make when providing their own rootless image and running
rootless: false. Or, phrased differently, we should make it explicit what usingrootless: truedoes behind the scences. They could be added in a new subsection below https://gitea.com/gitea/helm-chart#user-content-configuration. AFAICS these are:$HOMEto/data/gitea/gitSTART_SSH_SERVER: trueSSH_LISTEN_PORT: 2222SSH_LOG_LEVELOther actions, like chowning
/dataare only important when running rootful.@justusbunsi Feel free to add tasks in case I forgot some actions.
@pat-s thank you for the feedback. I just pushed and update based on your suggestion. Not sure if I really hit the mark with what you're wanting but just let me know what you think should be altered and if i got the location wrong and I'm happy to make those changes.
Thanks for continuing the work of #534.
@@ -172,6 +172,26 @@ The Prometheus `/metrics` endpoint is disabled by default.ENABLED = false```#### Rootless DefaultsPlease update the table-of-content at the top of this document.
@@ -174,1 +174,4 @@#### Rootless DefaultsIf `.Values.image.rootless: true`, then the following will occur:Suggestion:
Referring to the new option makes it more obvious why this is an important information.
@@ -175,0 +178,4 @@- `$HOME` becomes `/data/gitea/git`[see deployment.yaml](./templates/gitea/deployment.yaml#L185)Be careful with referencing specific lines of code. They tend to get outdated or incomplete quite fast. Instead, let the user look for contexts:
see [deployment.yaml](./templates/gitea/deployment.yaml) template inside (init-)container "env" declarations.@@ -175,0 +188,4 @@[see \_helpers.tpl](./templates/_helpers.tpl#L340)- (optional) Defining `SSH_LOG_LEVEL`Changing
SSH_LOG_LEVELis only possible via Chart logic when not usingrootlessimages. See7de8e83433/templates/gitea/deployment.yaml (L270)for the condition.@@ -1084,12 +1105,14 @@ gitea:```<!-- markdownlint-disable-next-line -->The empty lines between
<!-- markdownlint-disable-next-line -->(4x) causes the build to fail. Please remove these empty lines. They are probably added automatically.@@ -60,0 +67,4 @@asserts:- equal:path: spec.template.spec.containers[0].imagevalue: "gitea/gitea:1.19.3"Kudos for demonstrating how and ensuring that the
image.digestfield is completely ignored when usingimage.fullOverride.Thanks! I was thinking of even adding the registry, repository, and tag. Do you think that's worth doing, or is digest enough?
That would be great. You can even add a code comment that this purposely set to ensure such behavior.
@@ -43,6 +43,7 @@ clusterDomain: cluster.local## @param image.digest Image digest. Allows to pin the given image tag. Useful for having control over mutable tags like `latest`## @param image.pullPolicy Image pull policy## @param image.rootless Wether or not to pull the rootless version of Gitea, only works on Gitea 1.14.x or higher## @param image.fullOverride Completely overrides the image registry, path/image, tag and digestSuggestion:
This makes it more obvious that the Chart logic still rely on that setting, even when
image.fullOverrideis used. And gives a hint to the new section.feature-decouple-rootlessto Add `image.fullOverride`Thank you for the awesome feedback and suggestions @justusbunsi.
@@ -175,0 +189,4 @@[see \_helpers.tpl](./templates/_helpers.tpl) in `gitea.inline_configuration.defaults.server` definition- Defining `SSH_LOG_LEVEL` turned offIf I got your intention right, are trying to say that the
SSH_LOG_LEVELenvironment variable is not injected into the container when using a rootless image. If that's the case, I suggest writing it that way. The current "DefiningSSH_LOG_LEVELturned off" sounds a bit off.Awesome 🚀
@pat-s Anything left from your side?
I'll add some post-merge wording and formatting updates but overall 👍 Thanks everyone!