-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix pdbMinAvailableGreaterThanHPAMinReplicas check when minAvailable …
…is not present (#1062)
- Loading branch information
1 parent
952b6ae
commit 1c1e990
Showing
2 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
test/checks/pdbMinAvailableGreaterThanHPAMinReplicas/success-maxUnavailable.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: zookeeper | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: zookeeper | ||
foo: bar | ||
spec: | ||
containers: | ||
- name: zookeeper | ||
image: zookeeper | ||
--- | ||
apiVersion: policy/v1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
name: zookeeper-pdb | ||
spec: | ||
maxUnavailable: 5 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: zookeeper | ||
--- | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: zookeeper-hpa | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: zookeeper | ||
minReplicas: 5 | ||
maxReplicas: 7 | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: 50 |