-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IgnoreMissingValueFiles option to prevent passing non-existing valueFiles to helm template #7767
Labels
enhancement
New feature or request
Milestone
Comments
This is exactly the solution that we would prefer. I originally also thought about giving the code a look but didn't find the time. |
10 tasks
ocraviotto
added a commit
to ocraviotto/argo-cd
that referenced
this issue
Dec 20, 2021
so as to allow operators to prevent Argo CD from passing valueFiles to helm template if they don't exist in the source under the specified path. Signed-off-by: Oscar Craviotto <craviotto@avellaneda.com>
10 tasks
ocraviotto
added a commit
to ocraviotto/argo-cd
that referenced
this issue
Jan 1, 2022
so as to allow operators to prevent Argo CD from passing valueFiles to helm template if they don't exist in the source under the specified path. Signed-off-by: Oscar Craviotto <craviotto@avellaneda.com>
alexmt
pushed a commit
that referenced
this issue
Jan 3, 2022
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
This is a proposal to add a new application's
source.helm.ignoreMissingValueFiles
property so that when set totrue
, ArgoCD would not pass files invalueFiles
tohelm template
if they don't exist in the source under the specified path.Motivation
We currently use the app-of-apps pattern with a root Helm app whose application
source.helm.valueFiles
lists a staticvalues.yaml
and a dynamic[cluster-fqdn]-values.yaml
file, which currently needs to exist even if empty and is used for overrides only. Needless to say, with each new cluster we end up having an additional override values file (most of which are empty).The thing is, we also follow the same pattern for applications, and though some configurations live in a central
applications
folder at our app-of-apps repository (from the root, values are found underapplications/[app-name]/values/
) others hold that in their own repository (underk8s/values/
- their helm is found underk8s/[service-name]
).This makes it very difficult to default a list of
valueFiles
following the same pattern for all our services without having to create all of these additional empty files in multiple locations.I reckon there are ways around this to make the pattern work, but they all seem to require additional configuration or the empty files we're currently using. Inspired by a proposal mentioned by @m-yosefpor at the end of this message (yet having a slightly different idea about its necessity), and realizing I'm not alone in having this question or trying to define a defaults/overrides pattern when using the app-of-apps (see the linked message and the original question it responds to), I thought to bring this up for discussion, as IMHO the best way to enable this default/overrides pattern at scale is to have a config option to purposely ignore missing values files before they're passed to helm (and fail).
Proposal
To be able (declaratively or via cli) to set a new Boolean
source.helm
propertyignoreMissingValueFiles
so that, whenfalse
(default), we'd have the current behavior (valueFiles passed tohelm template
regardless of existence), but when set totrue
, the reposerver repositoryhelmTemplate
processing of valuesFiles would be changed so that, for each values file in valueFiles, it would simply enable checking that, when the reference is a file, that file exists, and when it does not, it would log the omission and prevent appending it to the list of value files options that are passed to thehelm template
command. This way, configuring potentially non-existing files would not result in a failedhelm template
command.Note
I'm willing to submit this change myself, since from a look at the code it seems simple enough, but would appreciate feedback, recommendations, ideas and the like before I do.
The text was updated successfully, but these errors were encountered: