---

apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component


resources:
  - ingress.yaml

patches:
  # yamllint disable rule:indentation
  - patch: |-
      - op: replace
        path: /metadata/annotations/cert-manager.io~1cluster-issuer
        value: cluster

      - op: replace
        path: /metadata/annotations/cert-manager.io~1common-name
        value: my-domain-name.tld

      - op: replace
        path: /spec/rules/0/host
        value: my-domain-name.tld

      - op: replace
        path: /spec/tls/0/hosts/0
        value: my-domain-name.tld

      - op: replace
        path: /spec/tls/0/secretName
        value: certificate-tls-domain-name.tld
    target:
      kind: Ingress
      name: nginx
      version: v1
      # yamllint enable rule:indentation
