You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+19-9
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ for resolving any potential issues and returns a non-zero exit code.
30
30
To install by using [Go](https://golang.org/), run the following command:
31
31
32
32
```bash
33
-
GO111MODULE=on go install golang.stackrox.io/kube-linter/cmd/kube-linter
33
+
go install golang.stackrox.io/kube-linter/cmd/kube-linter
34
34
```
35
35
Otherwise, download the latest binary from
36
36
[Releases](https://github.com/stackrox/kube-linter/releases) and add it to your
@@ -45,11 +45,18 @@ run the following command:
45
45
brew install kube-linter
46
46
```
47
47
48
+
### Using nix-shell
49
+
To install by using [nix](https://nixos.org/) on macOS, Linux, and [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about),
50
+
run the following command:
51
+
```bash
52
+
nix-shell -p kube-linter
53
+
```
54
+
48
55
### Using Docker
49
56
50
57
1. Get the latest KubeLinter Docker image:
51
58
```bash
52
-
docker pull stackrox/kube-linter:0.1.4
59
+
docker pull stackrox/kube-linter:v0.6.8
53
60
```
54
61
> [!NOTE] While we provide the `:latest` tag for convenience and ease of experimentation,
55
62
> we recommend using a tag corresponding to a specific release
@@ -79,7 +86,10 @@ The KubeLinter Github Action accepts the following inputs:
79
86
|:--|:--|
80
87
|`directory`|(Mandatory) A directory path that contains the Kubernetes YAML files or `Chart.yaml` file.|
81
88
|`config`|(Optional) A path to your custom [KubeLinter configuration file](configuring-kubelinter.md).
82
-
## Building from source
89
+
90
+
## Development
91
+
92
+
### Building from source
83
93
84
94
> [!NOTE] Before you build, make sure that you have [installed Go](https://golang.org/doc/install).
pod.yaml: (object: <nonamespace>/security-context-demo /v1, Kind=Pod) container "sec-ctx-demo" does not have a read-only root file system (check: no-read-only-root-fs, remediation: Set readOnlyRootFilesystem to true in your container's securityContext.)
190
200
191
201
pod.yaml: (object: <nonamespace>/security-context-demo /v1, Kind=Pod) container "sec-ctx-demo" has cpu limit 0 (check: unset-cpu-requirements, remediation: Set your container's CPU requests and limits depending on its requirements. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for more details.)
192
-
202
+
193
203
pod.yaml: (object: <nonamespace>/security-context-demo /v1, Kind=Pod) container "sec-ctx-demo" has memory limit 0 (check: unset-memory-requirements, remediation: Set your container's memory requests and limits depending on its requirements. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for more details.)
194
-
204
+
195
205
Error: found 3 lint errors
196
206
```
197
207
@@ -217,7 +227,7 @@ chart:
217
227
helm-chart-sample/helm-chart-sample/templates/tests/test-connection.yaml: (object: <no namespace>/test-release-helm-chart-sample-test-connection /v1, Kind=Pod) container "wget" is not set to runAsNonRoot (check: run-as-non-root, remediation: Set runAsUser to a non-zero number, and runAsNonRoot to true, in your pod or container securityContext. See https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ for more details.)
218
228
219
229
helm-chart-sample/helm-chart-sample/templates/tests/test-connection.yaml: (object: <no namespace>/test-release-helm-chart-sample-test-connection /v1, Kind=Pod) container "wget" has cpu request 0 (check: unset-cpu-requirements, remediation: Set your container's CPU requests and limits depending on its requirements. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for more details.)
220
-
230
+
221
231
...
222
232
223
233
Error: found 12 lint errors
@@ -240,6 +250,6 @@ To contribute, see the [contributing guide](https://github.com/stackrox/kube-lin
240
250
> [!ATTENTION]
241
251
> Our [code of conduct](https://github.com/stackrox/kube-linter/blob/main/CODE_OF_CONDUCT.md) governs all participation in the KubeLinter community.
242
252
243
-
# License
253
+
# License
244
254
245
255
KubeLinter is licensed under the [Apache License 2.0](https://github.com/stackrox/kube-linter/blob/main/LICENSE).
0 commit comments