<p>I'm trying to install Traefik on a K8s cluster using ArgoCD to deploy the official Helm chart.  But I also need it to us an additional &quot;values.yml&quot; file.  When I try to specify in the Application yaml file what additional values file to use, it fails to file not found for it.</p>
<p>Here is what I'm using:</p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: argo-traefik-chart
  namespace: argocd
spec:
  project: default
  source:
    path: traefik
    repoURL: https://github.com/traefik/traefik-helm-chart.git
    targetRevision: HEAD
    helm:
      valueFiles:
        - /traefik-values.yml
  destination: 
    server: https://kubernetes.default.svc
    namespace: 2195-leaf-dev-traefik
  syncPolicy:
    syncOptions:
      - CreateNamespace=true
    automated:
      prune: true
      selfHeal: true
</code></pre>
<p>Here is the traefik-value.yml file.</p>
<pre><code>additionalArguments:
# Configure your CertificateResolver here...
# 
# HTTP Challenge
# ---
# Generic Example:
#   - --certificatesresolvers.generic.acme.email=your-email@example.com
#   - --certificatesresolvers.generic.acme.caServer=https://acme-v02.api.letsencrypt.org/directory
#   - --certificatesresolvers.generic.acme.httpChallenge.entryPoint=web
#   - --certificatesresolvers.generic.acme.storage=/ssl-certs/acme-generic.json
#
# Prod / Staging Example:
#   - --certificatesresolvers.staging.acme.email=your-email@example.com
#   - --certificatesresolvers.staging.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory
#   - --certificatesresolvers.staging.acme.httpChallenge.entryPoint=web
#   - --certificatesresolvers.staging.acme.storage=/ssl-certs/acme-staging.json
#   - --certificatesresolvers.production.acme.email=your-email@example.com
#   - --certificatesresolvers.production.acme.caServer=https://acme-v02.api.letsencrypt.org/directory
#   - --certificatesresolvers.production.acme.httpChallenge.entryPoint=web
#   - --certificatesresolvers.production.acme.storage=/ssl-certs/acme-production.json
#
# DNS Challenge
# ---
# Cloudflare Example:
#  - --certificatesresolvers.cloudflare.acme.dnschallenge.provider=cloudflare
#  - --certificatesresolvers.cloudflare.acme.email=your-email@example.com
#  - --certificatesresolvers.cloudflare.acme.dnschallenge.resolvers=1.1.1.1
#  - --certificatesresolvers.cloudflare.acme.storage=/ssl-certs/acme-cloudflare.json
#
# Generic (replace with your DNS provider):
#  - --certificatesresolvers.generic.acme.dnschallenge.provider=generic
#  - --certificatesresolvers.generic.acme.email=your-email@example.com
#  - --certificatesresolvers.generic.acme.storage=/ssl-certs/acme-generic.json

logs:
# Configure log settings here...
  general:
    level: DEBUG

ports:
# Configure your entrypoints here...
  web:
    # (optional) Permanent Redirect to HTTPS
    redirectTo: websecure
  websecure:
    tls:
      enabled: true
      # (optional) Set a Default CertResolver
      # certResolver: cloudflare
  

#env:
# Set your environment variables here...
# 
# DNS Challenge Credentials
# ---
# Cloudflare Example:
#   - name: CF_API_EMAIL
#     valueFrom:
#       secretKeyRef:
#         key: email
#         name: cloudflare-credentials
#   - name: CF_API_KEY
#     valueFrom:
#       secretKeyRef:
#         key: apiKey
#         name: cloudflare-credentials

# Just to do it for now
envFrom:
  - secretRef:
      name: traefik-secrets
  
# Disable Dashboard
ingressRoute:
  dashboard:
    enabled: true

# Persistent Storage
persistence:
  enabled: true
  name: ssl-certs
  size: 1Gi
  path: /ssl-certs

# deployment:
#   initContainers:
#     # The &quot;volume-permissions&quot; init container is required if you run into permission issues.
#     # Related issue: https://github.com/containous/traefik/issues/6972
#     - name: volume-permissions
#       image: busybox:1.31.1
#       command: [&quot;sh&quot;, &quot;-c&quot;, &quot;chmod -Rv 600 /ssl-certs/*&quot;]
#       volumeMounts:
#         - name: ssl-certs
#           mountPath: /ssl-certs

# Set Traefik as your default Ingress Controller, according to Kubernetes 1.19+ changes.
ingressClass:
  enabled: true
  isDefaultClass: true
</code></pre>
<p>The traefik-values.yml file is in the same sub-directory as this file.  I fire this of with kubectl apply -f but when I got to look at it in the Argo GUI, it shows an error.  I'll paste the entire thing below, but it looks like the important part is this:</p>
<p>` failed exit status 1: Error: open .traefik-values.yml: no such file or directory</p>
<p>It's putting a period before the name of the file.  I tried different ways of specifying the file: .traefik-values.yml and ./treafik-values.yml.  Those get translated to:</p>
<p>: Error: open .traefik/.traefik-values.yml: no such file or directory</p>
<p>When I do a helm install using the exact same traefik-values.yml file, I get exactly what I expect.  And when I run the Argo without the alternate file, it deploys but with out the needed options of course.</p>
<p>Any ideas?</p>

Michael Eves Shaffer
<p>I assume this is because Argo will look for <code>traefik-values.yml</code> file in the <code>repoURL</code> (so, not in the location where <code>Application</code> file is), and it obviously doesn't exist there.</p>
<p>You can check more about this issue <a href="https://github.com/argoproj/argo-cd/issues/2789" rel="nofollow noreferrer">here</a>. There you can also find a couple of proposed solutions. Some of them are:</p>
<ul>
<li>a plugin to do a helm template with your values files</li>
<li>a custom CI pipeline to take the content of your values.yaml file and add it to Application manifest</li>
<li>putting values directly in Application manifest, skipping the values.yaml file altogether</li>
<li>having a chart that depends on a chart like <a href="https://mixi-developers.mixi.co.jp/argocd-with-helm-fee954d1003c" rel="nofollow noreferrer">here</a> (I don't like this one as it is downloading twice from two different locations, plus <a href="https://github.com/argoproj/argo-cd/issues/2789#issuecomment-790720510" rel="nofollow noreferrer">this</a> issue)</li>
<li>play around with kustomize</li>
<li>or wait for ArgoCD 2.5, it seems it will include a native solution out of the box, according to mentioned github issue</li>
</ul>
