Refactor everything

This commit is contained in:
Tobias Reisinger 2023-12-14 02:20:13 +01:00
parent 2e100d290f
commit 3f2e60becf
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
69 changed files with 366 additions and 281 deletions

View file

@ -1,16 +1,21 @@
---
svc_ports:
http: 20080
https: 20443
metrics: 29000
harbor_port_http: 20080
harbor_port_https: 20443
harbor_port_metrics: 29000
svc:
harbor_db_host: "{{ postgres.host }}"
harbor_db_port: "{{ postgres.port }}"
harbor_db_database: harbor
harbor_db_user: "{{ vault_harbor.db.user }}"
harbor_db_pass: "{{ vault_harbor.db.pass }}"
harbor_version: 2.9.0
harbor_svc:
name: harbor
no_compose: true # TODO remove when fixing "var-naming[no-role-prefix]"
domain: registry.serguzim.me
caddy_extra: |
reverse_proxy /metrics host.docker.internal:{{ svc_ports.metrics }}
reverse_proxy host.docker.internal:{{ svc_ports.https }} {
reverse_proxy /metrics host.docker.internal:{{ harbor_port_metrics }}
reverse_proxy host.docker.internal:{{ harbor_port_https }} {
transport http {
tls
tls_server_name registry.serguzim.me
@ -25,12 +30,12 @@ svc:
pass: "{{ vault_harbor.db.pass }}"
harbor_version: 2.9.0
svc_yml:
hostname: "{{ svc.domain }}"
harbor_yml:
hostname: "{{ harbor_svc.domain }}"
http:
port: "{{ svc_ports.http }}"
port: "{{ harbor_port_http }}"
https:
port: "{{ svc_ports.https }}"
port: "{{ harbor_port_https }}"
certificate: /opt/services/.lego/certificates/registry.serguzim.me.crt
private_key: /opt/services/.lego/certificates/registry.serguzim.me.key
external_url: https://registry.serguzim.me
@ -65,14 +70,14 @@ svc_yml:
rotate_count: 50
rotate_size: 200M
location: /var/log/harbor
_version: "{{ svc.harbor_version }}"
_version: "{{ harbor_version }}"
external_database:
harbor:
host: "{{ svc.db.host }}"
port: "{{ svc.db.port }}"
db_name: "{{ svc.db.database }}"
username: "{{ svc.db.user }}"
password: "{{ svc.db.pass }}"
host: "{{ harbor_db_host }}"
port: "{{ harbor_db_port }}"
db_name: "{{ harbor_db_database }}"
username: "{{ harbor_db_user }}"
password: "{{ harbor_db_pass }}"
ssl_mode: verify-full
max_idle_conns: 2
max_open_conns: 0
@ -86,7 +91,7 @@ svc_yml:
- trivy
metric:
enabled: enabled
port: "{{ svc_ports.metrics }}"
port: "{{ harbor_port_metrics }}"
path: /metrics
upload_purging:
enabled: true