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

namespace: scilla-server-prd

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

patches:
  - target:
      kind: Ingress
      name: scilla-server
    patch: |-
      - op: replace
        path: "/spec/rules/0/host"
        value: scilla-server.zilliqa.com
      - op: replace
        path: /metadata/annotations
        value:
          kubernetes.io/ingress.class: gce
          kubernetes.io/ingress.global-static-ip-name: scilla-server-zilliqa-com
          networking.gke.io/managed-certificates: scilla-server
          networking.gke.io/v1beta1.FrontendConfig: scilla-server
  - target:
      kind: Service
      name: scilla-server
    patch: |-
      - op: add
        path: /metadata/annotations
        value:
          beta.cloud.google.com/backend-config: '{"default": "scilla-server"}'
