Skip to content

Commit 332be90

Browse files
committed
fix: Resolve linter checks
1 parent 9f63f2a commit 332be90

File tree

8 files changed

+50
-27
lines changed

8 files changed

+50
-27
lines changed

.github/linters/.checkov.yaml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,33 @@
22

33
quiet: true
44

5+
directory:
6+
- backup-daemon
7+
- docker-zookeeper
8+
- integration-tests
9+
- monitoring
10+
- operator/charts/helm
11+
512
skip-check:
6-
# https://www.checkov.io/5.Policy%20Index/kubernetes.html
7-
- CKV_K8S_15 # Image Pull Policy should be Always
8-
- CKV_K8S_21 # The default namespace should not be used
9-
- CKV_K8S_22 # Use read-only filesystem for containers where possible
10-
- CKV_K8S_35 # Prefer using secrets as files over secrets as environment variables
11-
- CKV_K8S_38 # Ensure that Service Account Tokens are only mounted where necessary
12-
- CKV_K8S_40 # Containers should run as a high UID to avoid host conflict
13-
- CKV_K8S_43 # Image should use digest
14-
- CKV2_K8S_5 # No ServiceAccount/Node should be able to read all secrets
15-
- CKV2_K8S_6 # Minimize the admission of pods which lack an associated NetworkPolicy
16-
# https://www.checkov.io/5.Policy%20Index/dockerfile.html
17-
- CKV_DOCKER_2 # Ensure that HEALTHCHECK instructions have been added to container images
18-
# https://www.checkov.io/5.Policy%20Index/secrets.html
19-
- CKV_SECRET_6 # Base64 High Entropy String
20-
# https://www.checkov.io/5.Policy%20Index/github_actions.html
21-
- CKV2_GHA_1 # Ensure top-level permissions are not set to write-all
22-
- CKV_GHA_7 # The build output cannot be affected by user parameters other than the build entry point and the top-level source location. GitHub Actions workflow_dispatch inputs MUST be empty.
13+
# https://www.checkov.io/5.Policy%20Index/kubernetes.html
14+
- CKV_K8S_8 # Liveness Probe Should be Configured
15+
- CKV_K8S_9 # Readiness Probe Should be Configured
16+
- CKV_K8S_15 # Image Pull Policy should be Always
17+
- CKV_K8S_21 # The default namespace should not be used
18+
- CKV_K8S_22 # Use read-only filesystem for containers where possible
19+
- CKV_K8S_35 # Prefer using secrets as files over secrets as environment variables
20+
- CKV_K8S_38 # Ensure that Service Account Tokens are only mounted where necessary
21+
- CKV_K8S_40 # Containers should run as a high UID to avoid host conflict
22+
- CKV_K8S_43 # Image should use digest
23+
- CKV_K8S_49 # Minimize wildcard use in Roles and ClusterRoles
24+
- CKV2_K8S_5 # No ServiceAccount/Node should be able to read all secrets
25+
- CKV2_K8S_6 # Minimize the admission of pods which lack an associated NetworkPolicy
26+
# https://www.checkov.io/5.Policy%20Index/dockerfile.html
27+
- CKV_DOCKER_2 # Ensure that HEALTHCHECK instructions have been added to container images
28+
- CKV_DOCKER_10 # Ensure that WORKDIR values are absolute paths
29+
- CKV2_DOCKER_3 # Ensure that certificate validation isn't disabled with wget
30+
# https://www.checkov.io/5.Policy%20Index/secrets.html
31+
- CKV_SECRET_6 # Base64 High Entropy String
32+
# https://www.checkov.io/5.Policy%20Index/github_actions.html
33+
- CKV2_GHA_1 # Ensure top-level permissions are not set to write-all
34+
- CKV_GHA_7 # The build output cannot be affected by user parameters other than the build entry point and the top-level source location. GitHub Actions workflow_dispatch inputs MUST be empty.

.github/linters/.hadolint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
failure-threshold: error
2+
3+
ignored:
4+
- DL3018
5+
- DL3033
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,9 @@ MD037: false
2525
MD004: false
2626
# MD007/ul-indent Unordered list indentation
2727
MD007: false
28+
# MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: <?>]
29+
MD009: false
2830
# MD010/no-hard-tabs Hard tabs
29-
MD010: false
31+
MD010: false
32+
# MD051/Link fragments should be valid
33+
MD051: false

.github/linters/.yaml-lint.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
# Rules: https://yamllint.readthedocs.io/en/stable/rules.html
44

55
# Exclude not required files
6-
# ignore-from-file:
7-
# - .gitignore
8-
# - .yamlignore
6+
ignore-from-file:
7+
- .gitignore
8+
- .yamlignore
99

1010
rules:
1111
braces:
12-
min-spaces-inside: 1
12+
min-spaces-inside: 0
1313
max-spaces-inside: 1
14-
min-spaces-inside-empty: 0
15-
max-spaces-inside-empty: 0
14+
min-spaces-inside-empty: -1
15+
max-spaces-inside-empty: -1
1616
brackets:
1717
min-spaces-inside: 0
1818
max-spaces-inside: 1

.markdownlintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.yamlignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/.github/workflows/*
2+
**/charts/*/*
3+
**/charts/*/templates/*.yaml

docs/public/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The Qubership platform provides ZooKeeper deployment to Kubernetes/OpenShift usi
1818
The deployment procedure and additional features include the following:
1919

2020
* Support of Qubership deployment jobs for HA scheme and different configurations. For more detailed information, refer to [Installation Guide](/docs/public/installation.md).
21-
* Backup and restore. For more detailed information, refer to [ZooKeeper Backup Daemon Guide](https://github.com/Netcracker/qubership-zookeeper-backup-daemon/blob/main/documentation/maintenance-guide/development-guide/README.md).
21+
* Backup and restore. For more detailed information, refer to [ZooKeeper Backup Daemon Guide](./development-guide.md).
2222
* Monitoring integration with Grafana Dashboard and Prometheus Alerts. For more detailed information, refer to [Monitoring Guide](/docs/public/monitoring.md).
2323

2424
# ZooKeeper Components

docs/public/development-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ request body:
2424
curl -XPOST -u username:password -v -H "Content-Type: application/json" -d '{"mode":"transactional"}' http://localhost:8080/backup
2525
```
2626

27-
For more information about `Backup Modes` see [Backup Modes](../backup-modes/backup-modes).
27+
For more information about `Backup Modes` see [Backup Modes](./backup-modes.md).
2828

2929
### Not Evictable Backup
3030

0 commit comments

Comments
 (0)