move renovate to woodpecker cron job instead of k8s cron
Some checks failed
ci/woodpecker/push/flux-reconcile-source Pipeline failed
Some checks failed
ci/woodpecker/push/flux-reconcile-source Pipeline failed
This commit is contained in:
38
.woodpecker/renovate.yaml
Normal file
38
.woodpecker/renovate.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
when:
|
||||
- event: cron
|
||||
cron: renovate # schedule on 0 2 * * *, set in ui
|
||||
|
||||
skip_clone: true
|
||||
|
||||
steps:
|
||||
- name: Get renovate token from OpenBao
|
||||
image: quay.io/openbao/openbao:2.5.2
|
||||
environment:
|
||||
VAULT_ADDR: https://openbao.lumpiasty.xyz:8200
|
||||
ROLE_ID:
|
||||
from_secret: renovate_role_id
|
||||
SECRET_ID:
|
||||
from_secret: renovate_secret_id
|
||||
commands:
|
||||
- bao write -field token auth/approle/login
|
||||
role_id=$ROLE_ID
|
||||
secret_id=$SECRET_ID > /woodpecker/.vault_id
|
||||
- export VAULT_TOKEN=$(cat /woodpecker/.vault_id)
|
||||
- bao kv get -mount secret -field RENOVATE_TOKEN renovate > /woodpecker/renovate_token
|
||||
- name: Run Renovate
|
||||
image: renovate/renovate:43.108.2-full
|
||||
environment:
|
||||
RENOVATE_AUTODISCOVER: "true"
|
||||
RENOVATE_ENDPOINT: https://gitea.lumpiasty.xyz/api/v1
|
||||
RENOVATE_PLATFORM: gitea
|
||||
RENOVATE_GIT_AUTHOR: Renovate Bot <renovate@lumpiasty.xyz>
|
||||
commands:
|
||||
- export RENOVATE_TOKEN=$(cat /woodpecker/renovate_token)
|
||||
- /usr/local/sbin/renovate-entrypoint.sh renovate
|
||||
- name: Invalidate OpenBao token
|
||||
image: quay.io/openbao/openbao:2.5.2
|
||||
environment:
|
||||
VAULT_ADDR: https://openbao.lumpiasty.xyz:8200
|
||||
commands:
|
||||
- export VAULT_TOKEN=$(cat /woodpecker/.vault_id)
|
||||
- bao write -f auth/token/revoke-self
|
||||
@@ -5,7 +5,6 @@ resources:
|
||||
- crawl4ai-proxy
|
||||
- authentik
|
||||
- gitea
|
||||
- renovate
|
||||
- frigate
|
||||
- llama
|
||||
- immich
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
namespace: renovate
|
||||
name: renovate-config
|
||||
data:
|
||||
RENOVATE_AUTODISCOVER: "true"
|
||||
RENOVATE_ENDPOINT: https://gitea.lumpiasty.xyz/api/v1
|
||||
RENOVATE_PLATFORM: gitea
|
||||
RENOVATE_GIT_AUTHOR: Renovate Bot <renovate@lumpiasty.xyz>
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: renovate
|
||||
namespace: renovate
|
||||
spec:
|
||||
schedule: "@daily"
|
||||
concurrencyPolicy: Forbid
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: renovate
|
||||
# Update this to the latest available and then enable Renovate on
|
||||
# the manifest
|
||||
image: renovate/renovate:43.108.2-full
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: renovate-gitea-token
|
||||
- configMapRef:
|
||||
name: renovate-config
|
||||
restartPolicy: Never
|
||||
@@ -1,7 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- configmap.yaml
|
||||
- secret.yaml
|
||||
- cronjob.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: renovate
|
||||
@@ -1,38 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: renovate
|
||||
namespace: renovate
|
||||
---
|
||||
apiVersion: secrets.hashicorp.com/v1beta1
|
||||
kind: VaultAuth
|
||||
metadata:
|
||||
name: renovate
|
||||
namespace: renovate
|
||||
spec:
|
||||
method: kubernetes
|
||||
mount: kubernetes
|
||||
kubernetes:
|
||||
role: renovate
|
||||
serviceAccount: renovate
|
||||
---
|
||||
apiVersion: secrets.hashicorp.com/v1beta1
|
||||
kind: VaultStaticSecret
|
||||
metadata:
|
||||
name: renovate-gitea-token
|
||||
namespace: renovate
|
||||
spec:
|
||||
type: kv-v2
|
||||
|
||||
mount: secret
|
||||
path: renovate
|
||||
|
||||
destination:
|
||||
create: true
|
||||
name: renovate-gitea-token
|
||||
type: Opaque
|
||||
transformation:
|
||||
excludeRaw: true
|
||||
|
||||
vaultAuthRef: renovate
|
||||
4
vault/approles/ci-renovate.yaml
Normal file
4
vault/approles/ci-renovate.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
token_ttl: 20m
|
||||
token_max_ttl: 20m
|
||||
policies:
|
||||
- renovate
|
||||
@@ -1,6 +0,0 @@
|
||||
bound_service_account_names:
|
||||
- renovate
|
||||
bound_service_account_namespaces:
|
||||
- renovate
|
||||
token_policies:
|
||||
- renovate
|
||||
Reference in New Issue
Block a user