1
0
Fork 0

Compare commits

..

19 Commits

Author SHA1 Message Date
bot 7f5edfcd37 firefly-iii: Update to 6.2.6 2025-02-15 12:32:10 +00:00
Dustin 7da76d0615 cert-manager: Update to v1.16.4
Fixes for Cloudflare DNS API changes.
2025-02-14 18:27:31 -06:00
Dustin f9a315eba5 Merge pull request 'zwavejs2mqtt: Update to 9.30.1' (#45) from updatebot/home-assistant into master
Reviewed-on: #45
2025-02-10 23:49:17 +00:00
Dustin cf8dff83eb Merge pull request 'paperless-ngx: Update to 2.14.7' (#47) from updatebot/paperless-ngx into master
Reviewed-on: #47
2025-02-09 15:38:22 +00:00
Dustin 3abecae4d8 Merge pull request 'vaultwarden: Update to 1.33.1' (#49) from updatebot/vaultwarden into master
Reviewed-on: #49
2025-02-09 01:53:19 +00:00
Dustin 3255edc7b6 rabbitmq: Configure dch-webhooks/host-provisioner
The *dch-webhooks* user is used by *dch-webhooks* in order to publish
host information when a new machine triggers its _POST /host/online_
webhook.  It therefore needs to be able to write to the
_host-provisioner_ queue (via the default exchange).

The *host-provisioner* user is used by the corresponding consumer to
receive the host information and initiate the provisioning process.
2025-02-08 16:59:26 -06:00
Dustin bed5ed5767 dch-webhooks: Enable host provisioning feature
The *dch-webhooks* server now has a _POST /host/online_ hook that can
be triggered by a new machine when it first comes online. This hook
starts an automatic provisioning process by creating a Kubernetes Job
to run Ansible and publishing information about the host to provision
via AMQP.  Thus, the server now needs access to the Kubernetes API in
order to create the Job and access to RabbitMQ in order to publish the
task parameters.
2025-02-08 16:59:26 -06:00
Dustin 4d11a60e62 dch-root-ca: Disable hash name suffix
The contents of the DCH Root CA will not change, so it does not make
sense to enable the hash suffix feature for this ConfigMap.  Without it,
the ConfigMap name is predictable and can be used outside of a Kustomize
project.
2025-02-08 16:59:17 -06:00
Dustin edec79aaae ssh-known-hosts: Move ConfigMap to its own project
This will allow multiple projects to have a ConfigMap with the same
`ssh_known_hosts` contents without duplicating the source file in the
repository.
2025-02-08 11:56:34 -06:00
Dustin 28e120ddbd updatebot: Correct vaultwarden project name
Updatebot kept trying to "update" Authelia with the latest version of
Vaultwarden 🤦🏻‍♂️
2025-02-08 10:46:04 -06:00
bot 58d2f94842 vaultwarden: Update to 1.33.1 2025-02-08 15:52:46 +00:00
bot 983bf4808d tika: Update to 3.1.0.0 2025-02-08 15:52:44 +00:00
bot ffdcf6bd73 gotenberg: Update to 8.17.0 2025-02-08 15:52:44 +00:00
bot 6bee9847fc paperless-ngx: Update to 2.14.7 2025-02-08 15:52:44 +00:00
bot 0e1eefc13f zwavejs2mqtt: Update to 9.30.1 2025-02-08 15:52:40 +00:00
bot 4c0efc6a87 zigbee2mqtt: Update to 2.1.1 2025-02-08 15:52:39 +00:00
bot d16f27394c home-assistant: Update to 2025.2.1 2025-02-08 15:52:38 +00:00
Dustin dc835ddc9d v-m/alerts: Fix PostgreSQL WAL archive failed alert
The `pg_stat_archiver_failed_count` metric is a counter, so once a WAL
archival has failed, it will increase and never return to `0`.  To
ensure the alert is resolved once the WAL archival process recovers, we
need to use the `increase` function to turn it into a gauge.  Finally,
we aggregate that gauge with `max_over_time` to keep the alert from
flapping if the WAL archive occurs less frequently than the scrape
interval.
2025-02-05 10:42:35 -06:00
Dustin f637feba16 updatebot: Fix tag format for Vaultwarden
We're using the Alpine variant of the Vaultwarden container images,
since the default variant is significantly larger and we do not need any
of the extra stuff it includes.
2025-02-01 18:29:54 -06:00
22 changed files with 276 additions and 20 deletions

1
ansible/.gitignore vendored
View File

@ -1 +1,2 @@
ara/.secrets.toml
host-provisioner.key

View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICoOO/ZYMxRgmyvqZwGN3NM5pHyh3NBdC7iZrXIopt93 Host Provisioner

View File

@ -13,6 +13,8 @@ namespace: ansible
resources:
- ../dch-root-ca
- ../ssh-host-keys
- rbac.yaml
- secrets.yaml
- namespace.yaml
- ara.yaml

25
ansible/rbac.yaml Normal file
View 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

View File

@ -17,3 +17,21 @@ spec:
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

View File

@ -2,7 +2,7 @@ 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

View File

@ -5,3 +5,5 @@ configMapGenerator:
- name: dch-root-ca
files:
- dch-root-ca.crt
options:
disableNameSuffixHash: true

View File

@ -0,0 +1,115 @@
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'
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: {}

View 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -55,4 +55,4 @@ patches:
defaultMode: 0640
images:
- name: docker.io/fireflyiii/core
newTag: version-6.2.4
newTag: version-6.2.6

View File

@ -118,14 +118,14 @@ patches:
name: dch-root-ca
images:
- name: ghcr.io/home-assistant/home-assistant
newTag: 2025.1.4
newTag: 2025.2.1
- 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.0.0
newTag: 2.1.1
- name: docker.io/zwavejs/zwave-js-ui
newTag: 9.29.1
newTag: 9.30.1
- name: docker.io/library/eclipse-mosquitto
newTag: 2.0.20

View File

@ -10,14 +10,7 @@ resources:
- secrets.yaml
- iscsi.yaml
- gentoo-storage.yaml
configMapGenerator:
- name: ssh-known-hosts
namespace: jenkins-jobs
files:
- ssh_known_hosts
options:
disableNameSuffixHash: true
- ../ssh-host-keys
patches:
- patch: |

View File

@ -45,8 +45,8 @@ patches:
images:
- name: ghcr.io/paperless-ngx/paperless-ngx
newTag: 2.14.5
newTag: 2.14.7
- name: docker.io/gotenberg/gotenberg
newTag: 8.15.3
newTag: 8.17.0
- name: docker.io/apache/tika
newTag: 3.0.0.0
newTag: 3.1.0.0

View File

@ -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)$"
}
]
}

View File

@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
configMapGenerator:
- name: ssh-known-hosts
namespace: jenkins-jobs
files:
- ssh_known_hosts
options:
labels:
app.kubernetes.io/name: ssh-known-hosts
disableNameSuffixHash: true

View File

@ -100,8 +100,9 @@ projects:
- name: vaultwarden
kind: kustomize
images:
- name: authelia
- name: vaultwarden
image: ghcr.io/dani-garcia/vaultwarden
tag_format: '{version}-alpine'
source:
kind: github
organization: dani-garcia

View File

@ -27,4 +27,4 @@ configMapGenerator:
images:
- name: ghcr.io/dani-garcia/vaultwarden
newTag: 1.32.7-alpine
newTag: 1.33.1-alpine

View File

@ -185,7 +185,9 @@ groups:
for: 10m
- alert: WAL archive process failed
expr: >-
pg_stat_archiver_failed_count > 0
max_over_time(
increase(pg_stat_archiver_failed_count)[20m]
)> 0
annotations:
summary: The archiver process failed for one or more WAL segments
description: >-