<p>I have an ArgoCD App which is generating symbols</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
  labels:
    {{- include &quot;myapp.labels&quot; . | nindent 4 }}
  annotations:
    helm.sh/hook: pre-install,post-delete
  name: {{ include &quot;myapp.fullname&quot; . }}
type: Opaque
data:
  {{- if .Values.password }}
  password: {{ .Values.password | b64enc | quote }}
  {{- else }}
  password: {{ randAlphaNum 10 | b64enc | quote }}
  {{- end }}
</code></pre>
<p>A second service is adding additional values to the secrets later. I don't want this secrets in my chart</p>
<p>Now when something is changed on the app, the secrets are recreated.</p>
<p>How can i change this behaviour in ArgoCD?</p>

<p>Add annotation to that particular object and it should work</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
  labels:
    {{- include &quot;myapp.labels&quot; . | nindent 4 }}
  annotations:
    helm.sh/hook: pre-install,post-delete
    argocd.argoproj.io/sync-options: Prune=false
</code></pre>
<blockquote>
<p>Some Sync Options can defined as annotations in a specific resource. Most of the Sync Options are configured in the Application resource <code>spec.syncPolicy.syncOptions</code> attribute. Multiple Sync Options which are configured with the <code>argocd.argoproj.io/sync-options</code> annotation can be concatenated with a , in the annotation value; white spaces will be trimmed.</p>
</blockquote>
<p><a href="https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/#no-prune-resources" rel="nofollow noreferrer">no-prune-resources</a></p>
<p>Or if you don’t want to apply auto sync on this object then you can try <code>ApplyOutOfSyncOnly=false</code></p>
<p><a href="https://argo-cd.readthedocs.io/en/release-2.0/user-guide/sync-options/#selective-sync" rel="nofollow noreferrer">selective-sync</a></p>
