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

resources:
  - ../../base
  - certificate.yaml
  - frontend-config.yaml

patches:
  - target:
      kind: Ingress
      name: dev-wallet
    patch: |-
      - op: replace
        path: "/spec/rules/0/host"
        value: dev-wallet.zilliqa.com
      - op: replace
        path: /metadata/annotations
        value:
          kubernetes.io/ingress.class: gce
          kubernetes.io/ingress.global-static-ip-name: dev-wallet-zilliqa-com
          networking.gke.io/managed-certificates: dev-wallet
          networking.gke.io/v1beta1.FrontendConfig: dev-wallet
  - target:
      kind: ConfigMap
      name: dev-wallet-config
    patch: |-
      - op: replace
        path: "/data/config.js"
        value: |
          {
              "testnet": {
                "name": "testnet",
                "nodeUrl": "https://dev-api.zilliqa.com",
                "chainId": 333,
                "msgVersion": 1,
                "faucetUrl": "https://testnet-faucet.zilliqa.com/api/v1/faucet",
                "explorerUrl": "https://devex.zilliqa.com"
              },
              "isolated_server": {
                "name": "isolated_server",
                "nodeUrl": "https://zilliqa-isolated-server.zilliqa.com",
                "chainId": 222,
                "msgVersion": 1,
                "faucetUrl": "https://zilliqa-isolated-faucet.zilliqa.com/api/v1/faucet",
                "explorerUrl": "https://devex.zilliqa.com"
              }
          }

namespace: dev-wallet-prd
