Compare commits
123 Commits
65148505bd
...
renovate/g
Author | SHA1 | Date | |
---|---|---|---|
cf3b247b61 | |||
b056354f20 | |||
d053452ba1 | |||
1a34c57cf7 | |||
991bc7b7fe | |||
9c5f8a0daa | |||
ce8e5ad849 | |||
2bf0f95105 | |||
c90f84c5a4 | |||
39ed7b7cb1 | |||
af5e343156 | |||
8aee3d5bb0 | |||
3f060684af | |||
90ee70bdef | |||
e151807d90 | |||
f071b695ea | |||
faa091b8ac | |||
118c384ad7 | |||
f553351c5a | |||
6eb7e56134 | |||
80fbeb9aaa | |||
3a041a1e1e | |||
06ef30c97d | |||
71991a1b34 | |||
b40520f11b | |||
040387339e | |||
647e50ddf9 | |||
3db60cda74 | |||
ff87e5e8ef | |||
7e24f9e097 | |||
bfcbb7ddbf | |||
e4bf53ddc9 | |||
ac4d3b56e6 | |||
224a384725 | |||
efd310e1e9 | |||
9cb9156d4a | |||
1fb2cedf28 | |||
6318c34ad1 | |||
6639673c00 | |||
861bff92ed | |||
7435a89d40 | |||
0bf065ffc9 | |||
df3a8eac72 | |||
954b80c508 | |||
5b5dd72b6a | |||
8878f764a3 | |||
d0fcc1d6dc | |||
7728f16fa6 | |||
dd923ae991 | |||
bcfc194b4d | |||
6bb410d8d0 | |||
cb18fc6991 | |||
60cad84180 | |||
3d88cad982 | |||
c44e24d2f4 | |||
767985e5d5 | |||
602155cf53 | |||
9909e7fa73 | |||
fbbdde5f1e | |||
a97fbbfa00 | |||
b53eb881ad | |||
d6917fece0 | |||
402959e354 | |||
5eb53de71c | |||
99cb42c744 | |||
7b8ab87016 | |||
f35129f8d2 | |||
4a2c9cf796 | |||
b1a77f3ebb | |||
1b2e2f48b2 | |||
c5309a0d13 | |||
bbf84a1fd2 | |||
412a0cdc64 | |||
e6d3433ed1 | |||
99f032e5ae | |||
d8b49d515c | |||
2e1b2ebace | |||
8ea5fa1b4b | |||
e9fca673ca | |||
ed63a5a6f0 | |||
f65f2fdc53 | |||
8996017e2c | |||
138f7b2982 | |||
1ac657d4f7 | |||
abda2d20e7 | |||
4a07c274a6 | |||
a1b5e6b50f | |||
a627d8ced3 | |||
61fb1964c6 | |||
cb6fca88ab | |||
0cb82395a2 | |||
1b6562ba38 | |||
b89a0cd7c9 | |||
0cc06ea7fd | |||
8a0e065039 | |||
14f7a519c6 | |||
89cf9d9cc6 | |||
bb53d8c834 | |||
f7aac46e00 | |||
fa06f7ef80 | |||
d531b1207e | |||
30dba403ce | |||
faa9d3ee94 | |||
4a5816859a | |||
21ace17373 | |||
d9029563bc | |||
aaefe79301 | |||
f8e3c15a12 | |||
39a98d5ee9 | |||
1fa9465b40 | |||
937b11ca35 | |||
3146a164a3 | |||
02e7b17f8a | |||
9bbc5f246e | |||
d3400bcdbc | |||
7a0bade84f | |||
cea3b46673 | |||
cd9b8a1b2c | |||
608faea440 | |||
fbca780a86 | |||
0dbb674269 | |||
0caf36a99f | |||
594db40db0 |
@ -14,10 +14,6 @@ insert_final_newline = true
|
|||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
[*.md]
|
|
||||||
indent_size = 4
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[{Dockerfile,*.bash,*.sh}]
|
[{Dockerfile,*.bash,*.sh}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
@ -4,24 +4,25 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main, master]
|
branches: [main, master]
|
||||||
paths:
|
paths:
|
||||||
- "apps/**"
|
- "kubernetes/apps/production/**"
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "apps/**"
|
- "kubernetes/apps/production/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
scan:
|
scan:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.23.1"
|
go-version: "1.23.1"
|
||||||
|
|
||||||
- name: Cache Go modules
|
- name: Cache Go modules
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
@ -36,4 +37,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Scan yaml files with kube-linter
|
- name: Scan yaml files with kube-linter
|
||||||
run: |
|
run: |
|
||||||
kube-linter lint ./apps
|
kube-linter lint ./kubernetes/apps/production --config kubelinter-config.yaml
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
kubeconfig
|
kubeconfig
|
||||||
secrets.yaml
|
secrets.yaml
|
||||||
|
talos-cluster
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
checks:
|
|
||||||
include: []
|
|
||||||
exclude: []
|
|
45
README.md
45
README.md
@ -1,43 +1,42 @@
|
|||||||
<!-- PROJECT LOGO -->
|
<!-- PROJECT LOGO -->
|
||||||
<br />
|
<br />
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://github.com/github_username/repo_name">
|
<a href="https://git.fascinated.cc/Fascinated/homelab">
|
||||||
<img src="images/logo.png" alt="Logo" width="80" height="80">
|
<img src="images/logo.png" alt="Logo" width="80" height="80">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<h3 align="center">Homelab</h3>
|
<h3 align="center">Homelab</h3>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
Welcome to the configuration for my homelab.
|
Welcome to the configuration for my homelab.
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<a href="https://git.fascinated.cc/Fascinated/home-ops/issues">Report Issue</a>
|
||||||
<a href="https://git.fascinated.cc/Fascinated/home-ops/issues">Report Bug</a>
|
|
||||||
·
|
·
|
||||||
<a href="https://git.fascinated.cc/Fascinated/home-ops/issues">Request Something</a>
|
<a href="https://git.fascinated.cc/Fascinated/home-ops/issues">Request Feature/Service</a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### Infrastructure
|
### Infrastructure
|
||||||
|
|
||||||
- ![Kubernetes][k8s]
|
- [Kubernetes][k8s] - Isn't it obvious?
|
||||||
- ![Helm][helm]
|
- [Helm][helm] - Easily deploy and manage Kubernetes applications
|
||||||
- ![Traefik][traefik]
|
- [Traefik][traefik] - Web reverse proxy
|
||||||
- ![Cert Manager][cert-manager]
|
- [Cert Manager][cert-manager] - Generates LetsEncrypt certificates
|
||||||
- ![Metallb][metallb]
|
- [Metallb][metallb] - Load Balancer
|
||||||
- ![NFS][nfs]
|
- [NFS][nfs] - Remote Storage for PVs
|
||||||
- ![FluxCD][fluxcd]
|
- [FluxCD][fluxcd] - GitOps
|
||||||
|
- [Spegel][spegel] - Local Docker registry cache
|
||||||
|
- [Eraser][eraser] - Automated cleanup of old docker images
|
||||||
|
|
||||||
### Services
|
### Services
|
||||||
|
|
||||||
See [services](./apps/production/) for a list of services that I use in my homelab.
|
See [services](./kubernetes/apps/production/) for a list of services that I use in my homelab.
|
||||||
|
|
||||||
<!-- TODO -->
|
<!-- TODO -->
|
||||||
|
|
||||||
## Todo
|
## Todo
|
||||||
|
|
||||||
- [ ] Hashicorp Vault & Consul
|
- [ ] Setup Grafana and Traefik metrics
|
||||||
- [ ] DroneCI
|
|
||||||
|
|
||||||
### Backlog
|
### Backlog
|
||||||
|
|
||||||
@ -63,10 +62,12 @@ Don't forget to give the project a star! Thanks again!
|
|||||||
<!-- MARKDOWN LINKS & IMAGES -->
|
<!-- MARKDOWN LINKS & IMAGES -->
|
||||||
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
|
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
|
||||||
|
|
||||||
[fluxcd]: https://fluxcd.io
|
[fluxcd]: https://fluxcd.io/
|
||||||
[k8s]: https://kubernetes.io
|
[k8s]: https://kubernetes.io/
|
||||||
[helm]: https://helm.sh
|
[helm]: https://helm.sh/
|
||||||
[traefik]: https://traefik.io
|
[traefik]: https://traefik.io/
|
||||||
[cert-manager]: https://cert-manager.io
|
[cert-manager]: https://cert-manager.io/
|
||||||
[metallb]: https://metallb.org
|
[metallb]: https://metallb.org/
|
||||||
[nfs]: https://nfs.fascinated.cc
|
[nfs]: https://nfs.fascinated.cc/
|
||||||
|
[spegel]: https://github.com/spegel-org/spegel/
|
||||||
|
[eraser]: https://github.com/eraser-dev/eraser/
|
||||||
|
@ -1,154 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: flyimg-config
|
|
||||||
namespace: public-services
|
|
||||||
data:
|
|
||||||
parameters.yml: |
|
|
||||||
---
|
|
||||||
# Debug
|
|
||||||
debug: false
|
|
||||||
|
|
||||||
# Home page title
|
|
||||||
home_page_title: Flyimg
|
|
||||||
|
|
||||||
# Number of days for header cache expires `max_age`
|
|
||||||
header_cache_days: 365
|
|
||||||
|
|
||||||
# To enable the Cleanup Cronjob to purge the var/tmp folder
|
|
||||||
enable_cronjob_cleanup: true
|
|
||||||
|
|
||||||
# The cronjob interval to cleanup the var/tmp folder
|
|
||||||
cronjob_cleanup_interval: "0 */5 * * *"
|
|
||||||
|
|
||||||
# Options separator
|
|
||||||
# When changing this value, you should change the OPTIONS_SEPARATOR value in web/js/main.js!
|
|
||||||
options_separator: ','
|
|
||||||
|
|
||||||
# Security: Signature generation
|
|
||||||
# Security key
|
|
||||||
security_key: ''
|
|
||||||
# Secret Initialization vector(IV)
|
|
||||||
security_iv: ''
|
|
||||||
|
|
||||||
# Restrict domains, false by default
|
|
||||||
restricted_domains: false
|
|
||||||
|
|
||||||
# If restricted_domains is enabled, put whitelist domains here
|
|
||||||
whitelist_domains:
|
|
||||||
- domain-1.com
|
|
||||||
- domain-2.com
|
|
||||||
|
|
||||||
# Default storage system is local, to use AWS S3, change this param to s3
|
|
||||||
storage_system: local
|
|
||||||
|
|
||||||
# In case storage_system: s3, you need to add those AWS S3 parameters:
|
|
||||||
aws_s3:
|
|
||||||
access_id: ''
|
|
||||||
secret_key: ''
|
|
||||||
region: 'eu-central-1'
|
|
||||||
bucket_name: ''
|
|
||||||
|
|
||||||
# Number of threads for Imagemagick to use
|
|
||||||
thread: 1
|
|
||||||
|
|
||||||
# For Avif format: conversion speed parameter for the HEIF library.
|
|
||||||
heic_speed: 8
|
|
||||||
|
|
||||||
# Read source image timeout in seconds
|
|
||||||
source_image_request_timeout: 5
|
|
||||||
|
|
||||||
# When set to true the generated image will be deleted from the cache in web/upload and served directly in the response
|
|
||||||
disable_cache: false
|
|
||||||
|
|
||||||
# When supported by the browser, AVIF format will be served as default output
|
|
||||||
enable_avif: true
|
|
||||||
|
|
||||||
# When supported by the browser, Webp format will be served as default output (after checking AVIF support)
|
|
||||||
enable_webp: true
|
|
||||||
|
|
||||||
# Extra options for the header sent to source image server, as some servers requires the User-Agent.
|
|
||||||
header_extra_options:
|
|
||||||
- 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201'
|
|
||||||
|
|
||||||
# List of request header to forward to source image server (example Authorization)
|
|
||||||
forward_request_headers: []
|
|
||||||
|
|
||||||
# Keys used in url to match options. Ex: q_80,w_200,h_100
|
|
||||||
options_keys:
|
|
||||||
q: quality
|
|
||||||
o: output
|
|
||||||
unsh: unsharp
|
|
||||||
sh: sharpen
|
|
||||||
blr: blur
|
|
||||||
fc: face-crop
|
|
||||||
fcp: face-crop-position
|
|
||||||
fb: face-blur
|
|
||||||
w: width
|
|
||||||
h: height
|
|
||||||
c: crop
|
|
||||||
bg: background
|
|
||||||
st: strip
|
|
||||||
ao: auto-orient
|
|
||||||
rz: resize
|
|
||||||
g: gravity
|
|
||||||
f: filter
|
|
||||||
r: rotate
|
|
||||||
sc: scale
|
|
||||||
sf: sampling-factor
|
|
||||||
rf: refresh
|
|
||||||
smc: smart-crop
|
|
||||||
ett: extent
|
|
||||||
par: preserve-aspect-ratio
|
|
||||||
pns: preserve-natural-size
|
|
||||||
webpl: webp-lossless
|
|
||||||
gf: gif-frame
|
|
||||||
e: extract
|
|
||||||
p1x: extract-top-x
|
|
||||||
p1y: extract-top-y
|
|
||||||
p2x: extract-bottom-x
|
|
||||||
p2y: extract-bottom-y
|
|
||||||
pdfp: pdf-page-number
|
|
||||||
tm: time
|
|
||||||
clsp: colorspace
|
|
||||||
mnchr: monochrome
|
|
||||||
|
|
||||||
# Default options values
|
|
||||||
default_options:
|
|
||||||
quality: 70
|
|
||||||
output: webp
|
|
||||||
unsharp: null
|
|
||||||
sharpen: null
|
|
||||||
blur: null
|
|
||||||
face-crop: 0
|
|
||||||
face-crop-position: 0
|
|
||||||
face-blur: 0
|
|
||||||
width: null
|
|
||||||
height: null
|
|
||||||
crop: null
|
|
||||||
background: null
|
|
||||||
strip: 1
|
|
||||||
auto-orient: 0
|
|
||||||
resize: null
|
|
||||||
gravity: Center
|
|
||||||
filter: Lanczos
|
|
||||||
rotate: null
|
|
||||||
scale: null
|
|
||||||
sampling-factor: 1x1
|
|
||||||
refresh: false
|
|
||||||
smart-crop: false
|
|
||||||
extent: null
|
|
||||||
preserve-aspect-ratio: 1
|
|
||||||
preserve-natural-size: 1
|
|
||||||
webp-lossless: 0
|
|
||||||
gif-frame: 0
|
|
||||||
extract: null
|
|
||||||
extract-top-x: null
|
|
||||||
extract-top-y: null
|
|
||||||
extract-bottom-x: null
|
|
||||||
extract-bottom-y: null
|
|
||||||
pdf-page-number: 1
|
|
||||||
time: '00:00:01'
|
|
||||||
colorspace: 'sRGB'
|
|
||||||
monochrome: null
|
|
30
common/seal-secret.sh
Normal file
30
common/seal-secret.sh
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Function to seal a Kubernetes secret
|
||||||
|
seal_secret() {
|
||||||
|
local input_file="$1"
|
||||||
|
if [[ -z "$input_file" ]]; then
|
||||||
|
echo "Usage: seal <path-to-secret-file>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f "$input_file" ]]; then
|
||||||
|
echo "Error: File '$input_file' does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local output_file="$(dirname "$input_file")/sealed-$(basename "$input_file")"
|
||||||
|
|
||||||
|
echo "Sealing secret from '$input_file'..."
|
||||||
|
kubeseal --format=yaml < "$input_file" > "$output_file"
|
||||||
|
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo "Success! Sealed secret created at '$output_file'"
|
||||||
|
else
|
||||||
|
echo "Error: Failed to seal the secret."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Call the function with the provided argument
|
||||||
|
seal_secret "$1"
|
3
kubelinter-config.yaml
Normal file
3
kubelinter-config.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
checks:
|
||||||
|
include: []
|
||||||
|
exclude: ["run-as-non-root", "no-read-only-root-fs"]
|
13
kubernetes/apps/disabled/drone/kustomization.yaml
Normal file
13
kubernetes/apps/disabled/drone/kustomization.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: drone-ci
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- ./server/sealed-secrets.yaml
|
||||||
|
- ./server/pvc.yaml
|
||||||
|
- ./server/server-deployment.yaml
|
||||||
|
- ./server/service.yaml
|
||||||
|
- ./server/ingress.yaml
|
||||||
|
- ./runner/runner-deployment.yaml
|
||||||
|
- ./runner/rbac.yaml
|
7
kubernetes/apps/disabled/drone/namespace.yaml
Normal file
7
kubernetes/apps/disabled/drone/namespace.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: drone-ci
|
||||||
|
labels:
|
||||||
|
pod-security.kubernetes.io/enforce: privileged
|
70
kubernetes/apps/disabled/drone/runner/rbac.yaml
Normal file
70
kubernetes/apps/disabled/drone/runner/rbac.yaml
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
kind: Role
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: drone
|
||||||
|
namespace: drone-ci
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
- pods/log
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: drone
|
||||||
|
namespace: drone-ci
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: default
|
||||||
|
namespace: drone-ci
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: drone
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: drone-deploy-sa
|
||||||
|
namespace: public-services
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
namespace: public-services
|
||||||
|
name: drone-deployment-manager
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments"]
|
||||||
|
verbs: ["get", "list", "create", "update", "delete"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: drone-deployment-manager-binding
|
||||||
|
namespace: public-services
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: drone-deploy-sa
|
||||||
|
namespace: public-services
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: drone-deployment-manager
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
41
kubernetes/apps/disabled/drone/runner/runner-deployment.yaml
Normal file
41
kubernetes/apps/disabled/drone/runner/runner-deployment.yaml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: drone-runner
|
||||||
|
namespace: drone-ci
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: drone
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: drone
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: drone
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: runner
|
||||||
|
image: drone/drone-runner-kube:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 75Mi
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 200Mi
|
||||||
|
env:
|
||||||
|
- name: DRONE_RPC_HOST
|
||||||
|
value: drone.fascinated.cc
|
||||||
|
- name: DRONE_RPC_PROTO
|
||||||
|
value: https
|
||||||
|
- name: DRONE_NAMESPACE_DEFAULT
|
||||||
|
value: drone-ci
|
||||||
|
- name: DRONE_RPC_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: drone-secret
|
||||||
|
key: DRONE_RPC_SECRET
|
22
kubernetes/apps/disabled/drone/server/ingress.yaml
Normal file
22
kubernetes/apps/disabled/drone/server/ingress.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: drone-ci-ingress
|
||||||
|
namespace: drone-ci
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-external
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`drone.fascinated.cc`)
|
||||||
|
kind: Rule
|
||||||
|
middlewares:
|
||||||
|
- name: default-headers
|
||||||
|
namespace: traefik
|
||||||
|
services:
|
||||||
|
- name: drone-service
|
||||||
|
port: 80
|
||||||
|
tls:
|
||||||
|
secretName: fascinated-cc
|
12
kubernetes/apps/disabled/drone/server/pvc.yaml
Normal file
12
kubernetes/apps/disabled/drone/server/pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: drone-pvc
|
||||||
|
namespace: drone-ci
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
18
kubernetes/apps/disabled/drone/server/sealed-secrets.yaml
Normal file
18
kubernetes/apps/disabled/drone/server/sealed-secrets.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
apiVersion: bitnami.com/v1alpha1
|
||||||
|
kind: SealedSecret
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: drone-secret
|
||||||
|
namespace: drone-ci
|
||||||
|
spec:
|
||||||
|
encryptedData:
|
||||||
|
DRONE_GITEA_CLIENT_ID: AgBvs/BRqipwanwhehkG+efGyDYwbvkaYkOSsoW6PCqiKx3GX7wFUnSEEljoTLn8qCx7GKGT73KBcK6ItwFisAlJwFHTC7DtgCSJzpHBwHvbCWs+QtKumHCtgnj2XCHGs8yt4o9I9KClGl6mqKFfWAWiDAoBcY6YHCM5l23jh/ipglT1jcRGm+dxouZ5QCCNjHSEN/SD0wVv4bCajRmZ7fwOrJ9lsJFhfhu6hvm0UsFggsrtOGavk0TzwzUoeZPvGM7LOhFk5qAFFdJAMucErcfKlEKcxfPd4V0rwJTNaSQqSL01iEQLSdgwQqsypJxKpKz5D2aByEiYHe4HvpFzm0KnwaOth7MO6gmnp7+mb008MyUL4KSdcj82z76YjD5S9uU3XaeuxlEWrAU1obGWNzFU5E8a9L0iJIoOhH33kwcYhUFjloZ3S2mL0gyl2EpZ3tIXlXpjr8B0WXC/bgWOk5kq+veIaM2+jeTge7iLXhS/8rtxAy7tUk22jEK9ecXT5zqlLrTIpcJz3UMpKTh5N397vIGfRNJ1DoRPCL/UHXWTleNBQTijhGWDb+JcT70makwroXYOLQorZXOVbRLWCC/b+i9Aq8yVNhyBUJy0SR1qhkO4tCgZ5/E5+mXFJvjkH64JYHCyFDI/KPjzefby2HSINjTR1AD5mW+KKOfINMCffFD7Zy90jcd9iViU9JE4coqBRPG4v1lmoGPv++fnJEC5ZNoWKy2FMTkf5rt0cPtuBSsP8CU=
|
||||||
|
DRONE_GITEA_CLIENT_SECRET: AgBBub2TZ2xb6oVxTVHWZkdiVMo9zFNUrYxL0Iw1YeUFgZmJjkk/CP6UCxlCJbnzOj+b//HbYn1w8sS3vzGK82be8GgfkgI4/hTHHll3GSjEbdaTn7xEL/XJrp+JyVvX7bQNPLCkTsaxIrz7dh7kHUvcgRxOoSsFKHj73hjf27lHa+Qa89fDO5Zb1PjUSeT4IlAHlUuQraKx0viAoy8uEX6OyX3lhX5Aa2NQkbLRYCd8T7+IW0lyKvwwOpOdVH/38G8eAVXmADdKuNyIoq9++bYnUMMFMBj6OdMp3xNyGcEkuKlMI9+DaT29tmOgvDiWog/E2Hg0IERh4z5Dr2p4oJyT7b1N1ynRiwfndLp2di9d+nrzG5STf9NRKOK8U+NWTRcXv4JRkKyIDAi0j4eoC9cVyKGe341A4os3kTg9dky0RL+Q7+NWCWUYFAXIkU5cRHgwW7LTkv96cduerVT8YF3sxvu4FlJgHDNKvNuxFAhPOCwoOozPX8JbhhlEPfxWZ0s9B7QgRdNm/GY6RxV0Dl7F+IhzSxA/PrMxYUzuhenW+K9bIJd5dR73NfTlxbTdt/tM7DpVb00DrHx2Y2BOME1H76AXrRr+MZdWz46XHBSh6yeTMf5D3PRU8SPDEqSUrODEnjlEnJCkjYoxLOYAjXa/5dyZnyxIpS4WDMIB0/aXde0CX83fJ9C5KM6P36kKUZL8VOiJ5HA4Fzz/45X0wjEOkccuIHElWzPzOcW5geLc4vZRNiJa5ydLoktnMObqf7Iy3Jxrlg3SGg==
|
||||||
|
DRONE_RPC_SECRET: AgA96+L9/gvS8PkIfwDBnpBcagdL+eE1wyTqvMnG2pIGMhy7li10yvra/B1ptsuBak1Aab7WNZvNR5zUf2b2QVEk9Rz0q7D0ZqVFP0U6JiILPJ6p61K0GC+Lh5MKI4yzFmYrT+hfk6HkKGy5dEtJ+JoY2aT6Mn26pIs3dEnKlIObxxR7rQzlKuV2yrkguHnhV38DCvsMkMYaF8G1IiwfDsHJ1JcwXjHlRtkl02v/Arc1sGZi/2lXZpqXMW3UFb2YGRGP6rgeXcsGeNslIkMJkJaUSZdI3HS0ufHwSbJJaiug370E/ZkHChpaABibAEImoblgrRD2IPbwlNymiZdAqXpwjj++sAgoHvBDUkFk48TkIXb0uxOmVFeevgxJgYyXP9DPqJVPj+CtSRxWle7pAODYpmf1avn4bOB4DXdJVR1IR9si8OYgTZW3Fz4Lxh8naOuaTrnyzJosJBrB3Nks9q96IZQHitnzBJZKEuEjhfp6oAzkgaYPej4q2EAy8DoIb8kltFyaA+f+0s+9ipQeXL5OKhfCzNq6vBFsOqn3g5wHse/86NH3FHZnHEmqlOw/4N18gsj+g09TqJSeDVm/Tbzq+eYyPV6KKNN2F/890VAieUo+AyoCznjjv85AXHjA5gfj3JQj7zczW7CyQolcXxvcxoE9+/7fiy6sDQgFciDo1qswFRnYpVML4Y/UBb3howbVMONAt/fSnytT/DB5EH6FLKBxFOzmM9yuTacu4jo1HQ==
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: drone-secret
|
||||||
|
namespace: drone-ci
|
||||||
|
type: Opaque
|
62
kubernetes/apps/disabled/drone/server/server-deployment.yaml
Normal file
62
kubernetes/apps/disabled/drone/server/server-deployment.yaml
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: drone-server
|
||||||
|
namespace: drone-ci
|
||||||
|
labels:
|
||||||
|
app: drone
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: drone
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: drone
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: drone
|
||||||
|
image: drone/drone:2
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
- containerPort: 443
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 75Mi
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 200Mi
|
||||||
|
env:
|
||||||
|
- name: DRONE_GITEA_SERVER
|
||||||
|
value: "https://git.fascinated.cc"
|
||||||
|
- name: DRONE_GITEA_CLIENT_ID
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: drone-secret
|
||||||
|
key: DRONE_GITEA_CLIENT_ID
|
||||||
|
- name: DRONE_GITEA_CLIENT_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: drone-secret
|
||||||
|
key: DRONE_GITEA_CLIENT_SECRET
|
||||||
|
- name: DRONE_RPC_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: drone-secret
|
||||||
|
key: DRONE_RPC_SECRET
|
||||||
|
- name: DRONE_SERVER_HOST
|
||||||
|
value: "drone.fascinated.cc"
|
||||||
|
- name: DRONE_SERVER_PROTO
|
||||||
|
value: "https"
|
||||||
|
- name: DRONE_REGISTRATION_CLOSED
|
||||||
|
value: "true"
|
||||||
|
volumeMounts:
|
||||||
|
- name: drone-data
|
||||||
|
mountPath: /data
|
||||||
|
volumes:
|
||||||
|
- name: drone-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: drone-pvc
|
19
kubernetes/apps/disabled/drone/server/service.yaml
Normal file
19
kubernetes/apps/disabled/drone/server/service.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: drone-service
|
||||||
|
namespace: drone-ci
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
- name: https
|
||||||
|
port: 443
|
||||||
|
targetPort: 443
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
app: drone
|
25
kubernetes/apps/disabled/searxng/config.yaml
Normal file
25
kubernetes/apps/disabled/searxng/config.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: searxng-config
|
||||||
|
data:
|
||||||
|
limiter.toml: |
|
||||||
|
# This configuration file updates the default configuration file
|
||||||
|
# See https://github.com/searxng/searxng/blob/master/searx/limiter.toml
|
||||||
|
|
||||||
|
[botdetection.ip_limit]
|
||||||
|
# activate link_token method in the ip_limit method
|
||||||
|
link_token = true
|
||||||
|
|
||||||
|
settings.yml: |
|
||||||
|
# see https://docs.searxng.org/admin/settings/settings.html#settings-use-default-settings
|
||||||
|
use_default_settings: true
|
||||||
|
server:
|
||||||
|
# base_url is defined in the SEARXNG_BASE_URL environment variable, see .env and docker-compose.yml
|
||||||
|
limiter: true # can be disabled for a private instance
|
||||||
|
image_proxy: false
|
||||||
|
ui:
|
||||||
|
static_use_hash: true
|
||||||
|
redis:
|
||||||
|
url: redis://searxng-redis:6379/0
|
47
kubernetes/apps/disabled/searxng/deployment.yaml
Normal file
47
kubernetes/apps/disabled/searxng/deployment.yaml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: searxng
|
||||||
|
namespace: public-services
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: searxng
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: searxng
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: searxng
|
||||||
|
image: docker.io/searxng/searxng:2024.9.23-6be56aee1
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: SEARXNG_BASE_URL
|
||||||
|
value: "https://search.fascinated.cc"
|
||||||
|
- name: SEARXNG_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: searxng-secret
|
||||||
|
key: secret_key
|
||||||
|
volumeMounts:
|
||||||
|
- name: searxng-config-volume
|
||||||
|
mountPath: /etc/searxng/limiter.toml
|
||||||
|
subPath: limiter.toml
|
||||||
|
- name: searxng-config-volume
|
||||||
|
mountPath: /etc/searxng/settings.yml
|
||||||
|
subPath: settings.yml
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024M"
|
||||||
|
cpu: "500m"
|
||||||
|
volumes:
|
||||||
|
- name: searxng-config-volume
|
||||||
|
configMap:
|
||||||
|
name: searxng-config
|
21
kubernetes/apps/disabled/searxng/ingress.yaml
Normal file
21
kubernetes/apps/disabled/searxng/ingress.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: searxng-ingress
|
||||||
|
namespace: public-services
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-external
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`search.fascinated.cc`)
|
||||||
|
kind: Rule
|
||||||
|
middlewares:
|
||||||
|
- name: default-headers
|
||||||
|
namespace: traefik
|
||||||
|
services:
|
||||||
|
- name: searxng-service
|
||||||
|
port: 8080
|
||||||
|
tls:
|
||||||
|
secretName: fascinated-cc
|
13
kubernetes/apps/disabled/searxng/kustomization.yaml
Normal file
13
kubernetes/apps/disabled/searxng/kustomization.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: public-services
|
||||||
|
resources:
|
||||||
|
- ./redis/pvc.yaml
|
||||||
|
- ./redis/redis.yaml
|
||||||
|
- ./redis/service.yaml
|
||||||
|
- config.yaml
|
||||||
|
- sealed-secrets.yaml
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
- ingress.yaml
|
12
kubernetes/apps/disabled/searxng/redis/pvc.yaml
Normal file
12
kubernetes/apps/disabled/searxng/redis/pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: searxng-redis-pvc
|
||||||
|
namespace: public-services
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
33
kubernetes/apps/disabled/searxng/redis/redis.yaml
Normal file
33
kubernetes/apps/disabled/searxng/redis/redis.yaml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: searxng-redis
|
||||||
|
namespace: public-services
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: searxng-redis
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: searxng-redis
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: searxng-redis
|
||||||
|
image: docker.io/valkey/valkey:8-alpine
|
||||||
|
command:
|
||||||
|
["valkey-server", "--save", "30", "1", "--loglevel", "warning"]
|
||||||
|
ports:
|
||||||
|
- containerPort: 6379
|
||||||
|
volumeMounts:
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
volumes:
|
||||||
|
- name: redis-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: searxng-redis-pvc
|
13
kubernetes/apps/disabled/searxng/redis/service.yaml
Normal file
13
kubernetes/apps/disabled/searxng/redis/service.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: searxng-redis
|
||||||
|
namespace: public-services
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 6379
|
||||||
|
targetPort: 6379
|
||||||
|
selector:
|
||||||
|
app: searxng-redis
|
16
kubernetes/apps/disabled/searxng/sealed-secrets.yaml
Normal file
16
kubernetes/apps/disabled/searxng/sealed-secrets.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
apiVersion: bitnami.com/v1alpha1
|
||||||
|
kind: SealedSecret
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: searxng-secret
|
||||||
|
namespace: public-services
|
||||||
|
spec:
|
||||||
|
encryptedData:
|
||||||
|
secret_key: AgC0GFaPKSBszjmam9HxhhPIKPj3aTaa7BtMEJJBaPUGRA7wPi/9utkHcQL5MG/1HB2nHwfVmBKQY/nmJaYIZBCE+MGjLljjVED37rNEj6PCTcptA/b27+Rnbn7XxH8Zt19uBZapWf0TO8EZaHu/6B9cYIiThlQ0o5+Im7nwuMoYymQSpxMAAr7O6i5cF4XaehYxiNhP1YfveW34Uit/VCMG8qyVi03YBnxsgUKdMeb8krAL2p5zH15ELSd6CprfYdkB8xTZkFYXxEctKyYywsI6ZEC3G0f2R+lcJ46e19wEEZSaCvT1Nviij/jdt4zafHjdQ+U3ZH69Sc83KwNxKJ3hDRdhM2Nl6wDrftl5IFtMFyk2fwOOPPxd8i096dmMBKzljgNgUYzbH4E3f4LBBjaoW0Nrdgkg0wEJplolfpiZVEOtlCm+Jm9tCxEWGEIkrysuZCv90kmd41fJb+k43/J5oY25gMMzUgqEryjR1fXXexgTQoNd1YKOft6DvWy6jZw/RjZWpwxmBHjtxKx9tbr0kwIx/ZCGAQhZ/4LjYCvmP9axV5h7anBbBgiVMA36BJq6nxg//wJ2GMy4CXlIs1oFpob0zTWOg/aCPwzTfK2GrzYXH6xLFqN1ueTdXSxNjb6qi4aOwOFtmZ9z53ffT/XeKyHVgXsLCt6THc1TJVzaqeHL7eM93RtPWlSezdSf84MfzewokisJd3TD3dDoSzhob43ckHlbFV7lbclzPBUAdw==
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: searxng-secret
|
||||||
|
namespace: public-services
|
||||||
|
type: Opaque
|
13
kubernetes/apps/disabled/searxng/service.yaml
Normal file
13
kubernetes/apps/disabled/searxng/service.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: searxng-service
|
||||||
|
namespace: public-services
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
selector:
|
||||||
|
app: searxng
|
@ -16,11 +16,9 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: flyimg-container
|
- name: flyimg-container
|
||||||
image: flyimg/flyimg:1.4.12
|
image: flyimg/flyimg:1.4.13
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
runAsNonRoot: true
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
resources:
|
resources:
|
||||||
@ -33,13 +31,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: flyimg-storage
|
- name: flyimg-storage
|
||||||
mountPath: /var/www/html/web/uploads
|
mountPath: /var/www/html/web/uploads
|
||||||
- name: config-volume
|
|
||||||
mountPath: /var/www/html/config/parameters.yml
|
|
||||||
subPath: parameters.yml
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: flyimg-storage
|
- name: flyimg-storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: flyimg-pvc
|
claimName: flyimg-pvc
|
||||||
- name: config-volume
|
|
||||||
configMap:
|
|
||||||
name: flyimg-config
|
|
@ -1,7 +1,7 @@
|
|||||||
apiVersion: traefik.io/v1alpha1
|
apiVersion: traefik.io/v1alpha1
|
||||||
kind: IngressRoute
|
kind: IngressRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: capacitor-external-ingress
|
name: capacitor-ingress
|
||||||
namespace: public-services
|
namespace: public-services
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: traefik-external
|
kubernetes.io/ingress.class: traefik-external
|
@ -3,7 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: public-services
|
namespace: public-services
|
||||||
resources:
|
resources:
|
||||||
- config.yaml
|
|
||||||
- pvc.yaml
|
- pvc.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
@ -5,12 +5,12 @@ metadata:
|
|||||||
name: apps
|
name: apps
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 10m0s
|
interval: 5m0s
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- name: infrastructure
|
- name: infrastructure
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
path: ./apps/production
|
path: ./kubernetes/apps/production
|
||||||
prune: true
|
prune: true
|
||||||
wait: true
|
wait: true
|
@ -14258,7 +14258,7 @@ spec:
|
|||||||
resourceFieldRef:
|
resourceFieldRef:
|
||||||
containerName: manager
|
containerName: manager
|
||||||
resource: limits.memory
|
resource: limits.memory
|
||||||
image: ghcr.io/fluxcd/image-automation-controller:v0.38.0
|
image: ghcr.io/fluxcd/image-automation-controller:v0.39.0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
@ -6,12 +6,12 @@ metadata:
|
|||||||
name: flux-system
|
name: flux-system
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 10s
|
interval: 1m0s
|
||||||
ref:
|
ref:
|
||||||
branch: master
|
branch: master
|
||||||
secretRef:
|
secretRef:
|
||||||
name: flux-system
|
name: flux-system
|
||||||
url: https://git.fascinated.cc/fascinated/home-ops.git
|
url: https://git.fascinated.cc/fascinated/homelab.git
|
||||||
---
|
---
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
@ -20,7 +20,7 @@ metadata:
|
|||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 10m0s
|
interval: 10m0s
|
||||||
path: ./clusters/production
|
path: ./kubernetes/clusters/production
|
||||||
prune: true
|
prune: true
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
@ -5,10 +5,10 @@ metadata:
|
|||||||
name: infrastructure
|
name: infrastructure
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 10m0s
|
interval: 5m0s
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
path: ./infrastructure
|
path: ./kubernetes/infrastructure
|
||||||
prune: true
|
prune: true
|
||||||
wait: true
|
wait: true
|
549
kubernetes/infrastructure/eraser/eraser.yaml
Normal file
549
kubernetes/infrastructure/eraser/eraser.yaml
Normal file
@ -0,0 +1,549 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
control-plane: controller-manager
|
||||||
|
name: eraser-system
|
||||||
|
---
|
||||||
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
controller-gen.kubebuilder.io/version: v0.9.0
|
||||||
|
creationTimestamp: null
|
||||||
|
name: imagejobs.eraser.sh
|
||||||
|
spec:
|
||||||
|
group: eraser.sh
|
||||||
|
names:
|
||||||
|
kind: ImageJob
|
||||||
|
listKind: ImageJobList
|
||||||
|
plural: imagejobs
|
||||||
|
singular: imagejob
|
||||||
|
scope: Cluster
|
||||||
|
versions:
|
||||||
|
- name: v1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ImageJob is the Schema for the imagejobs API.
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: ImageJobStatus defines the observed state of ImageJob.
|
||||||
|
properties:
|
||||||
|
deleteAfter:
|
||||||
|
description: Time to delay deletion until
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
desired:
|
||||||
|
description: desired number of pods
|
||||||
|
type: integer
|
||||||
|
failed:
|
||||||
|
description: number of pods that failed
|
||||||
|
type: integer
|
||||||
|
phase:
|
||||||
|
description: job running, successfully completed, or failed
|
||||||
|
type: string
|
||||||
|
skipped:
|
||||||
|
description: number of nodes that were skipped e.g. because they are not a linux node
|
||||||
|
type: integer
|
||||||
|
succeeded:
|
||||||
|
description: number of pods that completed successfully
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- desired
|
||||||
|
- failed
|
||||||
|
- phase
|
||||||
|
- skipped
|
||||||
|
- succeeded
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: true
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
- deprecated: true
|
||||||
|
deprecationWarning: v1alpha1 of the eraser API has been deprecated. Please migrate to v1.
|
||||||
|
name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ImageJob is the Schema for the imagejobs API.
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: ImageJobStatus defines the observed state of ImageJob.
|
||||||
|
properties:
|
||||||
|
deleteAfter:
|
||||||
|
description: Time to delay deletion until
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
desired:
|
||||||
|
description: desired number of pods
|
||||||
|
type: integer
|
||||||
|
failed:
|
||||||
|
description: number of pods that failed
|
||||||
|
type: integer
|
||||||
|
phase:
|
||||||
|
description: job running, successfully completed, or failed
|
||||||
|
type: string
|
||||||
|
skipped:
|
||||||
|
description: number of nodes that were skipped e.g. because they are not a linux node
|
||||||
|
type: integer
|
||||||
|
succeeded:
|
||||||
|
description: number of pods that completed successfully
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- desired
|
||||||
|
- failed
|
||||||
|
- phase
|
||||||
|
- skipped
|
||||||
|
- succeeded
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: false
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
---
|
||||||
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
controller-gen.kubebuilder.io/version: v0.9.0
|
||||||
|
creationTimestamp: null
|
||||||
|
name: imagelists.eraser.sh
|
||||||
|
spec:
|
||||||
|
group: eraser.sh
|
||||||
|
names:
|
||||||
|
kind: ImageList
|
||||||
|
listKind: ImageListList
|
||||||
|
plural: imagelists
|
||||||
|
singular: imagelist
|
||||||
|
scope: Cluster
|
||||||
|
versions:
|
||||||
|
- name: v1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ImageList is the Schema for the imagelists API.
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: ImageListSpec defines the desired state of ImageList.
|
||||||
|
properties:
|
||||||
|
images:
|
||||||
|
description: The list of non-compliant images to delete if non-running.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- images
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: ImageListStatus defines the observed state of ImageList.
|
||||||
|
properties:
|
||||||
|
failed:
|
||||||
|
description: Number of nodes that failed to run the job
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
skipped:
|
||||||
|
description: Number of nodes that were skipped due to a skip selector
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
success:
|
||||||
|
description: Number of nodes that successfully ran the job
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
timestamp:
|
||||||
|
description: Information when the job was completed.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- failed
|
||||||
|
- skipped
|
||||||
|
- success
|
||||||
|
- timestamp
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: true
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
- deprecated: true
|
||||||
|
deprecationWarning: v1alpha1 of the eraser API has been deprecated. Please migrate to v1.
|
||||||
|
name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ImageList is the Schema for the imagelists API.
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: ImageListSpec defines the desired state of ImageList.
|
||||||
|
properties:
|
||||||
|
images:
|
||||||
|
description: The list of non-compliant images to delete if non-running.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- images
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: ImageListStatus defines the observed state of ImageList.
|
||||||
|
properties:
|
||||||
|
failed:
|
||||||
|
description: Number of nodes that failed to run the job
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
skipped:
|
||||||
|
description: Number of nodes that were skipped due to a skip selector
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
success:
|
||||||
|
description: Number of nodes that successfully ran the job
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
timestamp:
|
||||||
|
description: Information when the job was completed.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- failed
|
||||||
|
- skipped
|
||||||
|
- success
|
||||||
|
- timestamp
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: false
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: eraser-controller-manager
|
||||||
|
namespace: eraser-system
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: eraser-imagejob-pods
|
||||||
|
namespace: eraser-system
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: eraser-imagejob-pods-cluster-role
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: eraser-manager-role
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- nodes
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- podtemplates
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- eraser.sh
|
||||||
|
resources:
|
||||||
|
- imagejobs
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- eraser.sh
|
||||||
|
resources:
|
||||||
|
- imagejobs/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- eraser.sh
|
||||||
|
resources:
|
||||||
|
- imagelists
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- eraser.sh
|
||||||
|
resources:
|
||||||
|
- imagelists/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: eraser-imagejob-pods-cluster-rolebinding
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: eraser-imagejob-pods-cluster-role
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: eraser-imagejob-pods
|
||||||
|
namespace: eraser-system
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: eraser-manager-rolebinding
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: eraser-manager-role
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: eraser-controller-manager
|
||||||
|
namespace: eraser-system
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
data:
|
||||||
|
controller_manager_config.yaml: |
|
||||||
|
apiVersion: eraser.sh/v1alpha3
|
||||||
|
kind: EraserConfig
|
||||||
|
manager:
|
||||||
|
runtime:
|
||||||
|
name: containerd
|
||||||
|
address: unix:///run/containerd/containerd.sock
|
||||||
|
otlpEndpoint: ""
|
||||||
|
logLevel: info
|
||||||
|
scheduling:
|
||||||
|
repeatInterval: 24h
|
||||||
|
beginImmediately: true
|
||||||
|
profile:
|
||||||
|
enabled: false
|
||||||
|
port: 6060
|
||||||
|
imageJob:
|
||||||
|
successRatio: 1.0
|
||||||
|
cleanup:
|
||||||
|
delayOnSuccess: 0s
|
||||||
|
delayOnFailure: 24h
|
||||||
|
pullSecrets: [] # image pull secrets for collector/scanner/eraser
|
||||||
|
priorityClassName: "" # priority class name for collector/scanner/eraser
|
||||||
|
nodeFilter:
|
||||||
|
type: exclude # must be either exclude|include
|
||||||
|
selectors:
|
||||||
|
- eraser.sh/cleanup.filter
|
||||||
|
- kubernetes.io/os=windows
|
||||||
|
components:
|
||||||
|
collector:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
repo: ghcr.io/eraser-dev/collector
|
||||||
|
tag: v1.4.0-beta.0
|
||||||
|
request:
|
||||||
|
mem: 25Mi
|
||||||
|
cpu: 7m
|
||||||
|
limit:
|
||||||
|
mem: 500Mi
|
||||||
|
# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#how-pods-with-resource-limits-are-run
|
||||||
|
cpu: 0
|
||||||
|
scanner:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
repo: ghcr.io/eraser-dev/eraser-trivy-scanner # supply custom image for custom scanner
|
||||||
|
tag: v1.4.0-beta.0
|
||||||
|
request:
|
||||||
|
mem: 500Mi
|
||||||
|
cpu: 1000m
|
||||||
|
limit:
|
||||||
|
mem: 2Gi
|
||||||
|
# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#how-pods-with-resource-limits-are-run
|
||||||
|
cpu: 0
|
||||||
|
# The config needs to be passed through to the scanner as yaml, as a
|
||||||
|
# single string. Because we allow custom scanner images, the scanner is
|
||||||
|
# responsible for defining a schema, parsing, and validating.
|
||||||
|
config: |
|
||||||
|
# this is the schema for the provided 'trivy-scanner'. custom scanners
|
||||||
|
# will define their own configuration.
|
||||||
|
cacheDir: /var/lib/trivy
|
||||||
|
dbRepo: ghcr.io/aquasecurity/trivy-db
|
||||||
|
deleteFailedImages: true
|
||||||
|
deleteEOLImages: true
|
||||||
|
vulnerabilities:
|
||||||
|
ignoreUnfixed: true
|
||||||
|
types:
|
||||||
|
- os
|
||||||
|
- library
|
||||||
|
securityChecks:
|
||||||
|
- vuln
|
||||||
|
severities:
|
||||||
|
- CRITICAL
|
||||||
|
- HIGH
|
||||||
|
- MEDIUM
|
||||||
|
- LOW
|
||||||
|
ignoredStatuses:
|
||||||
|
timeout:
|
||||||
|
total: 23h
|
||||||
|
perImage: 1h
|
||||||
|
remover:
|
||||||
|
image:
|
||||||
|
repo: ghcr.io/eraser-dev/remover
|
||||||
|
tag: v1.4.0-beta.0
|
||||||
|
request:
|
||||||
|
mem: 25Mi
|
||||||
|
# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#how-pods-with-resource-limits-are-run
|
||||||
|
cpu: 0
|
||||||
|
limit:
|
||||||
|
mem: 30Mi
|
||||||
|
cpu: 0
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: eraser-manager-config
|
||||||
|
namespace: eraser-system
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
control-plane: controller-manager
|
||||||
|
name: eraser-controller-manager
|
||||||
|
namespace: eraser-system
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
control-plane: controller-manager
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
control-plane: controller-manager
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- --config=/config/controller_manager_config.yaml
|
||||||
|
command:
|
||||||
|
- /manager
|
||||||
|
env:
|
||||||
|
- name: POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: OTEL_SERVICE_NAME
|
||||||
|
value: eraser-manager
|
||||||
|
image: ghcr.io/eraser-dev/eraser-manager:v1.5.0-beta.0
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: 8081
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
periodSeconds: 20
|
||||||
|
name: manager
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /readyz
|
||||||
|
port: 8081
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 30Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 20Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
runAsGroup: 65532
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 65532
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /config
|
||||||
|
name: manager-config
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/os: linux
|
||||||
|
serviceAccountName: eraser-controller-manager
|
||||||
|
terminationGracePeriodSeconds: 10
|
||||||
|
volumes:
|
||||||
|
- configMap:
|
||||||
|
name: eraser-manager-config
|
||||||
|
name: manager-config
|
6
kubernetes/infrastructure/eraser/kustomization.yaml
Normal file
6
kubernetes/infrastructure/eraser/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: eraser-system
|
||||||
|
resources:
|
||||||
|
- eraser.yaml
|
8
kubernetes/infrastructure/fluxci/kustomization.yaml
Normal file
8
kubernetes/infrastructure/fluxci/kustomization.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: flux-system
|
||||||
|
resources:
|
||||||
|
- ./notification/sealed-secrets.yaml
|
||||||
|
- ./notification/reciever.yaml
|
||||||
|
- ./notification/ingress.yaml
|
22
kubernetes/infrastructure/fluxci/notification/ingress.yaml
Normal file
22
kubernetes/infrastructure/fluxci/notification/ingress.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: flux-notifications-ingress
|
||||||
|
namespace: flux-system
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-external
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`flux-notifications.local.fascinated.cc`)
|
||||||
|
kind: Rule
|
||||||
|
middlewares:
|
||||||
|
- name: default-headers
|
||||||
|
namespace: traefik
|
||||||
|
services:
|
||||||
|
- name: notification-controller
|
||||||
|
port: 80
|
||||||
|
tls:
|
||||||
|
secretName: fascinated-cc
|
16
kubernetes/infrastructure/fluxci/notification/reciever.yaml
Normal file
16
kubernetes/infrastructure/fluxci/notification/reciever.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
apiVersion: notification.toolkit.fluxcd.io/v1
|
||||||
|
kind: Receiver
|
||||||
|
metadata:
|
||||||
|
name: webapp
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
type: github
|
||||||
|
events:
|
||||||
|
- "ping"
|
||||||
|
- "push"
|
||||||
|
secretRef:
|
||||||
|
name: notification-secret
|
||||||
|
resources:
|
||||||
|
- kind: GitRepository
|
||||||
|
name: webapp
|
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
apiVersion: bitnami.com/v1alpha1
|
||||||
|
kind: SealedSecret
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: notification-secret
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
encryptedData:
|
||||||
|
token: AgB9gxfRBYdK3njhBAyXkKsFDSxncYLfO33bvV4Rq7hu4H6OM43xseXveMoSN5+Bw9gvjoaIkn/2Z7pUXNCIUwzG+JAtkDDyY25Xkmu53FN96f3ZUFBQyvtPcB3WTai3spki8GABqLUUkRFX3j7j+hBKLLdryKpkv77OSs/rh0K6V+LhtDjedSW+dKaywPA2kwf1jaX4T675fZpe0h5xpiV1KWO+mHyAmF03CgCC2LvnpCze1/6ZToU6EC+hETe2W6r3fDMxffnkggDgDO0hGy6py4ID00TFXd23dMHu/72caUUgFZGgKTkCF5/+AvOPNoVAaZSrs1V9xPPljYyCzDTucV8O7TfrG6tvsyPG74wU+y9R1OAbq/ZWBh8grMB8zfRHNKMbpGnCphcnB98vkZLQXAnlWYpCJOmerkQYBxiMs3l6XBbDPURuyO2/xOJe70XXDQ7BPA7ZsCilNQNSm+xY9U0Uf8g9oycNBhFoy96+b3VMy7VvAl0smsBPu4VuUwGxAJTftAmqT6lBFoordynEcUiL+q/xph7gKEZj6JQtNibrw5p8k1V8MreoWZe2DmeelgDvZcT7QpPgrHDvbCKNeHM2xFlOzgemBK8+/+Qcr9gZAJGQKE8ppUssD5zDECzk76A2mZ7/tJkGQFaFrC5zh7WDnpMfdXDkQac5e6hKFDAvuBckfgcLok8AAMlCeQgDcdwjlnrGXs1ZFYbvf73gIoAJknB9WZ44tM0I7Um3nzlqGXn5GF2S
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: notification-secret
|
||||||
|
namespace: flux-system
|
||||||
|
type: Opaque
|
@ -3,12 +3,16 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- namespaces
|
- namespaces
|
||||||
|
- sealed-secrets
|
||||||
- cert-manager
|
- cert-manager
|
||||||
- crds
|
- crds
|
||||||
- metallb
|
- metallb
|
||||||
|
- fluxci
|
||||||
- nfs
|
- nfs
|
||||||
- traefik
|
- traefik
|
||||||
- capacitor
|
- capacitor
|
||||||
- monitoring
|
- monitoring
|
||||||
- alerting/flux
|
- alerting/flux
|
||||||
|
- eraser
|
||||||
|
- spegel
|
||||||
#- backup
|
#- backup
|
@ -18,7 +18,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: kube-prometheus-stack
|
chart: kube-prometheus-stack
|
||||||
version: "62.7.0"
|
version: "63.0.0"
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: monitoring
|
name: monitoring
|
||||||
@ -56,3 +56,20 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 50Gi
|
storage: 50Gi
|
||||||
|
|
||||||
|
# ServiceMonitor configurations
|
||||||
|
serviceMonitors:
|
||||||
|
node-exporter:
|
||||||
|
metricRelabelings:
|
||||||
|
- action: replace
|
||||||
|
regex: (.*)
|
||||||
|
replacement: $1
|
||||||
|
sourceLabels:
|
||||||
|
- __meta_kubernetes_pod_node_name
|
||||||
|
targetLabel: kubernetes_node
|
||||||
|
kubelet:
|
||||||
|
metricRelabelings:
|
||||||
|
- action: replace
|
||||||
|
sourceLabels:
|
||||||
|
- node
|
||||||
|
targetLabel: instance
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: kube-system
|
||||||
|
resources:
|
||||||
|
- sealed-secrets.yaml
|
28
kubernetes/infrastructure/sealed-secrets/sealed-secrets.yaml
Normal file
28
kubernetes/infrastructure/sealed-secrets/sealed-secrets.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
|
kind: HelmRepository
|
||||||
|
metadata:
|
||||||
|
name: sealed-secrets
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
interval: 12h
|
||||||
|
url: https://bitnami-labs.github.io/sealed-secrets
|
||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: sealed-secrets
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
interval: 30m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: sealed-secrets
|
||||||
|
version: "2.16.1"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: sealed-secrets
|
||||||
|
namespace: kube-system
|
||||||
|
interval: 12h
|
||||||
|
values:
|
||||||
|
fullnameOverride: "sealed-secrets-controller"
|
7
kubernetes/infrastructure/spegel/kustomization.yaml
Normal file
7
kubernetes/infrastructure/spegel/kustomization.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: spegel
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- spegel.yaml
|
7
kubernetes/infrastructure/spegel/namespace.yaml
Normal file
7
kubernetes/infrastructure/spegel/namespace.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: spegel
|
||||||
|
labels:
|
||||||
|
pod-security.kubernetes.io/enforce: privileged
|
42
kubernetes/infrastructure/spegel/spegel.yaml
Normal file
42
kubernetes/infrastructure/spegel/spegel.yaml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
|
kind: HelmRepository
|
||||||
|
metadata:
|
||||||
|
name: spegel
|
||||||
|
namespace: spegel
|
||||||
|
spec:
|
||||||
|
type: "oci"
|
||||||
|
interval: 5m0s
|
||||||
|
url: oci://ghcr.io/spegel-org/helm-charts
|
||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: spegel
|
||||||
|
namespace: spegel
|
||||||
|
spec:
|
||||||
|
interval: 1m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: spegel
|
||||||
|
version: "v0.0.24"
|
||||||
|
interval: 5m
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: spegel
|
||||||
|
values:
|
||||||
|
spegel:
|
||||||
|
containerdRegistryConfigPath: /etc/cri/conf.d/hosts
|
||||||
|
registries:
|
||||||
|
[
|
||||||
|
"https://cgr.dev",
|
||||||
|
"https://docker.io",
|
||||||
|
"https://ghcr.io",
|
||||||
|
"https://quay.io",
|
||||||
|
"https://mcr.microsoft.com",
|
||||||
|
"https://public.ecr.aws",
|
||||||
|
"https://gcr.io",
|
||||||
|
"https://registry.k8s.io",
|
||||||
|
"https://k8s.gcr.io",
|
||||||
|
"https://lscr.io",
|
||||||
|
"https://git.fascinated.cc",
|
||||||
|
]
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user