We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a test.yaml file with the following contents:
test.yaml
apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: "test-pdb" spec: maxUnavailable: 1 selector: matchLabels: app: test
Then run it through the latest Polaris CLI:
cat test.yaml | docker run --rm -i quay.io/fairwinds/polaris:4.0.8 polaris audit --only-show-failed-tests --set-exit-code-on-danger --set-exit-code-below-score 85 --audit-path -
To get no errors.
Instead I get disruptionsAllowed is not greater than zero despite having a correct maxUnavailable setting:
disruptionsAllowed is not greater than zero
maxUnavailable
{ "PolarisOutputVersion": "1.0", "AuditTime": "2021-08-27T17:17:15Z", "SourceType": "Path", "SourceName": "-", "DisplayName": "-", "ClusterInfo": { "Version": "unknown", "Nodes": 0, "Pods": 0, "Namespaces": 0, "Controllers": 0 }, "Results": [ { "Name": "test-pdb", "Namespace": "", "Kind": "PodDisruptionBudget", "Results": { "pdbDisruptionsIsZero": { "ID": "pdbDisruptionsIsZero", "Message": "disruptionsAllowed is not greater than zero", "Details": null, "Success": false, "Severity": "warning", "Category": "Reliability" } }, "PodResult": null, "CreatedTime": "0001-01-01T00:00:00Z" } ], "Score": 0 }
Looking at one of the tests in the source code I think the issue is that it is looking for the status entry which only gets generated cluster runtime?
status
Couldn't find any, so I opened this new issue.
The text was updated successfully, but these errors were encountered:
Good catch! The way were were implementing it (by checking status) worked well for testing resources live in the cluster, but poorly for IaC.
I have a PR here that will make it more robust
Sorry, something went wrong.
No branches or pull requests
Steps to Reproduce
Create a
test.yaml
file with the following contents:Then run it through the latest Polaris CLI:
cat test.yaml | docker run --rm -i quay.io/fairwinds/polaris:4.0.8 polaris audit --only-show-failed-tests --set-exit-code-on-danger --set-exit-code-below-score 85 --audit-path -
Expected Behavior
To get no errors.
Actual Behavior
Instead I get
disruptionsAllowed is not greater than zero
despite having a correctmaxUnavailable
setting:Additional Context
Looking at one of the tests in the source code I think the issue is that it is looking for the
status
entry which only gets generated cluster runtime?References
Couldn't find any, so I opened this new issue.
The text was updated successfully, but these errors were encountered: