{"id":16553049,"url":"https://github.com/stangirard/argocd-diff-finder","last_synced_at":"2025-04-12T03:54:05.710Z","repository":{"id":37209483,"uuid":"504808765","full_name":"StanGirard/argocd-diff-finder","owner":"StanGirard","description":"Script to find the diff between your latest commit and what is deployed via argocd","archived":false,"fork":false,"pushed_at":"2023-02-26T18:38:39.000Z","size":523,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T03:54:01.731Z","etag":null,"topics":["argocd","diff","dyff","finder","helm","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StanGirard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-18T10:13:26.000Z","updated_at":"2024-05-04T11:54:42.000Z","dependencies_parsed_at":"2022-08-18T09:43:37.010Z","dependency_job_id":null,"html_url":"https://github.com/StanGirard/argocd-diff-finder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanGirard%2Fargocd-diff-finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanGirard%2Fargocd-diff-finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanGirard%2Fargocd-diff-finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanGirard%2Fargocd-diff-finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StanGirard","download_url":"https://codeload.github.com/StanGirard/argocd-diff-finder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514205,"owners_count":21116899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argocd","diff","dyff","finder","helm","kubernetes"],"created_at":"2024-10-11T19:46:52.937Z","updated_at":"2025-04-12T03:54:05.686Z","avatar_url":"https://github.com/StanGirard.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://argo-cd.readthedocs.io/en/stable/assets/logo.png\" width=\"180px\" /\u003e\u003c/p\u003e\n\n\n# Argocd Diff Finder\n\n**Argocd Diff Finder** is a small bash script that can tell you what your actual changes on your resources will be when you merge your changes to the ArgoCD repository.\n\n## Why you need it\n\n- It's **free**, easy and open source. \n- It's easy to install\n- No more pain knowing what your changes will be when you merge your changes to the ArgoCD repository.\n\n## Features\n\n- It's a bash script :D (no need to install anything)\n- None except telling you the differences between your changes and the state of your app in Kubernetes.\n\n## Demo\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"./demo/demo.gif\" width=\"800px\" /\u003e\u003c/p\u003e\n\n## How it works\n\nArgocd Diff Finder works with two configurations:\n- All your app declarations and their helm charts, yaml files are in the same repository (ARGOCD_GIT_URL)\n  - It scans your app declarations and their helm charts and yaml files and finds the differences between your changes and the state of your app in Kubernetes.\n- You have a repository for your app declarations and point to another repository for your helm charts and yaml files.\n  - In this case, Argocd diff finder needs to be run on the repository that host your helm charts and yaml files.\n  - It will clone the argocd repository and then run the diff finder to find the path of all your apps. \n    - It will extract information in your app configurations in order to find the name of your argo apps that have been impacted by the changes in your branch\n- It uses the `argocd app diff` command to find the differences between your changes and the state of your app in Kubernetes. \n\n## Installation\n\n- Optional: Install dyff\n  - `brew install homeport/tap/dyff`\n  - `export KUBECTL_EXTERNAL_DIFF=\"dyff between -b \"`\n- Go to your branch with the changes you want to merge.\n- Make sure you pushed your changes\n- Make a port forward to your argocd server if it is not publicly accessible\n- Export the following variables\n```bash\nexport ARGOCD_SERVER=\u003clocalhost:8080\u003e # The ArgoCD server address\nexport ARGOCD_USERNAME=\u003cusername\u003e # The ArgoCD username\nexport ARGOCD_PASSWORD=\u003cpassword\u003e # The ArgoCD password\nexport ARGOCD_GIT_URL=\u003cgit-url\u003e # The ArgoCD git url with you applications configuration\n```\n- Optional: change some values\n```bash\nexport MAIN_BRANCH=\u003cmain-branch\u003e # The main branch of your application - default main\nexport ARGOCD_TMP_DIR=\u003ctmp-dir\u003e # The temporary directory to store the diffs - default /tmp/argocd-cd-tmp\n```\n\n### Usage\n\n- Run the script on your branch with the changes\n```bash\nbash argocd_diff_finder.sh #./argocd_diff_finder.sh\n```\n\n#### Port Forwarding\n\n- `-p`: Port forwarding to the ArgoCD server\n- `ARGOCD_SERVER`: must be set to `localhost:8080` \n\n#### Run from anywhere\n\n```bash\nmkdir ~/bin\ncd ~/bin\ncurl -sL https://raw.githubusercontent.com/StanGirard/argocd-diff-finder/main/argocd_diff_finder.sh \u003e argo-diff\nchmod +x argo-diff\n```\n\n```bash\n## Add to your path\nexport PATH=~/bin:$PATH\n```\n\n\n## Contributions\n\nPlease feel free to add any contribution.\nI might, if I have the time, translate it into go.\n\n## Disclaimers\n\nIt comes as is, without any warranty.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstangirard%2Fargocd-diff-finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstangirard%2Fargocd-diff-finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstangirard%2Fargocd-diff-finder/lists"}