Skip to content

Commit

Permalink
Add explicit test for spec.replicas=0
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Krizak <paul.krizak@gmail.com>
  • Loading branch information
skaven81 committed Oct 28, 2023
1 parent f1d9328 commit 68ff2ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: autoscaling/v1
kind: Scale
metadata:
name: allowed-deployment
# kubectl scale deploy <name> --replicas=0 creates a Scale
# resource with an empty spec, not replicas:0
spec:
replicas: 0
4 changes: 4 additions & 0 deletions library/general/replicalimits/suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ tests:
object: samples/replicalimits_zero/example_scale_allowed.yaml
assertions:
- violations: no
- name: example-scale-allowed
object: samples/replicalimits_zero/example_scale_allowed2.yaml
assertions:
- violations: no
- name: example-disallowed
object: samples/replicalimits_zero/example_disallowed.yaml
assertions:
Expand Down

0 comments on commit 68ff2ce

Please sign in to comment.