Compare commits
235 Commits
xactmon-do
...
fb1ea48d06
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb1ea48d06 | ||
|
|
2dd5f4fdad | ||
|
|
f130231242 | ||
| cf9eae14b4 | |||
| 5c819ef120 | |||
| 7c6b6f4ca4 | |||
| a5ce333c74 | |||
| cce7e56d02 | |||
|
|
ec996f5872 | ||
|
|
bb87deb888 | ||
|
|
0762238900 | ||
|
|
6aa0b21848 | ||
|
|
05ebb147c1 | ||
|
|
f907a31650 | ||
| 8470af0558 | |||
| b75d83cd32 | |||
| 8f5129cbef | |||
| 33da018988 | |||
| efc53fd7f0 | |||
|
|
46b3e57101 | ||
|
|
00502a08cc | ||
| f10879fbf6 | |||
| 383b26401b | |||
| e17f95bcfc | |||
|
|
037bb7ad23 | ||
|
|
025c4f7a5a | ||
|
|
0fb4654e6c | ||
| 7da76d0615 | |||
| f9a315eba5 | |||
| cf8dff83eb | |||
| 3abecae4d8 | |||
| 3255edc7b6 | |||
| bed5ed5767 | |||
| 4d11a60e62 | |||
| edec79aaae | |||
| 28e120ddbd | |||
|
|
58d2f94842 | ||
|
|
983bf4808d | ||
|
|
ffdcf6bd73 | ||
|
|
6bee9847fc | ||
|
|
0e1eefc13f | ||
|
|
4c0efc6a87 | ||
|
|
d16f27394c | ||
| dc835ddc9d | |||
| f637feba16 | |||
| 6da330f2be | |||
| 11a0f84db7 | |||
| 79995801e2 | |||
| 759d8f112f | |||
| 32175156ac | |||
| a87b53e3ac | |||
| 5065e61a2d | |||
| 39298e9fea | |||
|
|
b32751bf28 | ||
|
|
4ce258b00c | ||
| 294c0230bf | |||
| 183bb28c12 | |||
| ce7d90d704 | |||
| 91f0432061 | |||
|
|
5fb6d70f59 | ||
|
|
511a9df619 | ||
| e426bcf550 | |||
| 509c44d9cc | |||
| 4ac1bab968 | |||
| 1674bc3b89 | |||
|
|
4a197bf91a | ||
|
|
07ffcd0bc5 | ||
|
|
e567c34df5 | ||
|
|
a8528302ee | ||
| 94be854bd7 | |||
| 1392a7c181 | |||
| 75e6f7ee16 | |||
| 252dcfedc8 | |||
| 6883ab41bd | |||
| 8374e1e28b | |||
| a74f7f64ad | |||
| 60f88c6960 | |||
| 21dcd853c4 | |||
| b9d69ec0a3 | |||
| a03d63841d | |||
| d04c18cfcd | |||
| 6e15b11f73 | |||
| db37e5a691 | |||
| 7a9adc642c | |||
| 93e42421e6 | |||
|
|
a79668dcf1 | ||
|
|
1c4b5e19a4 | ||
|
|
2691b58c05 | ||
|
|
50459e111e | ||
|
|
387b7d120e | ||
|
|
1768778b44 | ||
| 2b6830f131 | |||
| 4243823ba5 | |||
| b269fa5812 | |||
| 107852ad54 | |||
| 72d3f222c5 | |||
| 2a90ffc7a9 | |||
| 1f7631d6b7 | |||
| 607fa050f3 | |||
| 0a5af84778 | |||
| 1a39a8869a | |||
| fefbaa9991 | |||
| e7ea2b0659 | |||
| 5c78bb89b5 | |||
| 0a6086eb2a | |||
| d6c83565ec | |||
| 121e6e7111 | |||
| 3d5dd52eb9 | |||
| 3b3d4c38ed | |||
| da81a336e1 | |||
| e0c633c21e | |||
| 14492d827a | |||
| 444686cb1e | |||
| ceea84d7f9 | |||
|
|
4d2cc40b5e | ||
|
|
c31db5fde2 | ||
|
|
74ce0e1b0a | ||
|
|
f0b16fd53c | ||
|
|
acd9a0fa92 | ||
|
|
115b4ade39 | ||
| c1927eecfc | |||
| 04ef1faf75 | |||
| 0209f921c3 | |||
| 62b19e942b | |||
|
|
b956e9ac05 | ||
|
|
f7eb3b49e7 | ||
|
|
0db830a670 | ||
|
|
6d137af6dc | ||
| 3d40424cf7 | |||
| ac62a77c96 | |||
| e1d9833e83 | |||
| 4ad5518f18 | |||
| 9f287d0f71 | |||
| 2380468658 | |||
| db7c07ee55 | |||
| d76a1360c8 | |||
| 71b52e4c6f | |||
| 8ecee4133f | |||
| 4cef41688f | |||
| 6cf11f9f61 | |||
| 7a768cbb76 | |||
| 0101040634 | |||
| 3f9601dc94 | |||
| d12e66f58a | |||
| 045eea89a9 | |||
| 8ff45a8c01 | |||
| d3e00680c0 | |||
|
|
c5daf23f71 | ||
|
|
6e2c8d1a25 | ||
|
|
0e3f719e32 | ||
|
|
94e10207d2 | ||
| 99c8f7694c | |||
| e19e8f50ab | |||
| 78651eb5f8 | |||
| ee3e078b20 | |||
| ea89e0cde4 | |||
| e581957f9d | |||
| b01300f8cc | |||
|
|
55ae979a1d | ||
|
|
1de05f2ccc | ||
|
|
58f7f9e2cc | ||
|
|
390eacf209 | ||
| 145fa6286e | |||
| 1b4bb234c8 | |||
| 7e2512c261 | |||
|
|
281ec623c4 | ||
|
|
51fe6f39af | ||
| 2ccbcd494c | |||
| e9bfc63a74 | |||
| 32171cc76e | |||
|
|
71f091fa05 | ||
| df50decba1 | |||
| 0022171616 | |||
| a149bc8761 | |||
| 76588c3e20 | |||
| bdc24e1778 | |||
| 982cd88255 | |||
| ffa47b9fba | |||
| 9ec6b651c1 | |||
| c83ceee994 | |||
| 3f39747557 | |||
| 8f354a4460 | |||
| 1c6286a977 | |||
| a6683c9123 | |||
| f5b79cfdf8 | |||
| 4cab489534 | |||
|
|
ceaa9cd2cb | ||
|
|
669029ea33 | ||
| f07122897b | |||
|
|
f451f03c68 | ||
| 05c325656e | |||
|
|
70589b7e51 | ||
| 551f945364 | |||
| 26422d9f3c | |||
| 05e40c8ad3 | |||
| 3ae5f9e5ca | |||
| f17ad4f779 | |||
| 4d643bdc9a | |||
|
|
8b7ae74e41 | ||
|
|
5f9ab83a57 | ||
|
|
9c2e44ff63 | ||
|
|
128a434b09 | ||
|
|
db93ebf336 | ||
|
|
b825b8a272 | ||
| 431395f18f | |||
| f182479d34 | |||
| f3e20077b2 | |||
|
|
10c813b973 | ||
|
|
760829e221 | ||
| 4adb9cd243 | |||
| 9fb0510625 | |||
| 4436ec5c6c | |||
| 2589f475d9 | |||
| b291d9f570 | |||
| 25b8b3001f | |||
| 7117ef455b | |||
| 7c1fed7685 | |||
| 5de1379c1f | |||
|
|
b323984d6c | ||
| ab107022f4 | |||
| b60ed65c80 | |||
| 7fb0932084 | |||
| 01e95d22db | |||
| bcfd94948d | |||
| fd7b90bb1c | |||
| 1267032847 | |||
|
|
ca80663c29 | ||
|
|
d16cca534a | ||
|
|
d78f17f529 | ||
|
|
5a33f55d38 | ||
|
|
39c576a6eb | ||
| 9c50acb6b9 | |||
| a443929c0c | |||
| 78afee9abc | |||
| 94b7168b1e |
86
20125/config.yml
Normal file
86
20125/config.yml
Normal file
@@ -0,0 +1,86 @@
|
||||
alertmanager:
|
||||
url: http://alertmanager.victoria-metrics:9093
|
||||
|
||||
system_wide:
|
||||
alerts:
|
||||
- alertgoup: Active Directory
|
||||
- alertgoup: Longhorn
|
||||
- alertgoup: PostgreSQL
|
||||
- alertgoup: Restic
|
||||
- alertgoup: Temperature
|
||||
- job: authelia
|
||||
- job: blackbox
|
||||
- job: dns_pyrocufflink
|
||||
- job: dns_recursive
|
||||
- job: kubelet
|
||||
- job: kubernetes
|
||||
- instance: db0.pyrocufflink.blue
|
||||
- instance: gw1.pyrocufflink.blue
|
||||
- instance: vmhost0.pyrocufflink.blue
|
||||
- instance: vmhost1.pyrocufflink.blue
|
||||
|
||||
applications:
|
||||
- name: Home Assistant
|
||||
url: https://homeassistant.pyrocufflink.blue/
|
||||
icon:
|
||||
url: icons/home-assistant.svg
|
||||
alerts:
|
||||
- alertgroup: Home Assistant
|
||||
- alertgroup: Frigate
|
||||
- job: homeassistant
|
||||
- instance: homeassistant.pyrocufflink.blue
|
||||
|
||||
- name: Nextcloud
|
||||
url: &url https://nextcloud.pyrocufflink.net/index.php
|
||||
icon:
|
||||
url: icons/nextcloud.png
|
||||
alerts:
|
||||
- instance: *url
|
||||
- instance: cloud0.pyrocufflink.blue
|
||||
|
||||
- name: Invoice Ninja
|
||||
url: &url https://invoiceninja.pyrocufflink.net/
|
||||
icon:
|
||||
url: icons/invoiceninja.svg
|
||||
class: light-bg
|
||||
alerts:
|
||||
- instance: *url
|
||||
|
||||
- name: Jellyfin
|
||||
url: &url https://jellyfin.pyrocufflink.net/
|
||||
icon:
|
||||
url: icons/jellyfin.svg
|
||||
alerts:
|
||||
- instance: *url
|
||||
|
||||
- name: Vaultwarden
|
||||
url: &url https://bitwarden.pyrocufflink.net/
|
||||
icon:
|
||||
url: icons/vaultwarden.svg
|
||||
class: light-bg
|
||||
alerts:
|
||||
- instance: *url
|
||||
- alertgroup: Bitwarden
|
||||
|
||||
- name: Paperless-ngx
|
||||
url: &url https://paperless.pyrocufflink.blue/
|
||||
icon:
|
||||
url: icons/paperless-ngx.svg
|
||||
alerts:
|
||||
- instance: *url
|
||||
- alertgroup: Paperless-ngx
|
||||
- job: paperless-ngx
|
||||
|
||||
- name: Firefly III
|
||||
url: &url https://firefly.pyrocufflink.blue/
|
||||
icon:
|
||||
url: icons/firefly-iii.svg
|
||||
alerts:
|
||||
- instance: *url
|
||||
|
||||
- name: Receipts
|
||||
url: &url https://receipts.pyrocufflink.blue/
|
||||
icon:
|
||||
url: https://receipts.pyrocufflink.blue/static/icons/icon-512.png
|
||||
alerts:
|
||||
- instance: *url
|
||||
25
20125/ingress.yaml
Normal file
25
20125/ingress.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
cert-manager.io/issuer: status-server-ca
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: status-server
|
||||
name: status-server
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- 20125.home
|
||||
secretName: status-server-cert
|
||||
rules:
|
||||
- host: 20125.home
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: status-server
|
||||
port:
|
||||
number: 80
|
||||
path: /
|
||||
pathType: Prefix
|
||||
26
20125/kustomization.yaml
Normal file
26
20125/kustomization.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: '20125'
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app.kubernetes.io/instance: '20125'
|
||||
app.kubernetes.io/part-of: '20125'
|
||||
includeSelectors: true
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- secrets.yaml
|
||||
- status-server-ca.yaml
|
||||
- status-server.yaml
|
||||
- ingress.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: 20125-config
|
||||
files:
|
||||
- config.yml
|
||||
|
||||
images:
|
||||
- name: git.pyrocufflink.net/packages/20125.home
|
||||
newTag: dev
|
||||
6
20125/namespace.yaml
Normal file
6
20125/namespace.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: "20125"
|
||||
labels:
|
||||
app.kubernetes.io/name: '20125'
|
||||
13
20125/secrets.yaml
Normal file
13
20125/secrets.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
name: imagepull-gitea
|
||||
namespace: "20125"
|
||||
spec:
|
||||
encryptedData:
|
||||
.dockerconfigjson: AgAXY5XsnGF9E3RU9dnKXK9fWjqK0khCDf7n0vuJCLACrcM01aoWVSjl26+j7oSTTyc7t5C+EKPJnuKdlkNfh2Omw9Lh3dn8rPRYcBRmUEAyt0TvBVkxBIiP+49y39QEV1opYY+b1gLVJ5ZEC92u5uI9y8xovwx9wqtKLfQ+KCfc5m93AYaQJ9EcnV1DSEkv/HdtWNikQes2hO6pTLF/GHrh/s79eIeXMTm5oG/OyJWTOGQdy1SdoGWLLf31dsjhsJyGMYOtWx42Nou20lWqmdoy4Dd8OXuuhcfeDNzkH187mI4XpVjbS0M+P5teJsGiTwx+VyJlGQnEaquIiHy3KLt3YH/ltGeNeCNbFmSDa70A3IdP/t0cAXN20rlIFGVzqNrAOhMYtiTDEgaKOrL7mwM4i4NTCnLTA2nXU7gLEcLGPRqO7LKIhc1/6d1xWMT58SFjHAVklFt/lq1udY6zE8gXHp+RQ+7hIIEu500YiaKubvh2MsOKIqYOaX99Q4BW7PQhwjjwtFHFuwNjZn8wAbDq+3gsDSqgeFPgHAs7nPIImcBne/fTobsHhUVvxEnBNLCRtSqpkvOLzpgC+dRNsD6ZTcXPhFWTEOvjBMcUWqOTcRmd8DCsdxalM42x/ZQjlNlubZeuaNki+4pA80bYlsLWt3A2nWtcVbO/aAYrT1qiK/d8NZsPNidD0HE1rkUkCNv5KgXVWUfVU7ptX1YFpYXXuEIFeWzulH3gWmdW4q+t2nGHAqwkszZfijtpsexBttff1ym3rgBTGHFmQRkmSMbNHIAq29ehuVrxkH7uM8Q1cXXmMnGgre0ijtUfW9zMlx92jR86187xOLM3/hxANhfyt4eZVMwx8D42facMxxAngCi01vYTwqihA9mtBFkKlkQdKCH1NxgWQqwAJi87utgHoFivxeM+Pck7Zeottr0yzUEisdoBAdQR99hijR2C5SnC4iURnqfi9sloj0Uuo74SxiTGapA7pg77LmvpV9Wzu6QiEm944tftcZHwaMg=
|
||||
template:
|
||||
metadata:
|
||||
name: imagepull-gitea
|
||||
namespace: "20125"
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
32
20125/status-server-ca.yaml
Normal file
32
20125/status-server-ca.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: selfsigned-ca
|
||||
spec:
|
||||
selfSigned: {}
|
||||
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: status-server-ca
|
||||
spec:
|
||||
isCA: true
|
||||
commonName: 20125 CA
|
||||
secretName: status-server-ca-secret
|
||||
privateKey:
|
||||
algorithm: ECDSA
|
||||
size: 256
|
||||
issuerRef:
|
||||
name: selfsigned-ca
|
||||
kind: Issuer
|
||||
group: cert-manager.io
|
||||
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: status-server-ca
|
||||
spec:
|
||||
ca:
|
||||
secretName: status-server-ca-secret
|
||||
46
20125/status-server.yaml
Normal file
46
20125/status-server.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: status-server
|
||||
app.kubernetes.io/component: status-server
|
||||
name: status-server
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
targetPort: 20125
|
||||
selector: *labels
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: status-server
|
||||
app.kubernetes.io/component: status-server
|
||||
name: status-server
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels: *labels
|
||||
template:
|
||||
metadata:
|
||||
labels: *labels
|
||||
spec:
|
||||
containers:
|
||||
- name: status-server
|
||||
image: git.pyrocufflink.net/packages/20125.home
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- mountPath: /usr/local/share/20125.home/config.yml
|
||||
name: config
|
||||
subPath: config.yml
|
||||
readOnly: True
|
||||
imagePullSecrets:
|
||||
- name: imagepull-gitea
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: 20125-config
|
||||
2
ansible/.gitignore
vendored
Normal file
2
ansible/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
ara/.secrets.toml
|
||||
host-provisioner.key
|
||||
87
ansible/ara.yaml
Normal file
87
ansible/ara.yaml
Normal file
@@ -0,0 +1,87 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ara
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: ara
|
||||
app.kubernetes.io/component: ara
|
||||
spec:
|
||||
selector: *labels
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http
|
||||
port: 8000
|
||||
targetPort: 8000
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ara
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: ara
|
||||
app.kubernetes.io/component: ara
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: *labels
|
||||
template:
|
||||
metadata:
|
||||
labels: *labels
|
||||
spec:
|
||||
enableServiceLinks: false
|
||||
containers:
|
||||
- name: ara-api
|
||||
image: quay.io/recordsansible/ara-api
|
||||
env:
|
||||
- name: ARA_BASE_DIR
|
||||
value: /etc/ara
|
||||
- name: ARA_SETTINGS
|
||||
value: /etc/ara/settings.toml
|
||||
- name: SECRETS_FOR_DYNACONF
|
||||
value: /etc/ara/.secrets.toml
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
readinessProbe: &probe
|
||||
httpGet:
|
||||
port: 8000
|
||||
path: /api/
|
||||
httpHeaders:
|
||||
- name: Host
|
||||
value: ara.ansible.pyrocufflink.blue
|
||||
failureThreshold: 3
|
||||
periodSeconds: 60
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
startupProbe:
|
||||
<<: *probe
|
||||
failureThreshold: 30
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 1
|
||||
timeoutSeconds: 1
|
||||
volumeMounts:
|
||||
- mountPath: /etc/ara/settings.toml
|
||||
name: config
|
||||
subPath: settings.toml
|
||||
readOnly: true
|
||||
- mountPath: /etc/ara/.secrets.toml
|
||||
name: secrets
|
||||
subPath: .secrets.toml
|
||||
readOnly: true
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
subPath: tmp
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 7653
|
||||
runAsGroup: 7653
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: ara
|
||||
- name: secrets
|
||||
secret:
|
||||
secretName: ara
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
38
ansible/ara/settings.toml
Normal file
38
ansible/ara/settings.toml
Normal file
@@ -0,0 +1,38 @@
|
||||
[default]
|
||||
ALLOWED_HOSTS = [
|
||||
'ara.ansible.pyrocufflink.blue',
|
||||
]
|
||||
LOG_LEVEL = 'INFO'
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
EXTERNAL_AUTH = true
|
||||
READ_LOGIN_REQUIRED = false
|
||||
WRITE_LOGIN_REQUIRED = false
|
||||
|
||||
DATABASE_ENGINE = 'django.db.backends.postgresql'
|
||||
DATABASE_HOST = 'postgresql.pyrocufflink.blue'
|
||||
DATABASE_NAME = 'ara'
|
||||
DATABASE_USER = 'ara'
|
||||
|
||||
[default.DATABASE_OPTIONS]
|
||||
sslmode = 'verify-full'
|
||||
sslcert = '/run/secrets/ara/postgresql/tls.crt'
|
||||
sslkey = '/run/secrets/ara/postgresql/tls.key'
|
||||
sslrootcert = '/run/dch-ca/dch-root-ca.crt'
|
||||
|
||||
[default.LOGGING]
|
||||
version = 1
|
||||
disable_existing_loggers = false
|
||||
|
||||
[default.LOGGING.formatters.normal]
|
||||
format = '%(levelname)s %(name)s: %(message)s'
|
||||
|
||||
[default.LOGGING.handlers.console]
|
||||
class = 'logging.StreamHandler'
|
||||
formatter = 'normal'
|
||||
level = 'INFO'
|
||||
|
||||
[default.LOGGING.loggers.ara]
|
||||
handlers = ['console']
|
||||
level = 'INFO'
|
||||
propagate = false
|
||||
1
ansible/host-provisioner.key.pub
Normal file
1
ansible/host-provisioner.key.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICoOO/ZYMxRgmyvqZwGN3NM5pHyh3NBdC7iZrXIopt93 Host Provisioner
|
||||
32
ansible/ingress.yaml
Normal file
32
ansible/ingress.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ara
|
||||
labels:
|
||||
app.kubernetes.io/name: ara
|
||||
app.kubernetes.io/component: ara
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: dch-ca
|
||||
nginx.ingress.kubernetes.io/proxy-buffer-size: "8k"
|
||||
nginx.ingress.kubernetes.io/auth-method: GET
|
||||
nginx.ingress.kubernetes.io/auth-url: http://authelia.authelia.svc.cluster.local:9091/api/verify
|
||||
nginx.ingress.kubernetes.io/auth-signin: https://auth.pyrocufflink.blue/?rm=$request_method
|
||||
nginx.ingress.kubernetes.io/auth-snippet: |
|
||||
proxy_set_header X-Forwarded-Method $request_method;
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- ara.ansible.pyrocufflink.blue
|
||||
secretName: ara-cert
|
||||
rules:
|
||||
- host: ara.ansible.pyrocufflink.blue
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: ara
|
||||
port:
|
||||
name: http
|
||||
60
ansible/kustomization.yaml
Normal file
60
ansible/kustomization.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app.kubernetes.io/instance: ansible
|
||||
includeSelectors: true
|
||||
includeTemplates: true
|
||||
- pairs:
|
||||
app.kubernetes.io/part-of: ansible
|
||||
|
||||
namespace: ansible
|
||||
|
||||
resources:
|
||||
- ../dch-root-ca
|
||||
- ../ssh-host-keys
|
||||
- rbac.yaml
|
||||
- secrets.yaml
|
||||
- namespace.yaml
|
||||
- ara.yaml
|
||||
- postgres-cert.yaml
|
||||
- ingress.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: ara
|
||||
files:
|
||||
- ara/settings.toml
|
||||
options:
|
||||
labels:
|
||||
app.kubernetes.io/name: ara
|
||||
|
||||
patches:
|
||||
- patch: |-
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ara
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: ara-api
|
||||
volumeMounts:
|
||||
- mountPath: /run/dch-ca/dch-root-ca.crt
|
||||
name: dch-root-ca
|
||||
subPath: dch-root-ca.crt
|
||||
readOnly: true
|
||||
- mountPath: /run/secrets/ara/postgresql
|
||||
name: postgresql-cert
|
||||
readOnly: true
|
||||
securityContext:
|
||||
fsGroup: 7653
|
||||
volumes:
|
||||
- name: postgresql-cert
|
||||
secret:
|
||||
secretName: ara-postgres-cert
|
||||
defaultMode: 0640
|
||||
- name: dch-root-ca
|
||||
configMap:
|
||||
name: dch-root-ca
|
||||
6
ansible/namespace.yaml
Normal file
6
ansible/namespace.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: ansible
|
||||
labels:
|
||||
app.kubernetes.io/name: ansible
|
||||
12
ansible/postgres-cert.yaml
Normal file
12
ansible/postgres-cert.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: ara-postgres-cert
|
||||
spec:
|
||||
commonName: ara
|
||||
privateKey:
|
||||
algorithm: ECDSA
|
||||
secretName: ara-postgres-cert
|
||||
issuerRef:
|
||||
name: postgresql-ca
|
||||
kind: ClusterIssuer
|
||||
25
ansible/rbac.yaml
Normal file
25
ansible/rbac.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: dch-webhooks
|
||||
rules:
|
||||
- apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- jobs
|
||||
verbs:
|
||||
- create
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: dch-webhooks
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: dch-webhooks
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: dch-webhooks
|
||||
namespace: default
|
||||
37
ansible/secrets.yaml
Normal file
37
ansible/secrets.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
name: ara
|
||||
namespace: ansible
|
||||
labels:
|
||||
app.kubernetes.io/name: ara
|
||||
app.kubernetes.io/component: ara
|
||||
spec:
|
||||
encryptedData:
|
||||
.secrets.toml: AgAiObM2t8Cmr87pMRhZN4RBqb4soEdG0OJeAmaUCl//in2LihZyOHKu5RDeLBaPneoX5G/t5eQX7KkPCW7hffjBSngVbPMZ+U8Txb1IY3uFFHGAPnJBXwHo6FgRq5uKt3LQ6UmtWLoIF4ZB4K0f/g5BHR3N6FIah/x5pKrnU9lOltVgDFSEd7Ewgrj8AorASdE7ZxBAGuUPNktQZZ9MS0d2YiOhgfZiGHDnLZoqk0osDOZzKJX47yiYg5SR4NHoGzd7gfSvBtbrU4SIQCUGZJYtOKeUGaNtCgKnLe3oCphqV3izUY1JudVF8eN5MDgUH5vG2GcqDqMYTX2oRuk+rgRjiMJTkxQ/OZlbrXGxUocTR51EoM01vgjvvCsqaE3R5MhcKE7oOHrqTXzhDY6UzBPUu6QWrkWWMegBeIVCWA2ID3m8CPljyA0oZuClqVZpx/23cs3aHcyl2vye5ey3ca5QzLkkmKK7826H3przUYdwti9gMNp0sPszsDOTzfmN9iZD33a+WvEPfbf7+ZBXBAnoH06pLXeCGc43Q2S619xdHRw4caVGeczZAWYVjlnq8BUQGmHU2Ra5W6dzYM+i3vUimJRiuzeaG+APgY4KIdZNEjPguiwg93g9NtDWgap1h5rF3Yx4nEQelEN0pNAqT8CP67gW1Kp+wjNRNHkz45Ld3mJbMsvFqjZG5cCqk1s67mBNxhani0HBJM3vEV36wnDBzWwSmemuMUdjrG0zFwQHHeZwQe7oR+9XNz1DLPxvvp6KfEbHA3YMagQa2RYxN/C9APBBC+dmk6+TJn1n
|
||||
template:
|
||||
metadata:
|
||||
name: ara
|
||||
namespace: ansible
|
||||
labels:
|
||||
app.kubernetes.io/name: ara
|
||||
app.kubernetes.io/component: ara
|
||||
|
||||
---
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
name: provisioner-ssh-key
|
||||
namespace: ansible
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: provisioner-ssh-key
|
||||
app.kubernetes.io/component: host-provisioner
|
||||
spec:
|
||||
encryptedData:
|
||||
host-provisioner.key: AgCiBQEtPmzQO9GHoVxZNQmjFn9GjeKWlHmG2lz4uqeva77QByqnejUg8CbpQnoT61ct9o39tVtrrHgC8WjseXKGKkd+YELRaWENXBNBFlv4YN6id2iPzf4xHrgfowXLjzly7s4s4Fg3QntXFglQxwG009Z7K5HQmAvgCFzGm6y+fyLoNd2v2eNc9pGurynnm7wKQFuBBpBtoDVfYMNSS+tp9D3MFVMwEG8kU/kszv5OEEwVkipG4v2LeY86HXIQnHyeE3vITz0TFPoQjpjusBNg7MxBVHcz/ZruqF43DZ+uz2aRFL6D5udm86hsxZGSi3yVq8PSCUANtWoTicIpSc5yxpB+5FLsc3Q380vQPrRYvx8luAZwMGQPDv2NpGoSRUmutb/+4vpQbCBwaP9s8WHaYNDByUeoQKAX2o+RYp+/csfxmSy1/pK93RUjMnsWGYiyI7jpNdTqWkakDN+cM0Lrje9+VqcZge3FYp/4y78AI75pWEiEMy1VSXeqE2pgu5vZzyRdw9zORC2sAWhnTeu+Obbly1UdptpXPmGclmRbpwAPM1F7m7pDsCQ9SYAhoGg251Yu0sF3Nnc0uOElmP0KSn1bt/Jca9M0syg9DMntHo41dn40+Aihujej0ll4h3GXVZ0auUuzSLZEMe0dHQY0YCaq3JdeOa6AJuNyo63/0BmvmWP2T06INtVw4EqBsmvNl/YJIlZiRGhIOGaRyJllu21L6QBtToYjxI7fhTxZaCG6fyPbvCd1hu+IchoMr86rl7W0+k6d/lkamx9dg+PtWjjThOGyeLYwSRhMcsvQPsSdTl8BEmB9TRgRIk42txVRQkb+ei1+1y9nBYCOV9P540lDXQVbqgyb0j2cccWOa/AG7l3P3s8haDs2OujUaVkBJWJ489nsLsC33972wwAQbOk+uTKmXKL6nWSNL31rivW9R8ea+vfdcyN2/tLsI0mE9XTR/kRmS12qdLmDbzeX/scqSKaWFQZwnLHak5Xaqkd25ZGHqB3zrnTBIryDaXSzgC1CPCv7QNqbKvd6vmH+16j1DWqLycbUeorx5O9nwpEZ+GzQm8q62PJEO8xdvqr3nu5OvFgGrnX/Y6giV8Cv8ogyAxbmNrq0cC5VYxDlt4VvzlOpmWUlfxD/wd+gaHQoibhhHRbGtsJCX9AFclVQrY3kmduTi/iJlTTJjMQKm9JJRXKbNDxH+B25Zj/hUIC1/NNZOSDn654Pi/yOGXITp86j9unfnIXdJPg=
|
||||
template:
|
||||
metadata:
|
||||
name: provisioner-ssh-key
|
||||
namespace: ansible
|
||||
labels: *labels
|
||||
@@ -11,3 +11,6 @@ spec:
|
||||
path: authelia
|
||||
repoURL: https://git.pyrocufflink.blue/infra/kubernetes.git
|
||||
targetRevision: master
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
|
||||
@@ -11,3 +11,6 @@ spec:
|
||||
path: firefly-iii
|
||||
repoURL: https://git.pyrocufflink.blue/infra/kubernetes.git
|
||||
targetRevision: master
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
|
||||
@@ -11,3 +11,6 @@ spec:
|
||||
path: home-assistant
|
||||
repoURL: https://git.pyrocufflink.blue/infra/kubernetes.git
|
||||
targetRevision: master
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
|
||||
@@ -11,3 +11,6 @@ spec:
|
||||
path: ntfy
|
||||
repoURL: https://git.pyrocufflink.blue/infra/kubernetes.git
|
||||
targetRevision: master
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
|
||||
@@ -11,3 +11,6 @@ spec:
|
||||
path: paperless-ngx
|
||||
repoURL: https://git.pyrocufflink.blue/infra/kubernetes.git
|
||||
targetRevision: master
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
|
||||
18
argocd/applications/receipts.yaml
Normal file
18
argocd/applications/receipts.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: &name receipts
|
||||
namespace: argocd
|
||||
labels:
|
||||
vendor: dustin
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: default
|
||||
source:
|
||||
path: *name
|
||||
repoURL: https://git.pyrocufflink.blue/infra/kubernetes.git
|
||||
targetRevision: master
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
@@ -1,13 +1,16 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: postgresql
|
||||
name: vaultwarden
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: default
|
||||
source:
|
||||
path: postgresql
|
||||
path: vaultwarden
|
||||
repoURL: https://git.pyrocufflink.blue/infra/kubernetes.git
|
||||
targetRevision: master
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
@@ -5,6 +5,9 @@ access_control:
|
||||
networks:
|
||||
- 172.30.0.0/26
|
||||
- 172.31.1.0/24
|
||||
- name: cluster
|
||||
networks:
|
||||
- 10.149.0.0/16
|
||||
rules:
|
||||
- domain: paperless.pyrocufflink.blue
|
||||
policy: two_factor
|
||||
@@ -36,6 +39,10 @@ access_control:
|
||||
networks:
|
||||
- internal
|
||||
policy: bypass
|
||||
- domain: metrics.pyrocufflink.blue
|
||||
resources:
|
||||
- '^/insert/.*'
|
||||
policy: bypass
|
||||
- domain: metrics.pyrocufflink.blue
|
||||
networks:
|
||||
- internal
|
||||
@@ -50,6 +57,16 @@ access_control:
|
||||
resources:
|
||||
- '^/submit/.*'
|
||||
policy: bypass
|
||||
- domain: ara.ansible.pyrocufflink.blue
|
||||
networks:
|
||||
- internal
|
||||
- cluster
|
||||
resources:
|
||||
- '^/api/.*'
|
||||
methods:
|
||||
- POST
|
||||
- PATCH
|
||||
policy: bypass
|
||||
|
||||
authentication_backend:
|
||||
ldap:
|
||||
@@ -94,6 +111,7 @@ identity_providers:
|
||||
$pbkdf2-sha512$310000$TkQ1BwLrr.d8AVGWk2rLhA$z4euAPhkkZdjcxKFD3tZRtNQ/R78beW7epJ.BGFWSwQdAme5TugNj9Ba.aL5TEqrBDmXRW0xiI9EbxSszckG5A
|
||||
redirect_uris:
|
||||
- https://burp.pyrocufflink.blue:9090/oauth_callback
|
||||
- https://minio.backups.pyrocufflink.blue/oauth_callback
|
||||
- id: step-ca
|
||||
description: step-ca
|
||||
public: true
|
||||
|
||||
@@ -55,3 +55,6 @@ patches:
|
||||
- name: dch-root-ca
|
||||
configMap:
|
||||
name: dch-root-ca
|
||||
images:
|
||||
- name: ghcr.io/authelia/authelia
|
||||
newTag: 4.38.19
|
||||
|
||||
41
cert-manager/cert-exporter.config.yml
Normal file
41
cert-manager/cert-exporter.config.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
git_repo: gitea@git.pyrocufflink.blue:dustin/certs.git
|
||||
certs:
|
||||
- name: pyrocufflink-cert
|
||||
namespace: default
|
||||
key: certificates/_.pyrocufflink.net.key
|
||||
cert: certificates/_.pyrocufflink.net.crt
|
||||
bundle: certificates/_.pyrocufflink.net.pem
|
||||
- name: dustinhatchname-cert
|
||||
namespace: default
|
||||
key: acme.sh/dustin.hatch.name/dustin.hatch.name.key
|
||||
cert: acme.sh/dustin.hatch.name/fullchain.cer
|
||||
- name: hatchchat-cert
|
||||
namespace: default
|
||||
key: certificates/hatch.chat.key
|
||||
cert: certificates/hatch.chat.crt
|
||||
bundle: certificates/hatch.chat.pem
|
||||
- name: tabitha-cert
|
||||
namespace: default
|
||||
key: certificates/tabitha.biz.key
|
||||
cert: certificates/tabitha.biz.crt
|
||||
bundle: certificates/tabitha.biz.pem
|
||||
- name: chmod777-cert
|
||||
namespace: default
|
||||
key: certificates/chmod777.sh.key
|
||||
cert: certificates/chmod777.sh.crt
|
||||
bundle: certificates/chmod777.sh.pem
|
||||
- name: dustinandtabitha-cert
|
||||
namespace: default
|
||||
key: certificates/dustinandtabitha.com.key
|
||||
cert: certificates/dustinandtabitha.com.crt
|
||||
bundle: certificates/dustinandtabitha.com.pem
|
||||
- name: hlc-cert
|
||||
namespace: default
|
||||
key: certificates/hatchlearningcenter.org.key
|
||||
cert: certificates/hatchlearningcenter.org.crt
|
||||
bundle: certificates/hatchlearningcenter.org.pem
|
||||
- name: appsxyz-cert
|
||||
namespace: default
|
||||
key: certificates/apps.du5t1n.xyz.key
|
||||
cert: certificates/apps.du5t1n.xyz.crt
|
||||
bundle: certificates/apps.du5t1n.xyz.pem
|
||||
@@ -4,56 +4,6 @@ metadata:
|
||||
name: cert-exporter
|
||||
namespace: cert-manager
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cert-exporter
|
||||
namespace: cert-manager
|
||||
data:
|
||||
config.yml: |
|
||||
git_repo: gitea@git.pyrocufflink.blue:dustin/certs.git
|
||||
certs:
|
||||
- name: pyrocufflink-cert
|
||||
namespace: default
|
||||
key: certificates/_.pyrocufflink.net.key
|
||||
cert: certificates/_.pyrocufflink.net.crt
|
||||
bundle: certificates/_.pyrocufflink.net.pem
|
||||
- name: dustinhatchname-cert
|
||||
namespace: default
|
||||
key: acme.sh/dustin.hatch.name/dustin.hatch.name.key
|
||||
cert: acme.sh/dustin.hatch.name/fullchain.cer
|
||||
- name: hatchchat-cert
|
||||
namespace: default
|
||||
key: certificates/hatch.chat.key
|
||||
cert: certificates/hatch.chat.crt
|
||||
bundle: certificates/hatch.chat.pem
|
||||
- name: tabitha-cert
|
||||
namespace: default
|
||||
key: certificates/tabitha.biz.key
|
||||
cert: certificates/tabitha.biz.crt
|
||||
bundle: certificates/tabitha.biz.pem
|
||||
- name: dcow-cert
|
||||
namespace: default
|
||||
key: certificates/darkchestofwonders.us.key
|
||||
cert: certificates/darkchestofwonders.us.crt
|
||||
bundle: certificates/darkchestofwonders.us.pem
|
||||
- name: chmod777-cert
|
||||
namespace: default
|
||||
key: certificates/chmod777.sh.key
|
||||
cert: certificates/chmod777.sh.crt
|
||||
bundle: certificates/chmod777.sh.pem
|
||||
- name: dustinandtabitha-cert
|
||||
namespace: default
|
||||
key: certificates/dustinandtabitha.com.key
|
||||
cert: certificates/dustinandtabitha.com.crt
|
||||
bundle: certificates/dustinandtabitha.com.pem
|
||||
- name: hlc-cert
|
||||
namespace: default
|
||||
key: certificates/hatchlearningcenter.org.key
|
||||
cert: certificates/hatchlearningcenter.org.crt
|
||||
bundle: certificates/hatchlearningcenter.org.pem
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
@@ -71,10 +21,10 @@ rules:
|
||||
- dustinhatchname-cert
|
||||
- hatchchat-cert
|
||||
- tabitha-cert
|
||||
- dcow-cert
|
||||
- chmod777-cert
|
||||
- dustinandtabitha-cert
|
||||
- hlc-cert
|
||||
- appsxyz-cert
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
|
||||
@@ -71,24 +71,6 @@ spec:
|
||||
algorithm: ECDSA
|
||||
rotationPolicy: Always
|
||||
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: dcow-cert
|
||||
spec:
|
||||
secretName: dcow-cert
|
||||
dnsNames:
|
||||
- darkchestofwonders.us
|
||||
- '*.darkchestofwonders.us'
|
||||
issuerRef:
|
||||
group: cert-manager.io
|
||||
kind: ClusterIssuer
|
||||
name: zerossl
|
||||
privateKey:
|
||||
algorithm: ECDSA
|
||||
rotationPolicy: Always
|
||||
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
@@ -154,3 +136,20 @@ spec:
|
||||
privateKey:
|
||||
algorithm: ECDSA
|
||||
rotationPolicy: Always
|
||||
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: appsxyz-cert
|
||||
spec:
|
||||
secretName: appsxyz-cert
|
||||
dnsNames:
|
||||
- apps.du5t1n.xyz
|
||||
issuerRef:
|
||||
group: cert-manager.io
|
||||
kind: ClusterIssuer
|
||||
name: zerossl
|
||||
privateKey:
|
||||
algorithm: ECDSA
|
||||
rotationPolicy: Always
|
||||
|
||||
@@ -12,6 +12,18 @@ spec:
|
||||
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ4RENDQVdxZ0F3SUJBZ0lVYkh6MnRzc2EwOXpzSGsrRWRHRDNRS3ByTUtRd0NnWUlLb1pJemowRUF3UXcKUURFTE1Ba0dBMVVFQmhNQ1ZWTXhHREFXQmdOVkJBb01EMFIxYzNScGJpQkRMaUJJWVhSamFERVhNQlVHQTFVRQpBd3dPUkVOSUlGSnZiM1FnUTBFZ1VqSXdIaGNOTWpNd09USTBNakExTXpBNVdoY05ORE13T1RFNU1qQTFNekE1CldqQkFNUXN3Q1FZRFZRUUdFd0pWVXpFWU1CWUdBMVVFQ2d3UFJIVnpkR2x1SUVNdUlFaGhkR05vTVJjd0ZRWUQKVlFRRERBNUVRMGdnVW05dmRDQkRRU0JTTWpCWk1CTUdCeXFHU000OUFnRUdDQ3FHU000OUF3RUhBMElBQkUyRApOSkhSY2p1QTE5Wm9wckJLYXhJZlV4QWJ6NkxpZ003ZGd0TzYraXNhTWx4UkFWSm1zSVRBRElFLzIyUnJVRGdECk9ma3QyaVpUVWpNcnozQXhYaFdqUWpCQU1CMEdBMVVkRGdRV0JCVE0rZDhrYjFrb0dtS1J0SnM0Z045ellhKzYKb1RBU0JnTlZIUk1CQWY4RUNEQUdBUUgvQWdFQk1Bc0dBMVVkRHdRRUF3SUJCakFLQmdncWhrak9QUVFEQkFOSQpBREJGQWlFQTJLYThtTWlBRkxtckZXdDBkQW1sMjQ3cmUyK2k0VVBoeUhjT0JmTksrZ29DSUh2K3ZFdzdDSFpRCmlySWE2OTduZmU0S2lYSU13SGxBTVMxKzFRWm9oRkRDCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
||||
|
||||
solvers:
|
||||
- dns01:
|
||||
cnameStrategy: Follow
|
||||
rfc2136:
|
||||
nameserver: 172.30.0.1
|
||||
tsigSecretSecretRef:
|
||||
name: pyrocufflink-tsig
|
||||
key: cert-manager.tsig.key
|
||||
tsigKeyName: cert-manager
|
||||
tsigAlgorithm: HMACSHA512
|
||||
selector:
|
||||
dnsNames:
|
||||
- rabbitmq.pyrocufflink.blue
|
||||
- http01:
|
||||
ingress:
|
||||
ingressClassName: nginx
|
||||
|
||||
@@ -2,11 +2,20 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml
|
||||
- https://github.com/cert-manager/cert-manager/releases/download/v1.16.4/cert-manager.yaml
|
||||
- cluster-issuer.yaml
|
||||
- certificates.yaml
|
||||
- cert-exporter.yaml
|
||||
- dch-ca-issuer.yaml
|
||||
- secrets.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: cert-exporter
|
||||
namespace: cert-manager
|
||||
files:
|
||||
- config.yml=cert-exporter.config.yml
|
||||
options:
|
||||
disableNameSuffixHash: True
|
||||
|
||||
secretGenerator:
|
||||
- name: zerossl-eab
|
||||
|
||||
13
cert-manager/secrets.yaml
Normal file
13
cert-manager/secrets.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
name: pyrocufflink-tsig
|
||||
namespace: cert-manager
|
||||
spec:
|
||||
encryptedData:
|
||||
cert-manager.tsig.key: AgAf1dVezJ0ytOdGI5rzCJ35rAVpY114pQJgIzqAKsKkRVE6kwWXjoFj94ZgDsjpOedAp1zdNB1UQnu0n10ayuz/NUYb74wkXcu0RRy6Ve06SJjI01f7lHP2/a4cnW+0et/Xzin0RQ/3hHmZUk5aCwV/FCLs0D5LdFixHf+sbMCzhyIYrQ64x0YH9YqBTRgXkEx94+PUuxi9ZyLuKiepd/K4UF+L5rF2zWt9DVKOmdbilzd5RqdQSgEyoOOpmcbDKHm1s17KHWSJb44rvxj7vg2fmXXwEvEW5SiQdrhmywOcqqhXEbE1ZEvBrVt3GgrjZHeTyL0Gx4jugiqSR/WulY7ak4+ZkDF80OS5RzciYeVMDdNxst48Xdkc2F7E93GGWCeIN5gig0oCFcB18BRF3aO4AB+fqh0IWBSiBCGinbjvX684TF9BGPuKMj01ORW3fFnRfbeE4gYTrdBKFi1ltG6VxJ6X9i5ztLIQBcH48btf7uMjQsC79GPq35CCWBprqnNBvi81lJtGVaVqY6hNIvyQIO+fEReMk/Mp0N+KxWlWVY/vK+ck2KWkgXaui3xkM4jbB6RiXWZXrUW4y+XyDs+sTziwYRRz03MU9NC58do9MBnOeM+fJqioMyQq81/mXKtcxIsvJadJ7WsYQKdqa/gVE5D/ybJ2qrtbEQqgCXnyowIIIOVvvWilhzh/zjQgtRiLHlsbLmvRX5aZm1Z048CMDFPh8CxcHlVwz7FUviJzbNoqENh1PE6HhKwFqpGxtjjR6X3LEi8iLvLNg05EUzLNJD1+SCi0imhQPGesJZtr/h1xqI9utB4NjA==
|
||||
template:
|
||||
metadata:
|
||||
name: pyrocufflink-tsig
|
||||
namespace: cert-manager
|
||||
@@ -5,3 +5,5 @@ configMapGenerator:
|
||||
- name: dch-root-ca
|
||||
files:
|
||||
- dch-root-ca.crt
|
||||
options:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
117
dch-webhooks/ansible-job.yaml
Normal file
117
dch-webhooks/ansible-job.yaml
Normal file
@@ -0,0 +1,117 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
generateName: host-provision-
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: host-provisioner
|
||||
app.kubernetes.io/component: host-provisioner
|
||||
spec:
|
||||
backoffLimit: 0
|
||||
template:
|
||||
metadata:
|
||||
labels: *labels
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
initContainers:
|
||||
- name: ssh-agent
|
||||
image: &image git.pyrocufflink.net/infra/host-provisioner
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- tini
|
||||
- ssh-agent
|
||||
- --
|
||||
- -D
|
||||
- -a
|
||||
- /run/ssh/agent.sock
|
||||
restartPolicy: Always
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /run/ssh
|
||||
name: tmp
|
||||
subPath: run/ssh
|
||||
- name: ssh-add
|
||||
image: *image
|
||||
command:
|
||||
- ssh-add
|
||||
- -t
|
||||
- 30m
|
||||
- /run/secrets/ssh/host-provisioner.key
|
||||
env:
|
||||
- name: SSH_AUTH_SOCK
|
||||
value: /run/ssh/agent.sock
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /run/ssh
|
||||
name: tmp
|
||||
subPath: run/ssh
|
||||
- mountPath: /run/secrets/ssh
|
||||
name: provisioner-key
|
||||
readOnly: true
|
||||
containers:
|
||||
- name: host-provisioner
|
||||
image: *image
|
||||
env:
|
||||
- name: SSH_AUTH_SOCK
|
||||
value: /run/ssh/agent.sock
|
||||
- name: AMQP_HOST
|
||||
value: rabbitmq.pyrocufflink.blue
|
||||
- name: AMQP_PORT
|
||||
value: '5671'
|
||||
- name: AMQP_CA_CERT
|
||||
value: /run/dch-ca/dch-root-ca.crt
|
||||
- name: AMQP_CLIENT_CERT
|
||||
value: /run/secrets/host-provisioner/rabbitmq/tls.crt
|
||||
- name: AMQP_CLIENT_KEY
|
||||
value: /run/secrets/host-provisioner/rabbitmq/tls.key
|
||||
- name: AMQP_EXTERNAL_CREDENTIALS
|
||||
value: '1'
|
||||
- name: PYROCUFFLINK_EXCLUDE_TEST
|
||||
value: 'false'
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /etc/ssh/ssh_known_hosts
|
||||
name: ssh-known-hosts
|
||||
subPath: ssh_known_hosts
|
||||
readOnly: true
|
||||
- mountPath: /home/jenkins
|
||||
name: workspace
|
||||
- mountPath: /run/dch-ca
|
||||
name: dch-root-ca
|
||||
readOnly: true
|
||||
- mountPath: /run/ssh
|
||||
name: tmp
|
||||
subPath: run/ssh
|
||||
- mountPath: /run/secrets/host-provisioner/rabbitmq
|
||||
name: rabbitmq-cert
|
||||
readOnly: true
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
subPath: tmp
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
fsGroup: 1000
|
||||
volumes:
|
||||
- name: dch-root-ca
|
||||
configMap:
|
||||
name: dch-root-ca
|
||||
- name: provisioner-key
|
||||
secret:
|
||||
secretName: provisioner-ssh-key
|
||||
defaultMode: 0440
|
||||
- name: ssh-known-hosts
|
||||
configMap:
|
||||
name: ssh-known-hosts
|
||||
- name: rabbitmq-cert
|
||||
secret:
|
||||
secretName: rabbitmq-cert
|
||||
defaultMode: 0440
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
- name: workspace
|
||||
emptyDir: {}
|
||||
14
dch-webhooks/certificate.yaml
Normal file
14
dch-webhooks/certificate.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
spec:
|
||||
secretName: rabbitmq-cert
|
||||
commonName: dch-webhooks
|
||||
issuerRef:
|
||||
group: cert-manager.io
|
||||
kind: ClusterIssuer
|
||||
name: rabbitmq-ca
|
||||
privateKey:
|
||||
algorithm: ECDSA
|
||||
rotationPolicy: Always
|
||||
@@ -7,3 +7,10 @@ STEP_CA_URL=https://ca.pyrocufflink.blue:32599
|
||||
STEP_ROOT=/run/dch-root-ca.crt
|
||||
STEP_PROVISIONER=host-bootstrap
|
||||
STEP_PROVISIONER_PASSWORD_FILE=/run/secrets/du5t1n.me/step-ca/provisioner.password
|
||||
|
||||
AMQP_HOST=rabbitmq.pyrocufflink.blue
|
||||
AMQP_PORT=5671
|
||||
AMQP_EXTERNAL_CREDENTIALS=1
|
||||
AMQP_CA_CERT=/run/dch-root-ca.crt
|
||||
AMQP_CLIENT_CERT=/run/secrets/du5t1n.me/rabbitmq/tls.crt
|
||||
AMQP_CLIENT_KEY=/run/secrets/du5t1n.me/rabbitmq/tls.key
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: dch-webhooks
|
||||
labels:
|
||||
app.kubernetes.io/name: dch-webhooks
|
||||
app.kubernetes.io/component: dch-webhooks
|
||||
app.kubernetes.io/part-of: dch-webhooks
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
@@ -42,12 +52,14 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: dch-webhooks
|
||||
image: git.pyrocufflink.net/containerimages/dch-webhooks
|
||||
image: git.pyrocufflink.net/infra/dch-webhooks
|
||||
env:
|
||||
- name: UVICORN_HOST
|
||||
value: 0.0.0.0
|
||||
- name: UVICORN_LOG_LEVEL
|
||||
value: debug
|
||||
- name: ANSIBLE_JOB_YAML
|
||||
value: /etc/dch-webhooks/ansible-job.yaml
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: dch-webhooks
|
||||
@@ -76,22 +88,37 @@ spec:
|
||||
name: firefly-token
|
||||
- mountPath: /run/secrets/du5t1n.me/paperless
|
||||
name: paperless-token
|
||||
- mountPath: /run/secrets/du5t1n.me/rabbitmq
|
||||
name: rabbitmq-cert
|
||||
readOnly: true
|
||||
- mountPath: /run/secrets/du5t1n.me/step-ca
|
||||
name: step-ca-password
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
subPath: tmp
|
||||
- mountPath: /etc/dch-webhooks
|
||||
name: host-provisioner
|
||||
readOnly: true
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
serviceAccountName: dch-webhooks
|
||||
volumes:
|
||||
- name: firefly-token
|
||||
secret:
|
||||
secretName: firefly-token
|
||||
optional: true
|
||||
- name: host-provisioner
|
||||
configMap:
|
||||
name: host-provisioner
|
||||
optional: true
|
||||
- name: paperless-token
|
||||
secret:
|
||||
secretName: paperless-token
|
||||
optional: true
|
||||
- name: rabbitmq-cert
|
||||
secret:
|
||||
secretName: rabbitmq-cert
|
||||
optional: true
|
||||
- name: root-ca
|
||||
configMap:
|
||||
name: dch-root-ca
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app.kubernetes.io/instance: dch-webhooks
|
||||
includeSelectors: true
|
||||
includeTemplates: true
|
||||
- pairs:
|
||||
app.kubernetes.io/part-of: dch-webhooks
|
||||
|
||||
resources:
|
||||
- ../dch-root-ca
|
||||
- dch-webhooks.yaml
|
||||
- certificate.yaml
|
||||
- ingress.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: dch-webhooks
|
||||
envs:
|
||||
- dch-webhooks.env
|
||||
- name: host-provisioner
|
||||
files:
|
||||
- ansible-job.yaml
|
||||
options:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
secretGenerator:
|
||||
- name: firefly-token
|
||||
|
||||
1
dynk8s-provisioner/.gitignore
vendored
Normal file
1
dynk8s-provisioner/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
wireguard-config
|
||||
@@ -1,179 +1,3 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: dynk8s
|
||||
labels:
|
||||
kubernetes.io/metadata.name: dynk8s
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
automountServiceAccountToken: true
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- '*'
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: kube-system
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- '*'
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: kube-public
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- configmaps
|
||||
resourceNames:
|
||||
- cluster-info
|
||||
verbs:
|
||||
- get
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- list
|
||||
- get
|
||||
- delete
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: dynk8s-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: dynk8s-provisioner
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: kube-system
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: dynk8s-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: kube-public
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: dynk8s-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: dynk8s-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
@@ -268,54 +92,3 @@ spec:
|
||||
ports:
|
||||
- port: 8000
|
||||
name: http
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- dynk8s-provisioner.pyrocufflink.net
|
||||
rules:
|
||||
- host: dynk8s-provisioner.pyrocufflink.net
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: dynk8s-provisioner
|
||||
port:
|
||||
name: http
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: wireguard-config-0
|
||||
namespace: dynk8s
|
||||
labels:
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
dynk8s.du5t1n.me/ec2-instance-id: ''
|
||||
type: dynk8s.du5t1n.me/wireguard-config
|
||||
stringData:
|
||||
wireguard-config: |+
|
||||
[Interface]
|
||||
Address = 172.30.0.178/28
|
||||
DNS = 172.30.0.1
|
||||
PrivateKey = gGieVWS8SUQxC7L0NKmHlpvBTANNNaucsm9K1ioHPXU=
|
||||
|
||||
[Peer]
|
||||
PublicKey = 85BW2bagvhOZnvFD6gmjnT+uUj5NaF4z+YFBV/br9BA=
|
||||
PresharedKey = bZgUN82zDW7Q+558omOyRrZ0rw3bUohmIjEaxgtZCv8=
|
||||
Endpoint = vpn.pyrocufflink.net:19998
|
||||
AllowedIPs = 172.30.0.0/26, 172.30.0.160/28, 172.31.1.0/24
|
||||
|
||||
26
dynk8s-provisioner/ingress.yaml
Normal file
26
dynk8s-provisioner/ingress.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- dynk8s-provisioner.pyrocufflink.net
|
||||
rules:
|
||||
- host: dynk8s-provisioner.pyrocufflink.net
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: dynk8s-provisioner
|
||||
port:
|
||||
name: http
|
||||
14
dynk8s-provisioner/kustomization.yaml
Normal file
14
dynk8s-provisioner/kustomization.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- rbac.yaml
|
||||
- dynk8s-provisioner.yaml
|
||||
- ingress.yaml
|
||||
- secrets.yaml
|
||||
7
dynk8s-provisioner/namespace.yaml
Normal file
7
dynk8s-provisioner/namespace.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: dynk8s
|
||||
labels:
|
||||
kubernetes.io/metadata.name: dynk8s
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
164
dynk8s-provisioner/rbac.yaml
Normal file
164
dynk8s-provisioner/rbac.yaml
Normal file
@@ -0,0 +1,164 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
automountServiceAccountToken: true
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- '*'
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: kube-system
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- '*'
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: kube-public
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- configmaps
|
||||
resourceNames:
|
||||
- cluster-info
|
||||
verbs:
|
||||
- get
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/component: http-api
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ''
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- list
|
||||
- get
|
||||
- delete
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: dynk8s-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: dynk8s-provisioner
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: kube-system
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: dynk8s-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
namespace: kube-public
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: dynk8s-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: dynk8s-provisioner
|
||||
labels:
|
||||
app.kubernetes.io/name: dynk8s-provisioner
|
||||
app.kubernetes.io/instance: dynk8s-provisioner
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: dynk8s-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: dynk8s-provisioner
|
||||
namespace: dynk8s
|
||||
16
dynk8s-provisioner/secrets.yaml
Normal file
16
dynk8s-provisioner/secrets.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
name: wireguard-config-0
|
||||
namespace: dynk8s
|
||||
spec:
|
||||
encryptedData:
|
||||
wireguard-config: AgCRjcXhRNtDg/LSmDKFxbSunGGNBu6GrHGYIPG+DMXCbAIiRnnjxpeu/7Vh0WrYcHCHoLdm0NAr7M9G7S8aS8XUDZ7ANphGk56t8Mrrv9ZzOwHyCnxm3QM6q7RNus2+PgKJ/zNe8j5M1u4v3wGk1XzXPtYQ4dRp6op5X+ILGUu16Y2/hcfHEtW9IupqCKgteo1GAyHY4I86ldsTSIvEtcriVhXrEIYYRwYzEpR06y15dbz4qC86nTDp0RuhO+eU4hEzu/c80IJIjTz5CbDundSYRLqafZgs+LwL2fo5wnVyDy1KfP5X2o2mbZFz/5fhwj3M27/g+4KLh08NY5DJTMN1CFrHYGcWUbpIqWYCEJd8c40jRzzDVhcHA3WJjOd0KZv0oRfwmjbBlf0mMxDcJhG/h8tngQBs6aNEpq69RbABbL0bBkIQBokmib4bSfppHTBYNhzbdLwDQJD072qqNGKbDufHkcK4bBwuvmeE00EKxqFoqz++6EQMRkuNN7UtpFDKyDxElOMlo09KKGMUqz/JkFPb4YRJhF31+CskWmU1AVFge7Z5sVe5lMiDpoH62Zg5sxRSaHbdYvsS1vxsTfdG3rmhOAMxxYc+Kvt3u3eNkzEV3lUosorspZhBnEzyHHcap1QUd19vVarjv77g9Br7PATOl3SmuK58JqW2dyOiMQvjLNUAZ27q3uEZGAzRZ8yg5RoejFpueFJjSjTnV1UFdH/OseHXgvFd60syg/mviIA9IGzaxCjoZfxL1GlfjGDYsetnnIDCcQR8K915Qh0PfMdwHKsPBmmDGAxP7k/DHEM3tYC66SQAD4mpMH4Ri8jDD3ijpq8ud93CZX5S32rU0yrXIWCM4ByXks32HACCEOIdfHuGuys6FRQTCPFJuYlpwsVTSJKLjy59rTz5B6nLKxtaOuRULh8MrDR7KlhMiE7gl5waiIlYaiecVn/sNfu4q9UfgwGUntKIovmrwcBPjMRmLgs3IQH4p02G4OemPaByXkPD1JROk2epNkLMwH+IsUxAveGy/hCmrLa9fRaJWSlfuAQtqOihf34YBudsfqwr0UGLI8VsVe+p+tF+AYftUGDf1trJTI8TJUB/91CwrC6c61EFbQCJc90w+lL+oJueDZdGXzoYvkCsDpfFMA==
|
||||
template:
|
||||
metadata:
|
||||
name: wireguard-config-0
|
||||
namespace: dynk8s
|
||||
labels:
|
||||
app.kubernetes.io/part-of: dynk8s-provisioner
|
||||
dynk8s.du5t1n.me/ec2-instance-id: ''
|
||||
type: dynk8s.du5t1n.me/wireguard-config
|
||||
11
dynk8s-provisioner/wireguard-config.new
Normal file
11
dynk8s-provisioner/wireguard-config.new
Normal file
@@ -0,0 +1,11 @@
|
||||
# vim: set ft=dosini :
|
||||
[Interface]
|
||||
Address = 172.30.0.194/29
|
||||
DNS = 172.30.0.1
|
||||
PrivateKey = WJb4G0EL5xc0VMHZeiqJE3G0OlFhe1Q5CEJkMg8hTkE=
|
||||
|
||||
[Peer]
|
||||
PublicKey = 85BW2bagvhOZnvFD6gmjnT+uUj5NaF4z+YFBV/br9BA=
|
||||
PresharedKey = gVRSPVLZMx1maIfecFIcAeesrireopaKqs0jDj9muS0=
|
||||
Endpoint = vpn.pyrocufflink.net:19998
|
||||
AllowedIPs = 172.30.0.0/26, 172.30.0.160/28, 172.31.1.0/24
|
||||
@@ -1,6 +1,6 @@
|
||||
TZ=America/Chicago
|
||||
|
||||
TRUSTED_PROXIES=172.30.0.160/28
|
||||
TRUSTED_PROXIES=10.149.0.0/16
|
||||
VANITY_URL=https://firefly.pyrocufflink.blue
|
||||
|
||||
CAN_POST_FILES=true
|
||||
|
||||
@@ -4,7 +4,7 @@ SITE_OWNER=dustin@hatch.name
|
||||
|
||||
TZ=America/Chicago
|
||||
|
||||
TRUSTED_PROXIES=172.30.0.160/28
|
||||
TRUSTED_PROXIES=10.149.0.0/16
|
||||
|
||||
DB_CONNECTION=pgsql
|
||||
DB_HOST=postgresql.pyrocufflink.blue
|
||||
|
||||
@@ -15,7 +15,7 @@ resources:
|
||||
- ingress.yaml
|
||||
- importer.yaml
|
||||
- importer-ingress.yaml
|
||||
- ../dch-root-ca
|
||||
- ../dch-root-ca
|
||||
|
||||
configMapGenerator:
|
||||
- name: firefly-iii
|
||||
@@ -53,3 +53,6 @@ patches:
|
||||
secret:
|
||||
secretName: postgres-client-cert
|
||||
defaultMode: 0640
|
||||
images:
|
||||
- name: docker.io/fireflyiii/core
|
||||
newTag: version-6.2.9
|
||||
|
||||
@@ -19,3 +19,8 @@ patches:
|
||||
name: fleetlock
|
||||
spec:
|
||||
clusterIP: 10.96.1.15
|
||||
|
||||
images:
|
||||
- name: quay.io/poseidon/fleetlock
|
||||
newName: git.pyrocufflink.net/containerimages/fleetlock
|
||||
newTag: vadimberezniker-wait_evictions
|
||||
|
||||
1
home-assistant/.gitignore
vendored
1
home-assistant/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
mosquitto.passwd
|
||||
secrets.yaml.in
|
||||
|
||||
@@ -12,7 +12,6 @@ input_number:
|
||||
input_select:
|
||||
input_text:
|
||||
logbook:
|
||||
map:
|
||||
media_source:
|
||||
mobile_app:
|
||||
person:
|
||||
@@ -29,7 +28,7 @@ zone:
|
||||
|
||||
http:
|
||||
trusted_proxies:
|
||||
- 172.30.0.160/28
|
||||
- 10.149.0.0/16
|
||||
use_x_forwarded_for: true
|
||||
|
||||
recorder:
|
||||
@@ -39,6 +38,18 @@ recorder:
|
||||
commit_interval: 0
|
||||
|
||||
homeassistant:
|
||||
auth_providers:
|
||||
- type: trusted_networks
|
||||
trusted_networks:
|
||||
- 172.31.1.81/32
|
||||
- 172.31.1.115/32
|
||||
trusted_users:
|
||||
172.31.1.81:
|
||||
- 03a8b3528f1145ab908e20ed5687d893
|
||||
172.31.1.115:
|
||||
- 03a8b3528f1145ab908e20ed5687d893
|
||||
- type: homeassistant
|
||||
allow_bypass_login: true
|
||||
whitelist_external_dirs:
|
||||
- /config
|
||||
- /tmp
|
||||
@@ -76,25 +87,7 @@ light:
|
||||
- light.light_6
|
||||
- light.light_7
|
||||
|
||||
matrix:
|
||||
homeserver: https://hatch.chat
|
||||
username: '@homeassistant:hatch.chat'
|
||||
password: !secret matrix_password
|
||||
rooms:
|
||||
- '!DdgnpVhlRqeTeNqSEM:hatch.chat'
|
||||
- '!oyDXJxjUeJkEFshmAn:hatch.chat'
|
||||
commands:
|
||||
- word: snapshot
|
||||
name: snapshot
|
||||
- word: bunnies
|
||||
name: bunnies
|
||||
- expression: 'lights (?P<scene>.*)'
|
||||
name: lights
|
||||
|
||||
notify:
|
||||
- platform: matrix
|
||||
name: matrix
|
||||
default_room: '!DdgnpVhlRqeTeNqSEM:hatch.chat'
|
||||
- platform: group
|
||||
name: mobile_apps_group
|
||||
services:
|
||||
@@ -121,37 +114,8 @@ sensor:
|
||||
max_age:
|
||||
hours: 24
|
||||
|
||||
- platform: seventeentrack
|
||||
username: gyrfalcon@ebonfire.com
|
||||
password: !secret seventeentrack_password
|
||||
|
||||
template:
|
||||
- sensor:
|
||||
- name: 'Thermostat Temperature'
|
||||
device_class: temperature
|
||||
unit_of_measurement: °C
|
||||
state: >-
|
||||
{% if is_state('sensor.season', 'winter') %}
|
||||
{{ states('sensor.living_room_temperature') }}
|
||||
{% else %}
|
||||
{{ states('sensor.bedroom_temperature') }}
|
||||
{% endif %}
|
||||
|
||||
- name: "Tonight's Forecast"
|
||||
device_class: temperature
|
||||
unit_of_measurement: °C
|
||||
state: >-
|
||||
{{ state_attr('weather.kojc_daynight', 'forecast')
|
||||
| rejectattr('is_daytime')
|
||||
| map(attribute='temperature')
|
||||
| first }}
|
||||
|
||||
- name: Cost per Mow
|
||||
device_class: monetary
|
||||
unit_of_measurement: USD
|
||||
state: >-
|
||||
{{ 3072.21 / states('counter.mow_count')|int }}
|
||||
|
||||
- name: Apc1500 Load
|
||||
device_class: power
|
||||
unit_of_measurement: W
|
||||
|
||||
@@ -19,7 +19,7 @@ resources:
|
||||
- piper.yaml
|
||||
- whisper.yaml
|
||||
- ingress.yaml
|
||||
- ../dch-root-ca
|
||||
- ../dch-root-ca
|
||||
|
||||
configMapGenerator:
|
||||
- name: home-assistant
|
||||
@@ -28,7 +28,10 @@ configMapGenerator:
|
||||
- event-snapshot.sh
|
||||
- groups.yaml
|
||||
- restart-diddy-mopidy.sh
|
||||
- restart-kitchen-mqttmarionette.sh
|
||||
- shell-command.yaml
|
||||
- shutdown-kiosk.sh
|
||||
- ssh_known_hosts
|
||||
- rest-command.yaml
|
||||
options:
|
||||
disableNameSuffixHash: true
|
||||
@@ -113,3 +116,16 @@ patches:
|
||||
- name: dch-root-ca
|
||||
configMap:
|
||||
name: dch-root-ca
|
||||
images:
|
||||
- name: ghcr.io/home-assistant/home-assistant
|
||||
newTag: 2025.4.2
|
||||
- name: docker.io/rhasspy/wyoming-whisper
|
||||
newTag: 2.4.0
|
||||
- name: docker.io/rhasspy/wyoming-piper
|
||||
newTag: 1.5.0
|
||||
- name: docker.io/koenkk/zigbee2mqtt
|
||||
newTag: 2.2.1
|
||||
- name: docker.io/zwavejs/zwave-js-ui
|
||||
newTag: 10.1.5
|
||||
- name: docker.io/library/eclipse-mosquitto
|
||||
newTag: 2.0.21
|
||||
|
||||
@@ -26,11 +26,12 @@ spec:
|
||||
ports:
|
||||
- port: 8883
|
||||
name: mqtt
|
||||
nodePort: 30783
|
||||
selector:
|
||||
app.kubernetes.io/component: mosquitto
|
||||
app.kubernetes.io/name: mosquitto
|
||||
type: NodePort
|
||||
type: ClusterIP
|
||||
externalIPs:
|
||||
- 172.30.0.148
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
|
||||
1
home-assistant/restart-kitchen-mqttmarionette.sh
Normal file
1
home-assistant/restart-kitchen-mqttmarionette.sh
Normal file
@@ -0,0 +1 @@
|
||||
ssh -i /run/secrets/home-assistant/sshkey.pem -oUserKnownHostsFile=/run/config/ssh_known_hosts -oBatchMode=yes kitchen@kitchen.pyrocufflink.red restart-mqttmarionette
|
||||
@@ -3,3 +3,9 @@ event_snapshot: >-
|
||||
|
||||
restart_diddy_mopidy: >-
|
||||
sh /run/config/restart-diddy-mopidy.sh
|
||||
|
||||
restart_kitchen_mqttmarionette: >-
|
||||
sh /run/config/restart-kitchen-mqttmarionette.sh
|
||||
|
||||
shutdown_kiosk: >-
|
||||
sh /run/config/shutdown-kiosk.sh
|
||||
|
||||
4
home-assistant/shutdown-kiosk.sh
Normal file
4
home-assistant/shutdown-kiosk.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
ssh -i /run/secrets/home-assistant/sshkey.pem -oUserKnownHostsFile=/run/config/ssh_known_hosts -oBatchMode=yes kiosk@deskpanel.pyrocufflink.red doas systemctl poweroff
|
||||
3
home-assistant/ssh_known_hosts
Normal file
3
home-assistant/ssh_known_hosts
Normal file
@@ -0,0 +1,3 @@
|
||||
diddy.pyrocufflink.red ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILx6gRqlVnvdqTIJTH16NBLJ4ORfTsBaUIEpt5ZMkkNW
|
||||
kitchen.pyrocufflink.red ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBLzMLOlFXPiovBwYLmXCVV8Md/xR36zwPj6egT9V3O7
|
||||
deskpanel.pyrocufflink.red ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEcvO0jsZ8U2mw/HHs0BHbbEI48W0fxti8f5DuNyFS2L
|
||||
@@ -62,12 +62,17 @@ spec:
|
||||
runAsUser: 300
|
||||
runAsGroup: 300
|
||||
volumeMounts:
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
subPath: tmp
|
||||
- name: whisper-data
|
||||
mountPath: /data
|
||||
subPath: data
|
||||
securityContext:
|
||||
fsGroup: 300
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
- name: whisper-data
|
||||
ephemeral:
|
||||
volumeClaimTemplate:
|
||||
|
||||
@@ -93,6 +93,8 @@ spec:
|
||||
name: zigbee-device
|
||||
securityContext:
|
||||
fsGroup: 302
|
||||
supplementalGroups:
|
||||
- 18
|
||||
volumes:
|
||||
- name: zigbee2mqtt-data
|
||||
persistentVolumeClaim:
|
||||
|
||||
@@ -1,650 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
name: ingress-nginx
|
||||
---
|
||||
apiVersion: v1
|
||||
automountServiceAccountToken: true
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx
|
||||
namespace: ingress-nginx
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-webhook
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-admission
|
||||
namespace: ingress-nginx
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx
|
||||
namespace: ingress-nginx
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
- pods
|
||||
- secrets
|
||||
- endpoints
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingressclasses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resourceNames:
|
||||
- ingress-controller-leader
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resourceNames:
|
||||
- ingress-controller-leader
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-webhook
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-admission
|
||||
namespace: ingress-nginx
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
- endpoints
|
||||
- nodes
|
||||
- pods
|
||||
- secrets
|
||||
- namespaces
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingressclasses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-webhook
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-admission
|
||||
rules:
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx
|
||||
namespace: ingress-nginx
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: ingress-nginx
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: ingress-nginx
|
||||
namespace: ingress-nginx
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-webhook
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-admission
|
||||
namespace: ingress-nginx
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: ingress-nginx-admission
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: ingress-nginx-admission
|
||||
namespace: ingress-nginx
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: ingress-nginx
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: ingress-nginx
|
||||
namespace: ingress-nginx
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-webhook
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-admission
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: ingress-nginx-admission
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: ingress-nginx-admission
|
||||
namespace: ingress-nginx
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
allow-snippet-annotations: "true"
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-controller
|
||||
namespace: ingress-nginx
|
||||
# We will be using `hostNetwork: true` for nginx ingress controller
|
||||
# pods, so no Service object is required. All nodes run a copy of the
|
||||
# ingress controller (it is configured as a DaemonSet); traffic from
|
||||
# outside the cluster is sent to an arbitrary node and routed from
|
||||
# there to the appropriate Service.
|
||||
# ---
|
||||
# apiVersion: v1
|
||||
# kind: Service
|
||||
# metadata:
|
||||
# labels:
|
||||
# app.kubernetes.io/component: controller
|
||||
# app.kubernetes.io/instance: ingress-nginx
|
||||
# app.kubernetes.io/name: ingress-nginx
|
||||
# app.kubernetes.io/part-of: ingress-nginx
|
||||
# app.kubernetes.io/version: 1.3.0
|
||||
# name: ingress-nginx-controller
|
||||
# namespace: ingress-nginx
|
||||
# spec:
|
||||
# ports:
|
||||
# - appProtocol: http
|
||||
# name: http
|
||||
# port: 80
|
||||
# protocol: TCP
|
||||
# targetPort: http
|
||||
# - appProtocol: https
|
||||
# name: https
|
||||
# port: 443
|
||||
# protocol: TCP
|
||||
# targetPort: https
|
||||
# selector:
|
||||
# app.kubernetes.io/component: controller
|
||||
# app.kubernetes.io/instance: ingress-nginx
|
||||
# app.kubernetes.io/name: ingress-nginx
|
||||
# type: NodePort
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-controller-admission
|
||||
namespace: ingress-nginx
|
||||
spec:
|
||||
ports:
|
||||
- appProtocol: https
|
||||
name: https-webhook
|
||||
port: 443
|
||||
targetPort: webhook
|
||||
selector:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
type: ClusterIP
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-controller
|
||||
namespace: ingress-nginx
|
||||
spec:
|
||||
minReadySeconds: 0
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
spec:
|
||||
# nginx ingress controller listens on the "real" IP address of
|
||||
# the node.
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- args:
|
||||
- /nginx-ingress-controller
|
||||
- --election-id=ingress-controller-leader
|
||||
- --controller-class=k8s.io/ingress-nginx
|
||||
- --ingress-class=nginx
|
||||
- --configmap=$(POD_NAMESPACE)/ingress-nginx-controller
|
||||
- --validating-webhook=:8443
|
||||
- --validating-webhook-certificate=/usr/local/certificates/cert
|
||||
- --validating-webhook-key=/usr/local/certificates/key
|
||||
# Publish the node's IP address as the ingress External IP
|
||||
- --report-node-internal-ip-address
|
||||
- --default-ssl-certificate=default/pyrocufflink-cert
|
||||
- --tcp-services-configmap=ingress-nginx/tcp-services
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: LD_PRELOAD
|
||||
value: /usr/local/lib/libmimalloc.so
|
||||
image: registry.k8s.io/ingress-nginx/controller:v1.3.0@sha256:d1707ca76d3b044ab8a28277a2466a02100ee9f58a86af1535a3edf9323ea1b5
|
||||
imagePullPolicy: IfNotPresent
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- /wait-shutdown
|
||||
livenessProbe:
|
||||
failureThreshold: 5
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 10254
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
name: controller
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 443
|
||||
name: https
|
||||
protocol: TCP
|
||||
- containerPort: 8443
|
||||
name: webhook
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 10254
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 90Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: true
|
||||
capabilities:
|
||||
add:
|
||||
- NET_BIND_SERVICE
|
||||
drop:
|
||||
- ALL
|
||||
runAsUser: 101
|
||||
volumeMounts:
|
||||
- mountPath: /usr/local/certificates/
|
||||
name: webhook-cert
|
||||
readOnly: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
kubernetes.io/role: ingress
|
||||
serviceAccountName: ingress-nginx
|
||||
terminationGracePeriodSeconds: 300
|
||||
volumes:
|
||||
- name: webhook-cert
|
||||
secret:
|
||||
secretName: ingress-nginx-admission
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-webhook
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-admission-create
|
||||
namespace: ingress-nginx
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-webhook
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-admission-create
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- create
|
||||
- --host=ingress-nginx-controller-admission,ingress-nginx-controller-admission.$(POD_NAMESPACE).svc
|
||||
- --namespace=$(POD_NAMESPACE)
|
||||
- --secret-name=ingress-nginx-admission
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: create
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
restartPolicy: OnFailure
|
||||
securityContext:
|
||||
fsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
serviceAccountName: ingress-nginx-admission
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-webhook
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-admission-patch
|
||||
namespace: ingress-nginx
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-webhook
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-admission-patch
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- patch
|
||||
- --webhook-name=ingress-nginx-admission
|
||||
- --namespace=$(POD_NAMESPACE)
|
||||
- --patch-mutating=false
|
||||
- --secret-name=ingress-nginx-admission
|
||||
- --patch-failure-policy=Fail
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: patch
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
restartPolicy: OnFailure
|
||||
securityContext:
|
||||
fsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
serviceAccountName: ingress-nginx-admission
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: IngressClass
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: nginx
|
||||
spec:
|
||||
controller: k8s.io/ingress-nginx
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-webhook
|
||||
app.kubernetes.io/instance: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
app.kubernetes.io/version: 1.3.0
|
||||
name: ingress-nginx-admission
|
||||
webhooks:
|
||||
- admissionReviewVersions:
|
||||
- v1
|
||||
clientConfig:
|
||||
service:
|
||||
name: ingress-nginx-controller-admission
|
||||
namespace: ingress-nginx
|
||||
path: /networking/v1/ingresses
|
||||
failurePolicy: Fail
|
||||
matchPolicy: Equivalent
|
||||
name: validate.nginx.ingress.kubernetes.io
|
||||
rules:
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
apiVersions:
|
||||
- v1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- ingresses
|
||||
sideEffects: None
|
||||
@@ -4,5 +4,39 @@ kind: Kustomization
|
||||
namespace: ingress-nginx
|
||||
|
||||
resources:
|
||||
- ingress-nginx.yaml
|
||||
- tcp-services.yaml
|
||||
- https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.3.0/deploy/static/provider/cloud/deploy.yaml
|
||||
|
||||
replicas:
|
||||
- name: ingress-nginx-controller
|
||||
count: 2
|
||||
|
||||
patches:
|
||||
- patch: |-
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ingress-nginx-controller
|
||||
namespace: ingress-nginx
|
||||
spec:
|
||||
externalIPs:
|
||||
- 172.30.0.147
|
||||
externalTrafficPolicy: Local
|
||||
|
||||
- patch: |-
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: >-
|
||||
--default-ssl-certificate=default/pyrocufflink-cert
|
||||
target:
|
||||
group: apps
|
||||
kind: Deployment
|
||||
name: ingress-nginx-controller
|
||||
version: v1
|
||||
|
||||
- patch: |-
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: IngressClass
|
||||
metadata:
|
||||
name: nginx
|
||||
annotations:
|
||||
ingressclass.kubernetes.io/is-default-class: "true"
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: tcp-services
|
||||
data:
|
||||
'8883': home-assistant/mosquitto:8883
|
||||
'5671': rabbitmq/rabbitmq:5671
|
||||
@@ -9,7 +9,7 @@ metadata:
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: 40m
|
||||
spec:
|
||||
rules:
|
||||
- host: invoiceninja.pyrocufflink.blue
|
||||
- host: invoiceninja.pyrocufflink.net
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
@@ -46,3 +46,17 @@ spec:
|
||||
name: invoice-ninja
|
||||
port:
|
||||
name: http
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: invoice-ninja-redirect
|
||||
labels:
|
||||
app.kubernetes.io/name: invoice-ninja-redirect
|
||||
app.kubernetes.io/component: invoice-ninja
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/permanent-redirect: https://invoiceninja.pyrocufflink.net
|
||||
spec:
|
||||
rules:
|
||||
- host: invoiceninja.pyrocufflink.blue
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
APP_LOGO=https://invoiceninja.pyrocufflink.blue/images/logo.png
|
||||
APP_URL=https://invoiceninja.pyrocufflink.blue
|
||||
TRUSTED_PROXIES=172.30.0.171,172.30.0.172,172.30.0.173
|
||||
APP_LOGO=https://invoiceninja.pyrocufflink.net/images/logo.png
|
||||
APP_URL=https://invoiceninja.pyrocufflink.net
|
||||
TRUSTED_PROXIES=10.149.0.0/16
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mail.pyrocufflink.blue
|
||||
|
||||
@@ -19,7 +19,6 @@ resources:
|
||||
configMapGenerator:
|
||||
- name: invoice-ninja-init
|
||||
files:
|
||||
- init.sh
|
||||
- start.sh
|
||||
|
||||
- name: invoice-ninja
|
||||
|
||||
@@ -29,8 +29,9 @@ spec:
|
||||
ports:
|
||||
- port: 25
|
||||
- to:
|
||||
- ipBlock:
|
||||
cidr: 172.30.0.160/28
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: ingress-nginx
|
||||
ports:
|
||||
- port: 80
|
||||
- port: 443
|
||||
|
||||
170
jenkins/gentoo-storage.yaml
Normal file
170
jenkins/gentoo-storage.yaml
Normal file
@@ -0,0 +1,170 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: portage
|
||||
namespace: jenkins-jobs
|
||||
labels:
|
||||
app.kubernetes.io/name: portage
|
||||
app.kubernetes.io/component: gentoo
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 4Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: binpkgs
|
||||
namespace: jenkins-jobs
|
||||
labels:
|
||||
app.kubernetes.io/name: binpkgs
|
||||
app.kubernetes.io/component: gentoo
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: gentoo-dist
|
||||
namespace: jenkins-jobs
|
||||
labels:
|
||||
app.kubernetes.io/name: gentoo-dist
|
||||
app.kubernetes.io/component: gentoo
|
||||
data:
|
||||
rsyncd.conf: |+
|
||||
[gentoo-portage]
|
||||
path = /var/db/repos/gentoo
|
||||
|
||||
[binpkgs]
|
||||
path = /var/cache/binpkgs
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gentoo-dist
|
||||
namespace: jenkins-jobs
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: gentoo-dist
|
||||
app.kubernetes.io/component: gentoo
|
||||
ports:
|
||||
- name: rsync
|
||||
port: 873
|
||||
targetPort: rsync
|
||||
type: NodePort
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gentoo-dist
|
||||
namespace: jenkins-jobs
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: gentoo-dist
|
||||
app.kubernetes.io/component: gentoo
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: *labels
|
||||
template:
|
||||
metadata:
|
||||
labels: *labels
|
||||
spec:
|
||||
containers:
|
||||
- name: rsync
|
||||
image: docker.io/gentoo/stage3
|
||||
command:
|
||||
- /usr/bin/rsync
|
||||
- --daemon
|
||||
- --no-detach
|
||||
- --port=8873
|
||||
- --log-file=/dev/stderr
|
||||
ports:
|
||||
- name: rsync
|
||||
containerPort: 8873
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
runAsUser: 250
|
||||
runAsGroup: 250
|
||||
volumeMounts:
|
||||
- mountPath: /etc/rsyncd.conf
|
||||
name: config
|
||||
subPath: rsyncd.conf
|
||||
- mountPath: /var/db/repos/gentoo
|
||||
name: portage
|
||||
- mountPath: /var/cache/binpkgs
|
||||
name: binpkgs
|
||||
volumes:
|
||||
- name: binpkgs
|
||||
persistentVolumeClaim:
|
||||
claimName: binpkgs
|
||||
- name: config
|
||||
configMap:
|
||||
name: gentoo-dist
|
||||
- name: portage
|
||||
persistentVolumeClaim:
|
||||
claimName: portage
|
||||
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: emerge-webrsync
|
||||
namespace: jenkins-jobs
|
||||
labels:
|
||||
app.kubernetes.io/name: emerge-webrsync
|
||||
app.kubernetes.io/component: gentoo
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: sync
|
||||
image: docker.io/gentoo/stage3
|
||||
command:
|
||||
- emerge-webrsync
|
||||
volumeMounts:
|
||||
- mountPath: /var/db/repos/gentoo
|
||||
name: portage
|
||||
restartPolicy: OnFailure
|
||||
volumes:
|
||||
- name: portage
|
||||
persistentVolumeClaim:
|
||||
claimName: portage
|
||||
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: sync-portage
|
||||
namespace: jenkins-jobs
|
||||
labels:
|
||||
app.kubernetes.io/name: sync-portage
|
||||
app.kubernetes.io/component: gentoo
|
||||
spec:
|
||||
schedule: 4 19 * * *
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: sync
|
||||
image: docker.io/gentoo/stage3
|
||||
command:
|
||||
- emaint
|
||||
- sync
|
||||
volumeMounts:
|
||||
- mountPath: /var/db/repos/gentoo
|
||||
name: portage
|
||||
restartPolicy: OnFailure
|
||||
volumes:
|
||||
- name: portage
|
||||
persistentVolumeClaim:
|
||||
claimName: portage
|
||||
@@ -9,14 +9,8 @@ resources:
|
||||
- jenkins.yaml
|
||||
- secrets.yaml
|
||||
- iscsi.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: ssh-known-hosts
|
||||
namespace: jenkins-jobs
|
||||
files:
|
||||
- ssh_known_hosts
|
||||
options:
|
||||
disableNameSuffixHash: true
|
||||
- gentoo-storage.yaml
|
||||
- ../ssh-host-keys
|
||||
|
||||
patches:
|
||||
- patch: |
|
||||
|
||||
60
keepalived/keepalived.conf
Normal file
60
keepalived/keepalived.conf
Normal file
@@ -0,0 +1,60 @@
|
||||
# vim: set sw=4 ts=4 sts=4 et:
|
||||
includea /run/keepalived.interface
|
||||
|
||||
global_defs {
|
||||
max_auto_priority 79
|
||||
}
|
||||
|
||||
vrrp_track_process ingress-nginx {
|
||||
process nginx-ingress-c
|
||||
weight 90
|
||||
}
|
||||
|
||||
vrrp_track_process mosquitto {
|
||||
process mosquitto
|
||||
weight 90
|
||||
}
|
||||
|
||||
vrrp_track_process rabbitmq {
|
||||
process rabbitmq-server
|
||||
weight 90
|
||||
}
|
||||
|
||||
vrrp_instance ingress-nginx {
|
||||
state BACKUP
|
||||
priority 100
|
||||
interface ${INTERFACE}
|
||||
virtual_router_id 51
|
||||
virtual_ipaddress {
|
||||
172.30.0.147/28
|
||||
}
|
||||
track_process {
|
||||
ingress-nginx
|
||||
}
|
||||
}
|
||||
|
||||
vrrp_instance mosquitto {
|
||||
state BACKUP
|
||||
priority 100
|
||||
interface ${INTERFACE}
|
||||
virtual_router_id 52
|
||||
virtual_ipaddress {
|
||||
172.30.0.148/28
|
||||
}
|
||||
track_process {
|
||||
mosquitto
|
||||
}
|
||||
}
|
||||
|
||||
vrrp_instance rabbitmq {
|
||||
state BACKUP
|
||||
priority 100
|
||||
interface ${INTERFACE}
|
||||
virtual_router_id 53
|
||||
virtual_ipaddress {
|
||||
172.30.0.149/28
|
||||
}
|
||||
track_process {
|
||||
rabbitmq
|
||||
}
|
||||
}
|
||||
54
keepalived/keepalived.yaml
Normal file
54
keepalived/keepalived.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: keepalived
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: keepalived
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: *labels
|
||||
minReadySeconds: 10
|
||||
template:
|
||||
metadata:
|
||||
labels: *labels
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init
|
||||
image: docker.io/library/busybox
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
printf '$INTERFACE=%s\n' \
|
||||
$(ip route | awk '/^default via/{print $5}') \
|
||||
> /run/keepalived.interface
|
||||
volumeMounts:
|
||||
- mountPath: /run
|
||||
name: tmp
|
||||
subPath: run
|
||||
containers:
|
||||
- name: keepalived
|
||||
image: git.pyrocufflink.net/containerimages/keepalived:dev
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- keepalived
|
||||
- -nGlD
|
||||
securityContext:
|
||||
privileged: true
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /etc/keepalived
|
||||
name: config
|
||||
readOnly: true
|
||||
- mountPath: /run
|
||||
name: tmp
|
||||
subPath: run
|
||||
hostNetwork: true
|
||||
hostPID: true
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: keepalived
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
24
keepalived/kustomization.yaml
Normal file
24
keepalived/kustomization.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app.kubernetes.io/component: keepalived
|
||||
app.kubernetes.io/instance: keepalived
|
||||
includeSelectors: true
|
||||
includeTemplates: true
|
||||
- pairs:
|
||||
app.kubernetes.io/part-of: keepalived
|
||||
|
||||
namespace: keepalived
|
||||
|
||||
resources:
|
||||
- keepalived.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: keepalived
|
||||
files:
|
||||
- keepalived.conf
|
||||
options:
|
||||
labels:
|
||||
app.kubernetes.io/name: keepalived
|
||||
6
keepalived/namespace.yaml
Normal file
6
keepalived/namespace.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: keepalived
|
||||
labels:
|
||||
app.kubernetes.io/name: keepalived
|
||||
23
ntfy/kustomization.yaml
Normal file
23
ntfy/kustomization.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: ntfy
|
||||
|
||||
resources:
|
||||
- ntfy.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: ntfy
|
||||
namespace: ntfy
|
||||
files:
|
||||
- server.yml
|
||||
options:
|
||||
labels:
|
||||
app.kubernetes.io/name: ntfy
|
||||
app.kubernetes.io/component: ntfy
|
||||
app.kubernetes.io/instance: ntfy
|
||||
app.kubernetes.io/part-of: ntfy
|
||||
|
||||
images:
|
||||
- name: docker.io/binwiederhier/ntfy
|
||||
newTag: v2.11.0
|
||||
@@ -5,25 +5,6 @@ metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: ntfy
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ntfy
|
||||
namespace: ntfy
|
||||
labels:
|
||||
app.kubernetes.io/name: ntfy
|
||||
app.kubernetes.io/component: ntfy
|
||||
app.kubernetes.io/instance: ntfy
|
||||
app.kubernetes.io/part-of: ntfy
|
||||
data:
|
||||
server.yml: |+
|
||||
base-url: https://ntfy.pyrocufflink.net
|
||||
behind-proxy: true
|
||||
listen-http: '[::]:2586'
|
||||
attachment-cache-dir: /var/cache/ntfy/attachments
|
||||
attachment-file-size-limit: 100M
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
@@ -129,7 +110,7 @@ spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: ntfy.pyrocufflink.blue
|
||||
http:
|
||||
http: &http
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
@@ -138,6 +119,9 @@ spec:
|
||||
name: ntfy
|
||||
port:
|
||||
name: http
|
||||
- host: ntfy.pyrocufflink.net
|
||||
http: *http
|
||||
tls:
|
||||
- hosts:
|
||||
- ntfy.pyrocufflink.blue
|
||||
- ntfy.pyrocufflink.net
|
||||
|
||||
6
ntfy/server.yml
Normal file
6
ntfy/server.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
base-url: https://ntfy.pyrocufflink.net
|
||||
behind-proxy: true
|
||||
listen-http: '[::]:2586'
|
||||
attachment-cache-dir: /var/cache/ntfy/attachments
|
||||
attachment-file-size-limit: 100M
|
||||
enable-metrics: true
|
||||
69
paperless-ngx/gotenberg.yaml
Normal file
69
paperless-ngx/gotenberg.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: gotenberg
|
||||
app.kubernetes.io/component: gotenberg
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
name: gotenberg
|
||||
namespace: paperless-ngx
|
||||
spec:
|
||||
ports:
|
||||
- name: gotenberg
|
||||
port: 3000
|
||||
selector:
|
||||
app.kubernetes.io/name: gotenberg
|
||||
app.kubernetes.io/component: gotenberg
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gotenberg
|
||||
namespace: paperless-ngx
|
||||
labels:
|
||||
app.kubernetes.io/name: gotenberg
|
||||
app.kubernetes.io/component: gotenberg
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: gotenberg
|
||||
app.kubernetes.io/component: gotenberg
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: gotenberg
|
||||
app.kubernetes.io/component: gotenberg
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
spec:
|
||||
containers:
|
||||
- name: gotenberg
|
||||
image: docker.io/gotenberg/gotenberg:7.5.4
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- gotenberg
|
||||
- --chromium-disable-javascript=true
|
||||
- --chromium-allow-list=file:///tmp/.*
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
volumeMounts:
|
||||
- mountPath: /home/gotenberg
|
||||
name: tmp
|
||||
subPath: home
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
subPath: tmp
|
||||
securityContext:
|
||||
fsGroup: 1001
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
@@ -1,10 +1,31 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: paperless-ngx
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- redis.yaml
|
||||
- gotenberg.yaml
|
||||
- tika.yaml
|
||||
- paperless-ngx.yaml
|
||||
- ingress.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: paperless-cmd
|
||||
files:
|
||||
- paperless_cmd.sh
|
||||
options:
|
||||
labels:
|
||||
app.kubernetes.io/name: paperless_cmd.sh
|
||||
app.kubernetes.io/component: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
disableNameSuffixHash: true
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: StatefulSet
|
||||
@@ -22,3 +43,10 @@ patches:
|
||||
- name: PAPERLESS_URL
|
||||
value: https://paperless.pyrocufflink.blue
|
||||
|
||||
images:
|
||||
- name: ghcr.io/paperless-ngx/paperless-ngx
|
||||
newTag: 2.14.7
|
||||
- name: docker.io/gotenberg/gotenberg
|
||||
newTag: 8.17.3
|
||||
- name: docker.io/apache/tika
|
||||
newTag: 3.1.0.0
|
||||
|
||||
4
paperless-ngx/namespace.yaml
Normal file
4
paperless-ngx/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: paperless-ngx
|
||||
@@ -1,29 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: paperless-ngx
|
||||
labels:
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: paperless-cmd
|
||||
namespace: paperless-ngx
|
||||
labels:
|
||||
app.kubernetes.io/name: paperless_cmd.sh
|
||||
app.kubernetes.io/component: paperless-ngx
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
data:
|
||||
paperless_cmd.sh: |+
|
||||
#!/bin/sh
|
||||
|
||||
exec /usr/local/bin/supervisord -c /etc/supervisord.conf --user paperless
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: paperless-ngx
|
||||
@@ -40,27 +15,6 @@ spec:
|
||||
requests:
|
||||
storage: 20Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
name: redis
|
||||
namespace: paperless-ngx
|
||||
spec:
|
||||
ports:
|
||||
- name: redis
|
||||
port: 6379
|
||||
selector:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
@@ -82,113 +36,6 @@ spec:
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: gotenberg
|
||||
app.kubernetes.io/component: gotenberg
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
name: gotenberg
|
||||
namespace: paperless-ngx
|
||||
spec:
|
||||
ports:
|
||||
- name: gotenberg
|
||||
port: 3000
|
||||
selector:
|
||||
app.kubernetes.io/name: gotenberg
|
||||
app.kubernetes.io/component: gotenberg
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: tika
|
||||
app.kubernetes.io/component: tika
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
name: tika
|
||||
namespace: paperless-ngx
|
||||
spec:
|
||||
ports:
|
||||
- name: tika
|
||||
port: 9998
|
||||
selector:
|
||||
app.kubernetes.io/name: tika
|
||||
app.kubernetes.io/component: tika
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: paperless-ngx
|
||||
labels:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
spec:
|
||||
serviceName: redis
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: docker.io/library/redis:7
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: redis
|
||||
containerPort: 6379
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
subPath: data
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
volumeClaimTemplates:
|
||||
- apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: data
|
||||
labels:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
@@ -233,6 +80,8 @@ spec:
|
||||
value: '1'
|
||||
- name: PAPERLESS_ENABLE_FLOWER
|
||||
value: 'true'
|
||||
- name: PAPERLESS_OCR_USER_ARGS
|
||||
value: '{"continue_on_soft_render_error": true}'
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8000
|
||||
@@ -299,91 +148,3 @@ spec:
|
||||
- name: run
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gotenberg
|
||||
namespace: paperless-ngx
|
||||
labels:
|
||||
app.kubernetes.io/name: gotenberg
|
||||
app.kubernetes.io/component: gotenberg
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: gotenberg
|
||||
app.kubernetes.io/component: gotenberg
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: gotenberg
|
||||
app.kubernetes.io/component: gotenberg
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
spec:
|
||||
containers:
|
||||
- name: gotenberg
|
||||
image: docker.io/gotenberg/gotenberg:7.5.4
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- gotenberg
|
||||
- --chromium-disable-javascript=true
|
||||
- --chromium-allow-list=file:///tmp/.*
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: tika
|
||||
namespace: paperless-ngx
|
||||
labels:
|
||||
app.kubernetes.io/name: tika
|
||||
app.kubernetes.io/component: tika
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: tika
|
||||
app.kubernetes.io/component: tika
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: tika
|
||||
app.kubernetes.io/component: tika
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
spec:
|
||||
containers:
|
||||
- name: tika
|
||||
image: ghcr.io/paperless-ngx/tika:2.5.0-minimal
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
|
||||
4
paperless-ngx/paperless_cmd.sh
Normal file
4
paperless-ngx/paperless_cmd.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec /usr/local/bin/supervisord -c /etc/supervisord.conf --user paperless
|
||||
|
||||
83
paperless-ngx/redis.yaml
Normal file
83
paperless-ngx/redis.yaml
Normal file
@@ -0,0 +1,83 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
name: redis
|
||||
namespace: paperless-ngx
|
||||
spec:
|
||||
ports:
|
||||
- name: redis
|
||||
port: 6379
|
||||
selector:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: paperless-ngx
|
||||
labels:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
spec:
|
||||
serviceName: redis
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: docker.io/library/redis:7
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: redis
|
||||
containerPort: 6379
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
subPath: data
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
volumeClaimTemplates:
|
||||
- apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: data
|
||||
labels:
|
||||
app.kubernetes.io/name: redis
|
||||
app.kubernetes.io/component: redis
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
61
paperless-ngx/tika.yaml
Normal file
61
paperless-ngx/tika.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: tika
|
||||
app.kubernetes.io/component: tika
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
name: tika
|
||||
namespace: paperless-ngx
|
||||
spec:
|
||||
ports:
|
||||
- name: tika
|
||||
port: 9998
|
||||
selector:
|
||||
app.kubernetes.io/name: tika
|
||||
app.kubernetes.io/component: tika
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: tika
|
||||
namespace: paperless-ngx
|
||||
labels:
|
||||
app.kubernetes.io/name: tika
|
||||
app.kubernetes.io/component: tika
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
app.kubernetes.io/part-of: paperless-ngx
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: tika
|
||||
app.kubernetes.io/component: tika
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: tika
|
||||
app.kubernetes.io/component: tika
|
||||
app.kubernetes.io/instance: paperless-ngx
|
||||
spec:
|
||||
containers:
|
||||
- name: tika
|
||||
image: docker.io/apache/tika:2.5.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
@@ -12,6 +12,14 @@
|
||||
{
|
||||
"name": "xactmon",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"name": "host-provisioner",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"name": "dch-webhooks",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"permissions": [
|
||||
@@ -21,6 +29,20 @@
|
||||
"configure": "^xactmon\\..*",
|
||||
"read": "^xactmon\\..*",
|
||||
"write": "^xactmon\\..*"
|
||||
},
|
||||
{
|
||||
"user": "dch-webhooks",
|
||||
"vhost": "/",
|
||||
"configure": "^host-provisioner$",
|
||||
"read": "^host-provisioner$",
|
||||
"write": "^(host-provisioner|amq\\.default)$"
|
||||
},
|
||||
{
|
||||
"user": "host-provisioner",
|
||||
"vhost": "/",
|
||||
"configure": "^host-provisioner$",
|
||||
"read": "^host-provisioner$",
|
||||
"write": "^(host-provisioner|amq\\.default)$"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,19 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
labels:
|
||||
app.kubernetes.io/name: rabbitmq
|
||||
app.kubernetes.io/component: rabbitmq
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
@@ -28,6 +13,9 @@ spec:
|
||||
app.kubernetes.io/name: rabbitmq
|
||||
app.kubernetes.io/component: rabbitmq
|
||||
type: ClusterIP
|
||||
externalIPs:
|
||||
- 172.30.0.149
|
||||
externalTrafficPolicy: Local
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
@@ -51,7 +39,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: rabbitmq
|
||||
image: docker.io/library/rabbitmq:3.13-alpine
|
||||
image: docker.io/library/rabbitmq:4.0-alpine
|
||||
ports:
|
||||
- name: amqps
|
||||
containerPort: 5671
|
||||
@@ -82,7 +70,7 @@ spec:
|
||||
name: tmp
|
||||
subPath: tmp
|
||||
- mountPath: /var/lib/rabbitmq
|
||||
name: rabbitmq-data
|
||||
name: data
|
||||
subPath: data
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
@@ -98,10 +86,20 @@ spec:
|
||||
- name: rabbitmq-config
|
||||
configMap:
|
||||
name: rabbitmq
|
||||
- name: rabbitmq-data
|
||||
persistentVolumeClaim:
|
||||
claimName: rabbitmq
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
|
||||
volumeClaimTemplates:
|
||||
- apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: data
|
||||
labels:
|
||||
app.kubernetes.io/name: rabbitmq
|
||||
app.kubernetes.io/component: rabbitmq
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
1
receipts/.gitignore
vendored
Normal file
1
receipts/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
firefly.token
|
||||
12
receipts/config.toml
Normal file
12
receipts/config.toml
Normal file
@@ -0,0 +1,12 @@
|
||||
[default.firefly]
|
||||
url = "https://firefly.pyrocufflink.blue"
|
||||
token = "/run/secrets/receipts/secrets/firefly.token"
|
||||
search_query = "tag:Review has_attachments:false type:withdrawal has_any_bill:false"
|
||||
default_account = "Amazon Rewards Visa (Chase)"
|
||||
|
||||
[default.databases.receipts]
|
||||
url = "postgresql://receipts@postgresql.pyrocufflink.blue/receipts?sslmode=verify-full&sslrootcert=/run/dch-ca/dch-root-ca.crt&sslcert=/run/secrets/receipts/postgresql/tls.crt&sslkey=/run/secrets/receipts/postgresql/tls.key"
|
||||
|
||||
[default.limits]
|
||||
file = "4MiB"
|
||||
data-form = "4MiB"
|
||||
28
receipts/jenkins.yaml
Normal file
28
receipts/jenkins.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: jenkins
|
||||
rules:
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
resourceNames:
|
||||
- receipts
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: jenkins
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: jenkins
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
namespace: jenkins-jobs
|
||||
66
receipts/kustomization.yaml
Normal file
66
receipts/kustomization.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
transformers:
|
||||
- |
|
||||
apiVersion: builtin
|
||||
kind: NamespaceTransformer
|
||||
metadata:
|
||||
name: namespace-transformer
|
||||
namespace: receipts
|
||||
setRoleBindingSubjects: none
|
||||
fieldSpecs:
|
||||
- path: metadata/namespace
|
||||
create: true
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app.kubernetes.io/instance: receipts
|
||||
includeSelectors: true
|
||||
- pairs:
|
||||
app.kubernetes.io/part-of: receipts
|
||||
includeTemplates: true
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- secrets.yaml
|
||||
- receipts.yaml
|
||||
- postgres-cert.yaml
|
||||
- ../dch-root-ca
|
||||
- jenkins.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: receipts-config
|
||||
files:
|
||||
- config.toml
|
||||
options:
|
||||
labels:
|
||||
app.kubernetes.io/name: receipts
|
||||
app.kubernetes.io/component: receipts
|
||||
|
||||
patches:
|
||||
- patch: |-
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: receipts
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: receipts
|
||||
volumeMounts:
|
||||
- mountPath: /run/dch-ca
|
||||
name: dch-root-ca
|
||||
readOnly: true
|
||||
- mountPath: /run/secrets/receipts/postgresql
|
||||
name: postgresql-cert
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: dch-root-ca
|
||||
configMap:
|
||||
name: dch-root-ca
|
||||
- name: postgresql-cert
|
||||
secret:
|
||||
secretName: postgres-client-cert
|
||||
defaultMode: 0640
|
||||
7
receipts/namespace.yaml
Normal file
7
receipts/namespace.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: receipts
|
||||
labels:
|
||||
app.kubernetes.io/name: receipts
|
||||
app.kubernetes.io/component: receipts
|
||||
12
receipts/postgres-cert.yaml
Normal file
12
receipts/postgres-cert.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: postgres-client-cert
|
||||
spec:
|
||||
commonName: receipts
|
||||
privateKey:
|
||||
algorithm: ECDSA
|
||||
secretName: postgres-client-cert
|
||||
issuerRef:
|
||||
name: postgresql-ca
|
||||
kind: ClusterIssuer
|
||||
97
receipts/receipts.yaml
Normal file
97
receipts/receipts.yaml
Normal file
@@ -0,0 +1,97 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: receipts
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: receipts
|
||||
app.kubernetes.io/component: receipts
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8000
|
||||
selector: *labels
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: receipts
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: receipts
|
||||
app.kubernetes.io/component: receipts
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: *labels
|
||||
template:
|
||||
metadata:
|
||||
labels: *labels
|
||||
spec:
|
||||
containers:
|
||||
- name: receipts
|
||||
image: git.pyrocufflink.net/packages/receipts
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: RUST_LOG
|
||||
value: info,rocket=warn,receipts=debug
|
||||
- name: ROCKET_ADDRESS
|
||||
value: 0.0.0.0
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8000
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /etc/receipts
|
||||
name: config
|
||||
readOnly: true
|
||||
- mountPath: /run/secrets/receipts/secrets
|
||||
name: secrets
|
||||
readOnly: true
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
subPath: tmp
|
||||
imagePullSecrets:
|
||||
- name: imagepull-gitea
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 943
|
||||
runAsGroup: 943
|
||||
fsGroup: 943
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: receipts-config
|
||||
- name: secrets
|
||||
secret:
|
||||
secretName: receipts
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: receipts
|
||||
app.kubernetes.io/component: receipts
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: '0'
|
||||
name: receipts
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- receipts.pyrocufflink.blue
|
||||
rules:
|
||||
- host: receipts.pyrocufflink.blue
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: receipts
|
||||
port:
|
||||
name: http
|
||||
|
||||
35
receipts/secrets.yaml
Normal file
35
receipts/secrets.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
name: imagepull-gitea
|
||||
namespace: receipts
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: receipts
|
||||
app.kubernetes.io/component: receipts
|
||||
spec:
|
||||
encryptedData:
|
||||
.dockerconfigjson: AgCdye4FPceefzsWWdwX7BLLIkpCbJypTY/VMBHNZX4uNDjJiYICGtPFAbNceOnnBfKyQcXv47kfXgVWOzKl+OYv5ee9I3rsEpwXhU6zdkvRP2spZp/lXkDTrEitap3jcap3gGcK4j19ikXM42DfTCguSGkX5OM7jR7jg4xAQyB7M0FvZKkEnp9MwASp0+It3g4CxhQfQlrYOkbvuq7wY7qkpqHqoDVKOcKtmKM69HX6IMU5/gDFB3WZLdOkFxAhSQ6cEKJyqfyMx//nZlFw2jTFbpsiOBofQiqZ5dKFkz95OW22A6dcdxCoK1Xwmb2XvlD15wZ1ttaeh1GhpUWfqyKP9fePm+YAS4AvnPP0RurwpAKHh7C/EHKurwCt3o0UhfcQHDwhaIitA5c8lHEmDLPj76YGtjKreIH4cCEz3os6FyEg86pvfFHq4gjUKEV29qSuAEYYvfwAa7IRMjU5vjiD16EJ7/VaiKauKrA04tx53bq8Oq6oTZkOwO63ZU0kr82EJksPZ9jymHS7aq/cAnaXyZ2RamuT8HHGB/GZU6rXX/THaYww6Tii6al72EmGZ4OoY/Av+VXZBkxX1S762wbuA9KMwOG8raTPwXUVAm53Hl4E5piBAFMcGsboVdWNcKqr/yXWKeJfohlqKFr39g0aobekSB81ORAJEGHuSxE8tUdhfZYhbc5yemTzhuCu6iJFZj8yFPv6UwJV+OzSNQEuTZokyBNRPCteXh0xy2VxHZmp+oxakpM02oKPvS10z7yBIR0BgU9KddmqXozENekQP0v445i8BVVARpqoGFWBy3bbv4Z3suEJ8LIvb96vsq+bh0ia+DaslsnbXjiZ9XseGUrzYmWKZOBIFitpo181LJtWHRSU/GAm58GOUoVWCW66ldI79lZ4Z7xH+UJWGQIwbHQ+iky6Ooebsc42mdm3ToK4bi1Zkg4VdIxDAhFiPubOEmkacyoCKobqs+aeni6UB9lLjieClGWHNXdS7gQs4NPBE0dq2B0Sr2pBboA=
|
||||
template:
|
||||
metadata:
|
||||
name: imagepull-gitea
|
||||
namespace: receipts
|
||||
labels: *labels
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
|
||||
---
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
name: receipts
|
||||
namespace: receipts
|
||||
labels: &labels
|
||||
app.kubernetes.io/name: receipts
|
||||
app.kubernetes.io/component: receipts
|
||||
spec:
|
||||
encryptedData:
|
||||
firefly.token: AgBBu2w5ddlqY2b/Si6nLowW/3cTIt8fBZi97aMUIY6BLKHWgDxdOIWKJTlaG5GKNRJNDwTxcn5Tld6rBVfxkkjf2eUNuq4bfclrSOp1MysTH0zwN9ctA0Pi+u9id2lo44gEUuzrrm658aqJG4ZoX3Mw2FmBD9V1WzDQC/pa5fQrfyoMrdNBMpmtk0lf+fzNa/1QJxtoim35ekMy1+Fy1qycy1XsW5s8Z02vLF9o0Tv2GGQTK/VwJoJqEzTgIuGDlaipOji65YN7L9OkBeAK8ZcbPgjfjae7UNS8rXQKW1Q/UOta4z3/EYB3yLxC8y4osRt/0k0m+ApW8nxdZLWVFBLZFUbSvOV4M7r+2/PvqIjJww6wUDwtkAR89Orz2ceJjKCKgJxCHjGUabaAwM2wRmBm6d2BZOfuUxEhXMAUvEL5aFIaXAkePhdFDo3iX1tJXStAk9Iqx/cXT9l3CArsTrnit+NLwNGuqDq2T2I5VZ9Qh8LsO6BbOHm+qhycnl8/FCQt0AF7RYE4r6/OehdjPivNzRNDqh2P0cllw4mB06GCwK84mmfW7pJvbYLlpdtr2AMoYZGoQ23uTeXSOKWzdMT7sY/IUT5nAY4WPTkiy8OYxoR4/fw90d3UysmjunFr9SwJM/pzaKfmsO7IatV5Lnayecrilku0iFK0zKhkmfuEaK3CeLIAwxofWwD1iSqXtRvnhHG7KBMuQo0UyW9DGXqVVNBhDQ5393+8HRhsw6qQsZbd43cIJmCYD957K4rz7BsW6xHyTl7MtG237ljNS0V/fKIb99VvMDKCjAD6D7Bbn+swNglVGGOK+HwGNiQQ7A9sQE/tGMoNngj0Z4ASB4HDhkKc4BguRLsmALhn6X+mUxgNt/yQO/tIctl5KvhKhDfxpmwo4ZLZ/QWZoVHKLY651Ni9CLt0ozI3/B9OxYvewXXXFTIZYJJU91d46WaxdqwQm5OesUA7wAFymZ7CCqUHEaoP+hAkYMu77NyuiOZC9dL7HEXPHIRGvUirD0J8TdTLpkCRHvsbjgc9UUqVImlKpQ1G1PDcnuyClZyzh9itw+rUqeKXfeupclH0MK6TjvX8aRMVvDqRKeZvklsezxZPfwpUsXC+TN9745YLporVENvmk2XlHJbcyihYldVHFSOczcznxLYibSyCPN5cRue7ENE9aYjLZI3FddV8XYOGJ5mOo50n6H0iI0fkEzCX9VMYqMk+XwGJatzA1JHFL4VP8apSG3Y5boplLW2T2aQgVgRw7bsyCnq4UoFKrLuO9ZK4K6kGZj0qHnWrft7JmItZHOj9oBsHgjG1mQHQsxR7+UDHQ5Nr4eb0TAVpUsos1pcpzOVEmvnDh6pQ5bo4mA2Z/qGn/BWVcz9CsR1nKZOO1E+HNnFeYD9xKucBCm3mlrtr8QoKmrqBNiKN0Oz3wOqPtQTY6SZzKhSXkGmc2Lr2w8cIEtw8N+T3vaAdyUWhpkh/ZILW3YE9jMNr1cukbiiW4++9iU+R9heJNsR2nVdAJJoZyFeWjZQbfP8wq1P+i5W06hg8l7IEbvkOZX9DfpP5K4WV+uwkhZx6LpGhY957WgZOlvtwxwqC35KLspZStTnnCmfw130mwMx0paXXIQNWMVd2ob12e5Uzcg8gzy0LBgvVehk9ZUttxPdtZcjp5h+oiKLp+ruC1dOfB9PIy0rUp4d4EbeMO2h5c5hyXzcbZpclxOrN9JhGf3HnnP/XcMlJ8mIt319jdfIsOC+2OCEkgtywEupSTMeSdBm9p1Sr6OhOpY6T+Iv3ni9nhMfng83e2lGhQIckecMQ5xm7RJfD+5p0kmD3YdqecALePSfFLspXxkHz0CExvMpvqbu6Gmmz2U2UzooM+sTdlGGbqwSRu6ZhuVncjxIa3WlsNzm7I50EpsEwzprFBPDin0eqFJuEE9Gz224ZlbA3ulo/ITXYKDBe5Rlq2HzhS59J/KjZqw1mt8a+lrDNKygxLZtD0qksk1ngeV4m+DITU6iyo8MWmTNz9deD3w==
|
||||
template:
|
||||
metadata:
|
||||
name: receipts
|
||||
namespace: receipts
|
||||
labels: *labels
|
||||
@@ -12,6 +12,7 @@ resources:
|
||||
- network-policy.yaml
|
||||
- restic-exporter.yaml
|
||||
- secrets.yaml
|
||||
- ../dch-root-ca
|
||||
|
||||
configMapGenerator:
|
||||
- name: restic-exporter
|
||||
@@ -29,8 +30,19 @@ patches:
|
||||
spec:
|
||||
containers:
|
||||
- name: restic-exporter
|
||||
env:
|
||||
- name: RESTIC_CACERT
|
||||
value: /run/dch-ca/dch-root-ca.crt
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: restic-s3
|
||||
- configMapRef:
|
||||
name: restic-exporter
|
||||
volumeMounts:
|
||||
- mountPath: /run/dch-ca
|
||||
name: dch-ca
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: dch-ca
|
||||
configMap:
|
||||
name: dch-root-ca
|
||||
|
||||
@@ -21,9 +21,9 @@ spec:
|
||||
protocol: TCP
|
||||
- to:
|
||||
- ipBlock:
|
||||
cidr: 172.30.0.30/32
|
||||
cidr: 172.30.0.15/32
|
||||
ports:
|
||||
- port: 9000
|
||||
- port: 443
|
||||
ingress:
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
TZ=America/Chicago
|
||||
RESTIC_REPOSITORY=s3:https://burp.pyrocufflink.blue:9000/restic
|
||||
RESTIC_REPOSITORY=s3:s3.backups.pyrocufflink.blue/restic
|
||||
INCLUDE_PATHS=True
|
||||
REFRESH_INTERVAL=3600
|
||||
|
||||
@@ -31,8 +31,8 @@ metadata:
|
||||
app.kubernetes.io/part-of: restic-exporter
|
||||
spec:
|
||||
encryptedData:
|
||||
AWS_ACCESS_KEY_ID: AgCiUz6l8sPPSxh8lmtH4HEiQEu2EWN8zpS3Farh4/CxWVn01HufAU7n7xxPjMTkkoCfa42ux/WNLl3Gl539CgAoyaudlAfuzl+Uq5w3S1XesL/lTwBqYr3mF0ZeGxeHBh2h+S9IaTPef9SWFTV/F+X3rDOKw6OfMLSI3TZAarVuvNJ9GnK8vTu5MoE+4IhHfJRBor4qI9TGKOQQDtoQP9xcwWrOQJOKvyXGtOmz/u+H4K5VVsGvPpIWYDHS3V1HIzCaVLDEulL13dyNofXKmQB7mW7yPhRIn/MJGfuAvUXAE5Or1bgamftCujtl1nR8/K5Gq6h5212hVCtY2F8YMBZSt5G+GmitTSz7PJrjTB6OzXy1Uu+bNGWgjtck6bxzm/pkO44bC5/ZvhB0AESDSBIkpBSm1o7LMl6rCF+mUybsGNmRq9mcMvtMwAbUgzEewlMbdA+zN/YqEJFMZWcE9fYHms9pil3O+mDB1LilBMUczPD/zzpP88b2m36XmT3nSRBCTcfx8nqaqB6dvYK2AYjmM9iDPM0jRxZOaA6WZy3PsTUeJvfzxNapfE72lWREtaTVP3wfhwt2BcoiIxWqc7i/9LplcEOl62S2WhMtP0wJGXMSWmzxOPHno98u1aA4r/2K3LBk+9gSzA9grwi3VpK9NsADf1vFbLmd25eDqSe6zQl5YNk+Ty20uHqK53fdqwkM2WlvOmakXlw9dBr1CWGr
|
||||
AWS_SECRET_ACCESS_KEY: AgCJ3K0gt8GqI3go1fQ/pMjFjpW0Z+j/YElaPqTUp8dpuhEdRS3MybCOjLhKwfpQN/nufRXbk0hLZYgloGznjEpdJvP4EEb3uwwdfZ2oP+h8YVyHpHsh7DlnuHUk7RwGJiL+wb+Xnh6ChsYKQQ2HfWnIQ+JZMGKDMQqaq0CwaQAde8MUZlJyqu7tZjD5wP3PFf6WxG2lwQiwD7vMi+M/r8h0a5Sf4TVdXIrRSPE9nvVmuaN7+4eAmOmzRmVqUxXqHhSL0/yMichOFGXXOCWryQlM/gm0BETEj8g9RdhqyJ6iXvgR8/ObZUQ4zoOeonaQQNZYOjgcZ+oWD+8n0gayziCIQz1Czf3HeGyXFpmVRCcQKOFb+Pz/U308zefDT/sCg4ggH8Le/7VVBYqKjUZWPFrJrhVju1IU3BZDs8PZhjaFWDIHvL7IuI9QLLKhhHHNWQ1IQSZgSyQUNYGK0lLbOWpID14w1FgIBI9+JhLSGtue+KwKgZxgrmE9QUI1CEhEPVXCZDCSmjY629QNLiVmNG/SiEL9uJAj2BlXkMpPtZuI4b9iINcw+vS8yYifdiRxcBpCZQTD9DiEf9NRh8pvC4YuwTkFVN8++vQyDtPiJPigJpZo3Uuz2S7dEcsRD28Y2sSiLMOdzTzRwovUigkUUSONCecNWhWeMWneFx7u97PvNMK1ogDOAzjDxvM13I8dw/eK6uXB9XNKZh3NkC/18RsIqdHhLhZKeAzx3VOtbvTOIw==
|
||||
AWS_ACCESS_KEY_ID: AgAhNzhHnjDoEopNvdZaVxe84VhtxMiwxzYbwrFNvBkWMTF3aHbVjB2/qsWMjNU+a/jFFgFJZQzzfGK6Y9o0G3xFZaMwiBvBKBxRAOS6c2J8ClB7enCPD8HkAW/6BeuY3KsUW9wSEbGBlx8oW9tRWEOVFsRv6KHZwwh/vNfvSCiCXsZgBFAPorFy0Bh9FX+3PyZhANH6AAugWzGnxZGlRcNEgYx8ZnQovlFhhSxZsmUnSwyKzpZP2h+A48N3q+aUooFQlWuq6zGMEJqrFpMwiYg0M4A+60LBXneZGzc13FibWpbWpwEoX7YljnYYVnsat002U1qgkxSCoU75EKn3nay3vO6jT8lV5CUMGzbhxdNnaKbKevpaZgRZlUirrh+KGvG6pU8JghsiCKsP+HAuFRPTVfUYM2L13v5WDqOyVvLFT7S1Z1fl+LDwm1u7SPr8HYkEdgI/7ALD+vEBDUKmSCiQ8/sR3HGz9roDu8Lh0+HFZyUeuW27mEaDtSI5c/jKpWR8exN6ltClRS7vNyWuNGe1Jq3v7qyWrLEziTwxd2vunmvE/0bS6U4VgrkAvct0e6OUycuKP2Aaik/3tJA5OGYcw6x9hymc0y+XHszrIrkxJ6n4dtYP1Ymsf8OiqMTj3SOrP3+zUaFlSLi3474KlxmBR3GN/9W3wJx0nFhceXvoZVETtjdJXsfgXgMJ874WxC3YGld3weYqVSrIIs2BdjjTAc2j5g==
|
||||
AWS_SECRET_ACCESS_KEY: AgC26kXxZxlGlIUTFVu1aG/4c+UhCnudcOmHfmqXqwDqkY4OSEuFkdpp2uTdziT3oGGLlNxcjYUJRD1Jkn+d8TAuqMfKqaosILne6SwRzAFFn1+hYyntwuV4gvCjNn6dpI5uaweX2tpwqS8RG+aGhesugLD2XpRqh+iLrqEf6vJrfJHuURmrnHmU+zl3+3RrsjFf3BaUBOHBJRA/b/QoyBsrZ/ABbp9MVP8b7g7N7+2WVE4XMvlaVfax8J49XekMISKvqnw4oEV/UB471q6wODlQC+uSzepcFX+kBrwpkGGDrtYdPISeVtYdPQ1QDRX7XVw35s1wA67hh8UuNkp2CxMJ8VUz/uVIoMPv9EdnLiWZC2/OO84jLWcFPz/w7/LyBiicmWgaCd+A9HtODBW6Gdg8s6+8mmD3u4YQW3PgYVuI1tTWccn1FCLd3O5U3V8pS88aNRqg2c9FdQ853SNv6CJwm5CjeHW7go6KaJlbElVpqy3Vi3WY+/76HVBrfo6T6RtDc18wcBLpfDh1DiVwpVHqiVwNTPMLgalnX+VuohU6LsnRzQo0jvzx9OfwhdNA+pHGgfQt2nrKHr8pSqnPsaJBlXzm4N2Su2MeXVn962RYU1KtcciClKG70WdRxUxZ/EGKqCgleUS+1kSC488XYWSwg44zCEHqfzJxgF1ykCAF6oG5FT+rKpB4845OHsFKEn2X9gDb3UExNSuyzdQeyxSQSVo1EivjQbh2jK3vtdGckkmfJ8Nlxmoi
|
||||
template:
|
||||
metadata:
|
||||
name: restic-s3
|
||||
|
||||
2
restic/.gitignore
vendored
Normal file
2
restic/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
credentials
|
||||
password
|
||||
50
restic/kustomization.yaml
Normal file
50
restic/kustomization.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: restic
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app.kubernetes.io/instance: restic
|
||||
includeSelectors: true
|
||||
- pairs:
|
||||
app.kubernetes.io/part-of: restic
|
||||
includeTemplates: true
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- network-policy.yaml
|
||||
- restic-prune.yaml
|
||||
- secrets.yaml
|
||||
- ../dch-root-ca
|
||||
|
||||
configMapGenerator:
|
||||
- name: restic-env
|
||||
envs:
|
||||
- restic.env
|
||||
|
||||
patches:
|
||||
- patch: |-
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: restic-prune
|
||||
spec:
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: restic-prune
|
||||
env:
|
||||
- name: RESTIC_CACERT
|
||||
value: /run/dch-ca/dch-root-ca.crt
|
||||
volumeMounts:
|
||||
- mountPath: /run/dch-ca
|
||||
name: dch-ca
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: dch-ca
|
||||
configMap:
|
||||
name: dch-root-ca
|
||||
|
||||
6
restic/namespace.yaml
Normal file
6
restic/namespace.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: restic
|
||||
labels:
|
||||
app.kubernetes.io/name: restic
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user