Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ignoreDifferences within string #20873

Open
DerekTBrown opened this issue Nov 20, 2024 · 2 comments
Open

Support ignoreDifferences within string #20873

DerekTBrown opened this issue Nov 20, 2024 · 2 comments
Labels
component:diffing enhancement New feature or request more-information-needed Further information is requested

Comments

@DerekTBrown
Copy link

Summary

  • A common pattern is to define application-specific options as YAML inside a ConfigMap.
  • For the same reason as ignoreDifferences are supported within Kubernetes manifests, users may need to ignore differences inside a ConfigMap.

Motivation

For example- there are certain fields within our Kiali ConfigMap that show diffs on every update. We would like to suppress those changes in the ArgoCD UI.

Proposal

type ResourceIgnoreDifferences struct {
     ...
     JSONPointers           []string `json:"jsonPointers,omitempty" protobuf:"bytes,5,opt,name=jsonPointers"`
     JQPathExpressions      []string `json:"jqPathExpressions,omitempty" protobuf:"bytes,6,opt,name=jqPathExpressions"`
+   YAMLStringIgnoreJQPaths []string `json:"yamlStringIgnoreJQPaths,omitempty" protobuf:"bytes,6,opt,name=yamlStringIgnoreJQPaths"`

The behavior would be:

  • If YAMLStringIgnoreJQPaths is non-empty, all values referred to by JSONPointers and JQPathExpressions will be parsed as YAML.
  • Within those YAMLs, differences in keys referred to within YAMLStringIgnoreJQPaths will be ignored.
@DerekTBrown DerekTBrown added the enhancement New feature or request label Nov 20, 2024
@andrii-korotkov-verkada
Copy link
Contributor

Hm, this seems like it would be inconsistent with how JSONPointers and JQPathExpressions behave currently.

@andrii-korotkov-verkada
Copy link
Contributor

I don't fully understand the motivation yet. Wouldn't setting ignoreDifferences on individual keys in the data section work?

@andrii-korotkov-verkada andrii-korotkov-verkada added the more-information-needed Further information is requested label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:diffing enhancement New feature or request more-information-needed Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants