chore: add pre-commit config
This commit is contained in:
parent
b9d8cd04d4
commit
83345289be
28 changed files with 40 additions and 28 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -13,4 +13,4 @@ terraform.rc
|
||||||
*.retry
|
*.retry
|
||||||
.idea/
|
.idea/
|
||||||
secrets.yaml
|
secrets.yaml
|
||||||
.env
|
.env
|
||||||
|
|
|
||||||
17
.pre-commit-config.yaml
Normal file
17
.pre-commit-config.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v3.2.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-executables-have-shebangs
|
||||||
|
- id: check-json
|
||||||
|
- id: pretty-format-json
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: check-symlinks
|
||||||
|
- id: check-yaml
|
||||||
|
args:
|
||||||
|
- --allow-multiple-documents
|
||||||
|
- id: detect-private-key
|
||||||
|
- id: trailing-whitespace
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
[defaults]
|
[defaults]
|
||||||
inventory = inventory
|
inventory = inventory
|
||||||
host_key_checking = False
|
host_key_checking = False
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,4 @@
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: ../roles/base
|
- role: ../roles/base
|
||||||
become: yes
|
become: yes
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@
|
||||||
vars:
|
vars:
|
||||||
first_master_hostname: "{{ groups['k3s_masters'][0] }}"
|
first_master_hostname: "{{ groups['k3s_masters'][0] }}"
|
||||||
is_first_master: "{{ inventory_hostname in groups['k3s_masters'][0] }}"
|
is_first_master: "{{ inventory_hostname in groups['k3s_masters'][0] }}"
|
||||||
short_hostname: "{{ inventory_hostname.split('.')[0] }}"
|
short_hostname: "{{ inventory_hostname.split('.')[0] }}"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
community.general.timezone:
|
community.general.timezone:
|
||||||
name: "{{ system_timezone }}"
|
name: "{{ system_timezone }}"
|
||||||
when: (system_timezone is defined) and (system_timezone != "Your/Timezone")
|
when: (system_timezone is defined) and (system_timezone != "Your/Timezone")
|
||||||
|
|
||||||
- name: Enable IPv4 forwarding
|
- name: Enable IPv4 forwarding
|
||||||
ansible.posix.sysctl:
|
ansible.posix.sysctl:
|
||||||
name: net.ipv4.ip_forward
|
name: net.ipv4.ip_forward
|
||||||
|
|
@ -33,4 +33,4 @@
|
||||||
- import_tasks: mounts.yml
|
- import_tasks: mounts.yml
|
||||||
name: Mount NFS shares
|
name: Mount NFS shares
|
||||||
tags:
|
tags:
|
||||||
- nfs
|
- nfs
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,4 @@
|
||||||
- name: Update all packages
|
- name: Update all packages
|
||||||
apt:
|
apt:
|
||||||
upgrade: dist
|
upgrade: dist
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,4 @@
|
||||||
mode: 600
|
mode: 600
|
||||||
|
|
||||||
- name: Install k3s agent
|
- name: Install k3s agent
|
||||||
shell: "bash /tmp/k3s.install.sh agent"
|
shell: "bash /tmp/k3s.install.sh agent"
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,3 @@
|
||||||
get_url:
|
get_url:
|
||||||
url: https://get.k3s.io
|
url: https://get.k3s.io
|
||||||
dest: /tmp/k3s.install.sh
|
dest: /tmp/k3s.install.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,4 @@
|
||||||
etcd_snapshot_dir: "/nfs/nas1/backups/{{ short_hostname }}"
|
etcd_snapshot_dir: "/nfs/nas1/backups/{{ short_hostname }}"
|
||||||
|
|
||||||
- name: Install k3s master
|
- name: Install k3s master
|
||||||
command: bash /tmp/k3s.install.sh
|
command: bash /tmp/k3s.install.sh
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
token: {{ cluster_token }}
|
token: {{ cluster_token }}
|
||||||
server: https://{{ tls_san }}:6443
|
server: https://{{ tls_san }}:6443
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
k3s_version: "v1.27.4+k3s1"
|
k3s_version: "v1.27.4+k3s1"
|
||||||
tls_san: "{{ lookup('env', 'ANSIBLE_TLS_SAN') | mandatory }}"
|
tls_san: "{{ lookup('env', 'ANSIBLE_TLS_SAN') | mandatory }}"
|
||||||
cluster_token: "{{ lookup('env', 'ANSIBLE_CLUSTER_TOKEN') | mandatory }}"
|
cluster_token: "{{ lookup('env', 'ANSIBLE_CLUSTER_TOKEN') | mandatory }}"
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
ANSIBLE_K3S_CLUSTER_TOKEN=
|
ANSIBLE_K3S_CLUSTER_TOKEN=
|
||||||
ANSIBLE_K3S_TLS_SAN=
|
ANSIBLE_K3S_TLS_SAN=
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,4 @@
|
||||||
__path__: /mnt/share/data/cloud/data/{nextcloud,audit}.log
|
__path__: /mnt/share/data/cloud/data/{nextcloud,audit}.log
|
||||||
promtail_config_limits_config:
|
promtail_config_limits_config:
|
||||||
readline_rate_enabled: true
|
readline_rate_enabled: true
|
||||||
readline_rate_drop: true
|
readline_rate_drop: true
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
NEXTCLOUD_PROMTAIL_PASSWORD=superdupersecure
|
NEXTCLOUD_PROMTAIL_PASSWORD=superdupersecure
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
- name: patrickjahns.promtail
|
- name: patrickjahns.promtail
|
||||||
version: 1.26.0
|
version: 1.26.0
|
||||||
|
|
|
||||||
|
|
@ -64,4 +64,4 @@ spec:
|
||||||
persistence:
|
persistence:
|
||||||
enabled: true
|
enabled: true
|
||||||
storageClass: default
|
storageClass: default
|
||||||
size: 25Gi
|
size: 25Gi
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,4 @@ spec:
|
||||||
sources: []
|
sources: []
|
||||||
project: roboces
|
project: roboces
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
automated: {}
|
automated: {}
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,4 @@ spec:
|
||||||
- https://git.roboces.dev/catalin/fukuops.git
|
- https://git.roboces.dev/catalin/fukuops.git
|
||||||
- https://charts.goauthentik.io/
|
- https://charts.goauthentik.io/
|
||||||
- https://kubereboot.github.io/charts
|
- https://kubereboot.github.io/charts
|
||||||
- https://sqljames.github.io/factorio-server-charts/
|
- https://sqljames.github.io/factorio-server-charts/
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@ spec:
|
||||||
storageClassName: "truenas-nfs-csi"
|
storageClassName: "truenas-nfs-csi"
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 3Gi
|
storage: 3Gi
|
||||||
|
|
|
||||||
|
|
@ -17,4 +17,3 @@ spec:
|
||||||
name: secrets-authentik
|
name: secrets-authentik
|
||||||
namespace: apps-fuku
|
namespace: apps-fuku
|
||||||
type: Opaque
|
type: Opaque
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,3 @@ spec:
|
||||||
name: secrets-dcsi
|
name: secrets-dcsi
|
||||||
namespace: democratic-csi
|
namespace: democratic-csi
|
||||||
type: Opaque
|
type: Opaque
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,3 @@ spec:
|
||||||
name: secrets-factorio
|
name: secrets-factorio
|
||||||
namespace: apps-fuku
|
namespace: apps-fuku
|
||||||
type: Opaque
|
type: Opaque
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,4 @@ metadata:
|
||||||
namespace: monitoring
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
basicAuth:
|
basicAuth:
|
||||||
secret: loki-auth-secret
|
secret: loki-auth-secret
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,3 @@ spec:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
name: miniflux
|
name: miniflux
|
||||||
namespace: apps-roboces
|
namespace: apps-roboces
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,4 +63,4 @@ variable "disk_storage_name" {
|
||||||
description = "Disk storage name"
|
description = "Disk storage name"
|
||||||
type = string
|
type = string
|
||||||
default = "storage"
|
default = "storage"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,4 @@ terraform {
|
||||||
version = "0.11.1"
|
version = "0.11.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
PM_USER=
|
PM_USER=
|
||||||
PM_PASS=
|
PM_PASS=
|
||||||
PM_API_URL=
|
PM_API_URL=
|
||||||
TF_VAR_ci_password=
|
TF_VAR_ci_password=
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue