Currently, the policy that validates the minimum replica count only checks the configuration of the ReplicaSet. This works fine for simple use cases when you just use a ReplicaSet.
When an HPA is enabled, it is recommended that the value of spec.replicas of the Deployment and / or StatefulSet be removed from their [manifest(s)](https://kubernetes.io/docs/reference/glossary/?all=true#term-manifest).
Since the policy only checks the ReplicaSet, but not the HorizontalPodAutoscaler, the policy gives a false warning. The policy should also check the minReplicas in HorizontalPodAutoscaler configuration.
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
What happened?
Currently, the policy that validates the minimum replica count only checks the configuration of the ReplicaSet. This works fine for simple use cases when you just use a ReplicaSet.
However, when you use a HorizontalPodAutoscaler, the Kubernetes docs discourage using a ReplicaSet.
Since the policy only checks the ReplicaSet, but not the HorizontalPodAutoscaler, the policy gives a false warning. The policy should also check the
minReplicas
inHorizontalPodAutoscaler
configuration.Example
Use a HorizontalPodAutoscaler instead of a ReplicaSet to configure the minium amount of replicas.
Output of
pulumi about
pulumi about
doesn't seem to work in policy packages: Pulumi: Version3.95.0
Packages:Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).