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

Pass annotation to ignore specific lines #95

Open
ImIOImI opened this issue Jan 13, 2025 · 2 comments
Open

Pass annotation to ignore specific lines #95

ImIOImI opened this issue Jan 13, 2025 · 2 comments
Labels
feature-request Feature Request

Comments

@ImIOImI
Copy link

ImIOImI commented Jan 13, 2025

I would like you to expand the application selection/ignore syntax to include the ability to ignore specific yaml values. For example, I have a configmap with the following diff:

 apiVersion: v1
 data:
-  install_id: ee096b1b-7af3-4d55-b88e-ea75acbc66f1
-  install_time: "1735944438"
+  install_id: 0126b3ad-ab3e-4a51-8fe1-20de241b7383
+  install_time: "1735944478"
   install_type: k8s_manual
 kind: ConfigMap
 metadata:
   labels:
     app.kubernetes.io/instance: datadog-eks-cluster-name
     app.kubernetes.io/managed-by: Helm
     app.kubernetes.io/name: datadog
     app.kubernetes.io/version: "7"
     argocd.argoproj.io/instance: datadog-eks-cluster-name
     helm.sh/chart: <version>
 ---

install_id and install_time are pretty useless from a comparison point of view, and I'd like to be able to pass annotations or labels that told Argo Preview to ignore them.

Another example is the token generation for a datadog cluster agent:

 spec:
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: datadog
  template:
    metadata:
      annotations:
        checksum/autoconf-config: <token>
        checksum/checksd-config: <token>
-        checksum/clusteragent_token: <token>
+        checksum/clusteragent_token: <token changed>
        checksum/confd-config: <token>
        checksum/install_info: <token>
        container.apparmor.security.beta.kubernetes.io/system-probe: unconfined
      labels:
        admission.datadoghq.com/enabled: "false"
        app: datadog
        app.kubernetes.io/component: agent
        app.kubernetes.io/instance: datadog-eks-cluster-name
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: datadog
@dag-andersen dag-andersen added the feature-request Feature Request label Jan 13, 2025
@dag-andersen
Copy link
Owner

Hi @ImIOImI,

I understand your frustration! I had the same experience.
I believe you can run the tool with --diff-ignore="install_time|install_id", which will ignore all lines containing either of those two words. It uses regex to filter the lines: [docs].

Let me know if that solves your problem! :)

@dag-andersen
Copy link
Owner

@ImIOImI
Did that help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants