docs: Correct ApplicationSet (spec.preservedFields) (#20206)

* Fix docs

Signed-off-by: jyoungs <jyoungs@bluenightmare.com>

* Remove another errant block; improved comments

Signed-off-by: jyoungs <jyoungs@bluenightmare.com>

* Actually removed the errant block

Signed-off-by: jyoungs <jyoungs@bluenightmare.com>

* More doc fixes

Signed-off-by: jyoungs <jyoungs@bluenightmare.com>

* More spec fixes + USERS

Signed-off-by: jyoungs <jyoungs@bluenightmare.com>

---------

Signed-off-by: jyoungs <jyoungs@bluenightmare.com>
This commit is contained in:
Jeff Youngs 2024-10-04 11:44:39 -05:00 committed by GitHub
parent 1c6ec19a86
commit 2f6b6adb1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 27 deletions

View file

@ -85,6 +85,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [D2iQ](https://www.d2iq.com)
1. [DaoCloud](https://daocloud.io/)
1. [Datarisk](https://www.datarisk.io/)
1. [Daydream](https://daydream.ing)
1. [Deloitte](https://www.deloitte.com/)
1. [Deutsche Telekom AG](https://telekom.com)
1. [Devopsi - Poland Software/DevOps Consulting](https://devopsi.pl/)

View file

@ -3,16 +3,6 @@ kind: ApplicationSet
metadata:
name: test-hello-world-appset
namespace: argocd
# To preserve this annotation and label we can use the preservedFields property
preservedFields:
# This annotation and label exists only on this Application, and not in
# the parent ApplicationSet template:
# ignoreApplicationDifferences is the preferred way to accomplish this now.
annotations:
my-custom-annotation: some-value
labels:
my-custom-label: some-value
spec:
generators:
@ -168,29 +158,17 @@ spec:
applicationsSync: create-only
# Prevents ApplicationSet controller from deleting Applications. Update is allowed
# applicationsSync: create-update
# applicationsSync: create-update
# Prevents ApplicationSet controller from modifying Applications. Delete is allowed.
# applicationsSync: create-delete
# applicationsSync: create-delete
syncOptions:
- CreateNamespace=true
# Prevent an Application's child resources from being deleted, when the parent Application is deleted
preserveResourcesOnDeletion: true
# which fields of the ApplicationSet should be ignored when comparing Applications.
ignoreApplicationDifferences:
- jsonPointers:
- /spec/source/targetRevision
- name: some-app
jqExpressions:
- .spec.source.helm.values
strategy:
# This field lets you define fields which should be ignored when applying Application resources. This is helpful if you
# want to use ApplicationSets to create apps, but also want to allow users to modify those apps without having their
# changes overwritten by the ApplicationSet.
# This update strategy allows you to group Applications by labels present on the generated Application resources
# The RollingSync update strategy allows you to group Applications by labels present on the generated Application resources
# See documentation for "Progressive Syncs"
type: RollingSync
rollingSync:
steps:
@ -214,6 +192,13 @@ spec:
- env-prod
maxUpdate: 10% # maxUpdate supports both integer and percentage string values (rounds down, but floored at 1 Application for >0%)
# Define annotations and labels of the Application that this ApplicationSet will ignore
# ignoreApplicationDifferences is the preferred way to accomplish this now.
preservedFields:
annotations: [ some-annotation-key ]
labels: [ some-label-key ]
# Define fields of the that should be ignored when comparing Applications
ignoreApplicationDifferences:
- jsonPointers:
- /spec/source/targetRevision
@ -311,4 +296,4 @@ spec:
operator: In
values:
- https://kubernetes.default.svc
- https://some-other-cluster
- https://some-other-cluster