Skip to content
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

Multiple sources: Values are not refreshed if in the same repository #12166

Closed
3 tasks done
Azenet opened this issue Jan 26, 2023 · 1 comment
Closed
3 tasks done

Multiple sources: Values are not refreshed if in the same repository #12166

Azenet opened this issue Jan 26, 2023 · 1 comment
Labels
bug Something isn't working multi-source-apps Bugs or enhancements related to multi-source Applications.

Comments

@Azenet
Copy link

Azenet commented Jan 26, 2023

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

When creating an application that has values referencing the same repository the application is declared in, the values are not refreshed along with the source repository.

To Reproduce

Repro repository: https://github.com/Azenet/argotest

  1. Create an multi-source application referencing the same repository for values, writing a value that does not pass validation:
# apps/nginx/nginx.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: nginx
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default

  sources:
    - chart: nginx
      targetRevision: ^13.2
      repoURL: https://charts.bitnami.com/bitnami
      helm:
        version: v3
        releaseName: nginx
        valueFiles:
          - $values/apps/nginx/values.yaml
    - repoURL: https://github.com/Azenet/argotest.git
      targetRevision: HEAD
      ref: values

  destination:
    server: https://kubernetes.default.svc
    namespace: nginx

  syncPolicy:
    automated:
      prune: true
    syncOptions:
      - CreateNamespace=true

# apps/nginx/values.yaml
replicaCount: -1
  1. Push the change, check that sync of the app fails (replicaCount cannot be negative)
  2. Update the values.yaml file, setting replicaCount to a valid value
  3. Refresh and sync the app

Expected behavior

The deployment is updated with the new replicaCount

Actual behavior

The deployment is not updated and the validation error is not cleared. The invalid replica value can be seen in the app diff on the dashboard.

Workaround

Restarting the ArgoCD repo server and flushing the ArgoCD redis usually makes ArgoCD realize there's something to sync, although it will sometimes not auto-sync it even if auto-sync is enabled.

Version

argocd: v2.6.0-rc5+unknown
  BuildDate: 2023-01-26T22:58:08Z
  GitCommit: 
  GitTreeState: 
  GitTag: 2.6.0-rc5
  GoVersion: go1.19.4
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.6.0-rc5+unknown
  BuildDate: 2023-01-26T22:58:08Z
  GitTag: 2.6.0-rc5
  GoVersion: go1.19.4
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: 4.5.7 2022-08-12T18:18:43Z
  Helm Version: v3.10.2+g50f003e
  Jsonnet Version: v0.19.1

Logs

No relevant logs were found.

Thank you for any help!

@Azenet Azenet added the bug Something isn't working label Jan 26, 2023
@ishitasequeira ishitasequeira added the multi-source-apps Bugs or enhancements related to multi-source Applications. label Jan 27, 2023
@ishitasequeira
Copy link
Member

This issue is related to the already open issue #11772. Closing this issue as this is a duplicate issue. Feel free to re-open the issue again, if you think this needs to be a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working multi-source-apps Bugs or enhancements related to multi-source Applications.
Projects
None yet
Development

No branches or pull requests

2 participants