Skip to content

Commit cf08731

Browse files
Merge pull request #744 from sebrandon1/cnf-23578/add-yamllint-telco-ran
CNF-23578: Add yamllint coverage for telco-ran configuration
2 parents c72067d + b207062 commit cf08731

41 files changed

Lines changed: 131 additions & 130 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.yamllint.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33

44
extends: default
55

6+
ignore: |
7+
# Go-templated kube-compare reference directories — not valid YAML
8+
telco-core/configuration/reference-crs-kube-compare/
9+
telco-hub/configuration/reference-crs-kube-compare/
10+
telco-ran/configuration/kube-compare-reference/
11+
# Generated MachineConfig CRs with base64 ignition data exceeding line limits
12+
telco-ran/configuration/source-crs/extra-manifest/
13+
# Generated PolicyGenTemplate output with mixed indentation from the toolchain
14+
telco-ran/configuration/argocd/example/policygentemplates/group-du-clo5-cleanup-policy.yaml
15+
616
rules:
717
# Allow for whitespace in [] lists for readability, eg [ value, value ]
818
brackets:

Makefile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,9 @@ check-deps:
5656

5757
# Basic lint checking
5858
lintCheck:
59-
# The configuration is done piece-wise in order to skip the
60-
# kube-compare reference tree. Those yamls are augmented with
61-
# golang templating and are not expected to be legal yaml.
62-
yamllint -c .yamllint.yaml telco-core/configuration/*yaml
63-
yamllint -c .yamllint.yaml telco-core/configuration/reference-crs
64-
yamllint -c .yamllint.yaml telco-core/configuration/template-values
65-
yamllint -c .yamllint.yaml telco-core/install/
66-
yamllint -c .yamllint.yaml telco-hub/configuration/*yaml
67-
yamllint -c .yamllint.yaml telco-hub/configuration/reference-crs
68-
yamllint -c .yamllint.yaml telco-hub/configuration/example-overlays-config
69-
yamllint -c .yamllint.yaml telco-hub/install/
59+
yamllint -c .yamllint.yaml telco-core/
60+
yamllint -c .yamllint.yaml telco-hub/
61+
yamllint -c .yamllint.yaml telco-ran/
7062

7163
# markdownlint rules, following: https://github.com/openshift/enhancements/blob/master/Makefile
7264
.PHONY: markdownlint-image

telco-ran/configuration/argocd/example/acmpolicygenerator/acm-common-mno-ranGen.yaml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@
22
apiVersion: policy.open-cluster-management.io/v1
33
kind: PolicyGenerator
44
metadata:
5-
name: common-mno-latest
5+
name: common-mno-latest
66
placementBindingDefaults:
7-
name: common-mno-latest-placement-binding
7+
name: common-mno-latest-placement-binding
88
policyDefaults:
9-
namespace: ztp-common
10-
placement:
11-
labelSelector:
12-
matchExpressions:
13-
- key: common
14-
operator: In
15-
values:
16-
- "true"
17-
- key: du-profile
18-
operator: In
19-
values:
20-
- latest
21-
remediationAction: inform
22-
severity: low
23-
namespaceSelector:
24-
exclude:
25-
- kube-*
26-
include:
27-
- '*'
28-
evaluationInterval:
29-
compliant: 10m
30-
noncompliant: 10s
9+
namespace: ztp-common
10+
placement:
11+
labelSelector:
12+
matchExpressions:
13+
- key: common
14+
operator: In
15+
values:
16+
- "true"
17+
- key: du-profile
18+
operator: In
19+
values:
20+
- latest
21+
remediationAction: inform
22+
severity: low
23+
namespaceSelector:
24+
exclude:
25+
- kube-*
26+
include:
27+
- '*'
28+
evaluationInterval:
29+
compliant: 10m
30+
noncompliant: 10s
3131
policies:
32-
- name: common-mno-latest-config-policy
33-
policyAnnotations:
34-
ran.openshift.io/ztp-deploy-wave: "1"
35-
manifests:
36-
- path: source-crs/cluster-tuning/operator-hub/OperatorHub.yaml
32+
- name: common-mno-latest-config-policy
33+
policyAnnotations:
34+
ran.openshift.io/ztp-deploy-wave: "1"
35+
manifests:
36+
- path: source-crs/cluster-tuning/operator-hub/OperatorHub.yaml

telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-3node-ranGen.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ policies:
4747
openapi:
4848
path: schema.openapi
4949
- path: source-crs/sriov-operator/SriovOperatorConfig-SetSelector.yaml
50-
# For existing clusters with node selector set as "master",
50+
# For existing clusters with node selector set as "master",
5151
# change the complianceType to "mustonlyhave".
52-
# After complying with the policy, the complianceType can
52+
# After complying with the policy, the complianceType can
5353
# be reverted to "musthave"
5454
complianceType: musthave
5555
patches:

telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-clo5-cleanup.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@ policies:
3434
ran.openshift.io/ztp-deploy-wave: "11"
3535
manifests:
3636
- path: source-crs/cluster-logging/ClusterLogging5Cleanup.yaml
37-

telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-sno-ranGen.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ policies:
4949
openapi:
5050
path: schema.openapi
5151
## The setting below overrides the default "worker" selector predefined in
52-
## the source-crs. The change is recommended on SNOs configured with PTP
52+
## the source-crs. The change is recommended on SNOs configured with PTP
5353
## event notification for forward compatibility with possible SNO expansion.
54-
## When the default setting is left intact, then in case of an SNO
54+
## When the default setting is left intact, then in case of an SNO
5555
## expansion with one or more workers, PTP operator
5656
## would not create linuxptp-daemon containers on the worker node(s). Any
5757
## attempt to change the daemonsetNodeSelector will result in ptp daemon
@@ -80,9 +80,9 @@ policies:
8080
openapi:
8181
path: schema.openapi
8282
- path: source-crs/sriov-operator/SriovOperatorConfig-SetSelector.yaml
83-
## For existing clusters with node selector set as "master",
83+
## For existing clusters with node selector set as "master",
8484
## change the complianceType to "mustonlyhave".
85-
## After complying with the policy, the complianceType can
85+
## After complying with the policy, the complianceType can
8686
## be reverted to "musthave"
8787
complianceType: musthave
8888
patches:

telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-standard-ranGen.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ policies:
5252
openapi:
5353
path: schema.openapi
5454
- path: source-crs/sriov-operator/SriovOperatorConfig-SetSelector.yaml
55-
# For existing clusters with node selector set as "master",
55+
# For existing clusters with node selector set as "master",
5656
# change the complianceType to "mustonlyhave".
57-
# After complying with the policy, the complianceType can
57+
# After complying with the policy, the complianceType can
5858
# be reverted to "musthave"
5959
complianceType: musthave
6060
patches:
@@ -85,6 +85,6 @@ policies:
8585
- machineConfigLabels:
8686
machineconfiguration.openshift.io/role: "worker"
8787
priority: 18
88-
profile: ran-du-performance
88+
profile: ran-du-performance
8989
- path: source-crs/optional-extra-manifest/enable-crun-master.yaml
9090
- path: source-crs/optional-extra-manifest/enable-crun-worker.yaml

telco-ran/configuration/argocd/example/acmpolicygenerator/hub-side-templating/acm-group-du-3node-ranGen-templated.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ policies:
5252
openapi:
5353
path: schema.openapi
5454
- path: source-crs/sriov-operator/SriovOperatorConfig-SetSelector.yaml
55-
# For existing clusters with node selector set as "master",
55+
# For existing clusters with node selector set as "master",
5656
# change the complianceType to "mustonlyhave".
57-
# After complying with the policy, the complianceType can
57+
# After complying with the policy, the complianceType can
5858
# be reverted to "musthave"
5959
complianceType: musthave
6060
patches:
@@ -85,6 +85,6 @@ policies:
8585
- machineConfigLabels:
8686
machineconfiguration.openshift.io/role: "master"
8787
priority: 18
88-
profile: ran-du-performance
88+
profile: ran-du-performance
8989
- path: source-crs/optional-extra-manifest/enable-crun-master.yaml
9090
- path: source-crs/optional-extra-manifest/enable-crun-worker.yaml

telco-ran/configuration/argocd/example/acmpolicygenerator/hub-side-templating/acm-group-du-sno-ranGen-templated.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# For this PGT, we've considered an SNO managed cluster with the following labels:
2-
# group-du-sno-zone: zone-1
2+
# group-du-sno-zone: zone-1
33
# hardware-type: hw-type-platform-1
44
# ConfigMaps used:
55
# group-hardware-types-configmap.yaml: group-hardware-types-configmap
@@ -54,9 +54,9 @@ policies:
5454
openapi:
5555
path: schema.openapi
5656
## The setting below overrides the default "worker" selector predefined in
57-
## the source-crs. The change is recommended on SNOs configured with PTP
57+
## the source-crs. The change is recommended on SNOs configured with PTP
5858
## event notification for forward compatibility with possible SNO expansion.
59-
## When the default setting is left intact, then in case of an SNO
59+
## When the default setting is left intact, then in case of an SNO
6060
## expansion with one or more workers, PTP operator
6161
## would not create linuxptp-daemon containers on the worker node(s). Any
6262
## attempt to change the daemonsetNodeSelector will result in ptp daemon
@@ -144,7 +144,7 @@ policies:
144144
- machineConfigLabels:
145145
machineconfiguration.openshift.io/role: "master"
146146
priority: 18
147-
profile: ran-du-performance
147+
profile: ran-du-performance
148148
- path: source-crs/optional-extra-manifest/enable-crun-master.yaml
149149
- path: source-crs/optional-extra-manifest/enable-crun-worker.yaml
150150
# - path: source-crs/storage-lso/StorageClass.yaml

telco-ran/configuration/argocd/example/acmpolicygenerator/hub-side-templating/acm-group-du-standard-ranGen-templated.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ policies:
5757
openapi:
5858
path: schema.openapi
5959
- path: source-crs/sriov-operator/SriovOperatorConfig-SetSelector.yaml
60-
# For existing clusters with node selector set as "master",
60+
# For existing clusters with node selector set as "master",
6161
# change the complianceType to "mustonlyhave".
62-
# After complying with the policy, the complianceType can
62+
# After complying with the policy, the complianceType can
6363
# be reverted to "musthave"
6464
complianceType: musthave
6565
patches:
@@ -90,6 +90,6 @@ policies:
9090
- machineConfigLabels:
9191
machineconfiguration.openshift.io/role: "worker"
9292
priority: 18
93-
profile: ran-du-performance
93+
profile: ran-du-performance
9494
- path: source-crs/optional-extra-manifest/enable-crun-master.yaml
9595
- path: source-crs/optional-extra-manifest/enable-crun-worker.yaml

0 commit comments

Comments
 (0)