Skip to content

Commit 787b588

Browse files
committed
add action to lint yaml
and fix existing yamllint failures Signed-off-by: Bryce Palmer <[email protected]>
1 parent 136f6ce commit 787b588

File tree

35 files changed

+58
-53
lines changed

35 files changed

+58
-53
lines changed

.github/workflows/lint.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,13 @@ jobs:
5050
token: ${{ secrets.GITHUB_TOKEN }}
5151
labels: kind/bug
5252
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
53+
54+
yamllint:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v3
58+
- name: yaml-lint
59+
uses: ibiqlik/action-yamllint@v3
60+
with:
61+
file_or_dir: testdata
62+
config_data: "{extends: relaxed, rules: {line-length: {max: 120}}}"

pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/certmanager/kustomizeconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (f *KustomizeConfig) SetTemplateDefaults() error {
4444
}
4545

4646
//nolint:lll
47-
const kustomizeConfigTemplate = `# This configuration is for teaching kustomize how to update name ref and var substitution
47+
const kustomizeConfigTemplate = `# This configuration is for teaching kustomize how to update name ref and var substitution
4848
nameReference:
4949
- kind: Issuer
5050
group: cert-manager.io

pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/manager/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ spec:
8484
control-plane: controller-manager
8585
spec:
8686
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
87-
# according to the platforms which are supported by your solution.
87+
# according to the platforms which are supported by your solution.
8888
# It is considered best practice to support multiple architectures. You can
8989
# build your manager image using the makefile target docker-buildx.
9090
# affinity:

pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/certmanager/kustomizeconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (f *KustomizeConfig) SetTemplateDefaults() error {
4444
}
4545

4646
//nolint:lll
47-
const kustomizeConfigTemplate = `# This configuration is for teaching kustomize how to update name ref substitution
47+
const kustomizeConfigTemplate = `# This configuration is for teaching kustomize how to update name ref substitution
4848
nameReference:
4949
- kind: Issuer
5050
group: cert-manager.io

pkg/plugins/common/kustomize/v2-alpha/scaffolds/internal/templates/config/manager/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ spec:
8484
control-plane: controller-manager
8585
spec:
8686
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
87-
# according to the platforms which are supported by your solution.
87+
# according to the platforms which are supported by your solution.
8888
# It is considered best practice to support multiple architectures. You can
8989
# build your manager image using the makefile target docker-buildx.
9090
# affinity:

pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,5 +327,5 @@ const recorderTemplate = `
327327
Recorder: mgr.GetEventRecorderFor("%s-controller"),`
328328

329329
const envVarTemplate = `
330-
- name: %s_IMAGE
330+
- name: %s_IMAGE
331331
value: %s`

pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/internal/templates/config/samples/crd_sample.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ kind: {{ .Resource.Kind }}
4949
metadata:
5050
name: {{ lower .Resource.Kind }}-sample
5151
spec:
52-
# TODO(user): edit the following value to ensure the number
53-
# of Pods/Instances your Operand must have on cluster
52+
# TODO(user): edit the following value to ensure the number
53+
# of Pods/Instances your Operand must have on cluster
5454
size: 1
55-
56-
{{ if not (isEmptyStr .Port) -}}
55+
{{ if not (isEmptyStr .Port) -}}
5756
# TODO(user): edit the following value to ensure the container has the right port to be initialized
58-
containerPort: {{ .Port }}
59-
{{- end }}
57+
containerPort: {{ .Port }}
58+
{{- end }}
6059
`

pkg/plugins/golang/v2/scaffolds/internal/templates/config/certmanager/certificate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (f *Certificate) SetTemplateDefaults() error {
4242

4343
const certManagerTemplate = `# The following manifests contain a self-signed issuer CR and a certificate CR.
4444
# More document can be found at https://docs.cert-manager.io
45-
# WARNING: Targets CertManager 0.11 check https://docs.cert-manager.io/en/latest/tasks/upgrading/index.html for
45+
# WARNING: Targets CertManager 0.11 check https://docs.cert-manager.io/en/latest/tasks/upgrading/index.html for
4646
# breaking changes
4747
apiVersion: cert-manager.io/v1alpha2
4848
kind: Issuer

pkg/plugins/golang/v2/scaffolds/internal/templates/config/certmanager/kustomizeconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (f *KustomizeConfig) SetTemplateDefaults() error {
4141
}
4242

4343
//nolint:lll
44-
const kustomizeConfigTemplate = `# This configuration is for teaching kustomize how to update name ref and var substitution
44+
const kustomizeConfigTemplate = `# This configuration is for teaching kustomize how to update name ref and var substitution
4545
nameReference:
4646
- kind: Issuer
4747
group: cert-manager.io

pkg/plugins/golang/v2/scaffolds/internal/templates/config/kdefault/manager_auth_proxy_patch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (f *ManagerAuthProxyPatch) SetTemplateDefaults() error {
4242
return nil
4343
}
4444

45-
const kustomizeAuthProxyPatchTemplate = `# This patch inject a sidecar container which is a HTTP proxy for the
45+
const kustomizeAuthProxyPatchTemplate = `# This patch inject a sidecar container which is a HTTP proxy for the
4646
# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews.
4747
apiVersion: apps/v1
4848
kind: Deployment

0 commit comments

Comments
 (0)