Skip to content

Commit

Permalink
fix: unable to read jqPathExpressions (argoproj#7375)
Browse files Browse the repository at this point in the history
The commit introduces the following changes:
1. Update the admin settings resource-overrides CLI to work with jqPathExpressions
2. Allow jqPathExpressions to be set from the UI

Signed-off-by: Chetan Banavikalmutt <[email protected]>
  • Loading branch information
chetan-rns authored Oct 6, 2021
1 parent 07eeddf commit df5cce8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/argocd/commands/admin/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ argocd admin settings resource-overrides ignore-differences ./deploy.yaml --argo

executeResourceOverrideCommand(cmdCtx, args, func(res unstructured.Unstructured, override v1alpha1.ResourceOverride, overrides map[string]v1alpha1.ResourceOverride) {
gvk := res.GroupVersionKind()
if len(override.IgnoreDifferences.JSONPointers) == 0 {
if len(override.IgnoreDifferences.JSONPointers) == 0 && len(override.IgnoreDifferences.JQPathExpressions) == 0 {
_, _ = fmt.Printf("Ignore differences are not configured for '%s/%s'\n", gvk.Group, gvk.Kind)
return
}
Expand Down
10 changes: 10 additions & 0 deletions ui/src/app/shared/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,20 @@ export interface ApplicationSpec {
source: ApplicationSource;
destination: ApplicationDestination;
syncPolicy?: SyncPolicy;
ignoreDifferences?: ResourceIgnoreDifferences[];
info?: Info[];
revisionHistoryLimit?: number;
}

export interface ResourceIgnoreDifferences {
group: string;
kind: string;
name: string;
namespace: string;
jsonPointers: string[];
jqPathExpressions: string[];
}

/**
* RevisionHistory contains information relevant to an application deployment
*/
Expand Down

0 comments on commit df5cce8

Please sign in to comment.