Skip to content

Commit

Permalink
refactor: renovate update
Browse files Browse the repository at this point in the history
- remove matchStrings and use build managers
- add renovate groups and automerge
- add dummy-check as renovate need at least on status check for automerge
- extend renovate.json5 from projects
- change secret resolution strategy from sops to AWS SSM injection on talos configs
  • Loading branch information
timtorChen committed Mar 16, 2024
1 parent 4afbc06 commit 24662ac
Show file tree
Hide file tree
Showing 43 changed files with 308 additions and 366 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/dummy-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: dummy-check
"on":
pull_request:
branches: ["main"]

jobs:
echo:
runs-on: "ubuntu-latest"
steps:
- run: echo "dummy-check"
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
name: cron-renovate
name: renovate
"on":
workflow_dispatch:
push:
branches:
- "main"
paths:
- "renovate.json5"
- "**/renovate.json5"
schedule:
- cron: "0 0 * * *" # every 08:00 UTC+8
jobs:
Expand Down
22 changes: 17 additions & 5 deletions amethyst/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,31 +170,43 @@ tasks:
talos:apply:
silent: true
dir: talos
env: &talos-env
SECRET_ENV:
sh: |
export AWS_PROFILE=sso-admin@aws-homelab
aws ssm get-parameters --with-decryption \
--names /amethyst/talos-machine /amethyst/talos-cluster |\
jq -r '.Parameters[].Value | fromjson | to_entries[] | "\(.key)=\(.value)"'
cmds:
- |
NODE={{.NODE}}
[ -z "$NODE" ] && echo -n "Apply node: " && read NODE
export IP="$(yq 'head_comment' "${NODE}.yaml" | yq '.ip')"
[ -z "$IP" ] && exit 1
export TYPE="$(yq '.machine.type' "${NODE}.yaml")"
export TYPE_CONFIG="$(sops -d "${TYPE}.sops.yaml")"
export CONFIG="$(yq '. *= env(TYPE_CONFIG)' "${NODE}.yaml")"
export CONFIG="$(yq ea '. as $item ireduce ({}; . * $item)' "${TYPE}.yaml" "${NODE}.yaml")"
export $SECRET_ENV
export CONFIG="$(echo "$CONFIG" | envsubst)"
talosctl apply-config -f <(echo -n "$CONFIG") -n "$IP" {{.CLI_ARGS}}
talos:upgrade:
silent: true
dir: talos
prompt: The upgrade process will cause a reboot... continue?
env: *talos-env
cmds:
- |
NODE={{.NODE}}
[ -z "$NODE" ] && echo -n "Upgrade node: " && read NODE
export IP="$(yq 'head_comment' "${NODE}.yaml" | yq '.ip')"
[ -z "$IP" ] && exit 1
export TYPE="$(yq '.machine.type' "${NODE}.yaml")"
export IMAGE="$(yq '.machine.install.image' "${TYPE}.sops.yaml")"
export TYPE_CONFIG="$(sops -d "${TYPE}.sops.yaml")"
export CONFIG="$(yq '. *= env(TYPE_CONFIG)' "${NODE}.yaml")"
export IMAGE="$(yq '.machine.install.image' "${TYPE}.yaml")"
export CONFIG="$(yq ea '. as $item ireduce ({}; . * $item)' "${TYPE}.yaml" "${NODE}.yaml")"
export $SECRET_ENV
export CONFIG="$(echo "$CONFIG" | envsubst)"
echo "> Apply configuration"
talosctl apply-config -f <(echo -n "$CONFIG") -n "$IP"
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/archive/wego/wego.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ spec:
sourceRef:
kind: HelmRepository
name: wego
# renovate: packageName=ghcr.io/weaveworks/charts/weave-gitops
chart: weave-gitops
version: 4.0.36
interval: 1h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: jkroepke
# renovate: registryUrl=https://jkroepke.github.io/helm-charts/
chart: amazon-eks-pod-identity-webhook
version: 2.1.3
interval: 1h
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/cert-manager/cert-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: cert-manager
# renovate: registryUrl=https://charts.jetstack.io
chart: cert-manager
version: v1.12.2
install:
Expand Down
2 changes: 0 additions & 2 deletions amethyst/kubernetes/cloudflared/cloudflared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: bjw-s
# renovate: registryUrl=https://bjw-s.github.io/helm-charts
chart: app-template
version: 1.5.1
interval: 1h
Expand All @@ -31,7 +30,6 @@ spec:
rollingUpdate:
unavailable: 1
image:
# renovate:
repository: cloudflare/cloudflared
tag: 2024.2.1
args:
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/cnpg/cnpg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ spec:
kind: HelmRepository
namespace: cnpg
name: cnpg
# renovate: registryUrl=https://cloudnative-pg.github.io/charts
chart: cloudnative-pg
version: 0.18.1
install:
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/flux-system/flux2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ spec:
interval: 1m
url: https://github.com/fluxcd/flux2
ref:
# renovate: github-repo=fluxcd/flux2
tag: v2.2.3
ignore: |
/*
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/grafana/app/grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ spec:
kind: HelmRepository
namespace: grafana
name: grafana
# renovate: registryUrl=https://grafana.github.io/helm-charts
chart: grafana
version: 7.3.7
interval: 1h
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/ingress-nginx/ingress-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: ingress-nginx
# renovate: registryUrl=https://kubernetes.github.io/ingress-nginx
chart: ingress-nginx
version: 4.7.0
interval: 1h
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/kube-system/metrics-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: metrics-server
# renovate: registryUrl=https://kubernetes-sigs.github.io/metrics-server/
chart: metrics-server
version: 3.12.0
interval: 1h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: aws-secrets-manager
# renovate: registryUrl=https://aws.github.io/secrets-store-csi-driver-provider-aws
chart: secrets-store-csi-driver-provider-aws
version: 0.3.6
interval: 1h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: secrets-store-csi-driver
# renovate: registryUrl=https://kubernetes-sigs.github.io/secrets-store-csi-driver/charts
chart: secrets-store-csi-driver
version: 1.4.2
install:
Expand Down
6 changes: 2 additions & 4 deletions amethyst/kubernetes/kube-system/snapshot-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ spec:
interval: 5m
url: https://github.com/kubernetes-csi/external-snapshotter
ref:
# renovate: github-repo=kubernetes-csi/external-snapshotter
tag: v6.2.2
tag: v6.3.3
ignore: |
/*
# include the crd folder
Expand Down Expand Up @@ -39,8 +38,7 @@ spec:
interval: 5m
url: https://github.com/kubernetes-csi/external-snapshotter
ref:
# renovate: github-repo=kubernetes-csi/external-snapshotter
tag: v6.2.2
tag: v6.3.3
ignore: |
/*
# include the manifest folder
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/kyverno/kyverno.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ spec:
kind: HelmRepository
name: kyverno
version: 3.0.1
# renovate: registryUrl=https://kyverno.github.io/kyverno
chart: kyverno
install:
crds: CreateReplace
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/loki/loki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: grafana
# renovate: registryUrl=https://grafana.github.io/helm-charts
chart: loki
version: 5.26.0
interval: 1h
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/metallb-system/metallb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ spec:
kind: HelmRepository
name: metallb
version: 0.13.10
# renovate: registryUrl=https://metallb.github.io/metallb
chart: metallb
interval: 1h
maxHistory: 1
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/mimir/mimir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: grafana
# renovate: registryUrl=https://grafana.github.io/helm-charts
chart: mimir-distributed
version: 5.0.0
interval: 1h
Expand Down
6 changes: 0 additions & 6 deletions amethyst/kubernetes/mydata/immich/app/immich.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: bjw-s
# renovate: registryUrl=https://bjw-s.github.io/helm-charts
chart: app-template
version: 1.5.1
interval: 1h
Expand All @@ -28,7 +27,6 @@ spec:
controller:
strategy: RollingUpdate
image:
# renovate:
repository: ghcr.io/immich-app/immich-server
tag: v1.98.2
command: ["./start.sh", "immich"]
Expand Down Expand Up @@ -118,7 +116,6 @@ spec:
sourceRef:
kind: HelmRepository
name: bjw-s
# renovate: registryUrl=https://bjw-s.github.io/helm-charts
chart: app-template
version: 1.5.1
interval: 1h
Expand All @@ -127,7 +124,6 @@ spec:
controller:
strategy: RollingUpdate
image:
# renovate:
repository: ghcr.io/immich-app/immich-server
tag: v1.98.2
command: ["./start.sh", "microservices"]
Expand Down Expand Up @@ -214,14 +210,12 @@ spec:
sourceRef:
kind: HelmRepository
name: bjw-s
# renovate: registryUrl=https://bjw-s.github.io/helm-charts
chart: app-template
version: 1.5.1
interval: 1h
maxHistory: 1
values:
image:
# renovate:
repository: ghcr.io/immich-app/immich-machine-learning
tag: v1.98.2
env:
Expand Down
2 changes: 0 additions & 2 deletions amethyst/kubernetes/mydata/immich/deps/immich-dragonfly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ spec:
sourceRef:
kind: HelmRepository
name: bjw-s
# renovate: registryUrl=https://bjw-s.github.io/helm-charts
chart: app-template
version: 1.5.1
interval: 1h
Expand All @@ -20,7 +19,6 @@ spec:
type: statefulset
replicas: 1
image:
# renovate:
repository: ghcr.io/dragonflydb/dragonfly
tag: v1.6.2
args:
Expand Down
2 changes: 0 additions & 2 deletions amethyst/kubernetes/mydata/navidrome/navidrome.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ spec:
kind: HelmRepository
namespace: mydata
name: bjw-s
# renovate: registryUrl=https://bjw-s.github.io/helm-charts
chart: app-template
version: 1.5.1
interval: 1h
maxHistory: 1
values:
image:
# renovate:
repository: deluan/navidrome
tag: 0.51.1

Expand Down
2 changes: 0 additions & 2 deletions amethyst/kubernetes/mydata/nextcloud/app/nextcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ spec:
sourceRef:
kind: HelmRepository
name: bjw-s
# renovate: registryUrl=https://bjw-s.github.io/helm-charts
chart: app-template
version: 1.5.1
interval: 1h
Expand All @@ -22,7 +21,6 @@ spec:
rollingUpdate:
unavailable: 1
image:
# renovate:
repository: nextcloud
tag: 28.0.3-apache
serviceAccount:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ spec:
sourceRef:
kind: HelmRepository
name: bjw-s
# renovate: registryUrl=https://bjw-s.github.io/helm-charts
chart: app-template
version: 1.5.1
interval: 1h
Expand All @@ -19,7 +18,6 @@ spec:
type: statefulset
replicas: 1
image:
# renovate:
repository: ghcr.io/dragonflydb/dragonfly
tag: v1.6.2
args:
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/node-exporter/node-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: prometheus-community
# renovate: registryUrl=https://prometheus-community.github.io/helm-charts
chart: prometheus-node-exporter
version: 4.31.0
interval: 1h
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/prometheus/kube-prometheus-stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: prometheus-community
# renovate: registryUrl=https://prometheus-community.github.io/helm-charts
chart: kube-prometheus-stack
version: 48.2.1
install:
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/promtail/promtail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: grafana
# renovate: registryUrl=https://grafana.github.io/helm-charts
chart: promtail
version: 6.15.5
interval: 1h
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/reloader/reloader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: stakater
# renovate: registryUrl=https://stakater.github.io/stakater-charts
chart: reloader
version: 1.0.67
interval: 1h
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/rook-ceph/rook-ceph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ spec:
sourceRef:
kind: HelmRepository
name: rook-ceph
# renovate: registryUrl=https://charts.rook.io/release
chart: rook-ceph
version: v1.11.8
install:
Expand Down
2 changes: 0 additions & 2 deletions amethyst/kubernetes/smart-exporter/smart-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
sourceRef:
kind: HelmRepository
name: bjw-s
# renovate: registryUrl=https://bjw-s.github.io/helm-charts
chart: app-template
version: 1.5.1
interval: 1h
Expand All @@ -28,7 +27,6 @@ spec:
controller:
type: daemonset
image:
# renovate:
repository: matusnovak/prometheus-smartctl
tag: v2.3.0
env:
Expand Down
1 change: 0 additions & 1 deletion amethyst/kubernetes/snapscheduler/snapscheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ spec:
sourceRef:
kind: HelmRepository
name: backube
# renovate: registryUrl=https://backube.github.io/helm-charts/
chart: snapscheduler
version: 3.2.0
install:
Expand Down
Loading

0 comments on commit 24662ac

Please sign in to comment.