Lint yaml better

This commit is contained in:
Greg Hellings
2025-11-02 23:45:16 -06:00
parent 518c3898b6
commit af41fd6b92
12 changed files with 86 additions and 32 deletions
+9 -2
View File
@@ -47,7 +47,14 @@ default:
tags: tags:
- kubernetes - kubernetes
script: script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" - >-
podman login
-u "$CI_REGISTRY_USER"
-p "$CI_REGISTRY_PASSWORD"
"$CI_REGISTRY"
- podman load -i "${IMG}.tar.gz" - podman load -i "${IMG}.tar.gz"
- podman tag "localhost/${IMG}:latest" "$CI_REGISTRY/greg/nixos-config/${IMG}:latest" - >-
podman tag
"localhost/${IMG}:latest"
"$CI_REGISTRY/greg/nixos-config/${IMG}:latest"
- podman push "$CI_REGISTRY/greg/nixos-config/${IMG}:latest" - podman push "$CI_REGISTRY/greg/nixos-config/${IMG}:latest"
+26 -1
View File
@@ -1,4 +1,9 @@
{ hooks, system, ... }: {
hooks,
lib,
system,
...
}:
{ {
pre-commit-check = hooks.lib.${system}.run { pre-commit-check = hooks.lib.${system}.run {
@@ -9,6 +14,26 @@
#flake-checker.enable = true; #flake-checker.enable = true;
nixfmt-rfc-style.enable = true; nixfmt-rfc-style.enable = true;
check-merge-conflicts.enable = true; check-merge-conflicts.enable = true;
check-yaml.enable = true;
yamllint = {
enable = true;
args = [
"--config-data"
(lib.generators.toYAML { } {
extends = "default";
ignore = [
"manifests/cnpg-system/barman-cloud.yaml"
".pre-commit-config.yaml"
];
rules = {
comments = false;
comments-indentation = false;
document-start = false;
};
})
];
verbose = true;
};
}; };
}; };
} }
-1
View File
@@ -37,7 +37,6 @@ services:
image: postgres:17.6-alpine image: postgres:17.6-alpine
restart: unless-stopped restart: unless-stopped
ports: [] ports: []
#- 5432:5432
networks: networks:
pgattic: pgattic:
volumes: volumes:
+1
View File
@@ -122,6 +122,7 @@
checks = import ./checks.nix { checks = import ./checks.nix {
inherit system; inherit system;
inherit (top) hooks; inherit (top) hooks;
inherit (pkgs) lib;
}; };
devShells = import ./shells.nix { devShells = import ./shells.nix {
+15 -3
View File
@@ -5,7 +5,11 @@ metadata:
annotations: annotations:
"node.longhorn.io/default-disks-config": |- "node.longhorn.io/default-disks-config": |-
[ [
{ "path": "/var/lib/longhorn", "allowScheduling" : true, "tags": ["hdd", "large"]} {
"path": "/var/lib/longhorn",
"allowScheduling" : true,
"tags": ["hdd", "large"]
}
] ]
--- ---
apiVersion: v1 apiVersion: v1
@@ -15,7 +19,11 @@ metadata:
annotations: annotations:
"node.longhorn.io/default-disks-config": |- "node.longhorn.io/default-disks-config": |-
[ [
{ "path": "/var/lib/longhorn", "allowScheduling" : true, "tags": ["hdd", "large"]} {
"path": "/var/lib/longhorn",
"allowScheduling" : true,
"tags": ["hdd", "large"]
}
] ]
--- ---
apiVersion: v1 apiVersion: v1
@@ -25,5 +33,9 @@ metadata:
annotations: annotations:
"node.longhorn.io/default-disks-config": |- "node.longhorn.io/default-disks-config": |-
[ [
{ "path": "/var/lib/longhorn", "allowScheduling" : trues, "tags": ["ssd", "fast"]} {
"path": "/var/lib/longhorn",
"allowScheduling" : trues,
"tags": ["ssd", "fast"]
}
] ]
+4
View File
@@ -6,6 +6,7 @@ metadata:
spec: spec:
provider: provider:
webhook: webhook:
# yamllint disable-line rule:line-length
url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/item/{{ .remoteRef.key }}" url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/item/{{ .remoteRef.key }}"
headers: headers:
Content-Type: application/json Content-Type: application/json
@@ -19,6 +20,7 @@ metadata:
spec: spec:
provider: provider:
webhook: webhook:
# yamllint disable-line rule:line-length
url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/item/{{ .remoteRef.key }}" url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/item/{{ .remoteRef.key }}"
result: result:
jsonPath: '$.data.fields[?@.name=="{{ .remoteRef.property }}"].value' jsonPath: '$.data.fields[?@.name=="{{ .remoteRef.property }}"].value'
@@ -30,6 +32,7 @@ metadata:
spec: spec:
provider: provider:
webhook: webhook:
# yamllint disable-line rule:line-length
url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/item/{{ .remoteRef.key }}" url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/item/{{ .remoteRef.key }}"
result: result:
jsonPath: "$.data.notes" jsonPath: "$.data.notes"
@@ -41,5 +44,6 @@ metadata:
spec: spec:
provider: provider:
webhook: webhook:
# yamllint disable-line rule:line-length
url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/attachment/{{ .remoteRef.property }}?itemid={{ .remoteRef.key }}" url: "http://bitwarden-cli.bitwarden.svc.cluster.local:8087/object/attachment/{{ .remoteRef.property }}?itemid={{ .remoteRef.key }}"
result: {} result: {}
+6 -5
View File
@@ -21,11 +21,12 @@ spec:
spec: spec:
containers: containers:
- name: bitwarden-cli - name: bitwarden-cli
# Since my gitlab instance depends on the database hosted in k3s, and the # Since my gitlab instance depends on the database hosted in k3s, and
# database depends on this image, I need a way to bootstrap the system if # the database depends on this image, I need a way to bootstrap the
# I am doing disaster recovery. And this is it. # system if # I am doing disaster recovery. And this is it.
image: "ghcr.io/greg-hellings/nixos-config/img-bitwarden:latest" #image: "ghcr.io/greg-hellings/nixos-config/img-bitwarden:latest"
#image: "registry.thehellings.com/greg/nixos-config/img-bitwarden:latest" image: >-
registry.thehellings.com/greg/nixos-config/img-bitwarden:latest
imagePullPolicy: Always imagePullPolicy: Always
env: env:
- name: BW_CLIENTID - name: BW_CLIENTID
+5 -5
View File
@@ -39,11 +39,11 @@ spec:
parameters: parameters:
barmanObjectName: k3sbackup-objectstore barmanObjectName: k3sbackup-objectstore
# Use this as the target of the bootstrap recovery process # Use this as the target of the bootstrap recovery process
# It is important that the `externalClusters` serverName matches # It is important that the `externalClusters` serverName matches
# the old name of the original cluster that you are upgrading. # the old name of the original cluster that you are upgrading.
# When restoring, set the targetTime to the latest backup that you # When restoring, set the targetTime to the latest backup that you
# want to restore to # want to restore to
# bootstrap: # bootstrap:
# recovery: # recovery:
# source: origin # source: origin
+15 -13
View File
@@ -42,6 +42,7 @@ metadata:
name: longhorn-custom-path name: longhorn-custom-path
namespace: longhorn-system namespace: longhorn-system
data: data:
# yamllint disable-line rule:line-length
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
--- ---
apiVersion: kyverno.io/v1 apiVersion: kyverno.io/v1
@@ -113,6 +114,7 @@ metadata:
namespace: longhorn-system namespace: longhorn-system
annotations: annotations:
ingressClassName: traefik ingressClassName: traefik
# yamllint disable-line rule:line-length
traefik.ingress.kubernetes.io/router.middlewares: longhorn-system-basic-auth@kubernetescrd traefik.ingress.kubernetes.io/router.middlewares: longhorn-system-basic-auth@kubernetescrd
# Set body size to 10G to allow uploading large things # Set body size to 10G to allow uploading large things
traefik.ingress.kubernetes.io/buffering: | traefik.ingress.kubernetes.io/buffering: |
@@ -121,19 +123,19 @@ metadata:
spec: spec:
ingressClassName: traefik ingressClassName: traefik
rules: rules:
- &host - &host
host: longhorn.cluster host: longhorn.cluster
http: http:
paths: paths:
- pathType: Prefix - pathType: Prefix
path: "/" path: "/"
backend: backend:
service: service:
name: longhorn-frontend name: longhorn-frontend
port: port:
number: 80 number: 80
- <<: *host - <<: *host
host: longhorn.kubernetes host: longhorn.kubernetes
--- ---
apiVersion: storage.k8s.io/v1 apiVersion: storage.k8s.io/v1
kind: StorageClass kind: StorageClass
+2 -1
View File
@@ -8,7 +8,8 @@ spec:
ref: ref:
# Version 0.10.0 # Version 0.10.0
# For some reason, I can't get it to pull by tag or by auto-discovery # For some reason, I can't get it to pull by tag or by auto-discovery
digest: "sha256:bcffd3d504664710baa7c0bcd66dc246437c51a9a76f9b8ed1a10c7aecd80766" digest: >-
sha256:bcffd3d504664710baa7c0bcd66dc246437c51a9a76f9b8ed1a10c7aecd80766
--- ---
apiVersion: helm.toolkit.fluxcd.io/v2 apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease kind: HelmRelease
+1 -1
View File
@@ -45,7 +45,7 @@ metadata:
name: pgvector name: pgvector
spec: spec:
imageName: "ghcr.io/immich-app/postgres:16-vectorchord0.5.3" imageName: "ghcr.io/immich-app/postgres:16-vectorchord0.5.3"
#imageName: "ghcr.io/tensorchord/cloudnative-pgvecto.rs:16-v0.3.0" # imageName: "ghcr.io/tensorchord/cloudnative-pgvecto.rs:16-v0.3.0"
instances: 1 instances: 1
storage: storage:
size: 60Gi size: 60Gi
+2
View File
@@ -32,6 +32,7 @@ spec:
engineVersion: v2 engineVersion: v2
data: data:
matrix.pem: "{{ .matrix_pem }}" matrix.pem: "{{ .matrix_pem }}"
# yamllint disable rule:line-length
dendrite.yaml: | dendrite.yaml: |
version: 2 version: 2
global: global:
@@ -187,3 +188,4 @@ spec:
headers: null headers: null
baggage_restrictions: null baggage_restrictions: null
throttler: null throttler: null
# yamllint enable rule:line-length