Compare commits
18 Commits
5ad8140324
...
prd
| Author | SHA1 | Date | |
|---|---|---|---|
| d38a2d2840 | |||
| 2b88107a28 | |||
| d9be744f17 | |||
| b1a4779d96 | |||
| 54432a447f | |||
| 779d3448d5 | |||
| 7d9ddc574f | |||
| 0b4238217b | |||
| 39020882f4 | |||
| 39f53751ea | |||
| d686567857 | |||
| 74bca2946b | |||
| 1972f4a965 | |||
| b4f11ea722 | |||
| 004990a4ca | |||
|
|
1481dbe107 | ||
| 0414919e05 | |||
| d5ab5c4671 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1 @@
|
||||
.idea
|
||||
infra/terraform/.terraform
|
||||
infra/terraform/.terraform.lock.hcl
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
include:
|
||||
- local: infra/.gitlab/.gitlab-ci.yml
|
||||
- local: dmz/.gitlab/.gitlab-ci.yml
|
||||
@@ -1,5 +0,0 @@
|
||||
- hosts: all
|
||||
gather_facts: yes
|
||||
become: yes
|
||||
roles:
|
||||
- base
|
||||
@@ -1,4 +0,0 @@
|
||||
APT::Periodic::Update-Package-Lists "1";
|
||||
APT::Periodic::Download-Upgradeable-Packages "1";
|
||||
APT::Periodic::AutocleanInterval "7";
|
||||
APT::Periodic::Unattended-Upgrade "1";
|
||||
@@ -1 +0,0 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGhPVgL8gXdRTw0E2FvlOUoUI4vd794nB0nZVIsc+U5M
|
||||
@@ -1,4 +0,0 @@
|
||||
Use of this system is restricted to authorized users only, and all use is subjected to an acceptable use policy.
|
||||
|
||||
IF YOU ARE NOT AUTHORIZED TO USE THIS SYSTEM, DISCONNECT NOW.
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
THIS SYSTEM IS FOR AUTHORIZED USE ONLY
|
||||
|
||||
All activities are logged and monitored.
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
# Package generated configuration file
|
||||
# See the sshd_config(5) manpage for details
|
||||
|
||||
# What ports, IPs and protocols we listen for
|
||||
Port 22
|
||||
# Use these options to restrict which interfaces/protocols sshd will bind to
|
||||
#ListenAddress ::
|
||||
#ListenAddress 0.0.0.0
|
||||
Protocol 2
|
||||
# HostKeys for protocol version 2
|
||||
HostKey /etc/ssh/ssh_host_rsa_key
|
||||
HostKey /etc/ssh/ssh_host_dsa_key
|
||||
HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||
HostKey /etc/ssh/ssh_host_ed25519_key
|
||||
#Privilege Separation is turned on for security
|
||||
UsePrivilegeSeparation yes
|
||||
|
||||
# Lifetime and size of ephemeral version 1 server key
|
||||
KeyRegenerationInterval 3600
|
||||
ServerKeyBits 1024
|
||||
|
||||
# Logging
|
||||
SyslogFacility AUTH
|
||||
LogLevel INFO
|
||||
|
||||
# Authentication:
|
||||
LoginGraceTime 120
|
||||
PermitRootLogin no
|
||||
StrictModes yes
|
||||
|
||||
RSAAuthentication yes
|
||||
PubkeyAuthentication yes
|
||||
#AuthorizedKeysFile %h/.ssh/authorized_keys
|
||||
|
||||
# Don't read the user's ~/.rhosts and ~/.shosts files
|
||||
IgnoreRhosts yes
|
||||
# For this to work you will also need host keys in /etc/ssh_known_hosts
|
||||
RhostsRSAAuthentication no
|
||||
# similar for protocol version 2
|
||||
HostbasedAuthentication no
|
||||
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
|
||||
#IgnoreUserKnownHosts yes
|
||||
|
||||
# To enable empty passwords, change to yes (NOT RECOMMENDED)
|
||||
PermitEmptyPasswords no
|
||||
|
||||
# Change to yes to enable challenge-response passwords (beware issues with
|
||||
# some PAM modules and threads)
|
||||
ChallengeResponseAuthentication no
|
||||
|
||||
# Change to no to disable tunnelled clear text passwords
|
||||
PasswordAuthentication no
|
||||
|
||||
# Kerberos options
|
||||
#KerberosAuthentication no
|
||||
#KerberosGetAFSToken no
|
||||
#KerberosOrLocalPasswd yes
|
||||
#KerberosTicketCleanup yes
|
||||
|
||||
# GSSAPI options
|
||||
#GSSAPIAuthentication no
|
||||
#GSSAPICleanupCredentials yes
|
||||
|
||||
X11Forwarding no
|
||||
X11DisplayOffset 10
|
||||
PrintMotd no
|
||||
PrintLastLog yes
|
||||
TCPKeepAlive yes
|
||||
#UseLogin no
|
||||
|
||||
#MaxStartups 10:30:60
|
||||
#Banner /etc/issue.net
|
||||
|
||||
# Allow client to pass locale environment variables
|
||||
AcceptEnv LANG LC_*
|
||||
|
||||
Subsystem sftp /usr/lib/openssh/sftp-server
|
||||
|
||||
# Set this to 'yes' to enable PAM authentication, account processing,
|
||||
# and session processing. If this is enabled, PAM authentication will
|
||||
# be allowed through the ChallengeResponseAuthentication and
|
||||
# PasswordAuthentication. Depending on your PAM configuration,
|
||||
# PAM authentication via ChallengeResponseAuthentication may bypass
|
||||
# the setting of "PermitRootLogin without-password".
|
||||
# If you just want the PAM account and session checks to run without
|
||||
# PAM authentication, then enable this but set PasswordAuthentication
|
||||
# and ChallengeResponseAuthentication to 'no'.
|
||||
UsePAM yes
|
||||
|
||||
ClientAliveInterval 300
|
||||
|
||||
#enable remote powershell
|
||||
#Subsystem powershell /usr/bin/pwsh -sshs -NoLogo
|
||||
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
- name: Update packages
|
||||
apt:
|
||||
name: '*'
|
||||
state: latest
|
||||
update_cache: yes
|
||||
only_upgrade: yes
|
||||
retries: 300
|
||||
delay: 10
|
||||
|
||||
- name: Remove packages not needed anymore
|
||||
apt:
|
||||
autoremove: yes
|
||||
retries: 300
|
||||
delay: 10
|
||||
|
||||
- name: Install required packages Debian
|
||||
apt:
|
||||
state: latest
|
||||
pkg: "{{ item }}"
|
||||
with_items: "{{ required_packages }}"
|
||||
retries: 300
|
||||
delay: 10
|
||||
|
||||
- name: Create user account
|
||||
user:
|
||||
name: "user"
|
||||
shell: /bin/bash
|
||||
state: present
|
||||
createhome: yes
|
||||
|
||||
- name: ensure ssh folder exists for user
|
||||
file:
|
||||
path: /home/user/.ssh
|
||||
owner: user
|
||||
group: user
|
||||
mode: "0700"
|
||||
state: directory
|
||||
|
||||
- name: Deploy SSH Key (user)
|
||||
copy:
|
||||
dest: /home/user/.ssh/authorized_keys
|
||||
src: files/authorized_keys_user
|
||||
owner: user
|
||||
group: user
|
||||
force: true
|
||||
|
||||
- name: Remove Root SSH Configuration
|
||||
file:
|
||||
path: /root/.ssh
|
||||
state: absent
|
||||
|
||||
- name: Copy Secured SSHD Configuration
|
||||
copy:
|
||||
src: files/sshd_config_secured
|
||||
dest: /etc/ssh/sshd_config
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Copy Secured SSHD Configuration
|
||||
copy:
|
||||
src: files/sshd_config_secured_redhat
|
||||
dest: /etc/ssh/sshd_config
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: Restart SSHD
|
||||
systemd:
|
||||
name: sshd
|
||||
daemon_reload: yes
|
||||
state: restarted
|
||||
enabled: yes
|
||||
ignore_errors: yes
|
||||
|
||||
|
||||
- name: Copy unattended-upgrades file
|
||||
copy:
|
||||
src: files/10periodic
|
||||
dest: /etc/apt/apt.conf.d/10periodic
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
force: yes
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Remove undesirable packages
|
||||
package:
|
||||
name: "{{ unnecessary_software }}"
|
||||
state: absent
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Stop and disable unnecessary services
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
with_items: "{{ unnecessary_services }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Set a message of the day
|
||||
copy:
|
||||
dest: /etc/motd
|
||||
src: files/motd
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: Set a login banner
|
||||
copy:
|
||||
dest: "{{ item }}"
|
||||
src: files/issue
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
with_items:
|
||||
- /etc/issue
|
||||
- /etc/issue.net
|
||||
|
||||
- name: set timezone
|
||||
shell: timedatectl set-timezone America/Chicago
|
||||
|
||||
- name: Enable cockpit
|
||||
systemd:
|
||||
name: cockpit
|
||||
daemon_reload: yes
|
||||
state: restarted
|
||||
enabled: yes
|
||||
|
||||
- name: change password
|
||||
ansible.builtin.user:
|
||||
name: "administrator"
|
||||
state: present
|
||||
password: "{{ lookup('ansible.builtin.env', 'ADMIN_PASSWORD') | password_hash('sha512') }}"
|
||||
@@ -1,17 +0,0 @@
|
||||
required_packages:
|
||||
- ufw
|
||||
- qemu-guest-agent
|
||||
- fail2ban
|
||||
- unattended-upgrades
|
||||
- cockpit
|
||||
- nfs-common
|
||||
- open-iscsi
|
||||
|
||||
unnecessary_services:
|
||||
- postfix
|
||||
- telnet
|
||||
|
||||
unnecessary_software:
|
||||
- tcpdump
|
||||
- nmap-ncat
|
||||
- wpa_supplicant
|
||||
@@ -9,6 +9,6 @@ appVersion: "1.16.0"
|
||||
dependencies:
|
||||
- name: argo-cd
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
version: 6.11.1
|
||||
version: 6.7.11
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: authentik
|
||||
name: argocd
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/authentik
|
||||
targetRevision: prd
|
||||
path: argocd
|
||||
destination:
|
||||
namespace: authentik
|
||||
namespace: argocd
|
||||
name: in-cluster
|
||||
syncPolicy:
|
||||
automated:
|
||||
@@ -18,4 +18,3 @@ spec:
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: infra/authentik
|
||||
targetRevision: prd
|
||||
path: authentik
|
||||
destination:
|
||||
namespace: authentik
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/bitwarden
|
||||
targetRevision: prd
|
||||
path: bitwarden
|
||||
directory:
|
||||
recurse: true
|
||||
destination:
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/cert-manager
|
||||
targetRevision: prd
|
||||
path: cert-manager
|
||||
destination:
|
||||
namespace: cert-manager
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/crossplane
|
||||
targetRevision: prd
|
||||
path: crossplane
|
||||
destination:
|
||||
namespace: crossplane
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/durpapi
|
||||
targetRevision: prd
|
||||
path: durpapi
|
||||
destination:
|
||||
namespace: durpapi
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/durpot
|
||||
targetRevision: prd
|
||||
path: durpot
|
||||
destination:
|
||||
namespace: durpot
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/external-dns
|
||||
targetRevision: prd
|
||||
path: external-dns
|
||||
destination:
|
||||
namespace: external-dns
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: infra/external-secrets
|
||||
targetRevision: prd
|
||||
path: external-secrets
|
||||
destination:
|
||||
namespace: external-secrets
|
||||
name: in-cluster
|
||||
@@ -18,4 +18,3 @@ spec:
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/gatekeeper
|
||||
targetRevision: prd
|
||||
path: gatekeeper
|
||||
destination:
|
||||
namespace: gatekeeper
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/gitlab-runner
|
||||
targetRevision: prd
|
||||
path: gitlab-runner
|
||||
destination:
|
||||
namespace: gitlab-runner
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/heimdall
|
||||
targetRevision: prd
|
||||
path: heimdall
|
||||
destination:
|
||||
namespace: heimdall
|
||||
name: in-cluster
|
||||
36
argocd/templates/ingress.yaml
Normal file
36
argocd/templates/ingress.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: argocd-ingress
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-production
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`argocd.internal.prd.durp.info`)
|
||||
middlewares:
|
||||
- name: internal-only
|
||||
namespace: traefik
|
||||
kind: Rule
|
||||
services:
|
||||
- name: argocd-server
|
||||
port: 443
|
||||
scheme: https
|
||||
tls:
|
||||
secretName: argocd-tls
|
||||
|
||||
---
|
||||
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: argocd-tls
|
||||
spec:
|
||||
secretName: argocd-tls
|
||||
issuerRef:
|
||||
name: letsencrypt-production
|
||||
kind: ClusterIssuer
|
||||
commonName: "argocd.internal.prd.durp.info"
|
||||
dnsNames:
|
||||
- "argocd.internal.prd.durp.info"
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/krakend
|
||||
targetRevision: prd
|
||||
path: krakend
|
||||
destination:
|
||||
namespace: krakend
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/kube-prometheus-stack
|
||||
targetRevision: prd
|
||||
path: kube-prometheus-stack
|
||||
destination:
|
||||
namespace: kube-prometheus-stack
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/kubeclarity
|
||||
targetRevision: prd
|
||||
path: kubeclarity
|
||||
destination:
|
||||
namespace: kubeclarity
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/littlelink
|
||||
targetRevision: prd
|
||||
path: littlelink
|
||||
directory:
|
||||
recurse: true
|
||||
destination:
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: infra/longhorn
|
||||
targetRevision: prd
|
||||
path: longhorn
|
||||
destination:
|
||||
namespace: longhorn-system
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/metallb-system
|
||||
targetRevision: prd
|
||||
path: metallb-system
|
||||
destination:
|
||||
namespace: metallb-system
|
||||
name: in-cluster
|
||||
@@ -19,4 +19,3 @@ spec:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/nfs-client
|
||||
targetRevision: prd
|
||||
path: nfs-client
|
||||
directory:
|
||||
recurse: true
|
||||
destination:
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/open-webui
|
||||
targetRevision: prd
|
||||
path: open-webui
|
||||
destination:
|
||||
namespace: open-webui
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/traefik
|
||||
targetRevision: prd
|
||||
path: traefik
|
||||
destination:
|
||||
namespace: traefik
|
||||
name: in-cluster
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: master/uptimekuma
|
||||
targetRevision: prd
|
||||
path: uptimekuma
|
||||
directory:
|
||||
recurse: true
|
||||
destination:
|
||||
@@ -7,8 +7,8 @@ spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: infra/vault
|
||||
targetRevision: prd
|
||||
path: vault
|
||||
destination:
|
||||
namespace: vault
|
||||
name: in-cluster
|
||||
@@ -33,13 +33,13 @@ argo-cd:
|
||||
cm:
|
||||
create: true
|
||||
annotations: {}
|
||||
url: https://argocd.internal.durp.info
|
||||
url: https://argocd.internal.prd.durp.info
|
||||
oidc.tls.insecure.skip.verify: "true"
|
||||
dex.config: |
|
||||
connectors:
|
||||
- config:
|
||||
issuer: https://authentik.durp.info/application/o/argocd/
|
||||
clientID: dbb8ffc06104fb6e7fac3e4ae7fafb1d90437625
|
||||
issuer: https://authentik.prd.durp.info/application/o/argocd/
|
||||
clientID: lKuMgyYaOlQMNAUSjsRVYgkwZG9UT6CeFWeTLAcl
|
||||
clientSecret: $client-secret:clientSecret
|
||||
insecureEnableGroups: true
|
||||
scopes:
|
||||
@@ -9,4 +9,4 @@ appVersion: "1.16.0"
|
||||
dependencies:
|
||||
- name: authentik
|
||||
repository: https://charts.goauthentik.io
|
||||
version: 2024.8.3
|
||||
version: 2024.4.1
|
||||
@@ -6,7 +6,7 @@ spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`authentik.durp.info`) && PathPrefix(`/`)
|
||||
- match: Host(`authentik.prd.durp.info`) && PathPrefix(`/`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: authentik-server
|
||||
@@ -25,9 +25,9 @@ spec:
|
||||
issuerRef:
|
||||
name: letsencrypt-production
|
||||
kind: ClusterIssuer
|
||||
commonName: "authentik.durp.info"
|
||||
commonName: "authentik.prd.durp.info"
|
||||
dnsNames:
|
||||
- "authentik.durp.info"
|
||||
- "authentik.prd.durp.info"
|
||||
|
||||
---
|
||||
|
||||
@@ -36,7 +36,7 @@ apiVersion: v1
|
||||
metadata:
|
||||
name: authentik-external-dns
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/hostname: authentik.durp.info
|
||||
external-dns.alpha.kubernetes.io/hostname: authentik.prd.durp.info
|
||||
spec:
|
||||
type: ExternalName
|
||||
externalName: durp.info
|
||||
externalName:.prd.durp.info
|
||||
@@ -1,6 +1,8 @@
|
||||
authentik:
|
||||
global:
|
||||
env:
|
||||
- name: AUTHENTIK_REDIS__DB
|
||||
value: "1"
|
||||
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
@@ -26,17 +28,22 @@ authentik:
|
||||
server:
|
||||
name: server
|
||||
replicas: 3
|
||||
worker:
|
||||
replicas: 3
|
||||
postgresql:
|
||||
enabled: true
|
||||
image:
|
||||
registry: registry.internal.durp.info
|
||||
repository: bitnami/postgresql
|
||||
pullPolicy: Always
|
||||
postgresqlUsername: "authentik"
|
||||
postgresqlDatabase: "authentik"
|
||||
existingSecret: db-pass
|
||||
auth:
|
||||
username: "authentik"
|
||||
existingSecret: db-pass
|
||||
secretKeys:
|
||||
adminPasswordKey: dbpass
|
||||
userPasswordKey: dbpass
|
||||
|
||||
#postgresqlUsername: "authentik"
|
||||
#postgresqlDatabase: "authentik"
|
||||
#existingSecret: db-pass
|
||||
persistence:
|
||||
enabled: true
|
||||
storageClass: longhorn
|
||||
@@ -44,9 +51,6 @@ authentik:
|
||||
- ReadWriteMany
|
||||
redis:
|
||||
enabled: true
|
||||
master:
|
||||
persistence:
|
||||
enabled: false
|
||||
image:
|
||||
registry: registry.internal.durp.info
|
||||
repository: bitnami/redis
|
||||
@@ -17,7 +17,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: bitwarden
|
||||
image: registry.internal.durp.info/vaultwarden/server:1.32.7
|
||||
image: registry.internal.durp.info/vaultwarden/server:1.30.5
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: bitwarden-pvc
|
||||
@@ -28,7 +28,7 @@ spec:
|
||||
containerPort: 80
|
||||
env:
|
||||
- name: SIGNUPS_ALLOWED
|
||||
value: "FALSE"
|
||||
value: "TRUE"
|
||||
- name: INVITATIONS_ALLOWED
|
||||
value: "FALSE"
|
||||
- name: WEBSOCKET_ENABLED
|
||||
@@ -39,7 +39,7 @@ spec:
|
||||
value: "80"
|
||||
- name: ROCKET_WORKERS
|
||||
value: "10"
|
||||
- name: SECRET_USERNAME
|
||||
- name: ADMIN_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: bitwarden-secret
|
||||
63
bitwarden/templates/ingress.yaml
Normal file
63
bitwarden/templates/ingress.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: bitwarden-ingress
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`bitwarden.prd.durp.info`) && PathPrefix(`/`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: bitwarden
|
||||
port: 80
|
||||
tls:
|
||||
secretName: bitwarden-tls
|
||||
|
||||
---
|
||||
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: bitwarden-tls
|
||||
spec:
|
||||
secretName: bitwarden-tls
|
||||
issuerRef:
|
||||
name: letsencrypt-production
|
||||
kind: ClusterIssuer
|
||||
commonName: "bitwarden.prd.durp.info"
|
||||
dnsNames:
|
||||
- "bitwarden.prd.durp.info"
|
||||
|
||||
---
|
||||
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: bitwarden-external-dns
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/hostname: bitwarden.prd.durp.info
|
||||
spec:
|
||||
type: ExternalName
|
||||
externalName:.prd.durp.info
|
||||
|
||||
---
|
||||
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: bitwarden-admin-ingress
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`bitwarden.prd.durp.info`) && PathPrefix(`/admin`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: whitelist
|
||||
namespace: traefik
|
||||
services:
|
||||
- name: bitwarden
|
||||
port: 80
|
||||
tls:
|
||||
secretName: bitwarden-tls
|
||||
@@ -8,4 +8,4 @@ appVersion: 0.0.1
|
||||
dependencies:
|
||||
- name: cert-manager
|
||||
repository: https://charts.jetstack.io
|
||||
version: v1.15.3
|
||||
version: 1.*.*
|
||||
13
cert-manager/templates/self-signed.yaml
Normal file
13
cert-manager/templates/self-signed.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: selfsigned-issuer
|
||||
spec:
|
||||
selfSigned: {}
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: selfsigned-cluster-issuer
|
||||
spec:
|
||||
selfSigned: {}
|
||||
@@ -9,4 +9,4 @@ appVersion: "1.16.0"
|
||||
dependencies:
|
||||
- name: crossplane
|
||||
repository: https://charts.crossplane.io/stable
|
||||
version: 1.17.1
|
||||
version: 1.16.0
|
||||
@@ -3,7 +3,7 @@ kind: Provider
|
||||
metadata:
|
||||
name: provider-gitlab
|
||||
spec:
|
||||
package: xpkg.upbound.io/crossplane-contrib/provider-gitlab:v0.5.0
|
||||
package: xpkg.upbound.io/crossplane-contrib/provider-gitlab:v0.7.0
|
||||
---
|
||||
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
186
crossplane/values.yaml
Normal file
186
crossplane/values.yaml
Normal file
@@ -0,0 +1,186 @@
|
||||
# helm-docs renders these comments into markdown. Use markdown formatting where
|
||||
# appropiate.
|
||||
#
|
||||
# -- The number of Crossplane pod `replicas` to deploy.
|
||||
replicas: 1
|
||||
|
||||
# -- The deployment strategy for the Crossplane and RBAC Manager pods.
|
||||
deploymentStrategy: RollingUpdate
|
||||
|
||||
image:
|
||||
# -- Repository for the Crossplane pod image.
|
||||
repository: xpkg.upbound.io/crossplane/crossplane
|
||||
# -- The Crossplane image tag. Defaults to the value of `appVersion` in `Chart.yaml`.
|
||||
tag: ""
|
||||
# -- The image pull policy used for Crossplane and RBAC Manager pods.
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# -- Add `nodeSelectors` to the Crossplane pod deployment.
|
||||
nodeSelector: {}
|
||||
# -- Add `tolerations` to the Crossplane pod deployment.
|
||||
tolerations: []
|
||||
# -- Add `affinities` to the Crossplane pod deployment.
|
||||
affinity: {}
|
||||
|
||||
# -- Enable `hostNetwork` for the Crossplane deployment. Caution: enabling `hostNetwork` grants the Crossplane Pod access to the host network namespace. Consider setting `dnsPolicy` to `ClusterFirstWithHostNet`.
|
||||
hostNetwork: false
|
||||
|
||||
# -- Specify the `dnsPolicy` to be used by the Crossplane pod.
|
||||
dnsPolicy: ""
|
||||
|
||||
# -- Add custom `labels` to the Crossplane pod deployment.
|
||||
customLabels: {}
|
||||
|
||||
# -- Add custom `annotations` to the Crossplane pod deployment.
|
||||
customAnnotations: {}
|
||||
|
||||
serviceAccount:
|
||||
# -- Add custom `annotations` to the Crossplane ServiceAccount.
|
||||
customAnnotations: {}
|
||||
|
||||
# -- Enable [leader election](https://docs.crossplane.io/latest/concepts/pods/#leader-election) for the Crossplane pod.
|
||||
leaderElection: true
|
||||
# -- Add custom arguments to the Crossplane pod.
|
||||
args: []
|
||||
|
||||
provider:
|
||||
# -- A list of Provider packages to install.
|
||||
packages: []
|
||||
|
||||
configuration:
|
||||
# -- A list of Configuration packages to install.
|
||||
packages: []
|
||||
|
||||
function:
|
||||
# -- A list of Function packages to install
|
||||
packages: []
|
||||
|
||||
# -- The imagePullSecret names to add to the Crossplane ServiceAccount.
|
||||
imagePullSecrets: []
|
||||
|
||||
registryCaBundleConfig:
|
||||
# -- The ConfigMap name containing a custom CA bundle to enable fetching packages from registries with unknown or untrusted certificates.
|
||||
name: ""
|
||||
# -- The ConfigMap key containing a custom CA bundle to enable fetching packages from registries with unknown or untrusted certificates.
|
||||
key: ""
|
||||
|
||||
service:
|
||||
# -- Configure annotations on the service object. Only enabled when webhooks.enabled = true
|
||||
customAnnotations: {}
|
||||
|
||||
webhooks:
|
||||
# -- Enable webhooks for Crossplane and installed Provider packages.
|
||||
enabled: true
|
||||
|
||||
rbacManager:
|
||||
# -- Deploy the RBAC Manager pod and its required roles.
|
||||
deploy: true
|
||||
# -- Don't install aggregated Crossplane ClusterRoles.
|
||||
skipAggregatedClusterRoles: false
|
||||
# -- The number of RBAC Manager pod `replicas` to deploy.
|
||||
replicas: 1
|
||||
# -- Enable [leader election](https://docs.crossplane.io/latest/concepts/pods/#leader-election) for the RBAC Manager pod.
|
||||
leaderElection: true
|
||||
# -- Add custom arguments to the RBAC Manager pod.
|
||||
args: []
|
||||
# -- Add `nodeSelectors` to the RBAC Manager pod deployment.
|
||||
nodeSelector: {}
|
||||
# -- Add `tolerations` to the RBAC Manager pod deployment.
|
||||
tolerations: []
|
||||
# -- Add `affinities` to the RBAC Manager pod deployment.
|
||||
affinity: {}
|
||||
|
||||
# -- The PriorityClass name to apply to the Crossplane and RBAC Manager pods.
|
||||
priorityClassName: ""
|
||||
|
||||
resourcesCrossplane:
|
||||
limits:
|
||||
# -- CPU resource limits for the Crossplane pod.
|
||||
cpu: 500m
|
||||
# -- Memory resource limits for the Crossplane pod.
|
||||
memory: 1024Mi
|
||||
requests:
|
||||
# -- CPU resource requests for the Crossplane pod.
|
||||
cpu: 100m
|
||||
# -- Memory resource requests for the Crossplane pod.
|
||||
memory: 256Mi
|
||||
|
||||
securityContextCrossplane:
|
||||
# -- The user ID used by the Crossplane pod.
|
||||
runAsUser: 65532
|
||||
# -- The group ID used by the Crossplane pod.
|
||||
runAsGroup: 65532
|
||||
# -- Enable `allowPrivilegeEscalation` for the Crossplane pod.
|
||||
allowPrivilegeEscalation: false
|
||||
# -- Set the Crossplane pod root file system as read-only.
|
||||
readOnlyRootFilesystem: true
|
||||
|
||||
packageCache:
|
||||
# -- Set to `Memory` to hold the package cache in a RAM backed file system. Useful for Crossplane development.
|
||||
medium: ""
|
||||
# -- The size limit for the package cache. If medium is `Memory` the `sizeLimit` can't exceed Node memory.
|
||||
sizeLimit: 20Mi
|
||||
# -- The name of a PersistentVolumeClaim to use as the package cache. Disables the default package cache `emptyDir` Volume.
|
||||
pvc: ""
|
||||
# -- The name of a ConfigMap to use as the package cache. Disables the default package cache `emptyDir` Volume.
|
||||
configMap: ""
|
||||
|
||||
resourcesRBACManager:
|
||||
limits:
|
||||
# -- CPU resource limits for the RBAC Manager pod.
|
||||
cpu: 100m
|
||||
# -- Memory resource limits for the RBAC Manager pod.
|
||||
memory: 512Mi
|
||||
requests:
|
||||
# -- CPU resource requests for the RBAC Manager pod.
|
||||
cpu: 100m
|
||||
# -- Memory resource requests for the RBAC Manager pod.
|
||||
memory: 256Mi
|
||||
|
||||
securityContextRBACManager:
|
||||
# -- The user ID used by the RBAC Manager pod.
|
||||
runAsUser: 65532
|
||||
# -- The group ID used by the RBAC Manager pod.
|
||||
runAsGroup: 65532
|
||||
# -- Enable `allowPrivilegeEscalation` for the RBAC Manager pod.
|
||||
allowPrivilegeEscalation: false
|
||||
# -- Set the RBAC Manager pod root file system as read-only.
|
||||
readOnlyRootFilesystem: true
|
||||
|
||||
metrics:
|
||||
# -- Enable Prometheus path, port and scrape annotations and expose port 8080 for both the Crossplane and RBAC Manager pods.
|
||||
enabled: false
|
||||
|
||||
# -- Add custom environmental variables to the Crossplane pod deployment.
|
||||
# Replaces any `.` in a variable name with `_`. For example, `SAMPLE.KEY=value1` becomes `SAMPLE_KEY=value1`.
|
||||
extraEnvVarsCrossplane: {}
|
||||
|
||||
# -- Add custom environmental variables to the RBAC Manager pod deployment.
|
||||
# Replaces any `.` in a variable name with `_`. For example, `SAMPLE.KEY=value1` becomes `SAMPLE_KEY=value1`.
|
||||
extraEnvVarsRBACManager: {}
|
||||
|
||||
# -- Add a custom `securityContext` to the Crossplane pod.
|
||||
podSecurityContextCrossplane: {}
|
||||
|
||||
# -- Add a custom `securityContext` to the RBAC Manager pod.
|
||||
podSecurityContextRBACManager: {}
|
||||
|
||||
# -- Add custom `volumes` to the Crossplane pod.
|
||||
extraVolumesCrossplane: {}
|
||||
|
||||
# -- Add custom `volumeMounts` to the Crossplane pod.
|
||||
extraVolumeMountsCrossplane: {}
|
||||
|
||||
# -- To add arbitrary Kubernetes Objects during a Helm Install
|
||||
extraObjects: []
|
||||
# - apiVersion: pkg.crossplane.io/v1alpha1
|
||||
# kind: ControllerConfig
|
||||
# metadata:
|
||||
# name: aws-config
|
||||
# annotations:
|
||||
# eks.amazonaws.com/role-arn: arn:aws:iam::123456789101:role/example
|
||||
# helm.sh/hook: post-install
|
||||
# spec:
|
||||
# podSecurityContext:
|
||||
# fsGroup: 2000
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
stages:
|
||||
- plan
|
||||
- apply
|
||||
- destroy
|
||||
|
||||
variables:
|
||||
WORKDIR: $CI_PROJECT_DIR/dmz/terraform
|
||||
GITLAB_TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/dmz
|
||||
|
||||
image:
|
||||
name: registry.durp.info/opentofu/opentofu:latest
|
||||
entrypoint: [""]
|
||||
|
||||
.tf-init:
|
||||
before_script:
|
||||
- cd $WORKDIR
|
||||
- tofu init
|
||||
-reconfigure
|
||||
-backend-config="address=${GITLAB_TF_ADDRESS}"
|
||||
-backend-config="lock_address=${GITLAB_TF_ADDRESS}/lock"
|
||||
-backend-config="unlock_address=${GITLAB_TF_ADDRESS}/lock"
|
||||
-backend-config="username=gitlab-ci-token"
|
||||
-backend-config="password=${CI_JOB_TOKEN}"
|
||||
-backend-config="lock_method=POST"
|
||||
-backend-config="unlock_method=DELETE"
|
||||
-backend-config="retry_wait_min=5"
|
||||
|
||||
format:
|
||||
stage: .pre
|
||||
allow_failure: false
|
||||
script:
|
||||
- cd $WORKDIR
|
||||
- tofu fmt -diff -check -write=false
|
||||
rules:
|
||||
- changes:
|
||||
- "dmz/terraform/*.tf"
|
||||
|
||||
validate:
|
||||
stage: .pre
|
||||
allow_failure: false
|
||||
extends: .tf-init
|
||||
script:
|
||||
- tofu validate
|
||||
rules:
|
||||
- changes:
|
||||
- "dmz/terraform/*.tf"
|
||||
|
||||
plan-dmz-infrastructure:
|
||||
stage: plan
|
||||
variables:
|
||||
PLAN: plan.tfplan
|
||||
JSON_PLAN_FILE: tfplan.json
|
||||
ENVIRONMENT_NAME: dmz
|
||||
allow_failure: false
|
||||
extends: .tf-init
|
||||
script:
|
||||
- apk add --update curl jq
|
||||
- alias convert_report="jq -r '([.resource_changes[].change.actions?]|flatten)|{\"create\":(map(select(.==\"create\"))|length),\"update\":(map(select(.==\"update\"))|length),\"delete\":(map(select(.==\"delete\"))|length)}'"
|
||||
- tofu plan -out=$PLAN $ARGUMENTS
|
||||
- tofu show --json $PLAN | jq -r '([.resource_changes[].change.actions?]|flatten)|{"create":(map(select(.=="create"))|length),"update":(map(select(.=="update"))|length),"delete":(map(select(.=="delete"))|length)}' > $JSON_PLAN_FILE
|
||||
artifacts:
|
||||
reports:
|
||||
terraform: $WORKDIR/$JSON_PLAN_FILE
|
||||
needs: ["validate","format"]
|
||||
rules:
|
||||
- changes:
|
||||
- "dmz/terraform/*.tf"
|
||||
|
||||
apply-dmz-infrastructure:
|
||||
stage: apply
|
||||
variables:
|
||||
ENVIRONMENT_NAME: dmz
|
||||
allow_failure: false
|
||||
extends: .tf-init
|
||||
script:
|
||||
- tofu apply -auto-approve $ARGUMENTS
|
||||
rules:
|
||||
- changes:
|
||||
- "dmz/terraform/*.tf"
|
||||
when: manual
|
||||
needs: ["plan-dmz-infrastructure"]
|
||||
|
||||
destroy-dmz-infrastructure:
|
||||
stage: destroy
|
||||
variables:
|
||||
ENVIRONMENT_NAME: dmz
|
||||
allow_failure: false
|
||||
extends: .tf-init
|
||||
script:
|
||||
- tofu destroy -auto-approve $ARGUMENTS
|
||||
rules:
|
||||
- changes:
|
||||
- "dmz/terraform/*.tf"
|
||||
when: manual
|
||||
needs: ["plan-dmz-infrastructure"]
|
||||
@@ -1,7 +0,0 @@
|
||||
apiVersion: v2
|
||||
name: internalproxy
|
||||
description: A Helm chart for Kubernetes
|
||||
type: application
|
||||
|
||||
version: 0.1.0
|
||||
appVersion: "0.1.0"
|
||||
@@ -1,25 +0,0 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: authentik-ingress
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`test.durp.info`) && PathPrefix(`/`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: authentik-server
|
||||
port: 443
|
||||
tls:
|
||||
secretName: authentik-tls
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: authentik-server
|
||||
spec:
|
||||
type: ExternalName
|
||||
externalName: authentik.infra.durp.info
|
||||
@@ -1,101 +0,0 @@
|
||||
#apiVersion: external-secrets.io/v1beta1
|
||||
#kind: ExternalSecret
|
||||
#metadata:
|
||||
# name: ollama-secret
|
||||
#spec:
|
||||
# secretStoreRef:
|
||||
# name: vault
|
||||
# kind: ClusterSecretStore
|
||||
# target:
|
||||
# name: ollama-secret
|
||||
# data:
|
||||
# - secretKey: users
|
||||
# remoteRef:
|
||||
# key: secrets/internalproxy/ollama
|
||||
# property: users
|
||||
#
|
||||
#---
|
||||
#
|
||||
#apiVersion: traefik.containo.us/v1alpha1
|
||||
#kind: Middleware
|
||||
#metadata:
|
||||
# name: ollama-basic-auth
|
||||
#spec:
|
||||
# basicAuth:
|
||||
# secret: ollama-secret
|
||||
#
|
||||
#---
|
||||
#
|
||||
#apiVersion: v1
|
||||
#kind: Service
|
||||
#metadata:
|
||||
# name: ollama
|
||||
#spec:
|
||||
# ports:
|
||||
# - name: app
|
||||
# port: 11435
|
||||
# protocol: TCP
|
||||
# targetPort: 11435
|
||||
# clusterIP: None
|
||||
# type: ClusterIP
|
||||
#
|
||||
#---
|
||||
#
|
||||
#apiVersion: v1
|
||||
#kind: Endpoints
|
||||
#metadata:
|
||||
# name: ollama
|
||||
#subsets:
|
||||
# - addresses:
|
||||
# - ip: 192.168.20.104
|
||||
# ports:
|
||||
# - name: app
|
||||
# port: 11435
|
||||
# protocol: TCP
|
||||
#
|
||||
#---
|
||||
#
|
||||
#apiVersion: traefik.containo.us/v1alpha1
|
||||
#kind: IngressRoute
|
||||
#metadata:
|
||||
# name: ollama-ingress
|
||||
#spec:
|
||||
# entryPoints:
|
||||
# - websecure
|
||||
# routes:
|
||||
# - match: Host(`ollama.durp.info`) && PathPrefix(`/`)
|
||||
# middlewares:
|
||||
# - name: ollama-basic-auth
|
||||
# kind: Rule
|
||||
# services:
|
||||
# - name: ollama
|
||||
# port: 11435
|
||||
# tls:
|
||||
# secretName: ollama-tls
|
||||
#
|
||||
#---
|
||||
#
|
||||
#apiVersion: cert-manager.io/v1
|
||||
#kind: Certificate
|
||||
#metadata:
|
||||
# name: ollama-tls
|
||||
#spec:
|
||||
# secretName: ollama-tls
|
||||
# issuerRef:
|
||||
# name: letsencrypt-production
|
||||
# kind: ClusterIssuer
|
||||
# commonName: "ollama.durp.info"
|
||||
# dnsNames:
|
||||
# - "ollama.durp.info"
|
||||
#
|
||||
#---
|
||||
#
|
||||
#kind: Service
|
||||
#apiVersion: v1
|
||||
#metadata:
|
||||
# name: ollama-external-dns
|
||||
# annotations:
|
||||
# external-dns.alpha.kubernetes.io/hostname: ollama.durp.info
|
||||
#spec:
|
||||
# type: ExternalName
|
||||
# externalName: durp.info
|
||||
@@ -1,12 +0,0 @@
|
||||
apiVersion: v2
|
||||
name: metallb-system
|
||||
description: A Helm chart for Kubernetes
|
||||
type: application
|
||||
|
||||
version: 0.1.0
|
||||
appVersion: "1.16.0"
|
||||
|
||||
dependencies:
|
||||
- name: metallb
|
||||
repository: https://metallb.github.io/metallb
|
||||
version: 0.14.9
|
||||
@@ -1,17 +0,0 @@
|
||||
apiVersion: metallb.io/v1beta1
|
||||
kind: IPAddressPool
|
||||
metadata:
|
||||
name: cheap
|
||||
spec:
|
||||
addresses:
|
||||
- 192.168.98.130-192.168.98.140
|
||||
---
|
||||
apiVersion: metallb.io/v1beta1
|
||||
kind: L2Advertisement
|
||||
metadata:
|
||||
name: pool
|
||||
namespace: metallb-system
|
||||
spec:
|
||||
ipAddressPools:
|
||||
- cheap
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
resource "proxmox_vm_qemu" "k3smaster" {
|
||||
count = local.k3smaster.count
|
||||
ciuser = "administrator"
|
||||
vmid = "${local.vlan}${local.k3smaster.ip[count.index]}"
|
||||
name = local.k3smaster.name[count.index]
|
||||
target_node = local.k3smaster.node[count.index]
|
||||
clone = local.template
|
||||
tags = local.k3smaster.tags
|
||||
qemu_os = "l26"
|
||||
full_clone = true
|
||||
os_type = "cloud-init"
|
||||
agent = 1
|
||||
cores = local.k3smaster.cores
|
||||
sockets = 1
|
||||
cpu_type = "host"
|
||||
memory = local.k3smaster.memory
|
||||
scsihw = "virtio-scsi-pci"
|
||||
#bootdisk = "scsi0"
|
||||
boot = "order=virtio0"
|
||||
onboot = true
|
||||
sshkeys = local.sshkeys
|
||||
vga {
|
||||
type = "serial0"
|
||||
}
|
||||
serial {
|
||||
id = 0
|
||||
type = "socket"
|
||||
}
|
||||
disks {
|
||||
ide {
|
||||
ide2 {
|
||||
cloudinit {
|
||||
storage = local.storage
|
||||
}
|
||||
}
|
||||
}
|
||||
virtio {
|
||||
virtio0 {
|
||||
disk {
|
||||
size = local.k3smaster.drive
|
||||
format = local.format
|
||||
storage = local.storage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
network {
|
||||
id = 0
|
||||
model = "virtio"
|
||||
bridge = "vmbr0"
|
||||
tag = local.vlan
|
||||
}
|
||||
#Cloud Init Settings
|
||||
ipconfig0 = "ip=192.168.${local.vlan}.${local.k3smaster.ip[count.index]}/24,gw=192.168.${local.vlan}.1"
|
||||
searchdomain = "durp.loc"
|
||||
nameserver = local.dnsserver
|
||||
}
|
||||
|
||||
resource "proxmox_vm_qemu" "k3sserver" {
|
||||
count = local.k3sserver.count
|
||||
ciuser = "administrator"
|
||||
vmid = "${local.vlan}${local.k3sserver.ip[count.index]}"
|
||||
name = local.k3sserver.name[count.index]
|
||||
target_node = local.k3sserver.node[count.index]
|
||||
clone = local.template
|
||||
tags = local.k3sserver.tags
|
||||
qemu_os = "l26"
|
||||
full_clone = true
|
||||
os_type = "cloud-init"
|
||||
agent = 1
|
||||
cores = local.k3sserver.cores
|
||||
sockets = 1
|
||||
cpu_type = "host"
|
||||
memory = local.k3sserver.memory
|
||||
scsihw = "virtio-scsi-pci"
|
||||
#bootdisk = "scsi0"
|
||||
boot = "order=virtio0"
|
||||
onboot = true
|
||||
sshkeys = local.sshkeys
|
||||
vga {
|
||||
type = "serial0"
|
||||
}
|
||||
serial {
|
||||
id = 0
|
||||
type = "socket"
|
||||
}
|
||||
disks {
|
||||
ide {
|
||||
ide2 {
|
||||
cloudinit {
|
||||
storage = local.storage
|
||||
}
|
||||
}
|
||||
}
|
||||
virtio {
|
||||
virtio0 {
|
||||
disk {
|
||||
size = local.k3sserver.drive
|
||||
format = local.format
|
||||
storage = local.storage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
network {
|
||||
id = 0
|
||||
model = "virtio"
|
||||
bridge = "vmbr0"
|
||||
tag = local.vlan
|
||||
}
|
||||
#Cloud Init Settings
|
||||
ipconfig0 = "ip=192.168.${local.vlan}.${local.k3sserver.ip[count.index]}/24,gw=192.168.${local.vlan}.1"
|
||||
searchdomain = "durp.loc"
|
||||
nameserver = local.dnsserver
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
terraform {
|
||||
backend "http" {}
|
||||
required_providers {
|
||||
proxmox = {
|
||||
source = "Telmate/proxmox"
|
||||
version = "3.0.1-rc6"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "proxmox" {
|
||||
pm_parallel = 1
|
||||
pm_tls_insecure = true
|
||||
pm_api_url = var.pm_api_url
|
||||
pm_user = var.pm_user
|
||||
pm_password = var.pm_password
|
||||
pm_debug = false
|
||||
}
|
||||
|
||||
locals {
|
||||
sshkeys = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDEphzWgwUZnvL6E5luKLt3WO0HK7Kh63arSMoNl5gmjzXyhG1DDW0OKfoIl0T+JZw/ZjQ7iii6tmSLFRk6nuYCldqe5GVcFxvTzX4/xGEioAyG0IiUGKy6s+9xzO8QXF0EtSNPH0nfHNKcCjgwWAzM+Lt6gW0Vqs+aU5ICuDiEchmvYPz+rBaVldJVTG7m3ogKJ2aIF7HU/pCPp5l0E9gMOw7s0ABijuc3KXLEWCYgL39jIST6pFH9ceRLmu8Xy5zXHAkkEEauY/e6ld0hlzLadiUD7zYJMdDcm0oRvenYcUlaUl9gS0569IpfsJsjCejuqOxCKzTHPJDOT0f9TbIqPXkGq3s9oEJGpQW+Z8g41BqRpjBCdBk+yv39bzKxlwlumDwqgx1WP8xxKavAWYNqNRG7sBhoWwtxYEOhKXoLNjBaeDRnO5OY5AQJvONWpuByyz0R/gTh4bOFVD+Y8WWlKbT4zfhnN70XvapRsbZiaGhJBPwByAMGg6XxSbC6xtbyligVGCEjCXbTLkeKq1w0DuItY+FBGO3J2k90OiciTVSeyiVz9J/Y03UB0gHdsMCoVNrj+9QWfrTLDhM7D5YrXUt5nj2LQTcbtf49zoQXWxUhozlg42E/FJU/Yla7y55qWizAEVyP2/Ks/PHrF679k59HNd2IJ/aicA9QnmWtLQ== ansible"
|
||||
template = "Debian12-Template"
|
||||
storage = "cache-domains"
|
||||
emulatessd = true
|
||||
format = "raw"
|
||||
dnsserver = "192.168.98.1"
|
||||
vlan = 98
|
||||
k3smaster = {
|
||||
tags = "k3s_dmz"
|
||||
count = 3
|
||||
name = ["master01-dmz", "master02-dmz", "master03-dmz"]
|
||||
cores = 2
|
||||
memory = "4096"
|
||||
drive = 20
|
||||
node = ["mothership", "overlord", "vanguard"]
|
||||
ip = ["11", "12", "13"]
|
||||
}
|
||||
k3sserver = {
|
||||
tags = "k3s_dmz"
|
||||
count = 3
|
||||
name = ["node01-dmz", "node02-dmz", "node03-dmz"]
|
||||
cores = 4
|
||||
memory = "8192"
|
||||
drive = 240
|
||||
node = ["mothership", "overlord", "vanguard"]
|
||||
ip = ["21", "22", "23"]
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
variable "pm_api_url" {
|
||||
description = "API URL to Proxmox provider"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "pm_password" {
|
||||
description = "Passowrd to Proxmox provider"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "pm_user" {
|
||||
description = "UIsername to Proxmox provider"
|
||||
type = string
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
traefik:
|
||||
image:
|
||||
registry: registry.durp.info
|
||||
repository: traefik
|
||||
pullPolicy: Always
|
||||
|
||||
providers:
|
||||
kubernetesCRD:
|
||||
allowExternalNameServices: true
|
||||
|
||||
deployment:
|
||||
replicas: 3
|
||||
revisionHistoryLimit: 1
|
||||
|
||||
ingressRoute:
|
||||
dashboard:
|
||||
enabled: true
|
||||
|
||||
additionalArguments:
|
||||
- "--serversTransport.insecureSkipVerify=true"
|
||||
- "--log.level=DEBUG"
|
||||
- --experimental.plugins.jwt.moduleName=github.com/traefik-plugins/traefik-jwt-plugin
|
||||
- --experimental.plugins.jwt.version=v0.7.0
|
||||
|
||||
autoscaling:
|
||||
enabled: true
|
||||
minReplicas: 3
|
||||
maxReplicas: 10
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 80
|
||||
behavior:
|
||||
scaleDown:
|
||||
stabilizationWindowSeconds: 300
|
||||
policies:
|
||||
- type: Pods
|
||||
value: 1
|
||||
periodSeconds: 60
|
||||
|
||||
|
||||
# -- [Resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for `traefik` container.
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
memory: "512Mi"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
@@ -1,13 +1,11 @@
|
||||
apiVersion: v2
|
||||
name: durpapi
|
||||
description: A Helm chart for Kubernetes
|
||||
type: application
|
||||
|
||||
version: 0.1.0-dev0184
|
||||
name: durpapi
|
||||
appVersion: 0.1.0
|
||||
|
||||
dependencies:
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
version: 12.5.*
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
name: postgresql
|
||||
version: 0.1.0-dev0184
|
||||
apiVersion: v2
|
||||
type: application
|
||||
@@ -6,7 +6,7 @@ spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host("api.durp.info") && PathPrefix(`/api`)
|
||||
- match: Host("api.prd.durp.info") && PathPrefix(`/api`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: jwt
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host("api.durp.info") && PathPrefix(`/swagger`)
|
||||
- match: Host("api.prd.durp.info") && PathPrefix(`/swagger`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: "durpapi-service"
|
||||
@@ -41,4 +41,4 @@ spec:
|
||||
jwt:
|
||||
Required: true
|
||||
Keys:
|
||||
- https://authentik.durp.info/application/o/api/jwks
|
||||
- https://authentik.prd.durp.info/application/o/api/jwks/
|
||||
@@ -10,15 +10,15 @@ deployment:
|
||||
probe:
|
||||
readiness:
|
||||
httpGet:
|
||||
path: /health/gethealth
|
||||
path: /api/health/gethealth
|
||||
port: 8080
|
||||
liveness:
|
||||
httpGet:
|
||||
path: /health/gethealth
|
||||
path: /api/health/gethealth
|
||||
port: 8080
|
||||
startup:
|
||||
httpGet:
|
||||
path: /health/gethealth
|
||||
path: /api/health/gethealth
|
||||
port: 8080
|
||||
service:
|
||||
type: ClusterIP
|
||||
@@ -9,4 +9,4 @@ appVersion: 0.0.1
|
||||
dependencies:
|
||||
- name: external-dns
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 8.3.8
|
||||
version: 6.20.3
|
||||
@@ -4,10 +4,10 @@ external-dns:
|
||||
|
||||
image:
|
||||
pullPolicy: Always
|
||||
|
||||
txtPrefix: "prd-"
|
||||
sources:
|
||||
- service
|
||||
|
||||
|
||||
provider: cloudflare
|
||||
cloudflare:
|
||||
secretName : "external-dns"
|
||||
@@ -8,5 +8,5 @@ appVersion: 0.0.1
|
||||
dependencies:
|
||||
- name: external-secrets
|
||||
repository: https://charts.external-secrets.io
|
||||
version: 0.10.4
|
||||
version: 0.8.1
|
||||
|
||||
@@ -8,4 +8,4 @@ appVersion: 0.0.1
|
||||
dependencies:
|
||||
- name: gatekeeper
|
||||
repository: https://open-policy-agent.github.io/gatekeeper/charts
|
||||
version: 3.17.1
|
||||
version: 3.14.0
|
||||
277
gatekeeper/values.yaml
Normal file
277
gatekeeper/values.yaml
Normal file
@@ -0,0 +1,277 @@
|
||||
gatekeeper:
|
||||
replicas: 3
|
||||
revisionHistoryLimit: 10
|
||||
auditInterval: 60
|
||||
metricsBackends: ["prometheus"]
|
||||
auditMatchKindOnly: false
|
||||
constraintViolationsLimit: 20
|
||||
auditFromCache: false
|
||||
disableMutation: false
|
||||
disableValidatingWebhook: false
|
||||
validatingWebhookName: gatekeeper-validating-webhook-configuration
|
||||
validatingWebhookTimeoutSeconds: 3
|
||||
validatingWebhookFailurePolicy: Ignore
|
||||
validatingWebhookAnnotations: {}
|
||||
validatingWebhookExemptNamespacesLabels: {}
|
||||
validatingWebhookObjectSelector: {}
|
||||
validatingWebhookCheckIgnoreFailurePolicy: Fail
|
||||
validatingWebhookCustomRules: {}
|
||||
validatingWebhookURL: null
|
||||
enableDeleteOperations: false
|
||||
enableExternalData: true
|
||||
enableGeneratorResourceExpansion: true
|
||||
enableTLSHealthcheck: false
|
||||
maxServingThreads: -1
|
||||
mutatingWebhookName: gatekeeper-mutating-webhook-configuration
|
||||
mutatingWebhookFailurePolicy: Ignore
|
||||
mutatingWebhookReinvocationPolicy: Never
|
||||
mutatingWebhookAnnotations: {}
|
||||
mutatingWebhookExemptNamespacesLabels: {}
|
||||
mutatingWebhookObjectSelector: {}
|
||||
mutatingWebhookTimeoutSeconds: 1
|
||||
mutatingWebhookCustomRules: {}
|
||||
mutatingWebhookURL: null
|
||||
mutationAnnotations: false
|
||||
auditChunkSize: 500
|
||||
logLevel: INFO
|
||||
logDenies: false
|
||||
logMutations: false
|
||||
emitAdmissionEvents: false
|
||||
emitAuditEvents: false
|
||||
admissionEventsInvolvedNamespace: false
|
||||
auditEventsInvolvedNamespace: false
|
||||
resourceQuota: true
|
||||
externaldataProviderResponseCacheTTL: 3m
|
||||
image:
|
||||
repository: openpolicyagent/gatekeeper
|
||||
crdRepository: openpolicyagent/gatekeeper-crds
|
||||
release: v3.15.0-beta.0
|
||||
pullPolicy: Always
|
||||
pullSecrets: []
|
||||
preInstall:
|
||||
crdRepository:
|
||||
image:
|
||||
repository: null
|
||||
tag: v3.15.0-beta.0
|
||||
postUpgrade:
|
||||
labelNamespace:
|
||||
enabled: false
|
||||
image:
|
||||
repository: openpolicyagent/gatekeeper-crds
|
||||
tag: v3.15.0-beta.0
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecrets: []
|
||||
extraNamespaces: []
|
||||
podSecurity: ["pod-security.kubernetes.io/audit=restricted",
|
||||
"pod-security.kubernetes.io/audit-version=latest",
|
||||
"pod-security.kubernetes.io/warn=restricted",
|
||||
"pod-security.kubernetes.io/warn-version=latest",
|
||||
"pod-security.kubernetes.io/enforce=restricted",
|
||||
"pod-security.kubernetes.io/enforce-version=v1.24"]
|
||||
extraAnnotations: {}
|
||||
priorityClassName: ""
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
nodeSelector: {kubernetes.io/os: linux}
|
||||
resources: {}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 999
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
postInstall:
|
||||
labelNamespace:
|
||||
enabled: true
|
||||
extraRules: []
|
||||
image:
|
||||
repository: openpolicyagent/gatekeeper-crds
|
||||
tag: v3.15.0-beta.0
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecrets: []
|
||||
extraNamespaces: []
|
||||
podSecurity: ["pod-security.kubernetes.io/audit=restricted",
|
||||
"pod-security.kubernetes.io/audit-version=latest",
|
||||
"pod-security.kubernetes.io/warn=restricted",
|
||||
"pod-security.kubernetes.io/warn-version=latest",
|
||||
"pod-security.kubernetes.io/enforce=restricted",
|
||||
"pod-security.kubernetes.io/enforce-version=v1.24"]
|
||||
extraAnnotations: {}
|
||||
priorityClassName: ""
|
||||
probeWebhook:
|
||||
enabled: true
|
||||
image:
|
||||
repository: curlimages/curl
|
||||
tag: 7.83.1
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecrets: []
|
||||
waitTimeout: 60
|
||||
httpTimeout: 2
|
||||
insecureHTTPS: false
|
||||
priorityClassName: ""
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
nodeSelector: {kubernetes.io/os: linux}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 999
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
preUninstall:
|
||||
deleteWebhookConfigurations:
|
||||
extraRules: []
|
||||
enabled: false
|
||||
image:
|
||||
repository: openpolicyagent/gatekeeper-crds
|
||||
tag: v3.15.0-beta.0
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecrets: []
|
||||
priorityClassName: ""
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
nodeSelector: {kubernetes.io/os: linux}
|
||||
resources: {}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 999
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
podAnnotations: {}
|
||||
auditPodAnnotations: {}
|
||||
podLabels: {}
|
||||
podCountLimit: "100"
|
||||
secretAnnotations: {}
|
||||
enableRuntimeDefaultSeccompProfile: true
|
||||
controllerManager:
|
||||
exemptNamespaces: []
|
||||
exemptNamespacePrefixes: []
|
||||
hostNetwork: false
|
||||
dnsPolicy: ClusterFirst
|
||||
port: 8443
|
||||
metricsPort: 8888
|
||||
healthPort: 9090
|
||||
readinessTimeout: 1
|
||||
livenessTimeout: 1
|
||||
priorityClassName: system-cluster-critical
|
||||
disableCertRotation: false
|
||||
tlsMinVersion: 1.3
|
||||
clientCertName: ""
|
||||
strategyType: RollingUpdate
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: gatekeeper.sh/operation
|
||||
operator: In
|
||||
values:
|
||||
- webhook
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
topologySpreadConstraints: []
|
||||
tolerations: []
|
||||
nodeSelector: {kubernetes.io/os: linux}
|
||||
resources:
|
||||
limits:
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 512Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 999
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
podSecurityContext:
|
||||
fsGroup: 999
|
||||
supplementalGroups:
|
||||
- 999
|
||||
extraRules: []
|
||||
networkPolicy:
|
||||
enabled: false
|
||||
ingress: { }
|
||||
# - from:
|
||||
# - ipBlock:
|
||||
# cidr: 0.0.0.0/0
|
||||
audit:
|
||||
enablePubsub: false
|
||||
connection: audit-connection
|
||||
channel: audit-channel
|
||||
hostNetwork: false
|
||||
dnsPolicy: ClusterFirst
|
||||
metricsPort: 8888
|
||||
healthPort: 9090
|
||||
readinessTimeout: 1
|
||||
livenessTimeout: 1
|
||||
priorityClassName: system-cluster-critical
|
||||
disableCertRotation: false
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
nodeSelector: {kubernetes.io/os: linux}
|
||||
resources:
|
||||
limits:
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 512Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 999
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
podSecurityContext:
|
||||
fsGroup: 999
|
||||
supplementalGroups:
|
||||
- 999
|
||||
writeToRAMDisk: false
|
||||
extraRules: []
|
||||
crds:
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
nodeSelector: {kubernetes.io/os: linux}
|
||||
resources: {}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 65532
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65532
|
||||
pdb:
|
||||
controllerManager:
|
||||
minAvailable: 1
|
||||
service: {}
|
||||
disabledBuiltins: ["{http.send}"]
|
||||
psp:
|
||||
enabled: true
|
||||
upgradeCRDs:
|
||||
enabled: true
|
||||
extraRules: []
|
||||
priorityClassName: ""
|
||||
rbac:
|
||||
create: true
|
||||
externalCertInjection:
|
||||
enabled: false
|
||||
secretName: gatekeeper-webhook-server-cert
|
||||
@@ -8,4 +8,4 @@ appVersion: 0.0.1
|
||||
dependencies:
|
||||
- name: gitlab-runner
|
||||
repository: https://charts.gitlab.io/
|
||||
version: 0.69.0
|
||||
version: 0.43.0
|
||||
@@ -6,7 +6,7 @@ gitlab-runner:
|
||||
|
||||
imagePullPolicy: Always
|
||||
gitlabUrl: https://gitlab.com/
|
||||
unregisterRunner: false
|
||||
unregisterRunner: true
|
||||
terminationGracePeriodSeconds: 3600
|
||||
concurrent: 10
|
||||
checkInterval: 30
|
||||
@@ -68,4 +68,4 @@ gitlab-runner:
|
||||
memory: 2Gi
|
||||
requests:
|
||||
memory: 128Mi
|
||||
cpu: 500m
|
||||
cpu: 500m
|
||||
@@ -8,4 +8,4 @@ appVersion: 0.0.1
|
||||
dependencies:
|
||||
- name: heimdall
|
||||
repository: https://djjudas21.github.io/charts/
|
||||
version: 8.5.4
|
||||
version: 8.5.2
|
||||
@@ -7,7 +7,7 @@ spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`heimdall.durp.info`) && PathPrefix(`/`)
|
||||
- match: Host(`heimdall.prd.durp.info`) && PathPrefix(`/`)
|
||||
middlewares:
|
||||
- name: authentik-proxy-provider
|
||||
namespace: traefik
|
||||
@@ -15,7 +15,7 @@ spec:
|
||||
services:
|
||||
- name: heimdall
|
||||
port: 80
|
||||
- match: Host(`heimdall.durp.info`) && PathPrefix(`/outpost.goauthentik.io`)
|
||||
- match: Host(`heimdall.prd.durp.info`) && PathPrefix(`/outpost.goauthentik.io`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: ak-outpost-authentik-embedded-outpost
|
||||
@@ -35,9 +35,9 @@ spec:
|
||||
issuerRef:
|
||||
name: letsencrypt-production
|
||||
kind: ClusterIssuer
|
||||
commonName: "heimdall.durp.info"
|
||||
commonName: "heimdall.prd.durp.info"
|
||||
dnsNames:
|
||||
- "heimdall.durp.info"
|
||||
- "heimdall.prd.durp.info"
|
||||
|
||||
---
|
||||
|
||||
@@ -46,7 +46,7 @@ apiVersion: v1
|
||||
metadata:
|
||||
name: heimdall-external-dns
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/hostname: heimdall.durp.info
|
||||
external-dns.alpha.kubernetes.io/hostname: heimdall.prd.durp.info
|
||||
spec:
|
||||
type: ExternalName
|
||||
externalName: durp.info
|
||||
externalName:.prd.durp.info
|
||||
@@ -1,95 +0,0 @@
|
||||
stages:
|
||||
- plan
|
||||
- apply
|
||||
- destroy
|
||||
|
||||
variables:
|
||||
WORKDIR: $CI_PROJECT_DIR/infra/terraform
|
||||
GITLAB_TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/infra
|
||||
|
||||
image:
|
||||
name: registry.internal.durp.info/opentofu/opentofu:latest
|
||||
entrypoint: [""]
|
||||
|
||||
.tf-init:
|
||||
before_script:
|
||||
- cd $WORKDIR
|
||||
- tofu init
|
||||
-reconfigure
|
||||
-backend-config="address=${GITLAB_TF_ADDRESS}"
|
||||
-backend-config="lock_address=${GITLAB_TF_ADDRESS}/lock"
|
||||
-backend-config="unlock_address=${GITLAB_TF_ADDRESS}/lock"
|
||||
-backend-config="username=gitlab-ci-token"
|
||||
-backend-config="password=${CI_JOB_TOKEN}"
|
||||
-backend-config="lock_method=POST"
|
||||
-backend-config="unlock_method=DELETE"
|
||||
-backend-config="retry_wait_min=5"
|
||||
|
||||
format:
|
||||
stage: .pre
|
||||
allow_failure: false
|
||||
script:
|
||||
- cd $WORKDIR
|
||||
- tofu fmt -diff -check -write=false
|
||||
rules:
|
||||
- changes:
|
||||
- "infra/terraform/*.tf"
|
||||
|
||||
validate:
|
||||
stage: .pre
|
||||
allow_failure: false
|
||||
extends: .tf-init
|
||||
script:
|
||||
- tofu validate
|
||||
rules:
|
||||
- changes:
|
||||
- "infra/terraform/*.tf"
|
||||
|
||||
plan-infrastructure:
|
||||
stage: plan
|
||||
variables:
|
||||
PLAN: plan.tfplan
|
||||
JSON_PLAN_FILE: tfplan.json
|
||||
ENVIRONMENT_NAME: infra
|
||||
allow_failure: false
|
||||
extends: .tf-init
|
||||
script:
|
||||
- apk add --update curl jq
|
||||
- alias convert_report="jq -r '([.resource_changes[].change.actions?]|flatten)|{\"create\":(map(select(.==\"create\"))|length),\"update\":(map(select(.==\"update\"))|length),\"delete\":(map(select(.==\"delete\"))|length)}'"
|
||||
- tofu plan -out=$PLAN $ARGUMENTS
|
||||
- tofu show --json $PLAN | jq -r '([.resource_changes[].change.actions?]|flatten)|{"create":(map(select(.=="create"))|length),"update":(map(select(.=="update"))|length),"delete":(map(select(.=="delete"))|length)}' > $JSON_PLAN_FILE
|
||||
artifacts:
|
||||
reports:
|
||||
terraform: $WORKDIR/$JSON_PLAN_FILE
|
||||
needs: ["validate","format"]
|
||||
rules:
|
||||
- changes:
|
||||
- "infra/terraform/*.tf"
|
||||
|
||||
apply-infrastructure:
|
||||
stage: apply
|
||||
variables:
|
||||
ENVIRONMENT_NAME: infra
|
||||
allow_failure: false
|
||||
extends: .tf-init
|
||||
script:
|
||||
- tofu apply -auto-approve $ARGUMENTS
|
||||
rules:
|
||||
- changes:
|
||||
- "infra/terraform/*.tf"
|
||||
when: manual
|
||||
needs: ["plan-infrastructure"]
|
||||
|
||||
destroy-infrastructure:
|
||||
stage: destroy
|
||||
variables:
|
||||
ENVIRONMENT_NAME: infra
|
||||
allow_failure: false
|
||||
extends: .tf-init
|
||||
script:
|
||||
- tofu destroy -auto-approve $ARGUMENTS
|
||||
rules:
|
||||
- changes:
|
||||
- "infra/terraform/*.tf"
|
||||
when: manual
|
||||
needs: ["plan-infrastructure"]
|
||||
@@ -1,12 +0,0 @@
|
||||
apiVersion: v2
|
||||
name: argocd
|
||||
description: A Helm chart for Kubernetes
|
||||
type: application
|
||||
|
||||
version: 0.1.0
|
||||
appVersion: "1.16.0"
|
||||
|
||||
dependencies:
|
||||
- name: argo-cd
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
version: 6.11.1
|
||||
@@ -1,79 +0,0 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: argocd
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: infra/argocd
|
||||
destination:
|
||||
namespace: argocd
|
||||
name: in-cluster
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
---
|
||||
|
||||
#apiVersion: external-secrets.io/v1beta1
|
||||
#kind: ExternalSecret
|
||||
#metadata:
|
||||
# name: vault-argocd
|
||||
# labels:
|
||||
# app.kubernetes.io/part-of: argocd
|
||||
#spec:
|
||||
# secretStoreRef:
|
||||
# name: vault
|
||||
# kind: ClusterSecretStore
|
||||
# target:
|
||||
# name: client-secret
|
||||
# data:
|
||||
# - secretKey: clientSecret
|
||||
# remoteRef:
|
||||
# key: secrets/argocd/authentik
|
||||
# property: clientsecret
|
||||
|
||||
---
|
||||
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: argocd-ingress
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-production
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`argocd.infra.durp.info`)
|
||||
#middlewares:
|
||||
# - name: whitelist
|
||||
# namespace: traefik
|
||||
kind: Rule
|
||||
services:
|
||||
- name: argocd-server
|
||||
port: 443
|
||||
scheme: https
|
||||
tls:
|
||||
secretName: argocd-tls
|
||||
|
||||
---
|
||||
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: argocd-tls
|
||||
spec:
|
||||
secretName: argocd-tls
|
||||
issuerRef:
|
||||
name: vault-issuer
|
||||
kind: ClusterIssuer
|
||||
commonName: "argocd.infra.durp.info"
|
||||
dnsNames:
|
||||
- "argocd.infra.durp.info"
|
||||
@@ -1,21 +0,0 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: cert-manager
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: infra/cert-manager
|
||||
destination:
|
||||
namespace: cert-manager
|
||||
name: in-cluster
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: internal-proxy
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: dmz/internalproxy
|
||||
destination:
|
||||
namespace: internalproxy
|
||||
name: dmz
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: metallb-system
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: infra/metallb-system
|
||||
destination:
|
||||
namespace: metallb-system
|
||||
name: in-cluster
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
---
|
||||
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: metallb-system-dmz
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: dmz/metallb-system
|
||||
destination:
|
||||
namespace: metallb-system
|
||||
name: dmz
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: traefik
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: infra/traefik
|
||||
destination:
|
||||
namespace: traefik
|
||||
name: in-cluster
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
---
|
||||
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: traefik-dmz
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://gitlab.com/developerdurp/homelab.git
|
||||
targetRevision: main
|
||||
path: dmz/traefik
|
||||
destination:
|
||||
namespace: traefik
|
||||
name: dmz
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user