Skip to content

Commit b77faaa

Browse files
committed
Added comment as requested with reference to the issue number
Signed-off-by: Anand Francis Joseph <[email protected]>
1 parent 2a50326 commit b77faaa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/sync/sync_context.go

+4
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,8 @@ func (sc *syncContext) applyObject(t *syncTask, dryRun, force, validate bool) (c
909909
// irrespective of the dry run mode set in the sync context, always run
910910
// in client dry run mode as the goal is to validate only the
911911
// yaml correctness of the rendered manifests.
912+
// running dry-run in server mode breaks the auto create namespace feature
913+
// https://github.com/argoproj/argo-cd/issues/13874
912914
dryRunStrategy = cmdutil.DryRunClient
913915
}
914916

@@ -917,6 +919,8 @@ func (sc *syncContext) applyObject(t *syncTask, dryRun, force, validate bool) (c
917919
shouldReplace := sc.replace || resourceutil.HasAnnotationOption(t.targetObj, common.AnnotationSyncOptions, common.SyncOptionReplace)
918920
// if it is a dry run, disable server side apply, as the goal is to validate only the
919921
// yaml correctness of the rendered manifests.
922+
// running dry-run in server mode breaks the auto create namespace feature
923+
// https://github.com/argoproj/argo-cd/issues/13874
920924
serverSideApply := !dryRun && (sc.serverSideApply || resourceutil.HasAnnotationOption(t.targetObj, common.AnnotationSyncOptions, common.SyncOptionServerSideApply))
921925
if shouldReplace {
922926
if t.liveObj != nil {

0 commit comments

Comments
 (0)