Compare commits

..
Author SHA1 Message Date
Jørgen StensrudandClaude Fable 5.1 46eab199ee Add forte-cli public device-code Keycloak client
/ test (pull_request) Successful in 7s
Add a shared public client `forte-cli` to the `forte` realm so downloaded
skills (forte-drop first) can do RFC 8628 device-code login through the
Auth Sidecar. Today no client in the realm has the device grant enabled,
so the flow cannot start.

Client (inline in forte-realm.json, imported verbatim by keycloak-config-cli):
- publicClient: true, standardFlowEnabled: false,
  directAccessGrantsEnabled: false
- attributes: oauth2.device.authorization.grant.enabled=true
- no secret, no redirectUris/webOrigins, no k8s.secret.sync

It has to go in the realm JSON because the self-service registrar
hardcodes publicClient:false/standardFlowEnabled:true and drops
attributes. Also add forte-cli to the cleanup CronJob's protected list
(belt-and-braces; it does not match the UUID pattern anyway).

Additive only: gitea/grafana/argocd and all other realm settings are
unchanged. Keycloak is deployed only via the upc-dev overlay, which
inherits base values, so this lands on id.forteapps.net.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QciXev3MtCxo3eomcfrDRW
2026-09-03 09:56:31 +02:00
42 changed files with 65 additions and 516 deletions
+4 -5
View File
@@ -23,15 +23,14 @@ jobs:
REVIEW__INLINE_COMMENT_FALLBACK: "false" REVIEW__INLINE_COMMENT_FALLBACK: "false"
# LLM configuration # LLM configuration
LLM__PROVIDER: CLAUDE LLM__PROVIDER: CLAUDE
LLM__META__MODEL: claude-sonnet-5-5 LLM__META__MODEL: claude-3-opus
LLM__META__REASONING__EFFORT: high
LLM__META__MAX_TOKENS: "4096" LLM__META__MAX_TOKENS: "4096"
LLM__HTTP_CLIENT__API_URL: https://api.anthropic.com LLM__HTTP_CLIENT__API_URL: https://api.anthropic.com
LLM__HTTP_CLIENT__API_TOKEN: ${{ secrets.ANTHROPIC_API_KEY }} LLM__HTTP_CLIENT__API_TOKEN: ${{ secrets.ANTHROPIC_API_KEY }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v7 uses: actions/checkout@v4
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
@@ -41,11 +40,11 @@ jobs:
run: git submodule update --remote --merge run: git submodule update --remote --merge
- name: Run inline review - name: Run inline review
uses: docker://nikitafilonov/ai-review:v1.4.0 uses: docker://nikitafilonov/ai-review:v0.64.0
with: with:
args: ai-review run-inline args: ai-review run-inline
- name: Run summary review - name: Run summary review
uses: docker://nikitafilonov/ai-review:v1.4.0 uses: docker://nikitafilonov/ai-review:v0.64.0
with: with:
args: ai-review run-summary args: ai-review run-summary
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v7 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install TruffleHog - name: Install TruffleHog
+1 -1
View File
@@ -4,7 +4,7 @@ terraform {
required_providers { required_providers {
azurerm = { azurerm = {
source = "hashicorp/azurerm" source = "hashicorp/azurerm"
version = "~> 5.0" version = "~> 4.0"
} }
} }
} }
@@ -4,7 +4,7 @@ terraform {
required_providers { required_providers {
azurerm = { azurerm = {
source = "hashicorp/azurerm" source = "hashicorp/azurerm"
version = "~> 5.0" version = "~> 4.0"
} }
azuread = { azuread = {
source = "hashicorp/azuread" source = "hashicorp/azuread"
+1 -1
View File
@@ -4,7 +4,7 @@ terraform {
required_providers { required_providers {
azurerm = { azurerm = {
source = "hashicorp/azurerm" source = "hashicorp/azurerm"
version = "~> 5.0" version = "~> 4.0"
} }
} }
} }
+1 -1
View File
@@ -4,7 +4,7 @@ terraform {
required_providers { required_providers {
azurerm = { azurerm = {
source = "hashicorp/azurerm" source = "hashicorp/azurerm"
version = "~> 5.0" version = "~> 4.0"
} }
random = { random = {
source = "hashicorp/random" source = "hashicorp/random"
+1 -1
View File
@@ -2,7 +2,7 @@ terraform {
required_providers { required_providers {
aws = { aws = {
source = "hashicorp/aws" source = "hashicorp/aws"
version = "~> 6.0" version = "~> 5.0"
} }
tls = { tls = {
source = "hashicorp/tls" source = "hashicorp/tls"
@@ -2,7 +2,7 @@ terraform {
required_providers { required_providers {
aws = { aws = {
source = "hashicorp/aws" source = "hashicorp/aws"
version = "~> 6.0" version = "~> 5.0"
} }
tls = { tls = {
source = "hashicorp/tls" source = "hashicorp/tls"
+1 -1
View File
@@ -2,7 +2,7 @@ terraform {
required_providers { required_providers {
aws = { aws = {
source = "hashicorp/aws" source = "hashicorp/aws"
version = "~> 6.0" version = "~> 5.0"
} }
tls = { tls = {
source = "hashicorp/tls" source = "hashicorp/tls"
+1 -1
View File
@@ -2,7 +2,7 @@ terraform {
required_providers { required_providers {
aws = { aws = {
source = "hashicorp/aws" source = "hashicorp/aws"
version = "~> 6.0" version = "~> 5.0"
} }
tls = { tls = {
source = "hashicorp/tls" source = "hashicorp/tls"
+1 -1
View File
@@ -2,7 +2,7 @@ terraform {
required_providers { required_providers {
google = { google = {
source = "hashicorp/google" source = "hashicorp/google"
version = "~> 8.0" version = "~> 6.0"
} }
} }
} }
@@ -2,7 +2,7 @@ terraform {
required_providers { required_providers {
google = { google = {
source = "hashicorp/google" source = "hashicorp/google"
version = "~> 8.0" version = "~> 6.0"
} }
} }
} }
+1 -1
View File
@@ -2,7 +2,7 @@ terraform {
required_providers { required_providers {
google = { google = {
source = "hashicorp/google" source = "hashicorp/google"
version = "~> 8.0" version = "~> 6.0"
} }
} }
} }
+1 -1
View File
@@ -2,7 +2,7 @@ terraform {
required_providers { required_providers {
google = { google = {
source = "hashicorp/google" source = "hashicorp/google"
version = "~> 8.0" version = "~> 6.0"
} }
} }
} }
@@ -7,8 +7,7 @@ metadata:
namespace: mcp10x namespace: mcp10x
spec: spec:
encryptedData: encryptedData:
BENKEN_CLIENT_SECRET: AgBjps8BCn20C8upAaAdb1fG4Qh3eKBbTeFuuWhQb8WoIvHmk+v03mw8i39evkQwlUWvLBWV1mtGiKwpCNhmAAdicRFG6u0m30+21K6ZtYqtKEniPKo/kjPd9nDbtxvIwiaqK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vGpFniZKPyvxIdna9j7XEQjUZsGTiyN1w==
template: template:
metadata: metadata:
creationTimestamp: null creationTimestamp: null
-210
View File
@@ -1,210 +0,0 @@
❯ Plan and implement ai-git-bot based on the documentation https://github.com/tmseidel/ai-git-bot for Gitea. It should be hosted as a separate helm deployment on "upc-dev" overlay, with secrets ready to be sealed and added by me. I will also configure Gitea webhook myself afterwards.
Ran 1 shell command
● Fetch(https://github.com/tmseidel/ai-git-bot)
Received 463.7KB (200 OK)
Read 1 file, ran 2 shell commands
● Auto mode lets Claude handle permission prompts automatically — Claude checks each tool call for risky actions and prompt injection before executing. Actions Claude identifies as safe are executed, while actions Claude identifies as risky are blocked and Claude may try a different approach. Ideal for long-running tasks. Sessions are slightly more expensive. Claude can make mistakes that allow harmful commands to run, it's recommended to only use in isolated environments. Shift+Tab to change mode.
I've reviewed the ai-git-bot deployment docs — it's a Spring Boot app on :8080 needing Postgres and an APP_ENCRYPTION_KEY, with the rest configured how existing apps in this repo are wired(charts, ingress, TLS, secrets) to match the pattern.
Searched for 1 pattern, listed 1 directory, ran 3 shell commands
Got the conventions down: Argo multi-source apps, Traefik + cert-manager ingress, SealedSecrets, and plaintext
templates in gitignored private/upc-dev/. Chext, then writing the chart.
Ran 2 shell commands
No official Helm chart exists, just Docker C local chart for this repo — I'll also flagthat /setup is publicly accessible until the first admin is created. Writing the chart now.
Ran 2 shell commands
The shell heredoc tripped on quoting; I'll write the files directly instead.
● Write(apps\charts\ai-git-bot\Chart.yaml)
Wrote 6 lines to apps\charts\ai-git-bot\C
apiVersion: v2
name: ai-git-bot
description: AI-Git-Bot (https://github.com/tmseidel/ai-git-bot) - AI code review and coding agent for Gi
tea, with a bundled PostgreSQL
type: application
version: 0.1.0
appVersion: "1.27.0"
● Write(apps\charts\ai-git-bot\values.yaml)
Wrote 90 lines to apps\charts\ai-git-bot\
# Default values for ai-git-bot.
# Everything except the database conn providers, Git
# integrations, bots, prompts) is configured in the web UI and stored in PostgreSQL.
image:
repository: tmseidel/ai-git-bot
tag: "1.27.0"
pullPolicy: IfNotPresent
# Existing Secret with the app credeno the app as an
… +80 lines
● Write(apps\charts\ai-git-bot\templates\_helpers.tpl)
Wrote 33 lines to apps\charts\ai-git-bot\
{{- define "ai-git-bot.fullname" -}}
{{- .Release.Name | trunc 63 | trimSuf
{{- end -}}
{{- define "ai-git-bot.labels" -}}
helm.sh/chart: {{ printf "%s-%s" .Char
app.kubernetes.io/version: {{ .Values.image.tag | quote }}
app.kubernetes.io/managed-by: {{ .Rele
{{- end -}}
… +23 lines
● Write(apps\charts\ai-git-bot\templates\deplo
Wrote 124 lines to apps\charts\ai-git-bot\templates\deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "ai-git-bot.fullname" . }}
labels:
{{- include "ai-git-bot.labels" . | nindent 4 }}
{{- include "ai-git-bot.selectorL
spec:
replicas: {{ .Values.replicaCount }
# Recreate: agent sessions run in-process and Flyway migrations must not race
… +116 lines
● Write(apps\charts\ai-git-bot\templates\servi
Wrote 15 lines to apps\charts\ai-git-bot\templates\service.yaml
apiVersion: v1
kind: Service
metadata:
name: {{ include "ai-git-bot.fullname" . }}
labels:
{{- include "ai-git-bot.labels" . | nindent 4 }}
{{- include "ai-git-bot.selectorL
spec:
type: {{ .Values.service.type }}
ports:
… +5 lines
● Write(apps\charts\ai-git-bot\templates\ingre
Wrote 33 lines to apps\charts\ai-git-bot\templates\ingress.yaml
{{- if .Values.ingress.enabled }}
{{- if not .Values.ingress.host }}
{{- fail "ingress.host is required wh}
{{- end }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "ai-git-bot.fullname" . }}
labels:
{{- include "ai-git-bot.labels" . | nindent 4 }}
… +23 lines
● Write(apps\charts\ai-git-bot\templates\postg
Wrote 98 lines to apps\charts\ai-git-bot\templates\postgresql.yaml
{{- if .Values.postgresql.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "ai-git-bot.postgr
labels:
{{- include "ai-git-bot.labels" .
{{- include "ai-git-bot.postgresql.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: data
spec:
… +88 lines
● Update(apps\charts\ai-git-bot\templates\depl
Added 2 lines, removed 2 lines
metadata:
labels:
{{- include "ai-git-bot.sele
{{- if .Values.prometheus.enabled }}
annotations:
{{- if .Values.prometheus.enabled }}
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: /actuato
{{- end }}
{{- end }}
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
● Write(apps\overlays\upc-dev\ai-git-bot\ai-git-bot.yaml)
Wrote 48 lines to apps\overlays\upc-dev\a
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ai-git-bot
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"
labels:
app.kubernetes.io/name: ai-git-bot
app.kubernetes.io/part-of: apps
… +38 lines
● Write(apps\overlays\upc-dev\ai-git-bot\values.yaml)
Wrote 21 lines to apps\overlays\upc-dev\a
# upc-dev values for apps/charts/ai-git-bot
# AI providers, the Gitea integrationre configured
# in the web UI after the first login; see apps/overlays/upc-dev/ai-git-bot/README.md.
existingSecret: ai-git-bot-secrets
ingress:
host: ai-git-bot.forteapps.net
annotations:
cert-manager.io/cluster-issuer: l
… +11 lines
● Write(apps\overlays\upc-dev\ai-git-bot\kustomization.yaml)
Wrote 7 lines to apps\overlays\upc-dev\ai
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ai-git-bot.yaml
# Uncomment once the secret has been sealed (see README.md in this directory).
# Until then the pods wait in CreateCo
# - ai-git-bot-secrets-sealed.yaml
Now the plaintext secret (in gitignored private/upc-dev/, with freshly generated random values) and the README.
Searched for 1 pattern, ran 1 shell command
"Development" group already exists. Now the README and wiring into the upc-dev overlay.
● Write(apps\overlays\upc-dev\ai-git-bot\README.md) Wrote 63 lines to apps\overlays\upc-dev\a
# ai-git-bot (upc-dev)
[AI-Git-Bot](https://github.com/tmseidel/ai-git-bot) reviews Gitea pull requests and can implement issues as a coding agent. IHelm chart
`apps/charts/ai-git-bot` (app + bundled PostgreSQL 17) into the `ai-git-bot` namespace.
| | | |---|---|
| URL | https://ai-git-bot.forteapps.net | | Chart | `apps/charts/ai-git-bot` |
… +54 lines
● Update(apps\overlays\upc-dev\kustomization.yaml) Added 1 line
- forte-drop-postgresql - forte-drop
- forte-drop-mcp - ai-git-bot
# No patches needed — base apps alree paths
# (upc-dev is the default/base cluster).
● Update(apps\overlays\upc-dev\kustomization.yaml) Added 1 line
# forte-drop (postgres + web + mcp) and dbunk-demo are upc-dev-only apps — their # values hardcode upc-dev hosts (drot not sync to
# upc-prod, so they live here in the overlay rather than in apps/base/. # ai-git-bot is upc-dev-only as well-bot).
lidating: helm lint/template with the upc-uild of the overlay.
n 2 shell commands
-git-bot is set up as its own Helm deploymt file is ready for you to seal. helm lint,helm template and kubectl kustomize apps/overlays/upc-dev all pass. Nothing has been deployed to the cluster yet,thing is committed.
at I built
- The upstream project only provides Docker Compose, not a Helm chart, so I wrote a small chart at apps/charts/ai-git-bot/. It runs the app (:1.27.0) plus its own PostgreSQL 17 databasewith 5Gi storage, set so Argo won't delete the volume. It also includes the web address and TLS certificate, anhealth checks. The bot runs one pod, whichlapped on updates. Repo clones and agentbuilds use a 10Gi temporary volume. apps/overlays/upc-dev/ai-git-bot/ holds thattern as vaultwarden), the upc-dev settingsand a README with the setup steps. I added it to apps/overlays/upc-dev/kustomization.yaml. The address is https://ai-git-bot.forteapp homepage under "Development". This assumesthe *.forteapps.net DNS record covers the new name.
Secrets ivate/upc-dev/ai-git-bot-secrets.yaml is gASE_USERNAME, plus a freshly generatedDATABASE_PASSWORD and APP_ENCRYPTION_KEY. To seal it: beseal --format=yaml --namespace=ai-git-bo
< private/upc-dev/ai-git-bot-secrets.yaml \ > apps/overlays/upc-dev/ai-git-bot/ai-git-
Then uncomment the line for that file in apps/overlays/upc-dev/ai-git-bot/kustomization.yaml. If you push before is, the pods will just wait for the secretack up APP_ENCRYPTION_KEY (for example inVaultwarden): it encrypts the API keys and Gitea tokens stored in the database, and losing it makes them unreadab
Before you set up the webhook Create the admin account straight after this public until an admin exists, and whoeveropens it first becomes admin. You can open it through kubectl -n ai-git-bot port-forward svc/ai-git-bot 8080:80instead.
- Everything else is configured in the bot's web interface, not in Helm: the Anthropic key, the Gitea connection (https://git.forteapps.net and the bot useselves. Each bot gets a webhook URL likehttps://ai-git-bot.forteapps.net/api/webhook/<secret>. Set a webhook signing secret on the bot and enter the same value in Gitea. The README lists the Gitea
- The login is a username and password by default. Keycloak login (id.forteapps.net) is built in but off; turning it on is one setting plus two secret keys, de
- The image is several GB because it bundles build tools for the agent, so the first start will be slow. Metrics are
off; Prometheus would need a new scrape co
✻ Brewed for 4m 34s · done 14:04
@@ -1,63 +0,0 @@
# ai-git-bot (upc-dev)
[AI-Git-Bot](https://github.com/tmseidel/ai-git-bot) reviews Gitea pull requests and can
implement issues as a coding agent. It is deployed from the local Helm chart
`apps/charts/ai-git-bot` (app + bundled PostgreSQL 17) into the `ai-git-bot` namespace.
| | |
|---|---|
| URL | https://ai-git-bot.forteapps.net |
| Chart | `apps/charts/ai-git-bot` |
| Values | `apps/overlays/upc-dev/ai-git-bot/values.yaml` |
| Secret | `ai-git-bot-secrets` (SealedSecret) |
| Webhook endpoint | `https://ai-git-bot.forteapps.net/api/webhook/<per-bot-secret>` |
## 1. Seal the secret
The plaintext template (random DB password and encryption key already generated) lives in
the gitignored `private/upc-dev/ai-git-bot-secrets.yaml`.
```bash
kubeseal --format=yaml --namespace=ai-git-bot \
< private/upc-dev/ai-git-bot-secrets.yaml \
> apps/overlays/upc-dev/ai-git-bot/ai-git-bot-secrets-sealed.yaml
```
Then uncomment `ai-git-bot-secrets-sealed.yaml` in `kustomization.yaml` and commit.
| Key | Purpose |
|---|---|
| `DATABASE_USERNAME` / `DATABASE_PASSWORD` | Used by both PostgreSQL (initdb) and the app |
| `APP_ENCRYPTION_KEY` | Encrypts AI API keys / Gitea tokens / SSH keys in the DB. Back it up; changing it makes stored credentials unreadable |
| `GITEABOT_SECURITY_OAUTH_CLIENT_ID` / `_SECRET` | Optional, only with `loginMethod: oauth` |
The DB password is only applied on the first PostgreSQL init. To rotate it later, change it
inside PostgreSQL (`ALTER USER`) as well as in the secret.
## 2. First login (do this right after the first sync)
`/setup` is public until the first admin account exists — whoever opens it first becomes
admin. Open https://ai-git-bot.forteapps.net immediately after the pod is ready (or use
`kubectl -n ai-git-bot port-forward svc/ai-git-bot 8080:8080`) and create the admin.
Then in the web UI:
1. **AI Integrations** → add Anthropic (API key + model).
2. **Git Integrations** → Gitea, URL `https://git.forteapps.net`, token of the bot user
(scopes `write:issue`, `write:repository`, `write:user`).
3. **Bots** → create a bot, set **Username** to the Gitea bot user, set a
**Webhook signing secret**, copy the webhook URL.
## 3. Gitea webhook
Repo or org **Settings → Webhooks → Add Webhook → Gitea**: target = the bot's webhook URL,
`POST`, `application/json`, secret = the bot's signing secret. Custom events: Pull Request,
Pull Request Comment, Pull Request Review Requested, Pull Request Assigned, Issue Comment,
and Issue Assigned + Issues if you use the coding agent. See upstream
[GITEA_SETUP.md](https://github.com/tmseidel/ai-git-bot/blob/main/doc/GITEA_SETUP.md).
## Optional: Keycloak login
Set `loginMethod: oauth` and `oauth.issuerUri: https://id.forteapps.net/realms/forte` in
`values.yaml`, add the client id/secret keys to the secret, and register
`https://ai-git-bot.forteapps.net/login/oauth2/code/giteabot` as redirect URI.
@@ -1,47 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ai-git-bot
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"
labels:
app.kubernetes.io/name: ai-git-bot
app.kubernetes.io/part-of: apps
app.kubernetes.io/managed-by: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
sources:
- repoURL: ssh://git@git.forteapps.net:2222/Forte/forte-helm.git
path: ai-git-bot
targetRevision: HEAD
helm:
valueFiles:
- $values/ai-git-bot/values.yaml
- repoURL: ssh://git@git.forteapps.net:2222/Forte/helm-prod-values.git
targetRevision: HEAD
ref: values
destination:
server: https://kubernetes.default.svc
namespace: ai-git-bot
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- CreateNamespace=true
- Validate=true
- ServerSideApply=true
ignoreDifferences:
- group: apps
kind: StatefulSet
jsonPointers:
- /spec/volumeClaimTemplates
@@ -1,7 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ai-git-bot.yaml
# Uncomment once the secret has been sealed (see README.md in this directory).
# Until then the pods wait in CreateContainerConfigError.
# - ai-git-bot-secrets-sealed.yaml
-2
View File
@@ -5,11 +5,9 @@ resources:
- forte-drop-postgresql - forte-drop-postgresql
- forte-drop - forte-drop
- forte-drop-mcp - forte-drop-mcp
- ai-git-bot
# No patches needed — base apps already default to "upc-dev" value paths # No patches needed — base apps already default to "upc-dev" value paths
# (upc-dev is the default/base cluster). # (upc-dev is the default/base cluster).
# forte-drop (postgres + web + mcp) and dbunk-demo are upc-dev-only apps — their # forte-drop (postgres + web + mcp) and dbunk-demo are upc-dev-only apps — their
# values hardcode upc-dev hosts (drop.forteapps.net etc.) and must not sync to # values hardcode upc-dev hosts (drop.forteapps.net etc.) and must not sync to
# upc-prod, so they live here in the overlay rather than in apps/base/. # upc-prod, so they live here in the overlay rather than in apps/base/.
# ai-git-bot is upc-dev-only as well (chart in apps/charts/ai-git-bot).
+1 -1
View File
@@ -29,7 +29,7 @@ spec:
topologyKey: kubernetes.io/hostname topologyKey: kubernetes.io/hostname
initContainers: initContainers:
- name: gitea-dump - name: gitea-dump
image: gitea/gitea:28.0.0 image: gitea/gitea:1.25.4
command: command:
- sh - sh
- -c - -c
+20 -20
View File
@@ -1,27 +1,27 @@
{ {
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json", "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
"packages": [ "packages": [
"kubectl@1.36.3", "kubectl@1.33.2",
"kubernetes-helm@4.2.4", "kubernetes-helm@3.18.4",
"k9s@0.51.0", "k9s@0.50.7",
"kubeseal@0.38.4", "kubeseal@0.30.0",
"argocd@3.4.6", "argocd@2.14.11",
"kubecm@0.35.1", "kubecm@0.33.1",
"kubectl-tree@0.6.0", "kubectl-tree@0.4.3",
"kind@0.32.0", "kind@0.29.0",
"kustomize@5.8.1", "kustomize@5.7.0",
"kyverno@1.19.0", "kyverno@1.14.3",
"syft@1.51.0", "syft@1.29.0",
"grype@0.118.0", "grype@0.92.2",
"traefik@3.7.10", "traefik@3.6.7",
"claude-code@2.1.245", "claude-code@latest",
"go@latest", "go@latest",
"dotnet-sdk@8.0.424", "dotnet-sdk@latest",
"opentofu@1.12.5", "opentofu@1.11.6",
"_1password@2.30.0", "_1password@latest",
"github-cli@2.23.0", "github-cli@latest",
"upcloud-cli@3.36.0", "upcloud-cli@3.29.0",
"awscli2@2.35.11" "awscli2@2.34.24"
], ],
"shell": { "shell": {
"init_hook": [ "init_hook": [
@@ -17,7 +17,7 @@ spec:
source: source:
repoURL: https://charts.jetstack.io repoURL: https://charts.jetstack.io
chart: cert-manager chart: cert-manager
targetRevision: "v1.21.2" targetRevision: "v1.14.0"
helm: helm:
values: | values: |
+1 -1
View File
@@ -17,7 +17,7 @@ spec:
sources: sources:
- repoURL: https://fluent.github.io/helm-charts - repoURL: https://fluent.github.io/helm-charts
chart: fluent-bit chart: fluent-bit
targetRevision: 0.58.3 targetRevision: 0.47.10
helm: helm:
releaseName: fluent-bit releaseName: fluent-bit
valueFiles: valueFiles:
+1 -1
View File
@@ -17,7 +17,7 @@ spec:
sources: sources:
- repoURL: https://dl.gitea.com/charts - repoURL: https://dl.gitea.com/charts
chart: actions chart: actions
targetRevision: "0.1.2" targetRevision: "0.0.5"
helm: helm:
releaseName: gitea-actions releaseName: gitea-actions
valueFiles: valueFiles:
+1 -1
View File
@@ -17,7 +17,7 @@ spec:
sources: sources:
- repoURL: https://dl.gitea.com/charts - repoURL: https://dl.gitea.com/charts
chart: gitea chart: gitea
targetRevision: "12.7.0" targetRevision: "12.6.0"
helm: helm:
releaseName: gitea releaseName: gitea
valueFiles: valueFiles:
+1 -1
View File
@@ -17,7 +17,7 @@ spec:
sources: sources:
- repoURL: https://grafana.github.io/helm-charts - repoURL: https://grafana.github.io/helm-charts
chart: grafana chart: grafana
targetRevision: "8.15.0" targetRevision: "8.0.0"
helm: helm:
releaseName: grafana releaseName: grafana
valueFiles: valueFiles:
+1 -1
View File
@@ -36,7 +36,7 @@ spec:
source: source:
chart: kyverno chart: kyverno
repoURL: https://kyverno.github.io/kyverno/ repoURL: https://kyverno.github.io/kyverno/
targetRevision: 3.9.1 targetRevision: v3.7.0 # Update to latest stable version
helm: helm:
releaseName: kyverno releaseName: kyverno
valuesObject: valuesObject:
+1 -1
View File
@@ -17,7 +17,7 @@ spec:
sources: sources:
- repoURL: https://grafana.github.io/helm-charts - repoURL: https://grafana.github.io/helm-charts
chart: loki chart: loki
targetRevision: "7.3.0" targetRevision: "6.0.0"
helm: helm:
releaseName: loki releaseName: loki
valueFiles: valueFiles:
+1 -1
View File
@@ -17,7 +17,7 @@ spec:
sources: sources:
- repoURL: https://opencost.github.io/opencost-helm-chart - repoURL: https://opencost.github.io/opencost-helm-chart
chart: opencost chart: opencost
targetRevision: "2.5.32" targetRevision: "1.42.0"
helm: helm:
releaseName: opencost releaseName: opencost
valueFiles: valueFiles:
+1 -1
View File
@@ -17,7 +17,7 @@ spec:
sources: sources:
- repoURL: https://prometheus-community.github.io/helm-charts - repoURL: https://prometheus-community.github.io/helm-charts
chart: prometheus chart: prometheus
targetRevision: "28.16.0" targetRevision: "28.9.0"
helm: helm:
releaseName: prometheus releaseName: prometheus
valueFiles: valueFiles:
+1 -1
View File
@@ -17,7 +17,7 @@ spec:
sources: sources:
- repoURL: ghcr.io/renovatebot/charts - repoURL: ghcr.io/renovatebot/charts
chart: renovate chart: renovate
targetRevision: "46.318.0" targetRevision: "46.109.0"
helm: helm:
releaseName: renovate releaseName: renovate
valueFiles: valueFiles:
+2 -2
View File
@@ -16,8 +16,8 @@ spec:
source: source:
chart: sealed-secrets chart: sealed-secrets
repoURL: https://bitnami.github.io/sealed-secrets repoURL: https://bitnami-labs.github.io/sealed-secrets
targetRevision: 2.20.0 targetRevision: 2.16.2 # Update to latest stable version
helm: helm:
releaseName: sealed-secrets releaseName: sealed-secrets
parameters: parameters:
@@ -24,7 +24,7 @@ spec:
sources: sources:
- repoURL: https://traefik.github.io/charts - repoURL: https://traefik.github.io/charts
chart: traefik chart: traefik
targetRevision: "41.6.0" targetRevision: "28.0.0"
helm: helm:
releaseName: traefik releaseName: traefik
valueFiles: valueFiles:
+1 -1
View File
@@ -17,7 +17,7 @@ spec:
sources: sources:
- repoURL: https://helm.releases.hashicorp.com - repoURL: https://helm.releases.hashicorp.com
chart: vault chart: vault
targetRevision: "0.34.1" targetRevision: "0.32.0"
helm: helm:
releaseName: vault releaseName: vault
valueFiles: valueFiles:
@@ -17,7 +17,7 @@ spec:
sources: sources:
- repoURL: https://guerzon.github.io/vaultwarden - repoURL: https://guerzon.github.io/vaultwarden
chart: vaultwarden chart: vaultwarden
targetRevision: "0.46.2" targetRevision: "0.36.4"
helm: helm:
releaseName: vaultwarden releaseName: vaultwarden
valueFiles: valueFiles:
+7 -26
View File
@@ -200,21 +200,7 @@ keycloakConfigCli:
"webOrigins": [], "webOrigins": [],
"attributes": { "attributes": {
"oauth2.device.authorization.grant.enabled": "true" "oauth2.device.authorization.grant.enabled": "true"
}, }
"protocolMappers": [
{
"name": "audience-forte-drop-mcp",
"protocol": "openid-connect",
"protocolMapper": "oidc-audience-mapper",
"consentRequired": false,
"config": {
"included.custom.audience": "https://mcp.drop.forteapps.net/mcp",
"access.token.claim": "true",
"id.token.claim": "false",
"introspection.token.claim": "true"
}
}
]
} }
], ],
"browserFlow": "browser-auto-idp", "browserFlow": "browser-auto-idp",
@@ -319,7 +305,6 @@ extraDeploy:
namespace: keycloak namespace: keycloak
spec: spec:
schedule: "*/2 * * * *" schedule: "*/2 * * * *"
timeZone: "Europe/Oslo"
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1 successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 3 failedJobsHistoryLimit: 3
@@ -332,7 +317,7 @@ extraDeploy:
restartPolicy: Never restartPolicy: Never
containers: containers:
- name: registrar - name: registrar
image: alpine:3.24 image: alpine:3.20
command: [ "/bin/sh", "-c" ] command: [ "/bin/sh", "-c" ]
args: args:
- | - |
@@ -647,9 +632,7 @@ extraDeploy:
name: keycloak-client-cleanup name: keycloak-client-cleanup
namespace: keycloak namespace: keycloak
spec: spec:
schedule: "0 3 1 * *" schedule: "0 3 * * 0"
timeZone: "Europe/Oslo"
startingDeadlineSeconds: 3600
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1 successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 3 failedJobsHistoryLimit: 3
@@ -662,7 +645,7 @@ extraDeploy:
restartPolicy: Never restartPolicy: Never
containers: containers:
- name: cleanup - name: cleanup
image: alpine:3.24 image: alpine:3.20
command: [ "/bin/sh", "-c" ] command: [ "/bin/sh", "-c" ]
args: args:
- | - |
@@ -706,15 +689,13 @@ extraDeploy:
CLIENTS=$(curl -sf -H "Authorization: Bearer ${TOKEN}" \ CLIENTS=$(curl -sf -H "Authorization: Bearer ${TOKEN}" \
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients") "${KEYCLOAK_URL}/admin/realms/${REALM}/clients")
CANDIDATES=$(echo "$CLIENTS" | jq -c --argjson protected "$PROTECTED_JSON" \ CANDIDATES=$(echo "$CLIENTS" | jq -c --argjson protected "$PROTECTED_JSON" --argjson now "$NOW_SEC" --argjson min_age "$MIN_AGE_SEC" --arg pattern "$CLIENT_ID_PATTERN" '
--argjson now "$NOW_SEC" --argjson min_age "$MIN_AGE_SEC" --arg pattern "$CLIENT_ID_PATTERN" '
[ [
.[] .[]
| select(.clientId as $cid | $protected | index($cid) | not) | select(.clientId as $cid | $protected | index($cid) | not)
| select(.attributes["k8s.secret.sync"] != "true") | select(.attributes["k8s.secret.sync"] != "true")
| select(.clientId | test($pattern; "i")) | select(.clientId | test($pattern; "i"))
| select(.attributes["client.secret.creation.time"] != null) | select((.createdTimestamp // 0) / 1000 < ($now - $min_age))
| select((.attributes["client.secret.creation.time"] | tonumber) < ($now - $min_age))
] ]
') ')
@@ -762,7 +743,7 @@ extraDeploy:
- name: DRY_RUN - name: DRY_RUN
value: "false" value: "false"
- name: MIN_AGE_DAYS - name: MIN_AGE_DAYS
value: "60" value: "15"
volumeMounts: volumeMounts:
- name: keycloak-credentials - name: keycloak-credentials
mountPath: /secrets mountPath: /secrets
-9
View File
@@ -17,14 +17,7 @@ loki:
period: 24h period: 24h
object_store: filesystem # we're storing on filesystem so there's no real persistence here. object_store: filesystem # we're storing on filesystem so there's no real persistence here.
schema: v13 schema: v13
compactor:
working_directory: /var/loki/compactor
retention_enabled: true
delete_request_store: filesystem
compaction_interval: 10m
retention_delete_delay: 2h
limits_config: limits_config:
retention_period: 168h # 7 days
reject_old_samples: true reject_old_samples: true
reject_old_samples_max_age: 168h reject_old_samples_max_age: 168h
ingestion_rate_mb: 15 ingestion_rate_mb: 15
@@ -35,8 +28,6 @@ chunksCache:
resultsCache: resultsCache:
enabled: false enabled: false
singleBinary: singleBinary:
persistence:
size: 20Gi
replicas: 1 replicas: 1
resources: resources:
requests: requests:
+2 -22
View File
@@ -4,12 +4,6 @@ server:
service: service:
servicePort: 80 servicePort: 80
strategy:
type: Recreate
retention: 7d
retentionSize: 6GB
resources: resources:
requests: requests:
cpu: 150m cpu: 150m
@@ -24,7 +18,7 @@ server:
extraScrapeConfigs: | extraScrapeConfigs: |
- job_name: kyverno - job_name: kyverno
scrape_interval: 60s scrape_interval: 15s
metrics_path: /metrics metrics_path: /metrics
kubernetes_sd_configs: kubernetes_sd_configs:
- role: endpoints - role: endpoints
@@ -41,16 +35,9 @@ extraScrapeConfigs: |
target_label: pod target_label: pod
- source_labels: [__meta_kubernetes_namespace] - source_labels: [__meta_kubernetes_namespace]
target_label: namespace target_label: namespace
metric_relabel_configs:
- source_labels: [__name__]
regex: 'kyverno_(http_requests_duration_seconds|controller_.+_duration_seconds|admission_review_duration_seconds)_bucket'
action: drop
- source_labels: [__name__]
regex: 'go_.*|process_.*'
action: drop
- job_name: traefik - job_name: traefik
scrape_interval: 60s scrape_interval: 15s
metrics_path: /metrics metrics_path: /metrics
kubernetes_sd_configs: kubernetes_sd_configs:
- role: endpoints - role: endpoints
@@ -67,13 +54,6 @@ extraScrapeConfigs: |
target_label: pod target_label: pod
- source_labels: [__meta_kubernetes_namespace] - source_labels: [__meta_kubernetes_namespace]
target_label: namespace target_label: namespace
metric_relabel_configs:
- source_labels: [__name__]
regex: 'traefik_(router|service|entrypoint)_request_duration_seconds_bucket'
action: drop
- source_labels: [__name__]
regex: 'go_.*|process_.*'
action: drop
alertmanager: alertmanager:
enabled: false enabled: false
-5
View File
@@ -21,11 +21,6 @@ renovate:
"assignees": ["danijel.simeunovic"], "assignees": ["danijel.simeunovic"],
"reviewers": ["danijel.simeunovic"] "reviewers": ["danijel.simeunovic"]
}, },
{
"matchRepositories": ["**/launchpad"],
"assignees": ["danijel.simeunovic"],
"reviewers": ["danijel.simeunovic"]
},
{ {
"matchRepositories": ["**/forte-helm"], "matchRepositories": ["**/forte-helm"],
"assignees": ["danijel.simeunovic"], "assignees": ["danijel.simeunovic"],
-67
View File
@@ -1,67 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"group:allNonMajor",
":dependencyDashboard",
":semanticCommits"
],
"timezone": "Europe/Oslo",
"labels": ["renovate"],
"reviewers": ["danijel.simeunovic"],
"prConcurrentLimit": 10,
"prHourlyLimit": 4,
"minimumReleaseAge": "3 days",
"ignorePaths": [
"**/*-sealed.yaml",
"cluster-resources/policies/**",
"private/**",
".devbox/**"
],
"argocd": {
"description": "ArgoCD Applications live under infra/, apps/ and the root app-of-apps files. The manager skips any file without an argoproj.io apiVersion, so matching broadly is safe.",
"managerFilePatterns": [
"/^_app-of-apps-.+\\.yaml$/",
"/^apps/.+\\.yaml$/",
"/^infra/.+\\.yaml$/"
]
},
"helm-values": {
"description": "Values files are named <app>-values.yaml, not the default values.yaml.",
"managerFilePatterns": ["/^infra/values/.+\\.ya?ml$/"]
},
"kubernetes": {
"description": "Plain manifests with inline image references. Kyverno policies are excluded via ignorePaths - their images are Go templates, not tags.",
"managerFilePatterns": [
"/^cluster-resources/.+\\.yaml$/",
"/^apps/.+/resources/.+\\.yaml$/"
]
},
"packageRules": [
{
"description": "Every Application carries a second source pointing at this repo at HEAD for $values. HEAD is not a version.",
"matchDatasources": ["git-tags"],
"matchDepNames": ["/forteapps\\.net/"],
"enabled": false
},
{
"description": "Platform chart majors usually carry values-schema or CRD breaks - flag them for a careful read.",
"matchFileNames": ["infra/**"],
"matchUpdateTypes": ["major"],
"labels": ["renovate", "breaking-change"],
"minimumReleaseAge": "7 days"
},
{
"description": "Patch-level platform bumps are routine - let them through faster.",
"matchFileNames": ["infra/**"],
"matchUpdateTypes": ["patch"],
"minimumReleaseAge": "1 day"
}
]
}