{"id":20102956,"url":"https://github.com/stackrox/dynamic-vertical-pod-autoscaler","last_synced_at":"2026-06-08T06:31:29.577Z","repository":{"id":244779704,"uuid":"816242020","full_name":"stackrox/dynamic-vertical-pod-autoscaler","owner":"stackrox","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-17T11:45:16.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-30T15:56:25.339Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/stackrox.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":"2024-06-17T10:35:38.000Z","updated_at":"2024-06-17T11:45:20.000Z","dependencies_parsed_at":"2024-06-17T12:19:17.721Z","dependency_job_id":null,"html_url":"https://github.com/stackrox/dynamic-vertical-pod-autoscaler","commit_stats":null,"previous_names":["stackrox/dynamic-vertical-pod-autoscaler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stackrox/dynamic-vertical-pod-autoscaler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackrox%2Fdynamic-vertical-pod-autoscaler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackrox%2Fdynamic-vertical-pod-autoscaler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackrox%2Fdynamic-vertical-pod-autoscaler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackrox%2Fdynamic-vertical-pod-autoscaler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackrox","download_url":"https://codeload.github.com/stackrox/dynamic-vertical-pod-autoscaler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackrox%2Fdynamic-vertical-pod-autoscaler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34051768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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-13T17:33:45.829Z","updated_at":"2026-06-08T06:31:29.541Z","avatar_url":"https://github.com/stackrox.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dynamic-vertical-pod-autoscaler\n\nUse dynamic expressions to manage [VerticalPodAutoscalers](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler)\n\n## Description\n\nThis project is a Kubernetes operator that manages VerticalPodAutoscalers using dynamic expressions.\n\n### Example\n\n```yaml\napiVersion: autoscaling.stackrox.io/v1alpha1\nkind: DynamicVerticalPodAutoscaler\nmetadata:\n  name: example\nspec:\n  targetRef:\n    apiVersion: apps/v1\n    kind: Deployment\n    name: example\n  policies:\n    - condition: |\n        target.metadata.annotations?.[\"vpa-disabled\"] == \"true\" ?? false\n      vpaSpec:\n        updatePolicy:\n          updateMode: \"Off\"\n    - vpaSpec:\n        updatePolicy:\n          updateMode: \"Auto\"\n```\n\nThe controller will evaluate each policy sequentially, and will apply\nthe `vpaSpec` defined for the first policy that\nevaluates to `true`. If no policy evaluates to `true`, the controller\nwill throw an error. The absence of a `condition` field is equivalent to\n`true`.\n\nThe conditions are written with [expr](https://github.com/expr-lang/expr).\n\nThere are 3 fields available in the expression script:\n\n1. `target`: The target object of the VPA (Deployment, StatefulSet, etc.)\n2. `vpa`: The `VerticalPodAutoscaler` object. May be nil.\n3. `obj`: The `DynamicVerticalPodAutoscaler` object.\n\nThese objects are passed as a `map[string]interface{}`.\nSee [sample](./config/samples/_v1alpha1_dynamicverticalpodautoscaler.yaml)\nfor more example policies.\n\n### `DynamicVerticalPodAutoscalerSpec`\n\n| Field     | Description                      | Type                                   | Required |\n|-----------|----------------------------------|----------------------------------------|----------|\n| targetRef | The target object of the VPA     | `ObjectReference`                      | Yes      |\n| policies  | The list of policies to evaluate | `[]DynamicVerticalPodAutoscalerPolicy` | Yes      |\n\nAt least one policy must evaluate to `true`.\n\n### `DynamicVerticalPodAutoscalerPolicy`\n\n| Field     | Description                                              | Type      | Required |\n|-----------|----------------------------------------------------------|-----------|----------|\n| condition | The condition to evaluate. Empty means `true`            | `string`  | No       |\n| vpaSpec   | The VPA spec to apply                                    | `VpaSpec` | No       |\n| skip      | Skip reconciliation if the condition evaluates to `true` | `bool`    | No       |\n\n### `VpaSpec`\n\nSee the\n[VerticalPodAutoscaler](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go)\nfor the fields available in the `VpaSpec`.\n\n## Getting Started\n\n### Prerequisites\n\n- go version v1.20.0+\n- docker version 17.03+.\n- kubectl version v1.11.3+.\n- Access to a Kubernetes v1.11.3+ cluster.\n\n### To Deploy on the cluster\n\n**Build and push your image to the location specified by `IMG`:**\n\n```sh\nmake docker-build docker-push IMG=\u003csome-registry\u003e/dynamic-vertical-pod-autoscaler:tag\n```\n\n**NOTE:** This image ought to be published in the personal registry you specified.\nAnd it is required to have access to pull the image from the working environment.\nMake sure you have the proper permission to the registry if the above commands don’t work.\n\n**Install the `VerticalPodAutoscaler` operator**\n\n```sh\nmake install-vpa-operator\n```\n\n**Install the CRDs into the cluster:**\n\n```sh\nmake install\n```\n\n**Deploy the Manager to the cluster with the image specified by `IMG`:**\n\n```sh\nmake deploy IMG=\u003csome-registry\u003e/dynamic-vertical-pod-autoscaler:tag\n```\n\n\u003e **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin\n\u003e privileges or be logged in as admin.\n\n**Create instances of your solution**\nYou can apply the samples (examples) from the config/sample:\n\n```sh\nkubectl apply -k config/samples/\n```\n\n\u003e **NOTE**: Ensure that the samples has default values to test it out.\n\n### To Uninstall\n\n**Delete the instances (CRs) from the cluster:**\n\n```sh\nkubectl delete -k config/samples/\n```\n\n**Delete the APIs(CRDs) from the cluster:**\n\n```sh\nmake uninstall\n```\n\n**UnDeploy the controller from the cluster:**\n\n```sh\nmake undeploy\n```\n\n## Contributing\n\n// TODO(user): Add detailed information on how you would like others to contribute to this project\n\n**NOTE:** Run `make help` for more information on all potential `make` targets\n\nMore information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)\n\n## License\n\nCopyright 2024.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackrox%2Fdynamic-vertical-pod-autoscaler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackrox%2Fdynamic-vertical-pod-autoscaler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackrox%2Fdynamic-vertical-pod-autoscaler/lists"}