Comments (4)
@gerodriguez-fan Thank you for reporting this. Could you please add an example yaml (you can use our test yaml`s as a base) just to make sure we are talking about same thing.
From the description the problem could be the replicas we are using. So we are comparing replicas not minReplicas
in PDB.
kube-linter/pkg/templates/pdbminavailable/template.go
Lines 105 to 112 in e2c0cdb
@gerodriguez-fan Would you like to work on this issue?
from kube-linter.
I'm having a similar issue even when I use a percentage value on minAvailable
. My deployment spec doesn't have .spec.replicas
declared as I use the HPA min/max parameters and any value I put on the pdb ends up with an error.
my pdb spec:
spec:
minAvailable: 75%
selector:
matchLabels:
app: example
my deployment spec (to show it doesn't have replicas
):
spec:
revisionHistoryLimit: 3
progressDeadlineSeconds: 600
strategy:
rollingUpdate:
maxSurge: 10%
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app: example
template: [...]
What I've noticed:
- This started to happen when I updated the pdb apiVersion from policy/v1beta1 to policy/v1.
- If I force a .spec.replicas on my deployment, the minAvailable percentage needs to result in at least 1 available disruption (which makes sense). In this example, the minimal replicas to avoid the error is 4 (75% results in 3 disruptions, leaving 1 available disruption); The thing is, my hpa minReplicas is 60.
I'm using KubeLinter 0.6.4 both on Mac (local) and Linux (pipeline)
from kube-linter.
@gerodriguez-fan Thank you for reporting this. Could you please add an example yaml (you can use our test yaml`s as a base) just to make sure we are talking about same thing.
From the description the problem could be the replicas we are using. So we are comparing replicas not
minReplicas
in PDB.kube-linter/pkg/templates/pdbminavailable/template.go
Lines 105 to 112 in e2c0cdb
@gerodriguez-fan Would you like to work on this issue?
I can give it a try,
from kube-linter.
Closed with #688
from kube-linter.
Related Issues (20)
- [FEATURE_REQUEST] Support Restart Policy
- Golang Plugins for kube-linter HOT 5
- [FEATURE_REQUEST] Add OpenShift SecurityContextConstraints
- [FEATURE_REQUEST] Explicit check for `securityContext.allowPrivilegeEscalation=false` on containers
- [Bug] no pods found matching service labels HOT 1
- [BUG] Release assets name HOT 1
- [FEATURE_REQUEST] Common target platforms (ie: linux/arm64)
- Change unset-cpu-requirements check
- Change unset-memory-requirements check
- [BUG] - since v0.6.6 linting from stdin doesn't work anymore with the command: kube-linter lint -
- [FEATURE_REQUEST] EnvVar ValueFrom checks
- [FEATURE_REQUEST] Merge arbitrary values.yaml when checking a helm chart
- [BUG] - service has no selector specified raised when using Endpoint
- [FEATURE_REQUEST] Expand `run-as-non-root` template to verify `runAsGroup` field is nonzero. HOT 1
- Include line and column number ranges for errors HOT 1
- [FEATURE_REQUEST] Need check for priorityClassName value
- [FEATURE_REQUEST] arm64 Docker image
- [FEATURE_REQUEST] New ObjectKind and Template for PersistentVolumeClaim and volumeClaimTemplates
- [BUG] no-rolling-update-strategy does not account for the default Strategy being RollingUpdate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kube-linter.