Open tromsosec opened 1 month ago
Can you share your app's manifest, please? Also, what is that warning shown in the UI? If the resources are controlled by another app as well, this might be relevant.
Hi, thanks for the follow up.
Below app´s manifest:
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: devsecopsref
namespace: argocd-system
spec:
generators:
- git:
repoURL: https://<REMOVED>/devsecopsref/examples/sampleapp/deployment/sampleapp-lab.git
revision: main
files:
- path: "**/argocd.config.yaml"
template:
metadata:
name: '{{path.basename}}-devsecopsref-sampleapp'
spec:
project: devsecopsref
sources:
- chart: sampleapp-umbrella-chart/sampleapp
helm:
releaseName: sampleapp
valueFiles:
- $values/{{path.basename}}/values.yaml
repoURL: '{{helm.chartRegistry}}/devsecopsref/examples/sampleapp/helmcharts'
targetRevision: '{{helm.chartVersion}}'
- ref: values
repoURL: https://<REMOVED>/devsecopsref/examples/sampleapp/deployment/sampleapp-lab.git
targetRevision: main
destination:
name: '{{path.basename}}'
namespace: devsecopsref
syncPolicy:
automated:
prune: false
selfHeal: false
syncPolicy:
preserveResourcesOnDeletion: true
We use an appset with a git generator looking for argocd.config.yaml
file to create individual apps. This file just includes some parameters used within the spec, namely helm.chartRegistry
and helm.chartVersion
. The rest is defined in the spec itself.
Regarding the Warning it is only the "OrphanedResourceWarning" which is expected as it is enabled in the project and there are some manually created resources in the same namespace.
Thanks!
Can you also enable the debug logging and paste the logs, please? Pasting in json format can also help IMO.
Checklist:
argocd version
.Describe the bug
Our setup uses Argo-CD applications deployed using ApplicationSets on an app of apps pattern. Applications are multisource, i.e. using git generator and Helm Chart (OCI) + Values (Git repo). We currently do not have Auto-Sync enabled.
On our development environment, our Helm Charts artifacts are created and pushed to the OCI registry using rolling tags with "-dev" suffix, e.g. 0.0.1-dev. We overwrite the artifact with same tag upon new CI build completion.
We are currently running ArgoCD 2.11.4 and after upgrading to version 2.12.x (tried 2.12.1-3), an application running a chart with version 0.0.1-dev and upon the creation of a new chart with same tag version including changes, the changes are detected by Argo (application marked Out-Of-Sync) but the resources that are marked as Out-of-Sync cannot be synced any longer using the "Sync" button. However, if we enable "Auto-Sync" for the application the resources are synced as expected.
Additionally, performing a "Sync" with resource replacement recreates the resources but of previous state, still out of sync.
When the Helm Chart is updated to a different version tag, e.g. 0.0.2-dev there is no issue. It may be related on how the artifacts are cached. If we restart the Redis pods the first sync works but from there on we have the same above described behaviour.
To Reproduce
Expected behavior
Triggering a Sync using the UI should sync the resources to the latest state and not remained unapplied.
Screenshots
Version
Logs
ApplicationController logs when manual resources sync is triggered:
Kubernetes ArgoCD Deployment