apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: mainnet-replica-0-5-14
commonLabels:
  network: mainnet
  provider: internal

bases:
  - ../../../envs/mainnet-gen5-berlin
  - ../../../scripts

resources:
  - ../../bases/data-transport-layer
  - ../../bases/l2geth-replica
  - ../../bases/servicemonitors
  - ../../bases/replica-healthcheck
  - ../../bases/replica-healthcheck-v1
  - ./volumes.yaml

images:
  - name: ethereumoptimism/data-transport-layer
    newName: ethereumoptimism/data-transport-layer
    newTag: 0.5.21
  - name: ethereumoptimism/l2geth
    newName: ethereumoptimism/l2geth
    newTag: 0.5.14
  - name: ethereumoptimism/replica-healthcheck
    newName: ethereumoptimism/replica-healthcheck
    newTag: 0.3.6
  - name: ethereumoptimism/replica-healthcheck-v1
    newName: ethereumoptimism/replica-healthcheck
    newTag: 1.0.6

patchesStrategicMerge:
  - ./patches/dtl.yaml
  - ./patches/l2geth.yaml
  - ./patches/replica-healthcheck.yaml

patches:
  - path: ./patches/l2geth-volume.yaml
    target:
      group: apps
      version: v1
      kind: StatefulSet
      name: l2geth-replica
  - path: ./patches/dtl-volume.yaml
    target:
      group: apps
      version: v1
      kind: StatefulSet
      name: data-transport-layer

configMapGenerator:
  - name: replica-healthcheck-v1
    envs:
      - ./replica-healthcheck-v1.env
