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

Add policy Ensure HPA for Deployments #1080

Merged
merged 9 commits into from
Aug 6, 2024

Conversation

anuddeeph1
Copy link
Contributor

Description

This policy ensures that Deployments are only allowed if they have a corresponding Horizontal Pod Autoscaler (HPA) configured in the same namespace. The policy checks for the presence of an HPA that targets the Deployment and denies the creation or update of the Deployment if no such HPA exists. This policy helps enforce scaling practices and ensures that resources are managed efficiently.

Checklist

  • [] I have read the policy contribution guidelines.
  • [] I have added test manifests and resources covering both positive and negative tests that prove this policy works as intended.
  • [] I have added the artifacthub-pkg.yml file and have verified it is complete and correct.

Signed-off-by: anuddeeph1 <anudeep.nalla@nirmata.com>
Signed-off-by: anuddeeph1 <anudeep.nalla@nirmata.com>
other/check-hpa-exists/check-hpa-exists.yaml Outdated Show resolved Hide resolved
other/check-hpa-exists/check-hpa-exists.yaml Outdated Show resolved Hide resolved
Signed-off-by: anuddeeph1 <anudeep.nalla@nirmata.com>
other/check-hpa-exists/check-hpa-exists.yaml Outdated Show resolved Hide resolved
other/check-hpa-exists/artifacthub-pkg.yml Outdated Show resolved Hide resolved
@chipzoller chipzoller changed the title added policy to check HPA Exists Add policy Ensure HPA for Deployments Aug 2, 2024
Signed-off-by: anuddeeph1 <anudeep.nalla@nirmata.com>
chipzoller and others added 2 commits August 5, 2024 10:19
@chipzoller chipzoller enabled auto-merge (squash) August 6, 2024 11:26
@chipzoller chipzoller merged commit 3dd9aa6 into kyverno:main Aug 6, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants