apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: forgejo

labels:
- includeSelectors: true
  pairs:
    app.kubernetes.io/managed-by: kustomize
    app.kubernetes.io/part-of: forgejo

images:
  - name: act_runner
    newName: code.forgejo.org/forgejo/runner
    newTag: "3.5.1"
  - name: dind
    newName: docker
    newTag: 27.3.1-dind

resources:
  - resources/db/db.yaml
  - resources/db/user.yaml
  - resources/secrets/admin-credentials.yaml
  - resources/secrets/infra-credentials.yaml
  - resources/secrets/meili-credentials.yaml
  - resources/routes.yaml
  - resources/dragonfly.yml
  - resources/runners/secrets/runners.yaml
  - resources/runners/act-runner-arm64.yaml
  - resources/runners/act-runner-amd64.yaml
  - resources/runners/cache-pvc.yaml
  - resources/runners/act-cache.yaml
  - resources/runners/act-cache-svc.yaml

configMapGenerator:
- name: act-runner-config-arm64
  files:
  - config.yaml=config/runners/config-arm64.yaml
  - daemon.json=config/runners/daemon.arm64.json

- name: act-runner-config-amd64
  files:
  - config.yaml=config/runners/config-amd64.yaml
  - daemon.json=config/runners/daemon.amd64.json

helmCharts:
  - name: forgejo
    repo: oci://codeberg.org/forgejo-contrib
    releaseName: forgejo
    namespace: forgejo
    version: "9.0.0"
    valuesFile: config/values.forgejo.yaml
    skipTests: true
    apiVersions:
      - "networking.k8s.io/v1/Ingress"
  - name: meilisearch
    repo: https://meilisearch.github.io/meilisearch-kubernetes
    releaseName: forgejo-indexer
    namespace: forgejo
    version: "0.10.1"
    valuesFile: config/values.meilisearch.yaml
    skipTests: true