{"id":22885051,"url":"https://github.com/mark8s/argocd","last_synced_at":"2026-02-16T11:03:55.942Z","repository":{"id":112106606,"uuid":"450690167","full_name":"mark8s/argocd","owner":"mark8s","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-23T02:30:26.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-04T05:47:10.430Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Smarty","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mark8s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-22T01:43:52.000Z","updated_at":"2022-05-07T10:28:34.000Z","dependencies_parsed_at":"2023-07-31T22:15:59.289Z","dependency_job_id":null,"html_url":"https://github.com/mark8s/argocd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mark8s/argocd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mark8s%2Fargocd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mark8s%2Fargocd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mark8s%2Fargocd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mark8s%2Fargocd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mark8s","download_url":"https://codeload.github.com/mark8s/argocd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mark8s%2Fargocd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29506335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-12-13T19:31:18.937Z","updated_at":"2026-02-16T11:03:55.925Z","avatar_url":"https://github.com/mark8s.png","language":"Smarty","funding_links":[],"categories":[],"sub_categories":[],"readme":"### argocd\n\n\n#### sync policy\nargocd的同步策略\n\n- prune\n\n默认argocd的同步策略中 `prune: false` ，也就是当你删掉argocd监控的git仓库中的某个文件时， argocd中还会保留对应文件创建的那个资源记录。\n当你鼠标移动到那个资源时，会有个提示`OutOfSync（requires pruning）`。但是当你设置`prune: true`时，argocd在检测你的git中删除了某些资源时，\n它也会删除它自己的记录。\n\n- selfHeal\n\n指定是否要回到他们的期望状态恢复资源在集群中修改(默认值:false)。其实就是当你使用cmd修改k8s资源的时候，argocd的状态会变成`OutOfSync`。\n\n如果我们想要将使用cmd修改的k8s资源的状态恢复到git中指定的期望状态，就要设置 `selfHeal: true` 。\n\n\n- allowEmpty \n  \n允许argocd指定git path中的资源文件为空(默认值:false)。当 `allowEmpty: false`时，如果指定git path中的资源文件为空，那么会报错。\n\n错误如：`ComparisonError rpc error: code = Unknown desc = quickstart: app path does not exist`\n\n这时配置`allowEmpty: true` 就ok了。\n\n这里有个坑，路径下的资源为空，但是这个路径必须是要存在的。在git中，如果git某个文件夹下面没有任何文件，那么这个文件夹都会不存在了，所以测试的时候，可以放一个跟k8s无关的文件，保证path存在。\n\n#### 修改healthy判断逻辑\n如修改ingress的healthy判断逻辑\n```yaml\napiVersion: v1\ndata:\n  resource.customizations.health.networking.k8s.io_Ingress: |\n    hs = {}\n    hs.status = \"Healthy\"\n    return hs\n  resource.customizations.useOpenLibs.networking.k8s.io_Ingress: \"true\"\nkind: ConfigMap\nmetadata:\n  annotations:\n    kubectl.kubernetes.io/last-applied-configuration: |\n      {\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"annotations\":{},\"labels\":{\"app.kubernetes.io/name\":\"argocd-cm\",\"app.kubernetes.io/part-of\":\"argocd\"},\"name\":\"argocd-cm\",\"namespace\":\"argocd\"}}\n  creationTimestamp: \"2022-02-25T02:46:17Z\"\n  labels:\n    app.kubernetes.io/name: argocd-cm\n    app.kubernetes.io/part-of: argocd\n  name: argocd-cm\n  namespace: argocd\n  selfLink: /api/v1/namespaces/argocd/configmaps/argocd-cm\n```\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmark8s%2Fargocd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmark8s%2Fargocd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmark8s%2Fargocd/lists"}