diff --git a/.github/workflows/check-yaml.yml b/.github/workflows/check-yaml.yml new file mode 100644 index 0000000..776a934 --- /dev/null +++ b/.github/workflows/check-yaml.yml @@ -0,0 +1,19 @@ +--- +name: YAML Validation +on: [push, workflow_dispatch] + +jobs: + yaml-check: + runs-on: ubuntu-latest + steps: + + - name: Checkout this repository + uses: actions/checkout@v3.5.3 + + - name: Lint YAML files + uses: karancode/yamllint-github-action@v2.1.1 + with: + yamllint_config_datapath: .yamllint.yml + yamllint_strict: true + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000..f28a9f8 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,7 @@ +--- +extends: default + +rules: + line-length: disable + truthy: + check-keys: false diff --git a/argo-events/application.yaml b/argo-events/application.yaml index 3a3edb2..fd86197 100644 --- a/argo-events/application.yaml +++ b/argo-events/application.yaml @@ -1,10 +1,11 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: argo-events namespace: argocd finalizers: - - resources-finalizer.argocd.argoproj.io + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: argo-events @@ -23,4 +24,4 @@ spec: prune: true selfHeal: true syncOptions: - - CreateNamespace=true \ No newline at end of file + - CreateNamespace=true diff --git a/argo-rollouts/application.yaml b/argo-rollouts/application.yaml index 29a6a74..ae90f1c 100644 --- a/argo-rollouts/application.yaml +++ b/argo-rollouts/application.yaml @@ -1,10 +1,11 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: argo-rollouts namespace: argocd finalizers: - - resources-finalizer.argocd.argoproj.io + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: argo-rollouts @@ -23,4 +24,4 @@ spec: prune: true selfHeal: true syncOptions: - - CreateNamespace=true \ No newline at end of file + - CreateNamespace=true diff --git a/datadog-agent/application.yaml b/datadog-agent/application.yaml index 153dab3..0f45290 100644 --- a/datadog-agent/application.yaml +++ b/datadog-agent/application.yaml @@ -1,3 +1,4 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: @@ -44,7 +45,7 @@ spec: selfHeal: true syncOptions: - CreateNamespace=true -# ### NOTE: uncomment below to establish a datadog apm service for your cluster to leverage +# NOTE: uncomment below to establish a datadog apm service for your cluster to leverage # --- # apiVersion: v1 # kind: Service @@ -57,4 +58,4 @@ spec: # ports: # - protocol: TCP # port: 8126 -# targetPort: 8126 \ No newline at end of file +# targetPort: 8126 diff --git a/datadog-agent/external-secret.yaml b/datadog-agent/external-secret.yaml index 539456d..010a3df 100644 --- a/datadog-agent/external-secret.yaml +++ b/datadog-agent/external-secret.yaml @@ -1,3 +1,4 @@ +--- apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: diff --git a/goldilocks/application.yaml b/goldilocks/application.yaml index 8a22e1c..58072cd 100644 --- a/goldilocks/application.yaml +++ b/goldilocks/application.yaml @@ -1,3 +1,4 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: diff --git a/kratix/application.yaml b/kratix/application.yaml index 787e8ee..7944d82 100644 --- a/kratix/application.yaml +++ b/kratix/application.yaml @@ -1,3 +1,4 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: diff --git a/kubernetes-dashboard/application.yaml b/kubernetes-dashboard/application.yaml index 0272238..35a0273 100644 --- a/kubernetes-dashboard/application.yaml +++ b/kubernetes-dashboard/application.yaml @@ -1,3 +1,4 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: diff --git a/kubernetes-dashboard/clusterolebinding.yaml b/kubernetes-dashboard/clusterolebinding.yaml index 9abc09a..21377c9 100644 --- a/kubernetes-dashboard/clusterolebinding.yaml +++ b/kubernetes-dashboard/clusterolebinding.yaml @@ -1,3 +1,4 @@ +--- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: @@ -5,10 +6,10 @@ metadata: annotations: argocd.argoproj.io/sync-wave: "0" subjects: -- kind: ServiceAccount - name: k8s-dashboard-sa - namespace: default + - kind: ServiceAccount + name: k8s-dashboard-sa + namespace: default roleRef: kind: ClusterRole name: admin - apiGroup: rbac.authorization.k8s.io \ No newline at end of file + apiGroup: rbac.authorization.k8s.io diff --git a/kubernetes-dashboard/serviceaccount.yaml b/kubernetes-dashboard/serviceaccount.yaml index db04ce4..11cc645 100644 --- a/kubernetes-dashboard/serviceaccount.yaml +++ b/kubernetes-dashboard/serviceaccount.yaml @@ -1,5 +1,6 @@ +--- apiVersion: v1 kind: ServiceAccount metadata: name: k8s-dashboard-sa - namespace: default \ No newline at end of file + namespace: default diff --git a/kyverno/kyverno-policies.yaml b/kyverno/kyverno-policies.yaml index 0dfc5ec..e739fc3 100644 --- a/kyverno/kyverno-policies.yaml +++ b/kyverno/kyverno-policies.yaml @@ -1,10 +1,11 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: kyverno-policies namespace: argocd finalizers: - - resources-finalizer.argocd.argoproj.io + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: kyverno diff --git a/kyverno/kyverno.yaml b/kyverno/kyverno.yaml index a2ddd2e..2b385e5 100644 --- a/kyverno/kyverno.yaml +++ b/kyverno/kyverno.yaml @@ -1,10 +1,11 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: kyverno namespace: argocd finalizers: - - resources-finalizer.argocd.argoproj.io + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: kyverno diff --git a/kyverno/policy-reporter.yaml b/kyverno/policy-reporter.yaml index 8b13367..fe3f484 100644 --- a/kyverno/policy-reporter.yaml +++ b/kyverno/policy-reporter.yaml @@ -1,10 +1,11 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: policy-reporter namespace: argocd finalizers: - - resources-finalizer.argocd.argoproj.io + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: kyverno @@ -33,4 +34,4 @@ spec: prune: true selfHeal: true syncOptions: - - CreateNamespace=true \ No newline at end of file + - CreateNamespace=true diff --git a/opencost/opencost.yaml b/opencost/opencost.yaml index afe2b6b..76bccb4 100644 --- a/opencost/opencost.yaml +++ b/opencost/opencost.yaml @@ -1,3 +1,4 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: @@ -6,7 +7,7 @@ metadata: name: opencost namespace: argocd finalizers: - - resources-finalizer.argocd.argoproj.io + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: opencost @@ -25,4 +26,4 @@ spec: prune: true selfHeal: true syncOptions: - - CreateNamespace=true \ No newline at end of file + - CreateNamespace=true diff --git a/opencost/prometheus.yaml b/opencost/prometheus.yaml index f336bec..e26b807 100644 --- a/opencost/prometheus.yaml +++ b/opencost/prometheus.yaml @@ -1,3 +1,4 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: @@ -6,7 +7,7 @@ metadata: name: prometheus namespace: argocd finalizers: - - resources-finalizer.argocd.argoproj.io + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: prometheus diff --git a/polaris/application.yaml b/polaris/application.yaml index c869c5d..15c5994 100644 --- a/polaris/application.yaml +++ b/polaris/application.yaml @@ -1,3 +1,4 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: diff --git a/testkube/application.yaml b/testkube/application.yaml index 4a4be4e..f497dfe 100644 --- a/testkube/application.yaml +++ b/testkube/application.yaml @@ -1,10 +1,11 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: testkube namespace: argocd finalizers: - - resources-finalizer.argocd.argoproj.io + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: testkube @@ -23,4 +24,4 @@ spec: prune: true selfHeal: true syncOptions: - - CreateNamespace=true \ No newline at end of file + - CreateNamespace=true diff --git a/tracetest/application.yaml b/tracetest/application.yaml index 0152230..64c84df 100644 --- a/tracetest/application.yaml +++ b/tracetest/application.yaml @@ -1,10 +1,11 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: tracetest namespace: argocd finalizers: - - resources-finalizer.argocd.argoproj.io + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: tracetest @@ -23,4 +24,4 @@ spec: prune: true selfHeal: true syncOptions: - - CreateNamespace=true \ No newline at end of file + - CreateNamespace=true