{"id":18303106,"url":"https://github.com/monzo/argo-rollouts-api","last_synced_at":"2025-08-28T09:07:06.902Z","repository":{"id":78418131,"uuid":"601228386","full_name":"monzo/argo-rollouts-api","owner":"monzo","description":"Just API types for argoproj/argo-rollouts.","archived":false,"fork":false,"pushed_at":"2024-10-31T09:49:52.000Z","size":303,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-09T10:14:10.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"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/monzo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-13T16:24:08.000Z","updated_at":"2025-04-08T21:58:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab9dbfa5-af8d-46d5-81cb-72b1640bbfb4","html_url":"https://github.com/monzo/argo-rollouts-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/monzo/argo-rollouts-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fargo-rollouts-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fargo-rollouts-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fargo-rollouts-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fargo-rollouts-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monzo","download_url":"https://codeload.github.com/monzo/argo-rollouts-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fargo-rollouts-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272475029,"owners_count":24940670,"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","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-05T15:24:10.880Z","updated_at":"2025-08-28T09:07:06.869Z","avatar_url":"https://github.com/monzo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# argo-rollouts-api\n\nThis module contains just the Kubernetes API resources and types for https://github.com/argoproj/argo-rollouts (from pkg/apis and pkg/client), minus pkg/apis/rollout/validation. This allows us to import and use these types without having to transitively import k8s.io/kubernetes, which argoproj/argo-rollouts depends on.\n\n## How to update\n\nTo update the API definitions (e.g. from a newer release of Argo Rollouts), you can do the following:\n1. Checkout https://github.com/argoproj/argo-rollouts locally at the release tag you want to copy from\n2. Copy the relevant packages over:\n    ```shell\n    $ cp -fr $argo_rollouts_folder/pkg/apis ./pkg\n    $ cp -fr $argo_rollouts_folder/pkg/client ./pkg\n    ```\n3. Delete the `validation` package as this has a dependency on `argo-rollouts` and we don't need it just for API object usages:\n    ```shell\n    $ rm -fr ./pkg/apis/rollouts/validation\n    ```\n4. Raise a PR with the changes to monzo/argo-rollouts-api, get it merged\n5. In all **other projects** where you want to add this as a dependency, add a go mod replace directive:\n   ```shell\n   go mod edit -replace github.com/argoproj/argo-rollouts=github.com/monzo/argo-rollouts-api@$merge-commit-sha\n   ```\n\n\n\n## Why is this a problem, and why can't we just use `argoproj/argo-rollouts`?\n\nThe `argoproj/argo-rollouts` repository contains these API types, but also all of the code for the Argo Rollouts controllers. Many places in this controller code import code from `k8s.io/kubernetes`, which is the main holding repository for the Kubernetes project (https://github.com/kubernetes/kubernetes).\n\nThis repository contains the staging directories for many published Kubernetes packages. For example, you can find the original source for `k8s.io/api` at [kubernetes/kubernetes/staging/src/k8s.io/api](https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/api). To make it possible to test these staging packages with the rest of the codebase, the kubernetes/kubernetes `go.mod` makes heavy use of `replace` directives to redirect imports of various `k8s.io` packages to the respective staging directories. For example for `k8s.io/api`:\n```\n...\n\nrequire (\n   ...\n   k8s.io/api v0.0.0\n   ...\n)\n\nreplace (\n   ...\n   k8s.io/api =\u003e ./staging/src/k8s.io/api\n   ...\n)\n```\n\nGo modules don't propagate `replace` directives to their downstream dependencies - this would cause chaos if they did! Instead, if a project imports `k8s.io/kubernetes`, it just gets the `require` versions - in this case, `k8s.io/api = v0.0.0`. Since this isn't a real version, go mod dependency resolution fails.\n\nThe workaround for this is to replicate the `replace` directives, but instead target actual versions, e.g.:\n```\n\nreplace (\n   ...\n   k8s.io/api =\u003e k8s.io/api v0.24.2\n   ...\n)\n```\n\nThis is a fair amount of complexity, which we simply don't need. We just want to use the API types, not the controllers. So we've extracted the API types into this repository, which is a much simpler dependency to manage.\n\n\nSee https://github.com/kubernetes/kubernetes/issues/90358#issuecomment-617859364\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonzo%2Fargo-rollouts-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonzo%2Fargo-rollouts-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonzo%2Fargo-rollouts-api/lists"}