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

namespace: flxn-prod

resources:
- namespace.yaml
- ../../base
- configmap.yaml
- ingress.yaml

images:
- name: git.yohler.net/kyle/flxn-app
  newTag: latest
- name: git.yohler.net/kyle/flxn-pocketbase
  newTag: latest

commonLabels:
  environment: prod

patches:
- patch: |-
    - op: replace
      path: /spec/template/spec/containers/0/resources/requests/memory
      value: "1536Mi"
    - op: replace
      path: /spec/template/spec/containers/0/resources/limits/memory
      value: "3Gi"
  target:
    kind: Deployment
    name: flxn-app

- patch: |-
    - op: replace
      path: /spec/type
      value: NodePort
    - op: add
      path: /spec/ports/0/nodePort
      value: 30084
  target:
    kind: Service
    name: flxn-app

- patch: |-
    - op: replace
      path: /spec/ports/0/nodePort
      value: 30097
  target:
    kind: Service
    name: flxn-pocketbase
