instrumenta / instrumenta/kubeval

XXXXX.yaml contains an invalid HorizontalPodAutoscaler (openshift 3.11 strict)

Open
#313 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3.2k
Forks
227
PR merge metrics
No merged PRs in 30d

Description

I am seeing this error:
```
WARN - web_hpa.yaml contains an invalid HorizontalPodAutoscaler (app-x-hpa) - targetCPUUtilizationPercentage: Additional property targetCPUUtilizationPercentage is not allowed`
```
using flags --openshift --strict -v 3.11.0 on the following yaml construct:
```
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: app-x-hpa
spec:
maxReplicas: 15
minReplicas: 3
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: app-x-deployment
targetCPUUtilizationPercentage: 60
status:
conditions: []
currentMetrics: []
currentReplicas: 0
desiredReplicas: 0
```
furthermore, the status values are not required, yet --strict fails if they are not defined.

Using kubeval version :
```
15:03 $ kubeval --version
Version: 0.16.1
Commit: f5dba6b486fa18b9179b91e15eb6f2b0f7a5a69e
Date: 2021-03-30T15:17:06Z
```

_Originally posted by @davidmalott in https://github.com/instrumenta/kubeval/issues/57#issuecomment-911972927_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.