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

No Sync Triggered for Apps generated by AppSet's Cluster Generator when Annotation/Label change #18097

Open
sherifabdlnaby opened this issue May 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sherifabdlnaby
Copy link

Describe the bug

When Cluster's Annotations are referenced ApplicationSet's Template updating the cluster's annotation doesn't trigger a Sync for the generated Applications.

I use Cluster's Annotation (accessible via ApplicationSets Cluster Generator) to pass data from Terraform to ArgoCD.
The values of some annotations are fed into Helm's valuesObject.

When a cluster annotation is updated, it doesn't trigger a sync of the generated applications unless you manually sync each app.

To Reproduce

  1. Register a K8S Cluster to ArgoCD and add a key=value annotation.
  2. Create an ApplicationSet and use Cluster Generator to discover the registered cluster.
  3. Using Cluster Generators values: read the annotation into a variable using {{index .metadata.annotations "<annotation key>"}}
  4. Use the extracted Variable in a Helm Chart valuesObject.
  5. Apply the Application Set and wait for the generated Application to Sync.
  6. Update the Cluster Secret and modify the value of the annotation.

Expected behavior

A Sync is triggered since the Annotation Value changed and will change the resulting k8s manifests.

Version

{
    "Version": "v2.10.7+b060053",
    "BuildDate": "2024-04-15T08:45:08Z",
    "GitCommit": "b060053b099b4c81c1e635839a309c9c8c1863e9",
    "GitTreeState": "clean",
    "GoVersion": "go1.21.3",
    "Compiler": "gc",
    "Platform": "linux/arm64",
    "KustomizeVersion": "v5.2.1 2023-10-19T20:13:51Z",
    "HelmVersion": "v3.14.3+gf03cc04",
    "KubectlVersion": "v0.26.11",
    "JsonnetVersion": "v0.20.0"
}
@sherifabdlnaby sherifabdlnaby added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant