Skip to content

Commit

Permalink
chore: Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
szinn committed Jan 10, 2025
1 parent e6c7815 commit f25a5f5
Show file tree
Hide file tree
Showing 57 changed files with 597 additions and 655 deletions.
10 changes: 2 additions & 8 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
"**/*.sops.*"
],
"docker": {
"fileMatch": [
"ansible/files/ragnar/.+\\.ya?ml$",
"kubernetes/.+\\.ya?ml$"
]
"fileMatch": ["ansible/files/ragnar/.+\\.ya?ml$", "kubernetes/.+\\.ya?ml$"]
},
"flux": {
"fileMatch": ["kubernetes/.+\\.ya?ml$"]
Expand All @@ -35,9 +32,6 @@
"fileMatch": ["kubernetes/.+\\.ya?ml$"]
},
"kubernetes": {
"fileMatch": [
"\\.taskfiles/.+\\.ya?ml(?:\\.j2)?$",
"kubernetes/.+\\.ya?ml$"
]
"fileMatch": ["\\.taskfiles/.+\\.ya?ml(?:\\.j2)?$", "kubernetes/.+\\.ya?ml$"]
}
}
9 changes: 2 additions & 7 deletions .github/renovate/autoMerge.json5
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@
},
{
"description": "Auto merge media releases",
"matchDatasources": [
"docker",
"github-releases",
"github-tags",
"helm"
],
"matchDatasources": ["docker", "github-releases", "github-tags", "helm"],
"automerge": true,
"automergeType": "branch",
"requiredStatusChecks": null,
Expand All @@ -54,7 +49,7 @@
"ghcr.io/onedr0p/sonarr-develop",
"ghcr.io/szinn/lidarr-develop",
"ghcr.io/szinn/readarr-develop"
]
]
}
]
}
10 changes: 2 additions & 8 deletions .github/renovate/clusters.json5
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@
"packageRules": [
{
"description": "Separate PRs for main cluster",
"matchFileNames": [
"**/kubernetes/main/**",
"**/infrastructure/talos/main/**"
],
"matchFileNames": ["**/kubernetes/main/**", "**/infrastructure/talos/main/**"],
"additionalBranchPrefix": "main-"
},
{
"description": "Separate PRs for staging cluster",
"matchFileNames": [
"**/kubernetes/staging/**",
"**/infrastructure/talos/staging/**"
],
"matchFileNames": ["**/kubernetes/staging/**", "**/infrastructure/talos/staging/**"],
"additionalBranchPrefix": "staging-"
}
]
Expand Down
8 changes: 2 additions & 6 deletions .github/renovate/grafanaDashboards.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@
"grafana-dashboards": {
"defaultRegistryUrlTemplate": "https://grafana.com/api/dashboards/{{packageName}}",
"format": "json",
"transformTemplates": [
"{\"releases\":[{\"version\": $string(revision)}]}"
]
"transformTemplates": ["{\"releases\":[{\"version\": $string(revision)}]}"]
}
},
"customManagers": [
{
"customType": "regex",
"description": ["Process Grafana dashboards"],
"fileMatch": [
"(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"
],
"fileMatch": ["(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"],
"matchStrings": [
"# renovate: dashboardName=\"(?<depName>.*)\"\\n(?<indentation>\\s+)gnetId: (?<packageName>\\d+)\\n.+revision: (?<currentValue>\\d+)"
],
Expand Down
19 changes: 4 additions & 15 deletions .github/renovate/groups.json5
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@
{
"description": "Github Action Runner",
"groupName": "gha",
"matchPackagePatterns": [
"gha-runner-scale-set",
"gha-runner-scale-set-controller"
],
"matchPackagePatterns": ["gha-runner-scale-set", "gha-runner-scale-set-controller"],
"matchDatasources": ["docker", "github-releases"],
"matchUpdateTypes": ["minor", "patch"],
"group": {
Expand All @@ -103,10 +100,7 @@
{
"description": "Snapshot controller",
"groupName": "SnapshotController",
"matchPackagePatterns": [
"snapshot-validation-webhook",
"snapshot-controller"
],
"matchPackagePatterns": ["snapshot-validation-webhook", "snapshot-controller"],
"matchDatasources": ["docker", "github-releases"],
"matchUpdateTypes": ["minor", "patch"],
"group": {
Expand All @@ -117,10 +111,7 @@
{
"description": "Dragonfly Operator",
"groupName": "DragonflyOperator",
"matchPackagePatterns": [
"docker.dragonflydb.io/dragonflydb/operator",
"dragonflydb/dragonfly-operator"
],
"matchPackagePatterns": ["docker.dragonflydb.io/dragonflydb/operator", "dragonflydb/dragonfly-operator"],
"group": {
"commitMessageTopic": "{{{groupName}}} group"
},
Expand All @@ -129,9 +120,7 @@
{
"description": "Victoria Metrics",
"groupName": "VictoriaMetrics",
"matchPackagePatterns": [
"victoriametrics/"
],
"matchPackagePatterns": ["victoriametrics/"],
"group": {
"commitMessageTopic": "{{{groupName}}} group"
},
Expand Down
13 changes: 3 additions & 10 deletions .github/renovate/packageRules.json5
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@
"description": ["Custom versioning for minio"],
"matchDatasources": ["docker"],
"versioning": "regex:^RELEASE\\.(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)T.*Z$",
"matchPackagePatterns": [
"minio",
"quay.io/minio/minio"
]
"matchPackagePatterns": ["minio", "quay.io/minio/minio"]
},
{
"description": [
"Don't pin digests for packages that don't have/need a digest"
],
"description": ["Don't pin digests for packages that don't have/need a digest"],
"matchDatasources": ["docker"],
"matchDepNames": [
"ghcr.io/bjw-s/helm/app-template",
Expand All @@ -40,9 +35,7 @@
"pinDigests": false
},
{
"description": [
"Don't pin digests for managers that don't need a digest"
],
"description": ["Don't pin digests for managers that don't need a digest"],
"matchManagers": ["flux", "helmfile"],
"pinDigests": false
}
Expand Down
33 changes: 33 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"useTabs": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 120,
"plugins": [],
"overrides": [
{
"files": ["*.yaml", ".prettierrc"],
"options": {
"quoteProps": "preserve",
"singleQuote": false,
"tabWidth": 2
}
},
{
"files": ["*.md"],
"options": {
"quoteProps": "preserve",
"singleQuote": false,
"tabWidth": 2
}
},
{
"files": "*.json5",
"options": {
"quoteProps": "preserve",
"singleQuote": false,
"tabWidth": 2
}
}
]
}
4 changes: 2 additions & 2 deletions .taskfiles/Bootstrap/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ tasks:
get-certs:
desc: Fetch certificates from cluster
cmds:
- for: {var: certs, split: " "}
- for: { var: certs, split: " " }
cmd: kubectl --context {{.cluster}} get secrets -n networking {{.ITEM}}-tls -o yaml | grep -v "creationTimestamp:" | grep -v "resourceVersion:" | grep -v " uid:" > kubernetes/{{.cluster}}/apps/{{.ITEM}}-tls.yaml
requires:
vars:
Expand All @@ -105,7 +105,7 @@ tasks:
put-certs:
desc: Upload certificates to cluster
cmds:
- for: {var: certs, split: " "}
- for: { var: certs, split: " " }
cmd: kubectl --context {{.cluster}} apply -f kubernetes/{{.cluster}}/apps/{{.ITEM}}-tls.yaml
requires:
vars:
Expand Down
13 changes: 6 additions & 7 deletions .taskfiles/Proxmox/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,37 @@ tasks:
start-staging:
desc: Start staging cluster
cmds:
- for: {var: ALL_VMS, split: " "}
- for: { var: ALL_VMS, split: " " }
task: start-vm-{{.ITEM}}

stop-staging:
desc: Stop staging cluster
cmds:
- for: {var: ALL_VMS, split: " "}
- for: { var: ALL_VMS, split: " " }
task: stop-vm-{{.ITEM}}

unmount-staging-cdrom:
desc: Unmount staging cluster CD-ROM drives
cmds:
- for: {var: ALL_VMS, split: " "}
- for: { var: ALL_VMS, split: " " }
task: unmount-cdrom-{{.ITEM}}

destroy-staging:
desc: Destroy staging cluster
cmds:
- for: {var: ALL_VMS, split: " "}
- for: { var: ALL_VMS, split: " " }
task: destroy-vm-{{.ITEM}}

create-staging:
desc: Create staging cluster
cmds:
- for: {var: CP_VMS, split: " "}
- for: { var: CP_VMS, split: " " }
task: create-cp-vm-{{.ITEM}}

wait-for-startup:
internal: true
cmds:
- for: {var: ALL_VMS, split: " "}
- for: { var: ALL_VMS, split: " " }
task: wait-for-startup-{{.ITEM}}

start-vm-*-*-*:
Expand Down Expand Up @@ -84,7 +84,6 @@ tasks:
- cmd: ssh ares -- qm destroy {{.VMID_PREFIX}}{{.vmid}}
ignore_error: true


create-cp-vm-*-*-*:
internal: true
vars:
Expand Down
2 changes: 1 addition & 1 deletion .taskfiles/kubernetes/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks:
approve-certs:
desc: Approve pending certs on startup
cmds:
- for: {var: CERTS}
- for: { var: CERTS }
cmd: kubectl --kubeconfig {{.KUBERNETES_DIR}}/{{.cluster}}/kubeconfig --context {{.cluster}} certificate approve {{.ITEM}}
vars:
CERTS:
Expand Down
4 changes: 2 additions & 2 deletions .taskfiles/postgres/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,13 @@ tasks:
cmds:
- flux suspend helmrelease -n {{.NAMESPACE}} {{.HELMRELEASE}}
- flux suspend kustomization {{.KUSTOMIZATION}}
- for: {var: SERVICES}
- for: { var: SERVICES }
cmd: kubectl scale --replicas=0 -n {{.NAMESPACE}} {{.ITEM}}

_up:
desc: Bring a service up
cmds:
- for: {var: SERVICES}
- for: { var: SERVICES }
cmd: kubectl scale --replicas={{.REPLICAS}} -n {{.NAMESPACE}} {{.ITEM}}
- flux resume helmrelease -n {{.NAMESPACE}} {{.HELMRELEASE}}
- flux resume kustomization {{.KUSTOMIZATION}}
Expand Down
2 changes: 1 addition & 1 deletion .taskfiles/sops/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tasks:
SECRET_FILES:
sh: find . -type f -name '*.sops.yaml' ! -name ".sops.yaml"
cmds:
- for: {var: SECRET_FILES}
- for: { var: SECRET_FILES }
cmd: |
echo "Re-encrypting {{ .ITEM }}"
sops --decrypt --in-place "{{ .ITEM }}"
Expand Down
12 changes: 6 additions & 6 deletions .taskfiles/talos/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ tasks:
sh: ls {{.CLUSTER_CONFIG_ROOT}}/*.yaml
TALOSCONFIG: "{{.CLUSTER_DIR}}/talosconfig"
cmds:
- for: {var: CONFIG_FILES}
- for: { var: CONFIG_FILES }
task: _apply-machineconfig
vars:
cluster: "{{.cluster}}"
Expand Down Expand Up @@ -160,11 +160,11 @@ tasks:
sh: talosctl --talosconfig "{{.CLUSTER_DIR}}/talosconfig" --context {{.cluster}} config info --output json | jq --raw-output '.endpoints[0]'
cmds:
- talosctl kubeconfig
--context {{.cluster}}
--nodes {{.TALOS_CONTROLLER}}
--force
--force-context-name {{.cluster}}
"{{.KUBECONFIG}}"
--context {{.cluster}}
--nodes {{.TALOS_CONTROLLER}}
--force
--force-context-name {{.cluster}}
"{{.KUBECONFIG}}"
- cmd: kubectl config delete-context "admin@{{.cluster}}"
ignore_error: true

Expand Down
4 changes: 1 addition & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"recommendations": [
"signageos.signageos-vscode-sops"
]
"recommendations": ["signageos.signageos-vscode-sops"]
}
6 changes: 3 additions & 3 deletions ansible/files/ragnar/minio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ services:
# renovate: datasource=docker depName=quay.io/minio/minio
image: quay.io/minio/minio:RELEASE.2024-12-18T13-15-44Z
ports:
- '9000:9000'
- '9001:9001'
user: '473:473'
- "9000:9000"
- "9001:9001"
user: "473:473"
volumes:
- /mnt/atlas/Apps/minio:/data
12 changes: 6 additions & 6 deletions ansible/files/ragnar/node-exporter.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
services:
node-exporter:
command:
- '--path.rootfs=/host/root'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--path.udev.data=/host/root/run/udev/data'
- '--web.listen-address=0.0.0.0:9100'
- "--path.rootfs=/host/root"
- "--path.procfs=/host/proc"
- "--path.sysfs=/host/sys"
- "--path.udev.data=/host/root/run/udev/data"
- "--web.listen-address=0.0.0.0:9100"
- >-
--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)
# renovate: datasource=docker depName=quay.io/prometheus/node-exporter
image: quay.io/prometheus/node-exporter:v1.8.2
network_mode: host
ports:
- '9100:9100'
- "9100:9100"
restart: always
volumes:
- /:/host/root:ro
Expand Down
4 changes: 2 additions & 2 deletions ansible/files/ragnar/smartctl-exporter.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
services:
smartctl-exporter:
command:
- '--smartctl.device-exclude=nvme0'
- "--smartctl.device-exclude=nvme0"
# renovate: datasource=docker depName=quay.io/prometheuscommunity/smartctl-exporter
image: quay.io/prometheuscommunity/smartctl-exporter:v0.13.0
ports:
- '9633:9633'
- "9633:9633"
privileged: True
restart: always
user: root
Loading

0 comments on commit f25a5f5

Please sign in to comment.